aspose file tools*
The moose likes Other Application Frameworks and the fly likes Is Struts still the way to go? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Is Struts still the way to go?" Watch "Is Struts still the way to go?" New topic
Author

Is Struts still the way to go?

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1062
I'm evaluating frameworks for an upcoming Web project. From my research, it appears that Struts is sill the way to go.

Is creating tables with sortable columns "built-in" or can be done without a lot of programming?

Look forward to any replies.

- Mike
Michael Duffy
Ranch Hand

Joined: Oct 15, 2005
Posts: 163

I'm evaluating frameworks for an upcoming Web project. From my research, it appears that Struts is sill the way to go.


Struts is one way to go, but I'd hardly say it was "The Way". There are a lot of choices out there, and some of them offer great advantages over Struts:

http://java-source.net/open-source/web-frameworks

Merging Struts with WebWork might give it some life, but I'd prefer Spring. Spring MVC is excellent, and there's lots more worthwhile stuff in the Spring toolbox.


Is creating tables with sortable columns "built-in" or can be done without a lot of programming?


"sortable columns"? What columns can't be sorted using ORDER BY? Maybe you mean "indexed". Or perhaps you're asking whether it's better to sort in the database or on the middle tier. I'd let the database do what it's good at and use ORDER BY clauses whenever I could.


%
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1062
Hey,

Thanks a lot for your reply.

Yes, 'order by' is fine. My comment really referred to more opaque frameworks like JSF where sorting requires you do (a lot) more work or use MyFaces (which isn't exactly "plug-and-play", to say the least, either <s> .

Judging by the reviews I've read for Struts and Spring, it seems that Struts still enjoys the most widespread usage and is probably the best framework to use to find programming talent out there. That may change if JSF really takes off. I've heard lots of good things about Spring too.

-- Mike
Gerardo Tasistro
Ranch Hand

Joined: Feb 08, 2005
Posts: 362
I use Java Server Faces. Either Sun's or MyFaces. I think it has a more flexible navigation and logic schema than Struts. Still you can include Struts in the project and get the best of both worlds. For example keep the control in JSF and a lot of the view goodies made with Struts tags.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I prefer Tapestry and Wicket is becoming closer to a second choice. JSF has moved down my list a bit and Struts isn't even on my list.

While Struts is still the "industry standard" statistically, it is no longer in development as-is except for a few bug fixes here and there. "Shale" is the new Struts which will use JSF.

In the end though, using the tool that allows you to get the job done is always the best choice.


GenRocket - Experts at Building Test Data
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1062
Thanks for your reply.

Yeah, having recently used JSF, I agree with JSF moving down the list, but I'm surprised about Tapestry. The reviews of it aren't that hot that I've read.

One review said that that the documentation isn't very good and it's too general. (Yet, the Tapestry framework itself seems to be powerful and quite popular).

I've never heard of the other one you mentioned. <s>

Too many choices....

-- Mike
Gerardo Tasistro
Ranch Hand

Joined: Feb 08, 2005
Posts: 362
That was my exact same problem with Tapestry and Spring. To little documentation when I got started. JSF on the other hand had quite a few books.
Martijn Dashorst
author
Ranch Hand

Joined: Jan 23, 2006
Posts: 58
Originally posted by Mike London:
Thanks for your reply.
I've never heard of the other one you mentioned. <s>


I'm surprised, though. I thought we (the wicket team) did some serious marketing last 8 months or so.

Anyway, I agree with the number of choices available. Here's list of almost all Java web frameworks. While you're looking at the list, check out the rest of our website :-).

As far as finding people to work on your project, I'd rather hire someone who has worked with JSF, webwork, Tapestry and/or Wicket than someone that has only struts on his/her CV. Having been exposed to other frameworks shows an interest in what is going around in the rest of the world.

Especially when the developer is supposed to be experienced. If he can't explain what Ajax is, or the difference between a model2 framework and a component oriented framework, why one would use hibernate, then I'm not convinced he's an experienced java developer. Or perhaps he might be, but then he's really suffering from NIH syndrome
Reid M. Pinchback
Ranch Hand

