Tuesday, April 14, 2009

Agile Architecture talk from Coplien

For a nice glimpse at the future of programming as it evolves, I strongly recommend this talk from my favorite architecture guy: Coplien. Prerequisites: get a beer, slippers and a robe, the conclusion is not light reading!


http://blog.jaoo.dk/2009/03/04/handling-architecture-in-the-agile-world/


Some of the things that deserve emphasis:



  • The need that the application’s own model matches the model the users have in their head, i.e. the “view of the world” is obvious, but, unfortunately, it is not obvious to many…

  • Architecture is the essence of structure (the form), not the structure itself.

A good agile/lean architecture:



  • supports change

  • Supports user interaction

  • Lowers discovery costs, rework

Other memorables:



  • Habitable code – code where the designer could choose to live. Do you like your code? Would you live with it?

  • Refactoring is bad! We want to avoid re-work…you need a system view, not code–as-you-think!

  • The long forgotten purpose of OO is to capture the model from the user’s mind, not create toys for developers!

  • (Razie says hmm): Do object diagrams instead of class diagrams – users think in terms of instances, not abstract classes.

  • The GUI is not something between the GUI and the model, is a tool allowing the user to mess with the model! Kent Beck said “you can’t hide a bad architecture behind a good GUI”.

  • (Razie says hmm): Requirements are the LAST thing you look at when doing architecture!

  • Need architecture upfront, code just-in-time!

  • Java is a TOY language.

  • Scala’s got traits, baby!

This is the brief follow up: http://blog.jaoo.dk/2008/12/20/jaoo-video-2008-james-o-coplien/



  • Peter Coad’s now a pilot, but his role-based color modeling should’ve taken off!

Thursday, March 12, 2009

Components vs Frameworks

ABSTRACT: One of Razie's infamous uber-principles: I see frameworks as being the opposite of components. When architecting parts of a system, use this to decide on one or the other - this point of view could enrich the designer's arsenal of decision principles.
TAGS: architecture, design, principle

When you're talking about "writing code", the best option is generally reusing an existing piece of code and customizing it. Reusable pieces of code are normally in the category of either components or frameworks.

Components are more or less black boxes with well defined inputs/outputs and customization settings.

Frameworks, while they may also have defined inputs/outputs, they generally cannot be used as is. You write "plugins" (i.e. proxies or strategies) that customize a piece of the puzzle and then combine them to achieve the functionality the framework is intended for.

I see frameworks as being the opposite of components, given how they're used: while components are pre-determined pieces of functionality, which you combine to achieve a flexible structure, frameworks define first an immutable structure and then allow you to customize some aspects of it.

Patterns fall sqarely in the framework category, since they prescribe a structure with roles to fill out.

In terms of initialization and configuration, components get everything up-front, while frameworks usually will use a callback to retrieve configuration, when needed. At least it's easier to always follow this pattern: use of factories indicates frameworks, for instance.

Depending on the level you're at and your point of view, it is relative whether a given library falls in either category. For instance, a component could take a "strategy" as an input.

When you look at a system, you will see components made of frameworks, made of components, made of frameworks etc. A system is made of sub-systems, which can only be of either kind :) since they're the two opposite forms of sub-system architecture.

CONCLUSION

Making the distinction and decision between component vs. framework, when designing, is important, since the denomination of "component" carries lots of semantics: independence, self-sufficiency, black-box, upfront initialization etc.

Frameworks allow flexibility in the detail but are inflexible structure-wise. A framework that is too flexible is called a mess.

A framework with all variabilities fixed is a component.

Keep thinking and have fun, eh? I certainly am!

Tuesday, February 10, 2009

Stupid feedburner

Sorry folks, after many troubles and wasted time trying to get my feedburner feed to work, AFTER migration to google, I am giving up on using feedburner. It's the worse cloud ever and the worse migration of anything, ever!

This will be my feed. Yahoo pipes rock!

xxx url

Cheers!

[later edit] ... came to my senses...they still suck, but you should use this feed instead: http://feeds.razie.com/Razvan