Which Java web framework are you using currently?

I’ve been working with JSF and Facelets lately and I’m really enjoying it. So, what are you using for your web-based Java apps these days?

JSF and Facelets…sounds very intresting :). Ive just finished my web project based on Struts and Tiles Templating Framework.
I would really like to work with JSF, heard its very interactive in terms of designing a page.

regards,

ajos

I would say it is. My background is mostly ASP.NET based and I would say JSF is the closest framework to that in the Java world. It’s a very simple and lightweight framework. I’m definitely going to continue using it for my Java work.

I’m currently working with Spring MVC. I think its ok so far.

I’ve worked with struts in the past and I think working with struts2 would be a nice improvement over the original struts.

I’ve been looking at Spring MVC as an option. I’m not sure how I feel about Spring, being such a huge framework. What do you think of the MVC aspect of the framework?

I’ve been working with JSF and Facelets lately and I’m really enjoying it.
Well at least someone’s enjoying it… that’s not really the general attitude I’ve seen towards JSF. I’ve been using it myself for about 6 months now and I have very mixed feelings about this framework. It does have some nice features to it, and I’ve heard it’s quite similar to .NET which I have very little experience with.

The thing with JSFs component based architechture is that the basic components are not enough. We spent probably the first 2 or 3 months of this project developing components. Nowadays things are moving quickly since we have our components.

JSF is meant to be really easy to learn, although I’d have to disagree with this statement. Sure you can make a calculator or number guessing game really easily. I love the value binding mechanism, you don’t have to bother with ids and request.getParameter, the value is set, but beyond the basic examples things can get complicated. Understanding the JSF lifecycle is very important and it took me a while to fully understand and utilize it correctly.

It’s a very simple and lightweight framework.
I’m not exactly sure how you can consider this a lightweight framework… have you done a step through of the faces servlet, a lot of things happen between clicking a command link and actually exectuing your method, you have the first 4 phases of the lifecycle which to me is a lot of overhead. Since this is my first large scale JSF application I have no idea how it will be performance wise compared to other frameworks, but I’d have to imagine that something like Struts would outperform JSF in both server overhead and bandwidth usage.

I have some other issues with JSF, like the fact that everything is a form submit. If you want to use a button or link to do some javascript only actions you need to stick a “return false” in the onclick while JSF will still generate a whole line of javascript that’s never going to get called. Another issue with having everything as a form submit is your users won’t be able to bookmark any pages. We haven’t come across that issue yet so I don’t know if there’s a solution for that one.

I have many other issues with JSF but I won’t get into those now as this will become a big long rant. I’ll say this much… I prefer JSF to Struts but I’m no sure if I would recommend using JSF for the next project I work on (whatever that may be). I’ve worked with Struts and found it really annoying. I found it only a marginal improvement to straight JSP/Servlets. I have yet to try Struts 2 which is meant to be much better.

I’ve heard good things about Tapestry and Wicket although I don’t know much about them. We’re actually using Spring with JSF but not for the MVC part so I don’t know much about that either. The one a lot of people are talking about is Ruby on Rails, which is not Java (of course) but it’s supposedly the next big thing. I’ve done some programming in Ruby and I like it as a language but I believe it is interpreted and has not just in time compiler (although I could be wrong on that). So I don’t know how the performance will be on that one.

I haven’t developed any components. Everything I’ve needed so far has been in the framework. What have you needed that wasn’t there?

Yeah, if you want to understand every interworking detail, it may not be that easy. But really, what framework is at that level? To get started with JSF, I consider it very easy. My comparison is with frameworks such as Struts and Spring MVC. I find it much easier to create a faces-config.xml file and then jump straight into html and Java files.

Lots of steps may be taken behind the scenes, but a lightweight framework isn’t about steps the framework itself takes. It’s about the footprint the frameworks leaves on your code and the baggage created by the framework itself. In both instances, I would classify JSF as a very lightweight framework. I hate to keep referencing Struts and Spring, but yeah. :slight_smile:

I’ve looked into Wicket. I quickly realized you build the presentation in your Java code, much like Java Swing, and then I quickly closed the browser. I have no interest in bringing the Swing-like world into my web applications. Not to mention the lack of components available for presentation.

