What Is Wrong With Our Web Apps? Friday, December 10, 2004

Last night Rob Smith gave a great presentation on Tapestry at the St. Louis Java SIG. I liked a lot of the things that I learned about Tapestry but as I listened and learned I was thinking about what sorts of problems does Tapestry really solve for me. Then I started thinking about how that relates to many other web app frameworks that are out there. Just off the top of my head without spending too much time thinking about it or Googling or anything like that, I came up with this list of tools that help us build web apps...


  • JSP

  • Servlet

  • Java Server Faces

  • Velocity

  • Tapestry

  • Struts

  • Spring

  • Tiles



Several of those can be thought of as being direct competitors of each other.

These technologies all try to help improve our web apps by making it easy to do things like separate the presentation layer from the data. Some provide tools to help with state management. Some help with scalability. Those are all important things to address and sometimes are difficult to address. If the tools can help solve those problems that is a good thing of course.

Web apps are hard to build. Few would still entertain fantasies about some magic web tool that solves all of the Enterprise's problems, is easy for everyone in the Enterprise to use and doesn't call for much development time. We all know that can't happen. If we didn't know that in the beginning, we know it now.

I believe that a lot of things are well suited as web apps and for the purposes of this conversation I am using the term "web app" to mean an application that uses a web browser as its primary front end. However, I am wondering if a lot of us are spending a lot of time and effort (that sounds like money to me) building web apps that really shouldn't be web apps. At last year's No Fluff Just Stuff Java Symposium in St. Louis I remember a comment that Bob Lee made during one of the expert panels. Bob said something very close to "Can we all just agree to stop building browser based apps?".

I don't think that web apps are bad. I think a lot of things work very well as web apps. In addition, as a Software Engineer I find working with a lot of the web app frameworks to be a lot of fun. I am just wondering if we are collectively trying to push pegs into the wrong shaped holes too often.

More and more I am feeling like we really need a fundamentally different (and better) way to build distributed systems. I can't exactly put my finger on it, but somewhow I feel like we are solving a lot of the wrong problems and that in 6 months or 6 years or however long it takes us to come up with this next generation of ideas we are going to look back and wonder how we ever managed to operate our businesses any other way.

What do you think about any of that? Let me throw out some specific questions for thought.

What problems do you have in building web apps that are not solved very well by the existing frameworks?

What types of projects have you been involved with that were architected as web apps that should not have been and what made them poor candidates to be built as a web app?

What types of projects have you been involved in that were not architected as web apps that should have been and what made them so well suited to be web apps?

What do you think is next?

2 comments:

Weiqi Gao said...

Isn't it ironic that Bob Lee is working for Google now, supposedly building browser based apps?

The abundance of "web frameworks" is an indication that we haven't find the right answers to the questions "What is it that we are doing?", "What is the web?" and "Are the current crop of tools adequate?"

My answer to these questions are pessimistic:

We either don't know what we are doing, or we want to do what we have always done before, only with newer shinier tools.

The web is essentially REST, a framework defying distributed architecture not for applications but for linked data.

The standardized portion of the browser is inadequate for richer applications. The nonstandardized portion of browsers provide some relief.

Here is the problem that I want my framework to solve: Make it so that not every user gesture that requires interaction with server services results in a new page load!

What's next? As far as servlet based framework goes, we've beaten the model 2 architecture to death. May be it's time to go back to model 1 :) Similarly for scriplets ::)

Rewire said...

Hey Jeff,I am a student of a Computer Engineering school in greece.I was reading your blog and i want to answer your question as a feedback.So i want to tell you my story;
When i was at second semester i began to study and code to Java.Simply i loved it!Im a huge fan of Java and love to code everyday.
So,after learning the basics of JavaSE(Swing,Threads,Sockets) i started learning JavaEE.
In the begging i was very confused;I was a self-starter and found that there are many Frameworks(and many companies that support them) out there.I didn't know which to choose and why.
I started coding with JSP/Servlets(later i abandoned JSP/Servlets and wrote only JSF code),adopting the famous MVC architecture and building 2-tier WebApps with my Tomcat.
In the meantime i had to learn all the WebDesigning languages(HTML,CSS,Javascript) to make my web-app look good.
After that i still had to make another desicion for my backend(for making my WebApp 3-tier and distributed);whether to use EJB 3.0 or Spring 3.0.
I chose EJB 3.0,coded with that technology but found that most JavaEE developers prefer Spring over EJBs.
The reason(from what i have read) was that previous versions of EJB where adding more complexity to Enterprise apps,instead of simplyfying them,making Spring framework as a light-weight alternative.
So as a new programmer i wanted to also learn Spring 3.0.After studing Spring i realized that i had to deal with many lines of XML and Annotations.So,i had many questions about that fact.
I saw the differences between those frameworks but still couldnt understand why there have to be 2 frameworks,instead of one.Why i have to remember all of these,while the concept is still the same?
About a month ago i wanted to search about the famous Groovy and Grails framework.So i stumbled upon the video "building twitter in 90 minutes" and found myself writing Grails code and reading Grails books
(I have to say Grails is my favorite framework at the moment,because it follows the "convention over configuration" concept).




So i am asking with questions;Why there are so many frameworks in the WebApp software industry? and why building WebApps makes the situation complicated?.Why someone have to be a web-ninja to build a rich WebApp?
Why there are so many languages(HTML,CSS,Javascript,Flash,Flex,ActionScript etc..) only for the GUI?Why there are so many languages and frameworks for the Web(PHP,Ruby on Rails,Python Django,Groovy and Grails,Scala,Java(JSF,Struts,Spring Web MVC,Spring Web Flow,Spring Roo,JSP/Servlets,EJB,Spring)etc..)?
Why there are so many AJAX frameworks(DWR,IceFaces,GWT etc..)?


I think a newcomer will really be frustrated and discouraged to learn all these techonogies or choosing to learn one over another.
I think all these technologies are related and an experienced programmer can easily learn the ones who dont know.But they dont have to be so many.Why do you support Spring and Spring Roo,while there is already Grails(where Grails equals Spring + Hibernate + Sitemesh)?


In your's grails blog you said:

/*
More and more I am feeling like we really need a fundamentally different (and better) way to build distributed systems.
I can't exactly put my finger on it, but somewhow I feel like we are solving a lot of the wrong problems and that in 6 months or 6 years or however long it takes us to come up with this next generation of ideas we are going to look back and wonder how we ever managed to operate our businesses any other way.
*/

Well i think you can put your finger on it,you can come up with an idea and invest your time in it,that can make the developers world much better!You should focus on that and leave behind for a while all this framework jungle.


So,thats my opinion and hope that it helped!I am wishing you all the best...


Good luck!