Choosing Java Frameworks for Performance

Discussions

News: Choosing Java Frameworks for Performance

  1. Choosing Java Frameworks for Performance (12 messages)

    The Platform Solutions Manager at a large digital agency in the world recently asked me:

     

    If one was planning to develop a major Internet property using Java and needed to select a combination of frameworks with the following priorities in the following order:

     

    1) Lightweight and responsive – most important

     

    2) Rich internet application development (RIA):

     

    a. RESTful URL structure

     

    b. Built-in Client side validation or some JavaScript to make the application more robust

     

    c. Built-in AJAX support

     

    3) High developer productivity - rapid application development (RAD):

     

    a. Convention over configuration

     

    b. Scaffolding

     

    c. Inversion of Control/Dependency Injection

     

    What would you recommend? I’m looking at the Tapestry/Spring/Hibernate combination. And he referenced this article.

     

    I get asked questions like this fairly often. My favorite looks like this:

     

    1) Lighweight and responsive - Jetty

     

    2) RIA development: Build all of the client logic in JavaScript using JQuery, ExtJS and packaged for deployment with Appcelerator Titanium. Make JSON calls over HTTP Post requests to the backend.

     

    3) RAD development: For the server-side use NetBeans, annotations, and your own custom object library.

     

    PushToTest is building a new Web front-end to TestMaker. Spring is still a fine choice to build the basic objects. However, using Java annotations is powerful enough and there are many choices there. I don't like Hibernate because object-relational mapping eventually becomes a scalable bottleneck - especially if you need to persist XML data in the database.

     

    I choose to stay away from scaffolding systems with the expectation that the time it takes to eventually remove the scaffold is greater than the time saved in using the scaffold. I like plain old objects for easy maintenance over time.

     

    I'm only one voice, so I forwarded this to my friends and partners. Here are the replies:

     

     

    1) Ron Warshawsky

    I would strongly suggest to consider extJS or GWT. I have lots of experience with them and like them a lot.

     

     

    2) William Martinez Pomares

    We had two worlds, one the plug and play, compose yourself, little specific frameworks, and the BIG, bloated Java EE Spec.

     

    The framework combinations still has the same problem that the article mentions: You have to glue up all together. And you have version hell and jar hell all over the place. Still, they were light and popular.

     

    Java EE evolved too. The new version 6 has a Web Profile that eliminates 80% of the fat. The reference server, Glassfish, is just 30-80 megs and contains all that you need, mostly reference implementations of all standards. Let's got through the list:

     

    1. GlassFish is running on top of OSGi, with lazy initialization, so it is up and running in 10-30 seconds. Deployment can be done incrementally, thus modifying one part of the application can be automatically redeployed and the changes can be seen in less that 1 second, with no session loss.

     

    2. The standard supports Java Server Faces, which is a MVC just like Struts or Spring, but has many nice features. For page composition it can use JSP or Facelets which is becoming very popular. Is support Ajax frameworks like PrimeFaces. Any EJB you create now can be exposed as RESTFull services with a couple of clicks and some annotations.

     

    3. Now you can create one EJB with just writing @Stateless, all the rest is by default (convention over configuration). Most of the XML is now optional as you can write all in annotations. With NetBeans, you can import all entities from a database, create managing EJBs and create JSF pages for CRUD using just wizards (scaffolding). CDI is all over the place, local and remote with ejbs, just write @EJB and the name of the ejb to inject.

     

    So, yes, you can go Spring and Hibernate. I would go JSF and JPA, standards and easier to use. Not sure about Tapestry, never used it, but before selecting one option I would give it a try, select the most critical issues you need to resolve and try to use one or the other tool and see which fits better for you.

     

    3) Ole Lensmar

     

    To be honest, I really haven't worked with any of these so my "recommendation" is based entirely on what I've read and seen on the web - my spontaneous suggestion would actually have been wicket / spring, but according to the article that isn't the best of choice :-) I have seen a lot of negative comments on Tapestry, so I personally wouldn't consider that based on this article only. Worth noting might be that the article is almost one year old, a long time in java-framework-world.

     

    How about grails? or the play framework? http://www.playframework.org/

     

    cheers!

     

    4) Andy Oliver

    There is something else he should consider, market forces. There is always another way of doing something but some things win and some things lose. In general Spring won. If you want something very AJAXy then GWT is the most popular among Java developers. If you are hiring more web-designer-y type people then JQuery + something on the backend (like Spring).

     

    I disagree with the author's popularity methodology in the report. I can tell you that the facts on the ground are pretty different. JSF may result in more searches, etc. because it is more complicated and people searching for springmvc may be searching for more specific topics.

     

    -Andy

     

    PS I sponsored Tapestry into the ASF. While I continue to like the idea, it has never achieved the popularity of other frameworks.

     

     

    What do you think?

     

    -Frank

     

     

     

     

     

     

    Threaded Messages (12)

  2. Grails or Play! Framework[ Go to top ]

    With Grails (2.0 will be soon out) + IntelliJ IDEA:

    - superior productivity (in combination with IntelliJ IDEA)

    - RIA UI widget available via plugins

    - many useful + powerful plugins available (security, full-text search etc.)

    - good enough --> very good performance (if properly configured + one know what one does)

    - RESTful style URLs

     

    Play! Framework + Japid Template Engine

    - superior performance (with Japid Template Engine) + super lightweight

    - Designed at it's core for RESTful + Stateless Architecture and Share-nothing Architecture (of course, except DB and Cache)

    - Coding with pure Java (if use Japid), hot reloading of changes, no server restart required.

    - built-in support for efficient implementation Server-Push: Comet or WebSocket 

    - productivity is ok (not so good as Grails + IntelliJ IDEA)

    - RIA UI widgets only avaiable over JS frameworks (jQuery UI, ExtJs, Yahoo UI etc.)

  3. Care to elaborate on "if properly configured + one know what one does"? I thought Grails was using the JVM under the covers. Correct?

  4. technology stack under cover:

    - Spring + Spring MVC

    - Hibernate as ORM (Hibernate is abit tricky to get all that performance out of it, even for pro, but very easy to do something wrong for novice)

    - Groovy + Java as language

  5. GWT MVP Spring Data?[ Go to top ]

    Could you please comment the technologies for the client like

    Desktop:Swing

    Web:GWT

    Mobile: Android

     

     

    Design PAttern:MVP or View Activity Model

     

    Spring Injection would be used along with it.

     

    Instead of hibernate low performance, We could Spring Data(JDBC) API. It would run on Tomcat.

     

    Please provide comments on the above architecture.

  6. GWT MVP Spring Data?[ Go to top ]

    Could you please comment the technologies for the client like

    Desktop:Swing

    Web:GWT

    Mobile: Android

     

     

    Design PAttern:MVP or View Activity Model

     

    Spring Injection would be used along with it.

     

    Instead of hibernate low performance, We could Spring Data(JDBC) API. It would run on Tomcat.

     

    Please provide comments on the above architecture.

    We could use RESTful service in the middle layer. Please provide your comments on this.- Naveen Gayar

  7. Consider JBoss Seam[ Go to top ]

    I would recommend to consider JBoss Seam. It is one of better frameworks for end to end development and is quite mature too. 

    • Create your short list :
      Evaluate different framework using your criterias (Lightweight and responsive, ...)
      This will help you to create your short list (2/3 framework).
    • Evaluate and benchmark each of them.

    Check Matt Raible's articles, they can help you : http://static.raibledesigns.com/repository/presentations/Comparing_JVM_Web_Frameworks_33rdDegree.pdf 

  8. I Suggest some frameworks for each listed features;

    1)Lighweight and responsive

    ------------------------------------------------------

        *tapestry

          *jsf

     

    2) RIA development: Build all of the client logic in JavaScript using JQuery, ExtJS and packaged for deployment with Appcelerator Titanium. Make JSON calls over HTTP Post requests to the backend.

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    * ZK

    *SEAM

    *ORACLE-ADF

     

    3) RAD development: For the server-side use NetBeans, annotations, and your own custom object library.

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    *SPRING!

  9. Developer[ Go to top ]

    Oracle ADF and Weblogic 10.3

    jdeveloper

  10. For RIA

    ZK. Way ahead of the rest.

    Who wants to learn tags and all if you can do it all in Java. Of course if you want to make your life difficult, you can use tags too.

     

  11. Zk[ Go to top ]

    Can you describe pros & cons of ZK? I learned and played with it but haven't actually used it in real application. How do you use it in your application?

    If you don't mind, you can email me dhaval04 at gmail dot com for offline conversation. I am interested in developing application in ZK.

  12. JBoss Seam[ Go to top ]

    Everything u need to develop your web application, i highly recommend considering it