As for Rails, I’ve spent a lot of time there over the last 12 months. I enjoyed the experience of development, but for real world applications, I don’t see it as a real option. The performance is poor, the methodology itself promotes bad ideals such as the lack of FK relationships in your database, and the deployment just isn’t what I like to see. It’s certainly an immature framework that is simply hyped by developers who are bored with their jobs and want to “do less” but yield the same results. I don’t see it as something I’d use again for a real project until it matures, a lot.

I haven’t developed any components. Everything I’ve needed so far has been in the framework. What have you needed that wasn’t there?
First we needed a data tree. We ended up going with Tomahawk’s tree2 component. A decision I regret… nothing but headaches. As far as I’m concerned that component is good for representing a static data tree, yet the HTML it produces is horrible. It’s nested tables within nested tables and completely inaccessible. This project is version 3.0 of an internal application and a big requirement was accessibility as there actually will be some blind people using it. It’s been a good learning experience in making an accessible site. That’s another topic though. So I haven’t entirely rewritten tree2 but I spent a great deal of time changing the renderer and adding some helper classes to handle the model and the data changes, essentially making it a dynamic tree.

We also needed a multiple file upload component. I spent a bit of time on that one, works quite well, although it’s bit tricky. I can understand why there’s no default multi file upload component, although I’d have to get into some fairly technical reasons to explain why.

Perhaps the most useful is the menu components which I’ve developed. I have a context menu, menu bar, drop down menu, and sub menu component. I spent a lot of time on these and they’ve been really useful. Now whenever we need a new page with a new menu it’s a pretty quick thing to build, but getting those components working in the first place was not easy.

A colleague of mine developer a message box component. We didn’t like the built in mechanism for displaying error messages (<h:messages /> etc…), so he spent a bunch of time on that.

Those are the major ones. We’ve also made some other minor changes to the framework itself, like a custom navigation handler, we’re using myfaces so we’ve also made some changes to the myfaces ExtensionFilter.

Anyway, I’m not saying it’s all bad, I’m just saying we’ve spent a lot of time on things that we kind of expected the framework to already take care of. I actually enjoyed making the components, but it was quite time consuming.

Yeah, if you want to understand every interworking detail, it may not be that easy. But really, what framework is at that level? To get started with JSF, I consider it very easy.
I suppose if everything works as it should you wouldn’t need to get into the inner workings, but we’ve run into some strange problems that required us to go digging around in the framework source. In any case doing so has given me a much better understanding of the framework.

Lots of steps may be taken behind the scenes, but a lightweight framework isn’t about steps the framework itself takes. It’s about the footprint the frameworks leaves on your code and the baggage created by the framework itself. In both instances, I would classify JSF as a very lightweight framework. I hate to keep referencing Struts and Spring, but yeah.
I’m not only referring to behind the scenes… have you looked at the source of the pages generated? like that view state field? Also all the javascript that’s generated. Not to mention the form submit every time, which requires the user to send the view state field, and every other field on the page even for an action that may not use the fields. I’m just saying there is a lot of wasted bandwidth with JSF.

Anyway… I’m not totally against JSF, I do like it in some cases, I’m just not sure if it would be my first choice on the next project. I actually found JSF to be more like Swing programming, with the method bindings and value bindings, also if you write your own components then you are handling HTML code on the Java side.

I kind of suspected that the Rails thing is a lot of hype. I just haven’t had to the time to check it out.

I am using
Struts2, Sitemesh for front end.
Spring - Business layer
JDBC DAO Support - DAO layer
Acegi - Authentication and security
other few components like Java mail API, JXP, JUnit, Display Tag, Jasper Reports, Ant, etc…

Very good topic~ haven’t seen this for a while.

This is just my opinion so~ feel free to be offended but don’t expect me to argue back~ :eye::eye::eye:

I have a hate/love relationship w/ Struts and for my career path I’m leaning toward JSF now. I’m pretty sure the ratio of JSF vs. any other framework combined that’s use for new web apps are probably more than 50%. The only reason that Struts was so popular compare to other MVC is because of open community. Chances are the problem you are having is already been “solved” in ad-hoc or whatever way. Many new framework solves Struts problem in many ways but no “massive” open community = “you are on your own”. I just love how I google any issue on Struts and I usually get the answer on the first page. Now, JSF is on the same boat. Plus, JSF is supported by Sun and comes standard w/ J2EE servers. Of course, new feature/easier development is very critical in choosing which MVC but I’ll always go w/ the most open community. Sorry Struts but I’m glad to say farewell!!! As far as coolest Java Web framework will be EXTGWT 2.0 hands down!!!