Joined: Jan 25, 2002
Posts: 775
Originally posted by Mike London:
One review said that that the documentation isn't very good and it's too general. (Yet, the Tapestry framework itself seems to be powerful and quite popular).


Just as a random anecode, I'd been using Struts for at least 3 years before I tackled Tapestry. I got a lot farther a lot faster with Tapestry, although getting the Tapestry in Action book was pretty much a necessity. It is actually only a pretty recent situation that the Struts docs themselves have gotten tolerable, it definitely wasn't always that way.

Not claiming Tapestry is the best thing since sliced break, but it does have one really nice characteristic. If you are mostly focused more on the Java work and have a web designer dealing with the visual impression of the pages (nontrivial CSS, DHTML, graphics), working together on the same project is going to be much easier with something like Tapestry than it is with Struts for the simple reason that you tend to break less of each other's stuff. Tapestry lets you leave more of the view resources in the hands of the designer even if the webapp is quite complex with a large page count. It can be harder to have that clean a division of labour with Struts, particularly if you add Tiles into the mix. Not impossible, just harder.
[ February 01, 2006: Message edited by: Reid M. Pinchback ]

Reid - SCJP2 (April 2002)
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

...why one would use hibernate,...

Or choose not to.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Mike London:
One review said that that the documentation isn't very good and it's too general. (Yet, the Tapestry framework itself seems to be powerful and quite popular).

-- Mike


I'd say that was true through the 3.x line. The 4.0 documentation, while not perfect, is much better and there is a nice getting started guide on the tapestry website that steps you through creating a simple hello world type app and adding dynamic content.

If you really want to get some good docs on T4 I'd suggest looking at Kent Tong's Enjoying Web Development With Tapestry. The first 4 chapters are free.

Do take a look at Wicket as well. There is appearntly a Wicket in Action in the works though I believe it will be a while before it's released. And I've found few In Action books that I thought were good at showing you how to do anything. They seem more why and internals. The online docs for Wicket aren't bad. I find myself bouncing between there and the example source code.
[ February 01, 2006: Message edited by: Gregg Bolinger ]
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1062
Hi Gregg,

Well, we seem to agree on just about everything ("In Action" books, JSF, MyFaces, etc.).

Therefore, I believe that Tapestry may be just what I'm looking for.

What I need is a drag and drop environment like .NET offers (that JSF may have... eventually) -- where I don't have to spend hours crafting pain-in-the-a** HTML tables and such!

I'm usually doing both the visual and non-visual elements of an application. While I don't "mind" doing the visual part, I think it could be a whole lot easier that it is now with most Java environments. The Sun Java Creator seems to be a good start, but unfortunately, has too many problems that experienced developers won't like.

Next, I want an event-driven architecture so I can start focusing on business logic quickly not buying 2**N books so I can start a research project on a particular framework. <s>

In Java, if you try to set something as simple as the tab order for a form's controls, you can be quickly overwhelmed by the complexity of this task. IMHO, that's an example of needless over-engineering to the point of ridiculousness. With Microsoft products, setting tab order is a snap! A lot of the Swing MVC controls are over-engineered too, to the point (again, IMHO) of being unusable for all but the most "well funded" (for lots of "proof of concept" mini-projects in the budget) projects.

These are tough choices to make. .NET is quite appealing and it works extremely well (except for the 2003 debugger which somehow knew how to bring the BSD to my XP Pro machine!).

I'll check out Tapestry.

Thanks for the link to the article and free chapters.

Much appreciated!!!

-- Mike
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Is creating tables with sortable columns "built-in" or can be done without a lot of programming?



Check the displaytag at displaytag


I did make use of it my project with struts..


Hope it helps you...

Regards
Alexander Kolesnikov
author
Ranch Hand

Joined: Feb 26, 2005
Posts: 99
Since the discussion began with sortable tables, I will add: there is a fabulous, ready to use sortable table component in the Tapestry's contrib library. REALLY easy to use. And Kent Tong in his book provides a perfect tutorial on this one.


