The pain in the web application development frameworks around

I've been working on a big project for more than a year now and during that year I've played with many web development frameworks with different approaches to tackle modern developer problems. Honestly, I've been impressed with some of the frameworks on how simple it's designed and the elegance in their usability. I even wrote some articles about that. But that didn't last long!

Web Development

In any web development project, things start out cleanly organized and well-designed, and by adding more features, functionality, code, templates, and javascript, the application becomes very painful to maintain. Applying modularity concepts become harder, following good design rules become impossible, every piece of the web page is conditional. It's simply a mess!

I'm still trying to figure out the best way to split a project into smaller pieces to maintain its tidiness, cleanness, and maintainability. Out of my experience, I can list some of the issues I've seen inherent in all of the frameworks I've used so far.

  1. Template language is not HTML/XML, so it basically breaks most of HTML/CSS/JS code highlighters, scrambles your clean HTML with lots of includes, if conditions, loops, etc. Think of editing the design and forgetting to change the error state, branched code that you missed to see, Sigh.
  2. Common bases are not really common! You start out by writing a base template for your whole application UI, which potentially contains header, footer, main container, and etc. and after a while you discover that you need to customize that base based on some conditions, you need to parametrize its widgets to look differently in different pages. Then you discover that you actually need more than one base, so you create a base for those bases :) You are actually doing OO inheritance but in HTML templates, OO inheritance suck as in HTML inheritance.
  3. Where/when to load a specific Javascript library? In the base? Can we load that on demand? Is there scripts dependency? Is there a case where javascript libraries are loaded twice? Same for CSS. Trust me, this happens all the time.
  4. Maintaining versions of javascript libraries inside your templates is also a mess, with the best code organisation schemes you are still in charge of managing versions, ensuring conflicts doesn't happen, making sure you are loading the correct version every time you need to load a library.
  5. No debugging in template code, most of the frameworks doesn't allow you to debug template's code, you are on your own. Use traditional techniques like printing, logging, generating non-sense output to understand what's actually going wrong in the template. This wastes tons of time.
  6. 95% of the time, the template language is just a new language, you need to learn it, understand its tricks, you are limited by its capabilities/stupidity, and guess what? Every framework is inventing its own language and conventions!
  7. Very few frameworks are designed for today's demands, asynchronous processing, distributed workers, distributed caching, Comet, NoSQL backend, multi-tier REST communication, etc.

Conclusion

As it appears, most of the framework developers were focusing on giving you cool backend features, MVC, and neglecting those issues affecting the UI. I deeply think that a revolutionary solution to those inherent problems must rise soon.

That's why some frameworks started looking at those problems and introduced some interesting solutions. One of those frameworks is Lift.

comments powered by Disqus