Very good topic~ haven’t seen this for a while.

This is just my opinion so~ feel free to be offended but don’t expect me to argue back~ :eye::eye::eye:

I have a hate/love relationship w/ Struts and for my career path I’m leaning toward JSF now. I’m pretty sure the ratio of JSF vs. any other framework combined that’s use for new web apps are probably more than 50%. The only reason that Struts was so popular compare to other MVC is because of open community. Chances are the problem you are having is already been “solved” in ad-hoc or whatever way. Many new framework solves Struts problem in many ways but no “massive” open community = “you are on your own”. I just love how I google any issue on Struts and I usually get the answer on the first page. Now, JSF is on the same boat. Plus, JSF is supported by Sun and comes standard w/ J2EE servers. Of course, new feature/easier development is very critical in choosing which MVC but I’ll always go w/ the most open community. Sorry Struts but I’m glad to say farewell!!! As far as coolest Java Web framework will be EXTGWT 2.0 hands down!!!

Yeah I don’t see too much JSF discussion on sitepoint. It’s nice to discuss since that’s what I’ve been working with for the last few months. Regarding Struts I couldn’t agree more. As I mentioned before I found struts annoying to work with and I prefer doing JSF. The JSF 2.0 spec looks promising but at the moment we’re not even using the newest version of myfaces because it requires Java 5 or higher. Since we’re deploying to WebSphere, which is a great server, but is still runnign Java 1.4.2. For one thing myfaces 1.2 at least gives you a nice error screen when developing so you know easily which component caused the error. I’m on myfaces 1.1.5 and you just get a nice blank screen and a fairly useless stack trace from a JasperException (we develop on Tomcat…).

What’s the EXTGWT? Is that extended Google web toolkit? I don’t know much about GWT in the first place. As far as I’ve heard it’s essentially all written in Java and somehow compiles itself into HTML/Javascript etc…

It’s GWT + a Javascript framework called “EXT”. Yeah, that’s about right it converts into HTML/Javascript using 100% Java. Also, you can extend your own javascript too as well… Learning curve is bit heavy. This framework doesn’t really shine if you’re doing hello world type of programming but if you want to make online desktop application like gmail…this kicks ***~ Here’s the demo url

http://extjs.com/explorer/

Thanks for the link, but my first impression is the framework is outright heavy, i wonder the impact on the server…hmm :rolleyes:

How does it compare with say something like AJAX?

I promise GWT can run this on x486 machine on a tomcat and you will not see any performance issue. GWT does not autogenerate JavaScript on the fly from the server~~~ You write the Java Code, run GWT compiler to generate HTML/JavaScript, then you load them on the server. So, there’s 0 generating the scripts on the fly. Also, the JavaScript that auto-generates only includes that is written in “Java” then compresses script to make the load quicker. Anyways~~ don’t judge by the front cover!!

Hm… compare to AJAX? Not quite sure what you mean. You mean compare with other AJAX Framework like Prototype/Dojo/Scriptaculous? It’s totally different~ If you’re a Java Programmer I would seriously consider GWT if not then any JavaScript based Framework would be a great choice.

How closely linked to JSP is JSF?

I’m always interested in learning new frameworks however I don’t really have the time right now to try and pick up something totally alien to me.

I wouldn’t say they are too closely related. It’s enough that it’s not totally different but not enough that it isn’t worth learning because you’ll actually learn something.

On the topic of JSF, I have a brand new community getting started around the technology. Find out more from the link in my signature. :slight_smile:

JSP can’t be compare w/ JSF. The reason is that JSF uses JSP. So, JSP is a technology and JSF is a framework. Hope this clears it up.

It does, thanks. Essentially, my okay-ish knowledge of JSP will put me in reasonably good stead to attack the learning curve of JSF, yes?

Yes

Examples look fabulous. Given gmail is using the same tools, it looks possible to create complex web applications without any performance issues.