Alexander Kolesnikov<br />Java Web Developer<br />SCJP 1.4, SCWCD 1.4, SCBCD 1.3<br /><a href="http://sundraw.ws" target="_blank" rel="nofollow">Tapestry 5: Building Web Applications</a><br /><a href="http://sundraw.ws/batik.jsp" target="_blank" rel="nofollow">Java Drawing With Apache Batik</a>
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
And a very cool Wicket DataTable for the same
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1062
My trepidation of starting to use Tapestry comes from my experience with JSF...namely, if you get stuck and there really aren't that many people using it who can help -- especially when you're using MyFaces or other components that have little documentation.

Also, aside from the Tapestry "die-hards" here on the ranch (meant as a compliment), would Tapestry on a resume do a (corporate) developer any good or a developer looking for work? All I see is Struts work out there. I've never seen a job posting for Tapestry or for JSF, for that matter.

When it comes to column sorting, do any of the Tapestry solutions mentioned just let you create an "event" where you can just "re-query" the result set with a different "order by" clause? M$ gets this "really easy" method mostly right with a lot of this stuff, where JSF, for example, (IMHO) really messes it up with complicated programming to just SORT COLUMNS! JSF needs to re-work their "value proposition" to make the things the programmer will want most of the time (like column sorting) to be Much Easier.

Tapestry "sounds" good, but there are only a couple books. What if it's just another fringe framework out there. I would hate to invest all that time learning YAF (Yet Another Framework) to just have to learn YAF. Plus there's the "I'm stuck and nobody knows the answer..." scenario.

Nothing's easy I suppose...

--Mike
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209

When it comes to column sorting, do any of the Tapestry solutions mentioned just let you create an "event" where you can just "re-query" the result set with a different "order by" clause?


I can tell you how wicket does this. Wicket abstracts the data-fetching part behind an interface
ISortableDataProvider
that you are expected to implement. The DataTable component would automatically turn the table column names that need sorting, into links. When any of the column / link is clicked, the DataProvider implementation that was provided earlier gets an event in the form of a method call and the column that got clicked is passed in as a parameter.In turn, you are expected to return an iterator for the data that needs to be displayed. So to answer your question, yes you can re-query the result set with the order by clause corresponding to the column that was clicked. The component just needs an Iterator.


Plus there's the "I'm stuck and nobody knows the answer..." scenario.


Wicket user support is excellent and I can hardly remember a day go by without a question being answered. May be you can give it a try sometime.
[ February 22, 2006: Message edited by: Karthik Guru ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
While Struts is still the "industry standard" statistically, it is no longer in development as-is except for a few bug fixes here and there.


To me, this is an advantage of Struts, not a disadvantage. It means it's a stable framework that works, and that I don't need to wait for the fix-of-the week for my code to work.

While what's most popular is not always what's best, when something is popular, there's usually a reason. As I see it, some of the reasons Struts is so popular are:

  • It makes it nearly impossible not to follow the MVC pattern when developing web applications.
  • It creates a way of organiziing large projects into manageable components
  • It's flexible. It allows you to use pretty much whatever technology or framework you want for your model component.
  • There are a lot of really good tools that support it. It's easy to find tools that provide a GUI interface for the configuration file and drag and drop capability for Struts components
  • It's not rocket science, and has a fairly small learning curve.


  • Merrill
    Consultant, Sima Solutions
    Mike London
    Ranch Hand

    Joined: Jul 12, 2002
    Posts: 1062
    Good points. Virtually 100% of all the job postings I see say Struts and nothing else.

    - Mike
    Georgi Shirkov
    Greenhorn

    Joined: Mar 04, 2006
    Posts: 1
    Hi,

    I'm new to java web frameworks and I made some job searches on dice.com for job postings with different keywords and found this:

    Struts - 1742 job postings
    JSF - 301 job postings
    Turbine - 115 job postings
    Spring MVC - 59 job postings
    Tapestry - 41 job postings
    WebWork - 38 job postings
    Cocoon - 21 job postings
    Wicket - 2 job postings

    Isn't the fact that Struts is one of the first frameworks the reason for its popularity? Probably the new frameworks (e.g. Wicket) offer funcionality which is not worse than that of Struts, for example.
    Karthik Guru
    Ranch Hand

    Joined: Mar 06, 2001
    Posts: 1209
    this post has some reference to popularity of struts.
     
     
    subject: Is Struts still the way to go?