Sunday, December 10, 2006

Flexibility Vs. Complexity

One of the features in ASP.Net 2.0 is dynamic compilation - the ability to execute your asp.net code without the need to compile it first.
Instead ASP.Net has a FileSystemWatcher that check for changes in *.cs files and automatically reloads them.

Although this feature is good in many ways, I'd like to focus this post on a specific drawback - design time.

More Flexible Or Too Messy
The dynamic compilation has the same drawback like .Net 3.0's anonymous types do.
Whilst you do get more flexibility to your code\deployment, I find it hard to believe a good design-time support will be - or I dare say can be available.

Even today when your WebSite application becomes bigger than 50~ web-pages, it is very annoying that your Intellisense starts to act funny because you wrote textBox instead of TextBox in one of your classes.

In my opinion, although the wish to extend and to make the language richer and more flexible is good, it can easily make your code too complex to maintain.
A good example to this tradeoff, is the reason why multiple inheritance is not supported in the .Net Framework.

No comments: