• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

which framework is better to learn for a newbie?

 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys,
i just want an opinion from the experts as to which framework is better to learn for a person who doesn't know either struts or JSF yet? i read up on the pros and cons of both. but i really want to get an experts opinion on it?

what is the mostly used framework used in the real worl applications and which one should i strive to learn?

hoping for a response
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The subject of which framework is best is often hotly debated. Ask this question to 6 developers and you'll get 6 different answers. Here's my two cents, trying to be as objective as possible.

If you're looking for the most "mainstream" approach, meaning the one which appears to be supported by the greatest number of vendors and the java community at large, I'd recommend that you go with JavaServer Faces (JSF). It's the only web framework that is officially part of the J2EE spec. It's good also from a "newbie" point of view, because it's supported by a number of "drag and drop" type tools that make it fairly easy to create applications. However, the actual mechanism of JSF is quite complicated, and if you are really serious about writing production applications in JSF, you need to spend some time learning it.

If you're looking for the most commonly used framework, Struts wins in that category. It's used in more currently running applications by far than any other framework. However, that will probably change. There aren't nearly as many new projects using Struts as there were a year or two ago.

In my view, Struts is also simpler than JSF if you're not using a GUI drag-and-drop tool.

Back when Struts first came out, it was a choice between using Struts or just writing JSPs and Servlets and maybe creating your own framework of sorts. Now there are dozens of Web Frameworks competing for attention. When Ruby on Rails became an overnight sensation, several Java frameworks sprang up trying to emulate the ease of use of Ruby on Rails.

One Framework that I tried out recently and really liked is Stripes. I'd have to give it the prize for the most easy to use.
[ November 13, 2006: Message edited by: Merrill Higginson ]
 
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Merrill Higginson, would it be possible Stripes getting popular and replace struts instead ? what is so good in Stripes ?
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One Framework that I tried out recently and really liked is Stripes. I'd have to give it the prize for the most easy to use.

+1

