Sunday, August 20, 2006

Mailing Lists and WWW

Long after email announced dead mailing lists still constitute for me the main source of information in the most important for me topics.
Their publish-subscribe nature and the universal availability makes them an ideal tool for many communities of practice. The archives of many mailing lists represent major source of information on many topics - but the exposition of this information is far from being perfect. I can see one small improvement that would help a bit - the mailing list servers should put in the footer of the letter a link to the archived version of it. This would spare a bit of work for anyone wanting to publish a link to some interesting email conversation and in effect would improve the flow of ideas between www and email.

Saturday, August 19, 2006

Why Scaffolding? Validation and learning.

The text below was first posted on the Catalyst mailing list. It is an analyzis of value of the code generation technique that was popularized as 'scaffolding' by Ruby on Rails. It describes what makes the scaffolding so efficient in converting newcommers into avid users of the framework.

I would like you to imagine you in the position of a developer that has some idea for a web project, thinking about trying a new web programming framework. There are many to choose from, or you can also go the simple way and use CGI.pm or develop something for his own - how would you decide? Every framework is lots of code, lots of documentation so it's not an easy task. After reading those mountains of manuals you can discover that some limitations make the framework not really fitting to your project (some related thoughts in http://www.artima.com/weblogs/viewpost.jsp?thread=8826). This is that risk that scaffolding mitigates - you generate your application with minimal effort and you have a working example tailored to your database schema. You don't need to think if a example from the manual can be adopted to your data structures - you have it adopted automatically. This is the first advantage of scaffolding - easy evaluation.

The other important advantage is that it helps in the learning process. You get a non trivial working example. And again this example is based on your database schema - from the starting point you at once know much about the program. You don't need to internalize the arbitrary business rules of some unfamiliar application - the business rules are yours - so at once you can start and play with it. And a good scaffolding will give you much space for simple but meaningful modifications to tweak and play with.

Of course there are also disadvantages to code generation. It is impossible to come with a good schema to update the generated code when you release a new version of the generator and we don't want the programmers who use the scaffolding to be stuck forever to the version that they used the first time. One solution can be to limit the code generator to really most trivial part and move all other logic into traditional libraries that just happen to cooperate with the generated code - and this is what I try to do with InstantCRUD.