InfoQ

News

Java and Web Application Development: Is Too Much Abstract A Bad Thing?

Posted by Scott Delap on Jul 26, 2007

Community
Architecture,
Ruby,
Java
Topics
Web Frameworks
Tags
Django ,
Ruby on Rails
RedMonk analyst, Michael Coté, has written a lengthy opinion piece comparing Java web application development to to development with frameworks such as Rails and Django which embrace the idea of building web applications closer to the core of their design. The commentary stems from a statement by Bill de hÓra:

...My sense of it is that on Java, too many web frameworks - think JSF, or Struts 1.x - consider the Web something you work around using software patterns. The goal is get off the web, and back into middleware. Whereas a framework like Django or Rails is purpose-built for the Web; integrating with the internal enterprise is a non-goal...

Coté then proceeds to explain the abstraction levels of a typical Java web application in a somewhat sarcastic-al tone. Summarizing his points:

    - The VM itself is an abstraction from the OS.
    - Libraries such as JNDI or JAAS start as classes that model possibilities.
    - A UI may need to be swapped out in the future so abstract it.

Coté does go on to say that some abstractions such as file systems, sorting algorithms, collections work well for Java. However in general he feels:

  • By the time you’ve written your abstraction layer, you’ve essentially written your own framework. Chances are, you’re not a good framework writer, and it’s going to suck, and you’re going to realize that one or two versions down the road and re-write it.
  • New frameworks and ways of building applications will come along that you want to use (web applications, clustering, Ajax, mobile access) that don’t readily map to the metaphors, idioms, and expectations of your abstraction layer. At this point, you’ll get upward leak as the new things you want to do are bolted onto your abstraction layer.
  • The chief reason it’s crap, and to Bill’s point, is that you’ll always be sacrificing fully taking advantage of things you’ve abstracted away, or making them harder.

The theory is then suggested that developers using technologies such as LAMP, Ruby, and Django see themselves as building web applications. Java developers on the other hand are more of the mentality that they are building an application which happens to have a "view" of the web.

Java Developers vs. Web Developers by Matt Raible Posted Jul 26, 2007 10:10 AM
Come again? by Steven Devijver Posted Jul 26, 2007 10:35 AM
"Replace"ability of the technologies by Renat Zubairov Posted Jul 26, 2007 11:59 AM
Re: replaceability by Alex Popescu Posted Jul 26, 2007 12:56 PM
RoR: is too little abstraction a bad thing? by Jason Carreira Posted Jul 26, 2007 12:26 PM
Re: RoR: is too little abstraction a bad thing? by Michael Campbell Posted Jul 27, 2007 7:54 PM
The point is... by Remember Objective Posted Jul 26, 2007 4:06 PM
  1. Back to top

    Java Developers vs. Web Developers

    Jul 26, 2007 10:10 AM by Matt Raible

    To me, it seems like the Java Web Frameworks were built by Java Developers, whereas PHP, Ruby and Python frameworks were built by web developers. Java frameworks target Java developers, the others target web developers. It'd be cool if a Java web framework targeted web developers, but that may be difficult to do.

  2. Back to top

    Come again?

    Jul 26, 2007 10:35 AM by Steven Devijver

    The only point that I got from this article is that when programming in Java *people* tend to abstract things too much. In case of JSF that's certaintly true.

    But look at Spring MVC. It's the most powerful way to plug into any part of the HTTP request/response lifecycle along the lines of the MVC pattern. And yet it's pretty intuitive to use since you can ignore the intersection points you're not interested in.

    As far as I understand Rails and Django also implement the MVC pattern.

    I guess I don't get the point of this article, at all.

  3. Back to top

    "Replace"ability of the technologies

    Jul 26, 2007 11:59 AM by Renat Zubairov

    I guess the topic of replaceability of the underlying technologies was already discussed multiple times and I guess this article raises it again, when author considering replacing technologies usecase as irrelevant I strongly disagree, because of different development environments, different OSs and flexibility we gain from these abstractions.

  4. Back to top

    RoR: is too little abstraction a bad thing?

    Jul 26, 2007 12:26 PM by Jason Carreira

    When you look at things like RoR it's like they were designed to build prototypes... No referential integrity? Who needs it anyway? We won't ever need more than one way to do x, y, or z, so let's make it really hard to do it any way but the way we've hard-wired in. That's more like using Microsoft (our way or the highway) tools.

    Sure, abstraction can be taken too far *cough*JSF*cough* but it's put in there for a reason, because we've seen these needs before and we don't want to paint ourselves into a corner.

  5. Back to top

    Re: replaceability

    Jul 26, 2007 12:56 PM by Alex Popescu

    I guess the topic of replaceability of the underlying technologies was already discussed multiple times and I guess this article raises it again, when author considering replacing technologies usecase as irrelevant

    I don't know what camp Michael Coté is from, but even Guido van Rossum (as in Python creator) expressed his concern about the web framework technology lock ins.

    bests,
    ./alex
    --
    .w( the_mindstorm )p.
    ________________________
    Alexandru Popescu
    Senior Software Eng.
    InfoQ TechLead&CoFounder

  6. Back to top

    The point is...

    Jul 26, 2007 4:06 PM by Remember Objective

    Java plain sucks for web apps.

    The only thing that'll save it is Grails.

    That'll be 25 bucks.

    --Johnny "Article Writer" Bravo

  7. Back to top

    Re: RoR: is too little abstraction a bad thing?

    Jul 27, 2007 7:54 PM by Michael Campbell

    When you look at things like RoR it's like they were designed to build prototypes... No referential integrity? Who needs it anyway? We won't ever need more than one way to do x, y, or z, so let's make it really hard to do it any way but the way we've hard-wired in. That's more like using Microsoft (our way or the highway) tools.

    Sure, abstraction can be taken too far *cough*JSF*cough* but it's put in there for a reason, because we've seen these needs before and we don't want to paint ourselves into a corner.


    Jason, c'mon. The FUD is a bit much. There's nothing in Rails that negates referential integrity, and I haven't heard anyone (realistically) say there's no need for it. And, last I checked, it's in the database, where Rails can neither dictate its absence nor presence. Nor is Rails "really hard" to do many, many things that are defaulted.

    Webwork is great - I have a commercial site on it. But other things can be good too. And lastly, Rails never proposed to be the end-all be-all. It's SUPPOSED to be for the one corner you seem so afraid of being in. Granted, some zealots have tried to make it be a lot more than that, so blast those zealots, not the framework.

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.