what is so good in Stripes ?
  • No configuration files. All configuration is done using Annotations.
  • Full Java5 support. Stripes doesn't really work with any version less than Java5.
  • Only 3 required JAR files to get up and running. Any real app will need more, but 3 is the fewest I've seen a framework require just to display pages and process actions
  • Easy/Fast learning curve.
  • Documentation, documentation, documentation. Very good documentation.
  • Ajax ready. Ok, I threw in a buzz word, but Stripes is ready to process Ajax requests in the same manner as a typical request. And you can use your favorite Ajax library (prototype, json, etc) of your choice.
  • Small taglib - the taglib for stripes is primarily for processing forms so there isn't a bunch of complicated tags to use.
  • JSTL friendly


  • That's just to name a few. I find something else I like every day that I use it. Keep in mind that Stripes is an action based framework, much like struts, just easier, IMHO. It's not a component oriented framework like JSF, Wicket, and Tapestry. That is to say there isn't anything like <stripes ataGrid/> or <stripes:calendar/>. Stripes figures that you have your own favorite tag libs and the JSTL for all your other needs. So the framework stays pretty slim.

    Ok, I am off the soap box now.
    [ November 14, 2006: Message edited by: Gregg Bolinger ]
     
    Nakata kokuyo
    Ranch Hand
    Posts: 472
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    thanks for warm reply Gregg Bolinger ,

    i believe the life cycle of framework always depend on population of user supported, struts and jsf are current most popular and commonly use framework at the moment, hence , i feel it worth to learn(at least it help in interview ), but what about stripes ? do you think it will getting popular ? or perhaps it replace struts in one day ?

    can you list some bad point for stripes as well ? besides, i personally feel that struts have a bad point where the interface like textbox only show in run-time and cannot preview it, how about stripes in this case ?
     
    Gregg Bolinger
    Ranch Hand
    Posts: 15304
    6
    Mac OS X IntelliJ IDE Chrome
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by Nakata kokuyo:
    thanks for warm reply Gregg Bolinger ,

    i believe the life cycle of framework always depend on population of user supported, struts and jsf are current most popular and commonly use framework at the moment, hence , i feel it worth to learn(at least it help in interview ), but what about stripes ? do you think it will getting popular ? or perhaps it replace struts in one day ?

    can you list some bad point for stripes as well ? besides, i personally feel that struts have a bad point where the interface like textbox only show in run-time and cannot preview it, how about stripes in this case ?



    I'd agree, from your point of view, that the industry acceptance of a framework is very important. Especially if you are trying to get a job. So Struts and JSF are probably frameworks that will help you in that quest.

    Struts has 2 other projects going now that will be interesting to see how the evolve. Shale and Struts Action 2 which is a hybrid of Struts and WebWork (Struts team recently took over WebWork development). So Struts something will always be going on.

    besides, i personally feel that struts have a bad point where the interface like textbox only show in run-time and cannot preview it, how about stripes in this case

    This is because Struts uses taglibs for form fields and processing. Stripes does the same thing. So you are out of luck there. One thing that Stripes does allow you to do that Struts won't is to deploy and view a JSP running in a web container (Tomcat, etc) without the need for anything else. What I mean by that is with Struts, you make the JSP, then you have to get all the configuration done; the ActionBean, FormBean, Validation (if any), etc. Then, as long as everything is correctly configured, you can preview your JSP.

    With Stripes, you can create the entire JSP, form and all, deploy it, and view it. Stripes figures if the associated Action Bean isn't available, so what. Show the page anyway. I like that.

    Downsides to Stripes are:

  • It's new - barely a year old. So there really is no industry acceptance.
  • Validation needs a bit of work. Some things are being fixed in the 1.5 release but there still is no built in client side validation support
  • Java5 - yes, I listed that as a plus for Stripes. But to be fair, it is also a negative since there are still people living in the stone age and can't run Java5.
  • Community is still relatively small. So finding answers to problems can sometimes be a problem. But the folks on the mailing list do a good job, none-the-less.


  • I am sure there are more, but I can't think of them right now.
     
    Ranch Hand
    Posts: 948
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    While we are talking about web development and frameworks, I will throw this out...

    I have not been able to get too excited about frameworks that provide an incremental improvement over Struts. The reason is that most of them are built to create the same crappy fill out an html form, submit a page, click a link, refresh the entire page type web applications that Struts is designed to produce. I would love to see the web move towards a rich interface, drag and drop, right click, dynamic refresh model (Web 2.0...like the apps that Google is making famous). On the other hand I am not real excited about producing a bunch of client side JavaScript and I am not sure that I want a framework that produces a bunch of JavaScript either (like the framework that Google released).

    At some point I have to wonder if we will be able to break out of the browser and away from HTML and JavaScript. I wonder about the feasibility of Swing based applications deployed with Java Web Start that retrieved data from the middle tier using web service calls over HTTP. Or maybe applet development will come back into vogue. I have seen some nice applications developed with ActiveX (or whatever Microsoft calls that technology these days) but I am not a huge fan of solutions tied to Windows or IE.

    Oh well...I guess I have to get back to writing more crappy Struts based pages. ;-)

    - Brent
     
    Gregg Bolinger
    Ranch Hand
    Posts: 15304
    6
    Mac OS X IntelliJ IDE Chrome
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Brent, you might be interested in this thread in the Swing forum where a few of us were discussing similar opinions. Please feel free to comment there. That will also help keep this thread on topic.

    Oh well...I guess I have to get back to writing more crappy Struts based pages. ;-)

    Or you could use Stripes.
     
    clojure forum advocate
    Posts: 3479
    Mac Objective C Clojure
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Well, I'm an expert but I really like WebWork.
    To me, it is the best Action framework in these streets these days.
    And you will get a bonus since Struts 2 is WebWork.
    So, Stripes is interesting ? Hmmmm ...
    I will give a shot soon.
     
    Ranch Hand
    Posts: 145
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    >>>>what is the mostly used framework used in the real worl applications and which one should i strive to learn?

    its tough to answer that buddy

    i am a struts developer myself and i am not sure if i should upgrade my skills in Shale and Struts Action 2 or start learning JSF.
    Although struts is the mostly used framework, JSF seems to be taking over the struts job market . so if you are looking to learn a framework to
    get a job, i would say go with JSF.
    [ March 13, 2007: Message edited by: jay roy ]
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic