Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Web Frameworks - which one should I learn?

I've seen a lot of talk about Web Frameworks these last couple of weeks - particularly JavaServer Faces, WebWork and Spring. There's also been great articles posted comparing Spring and WebWork as well as an Introduction to Spring from TSS. Spring, WebWork and JSF all look like excellent frameworks to me, but I also continue to believe that Struts is a great framework. And I would go so far as to say that it's the best web application framework. Yep, I said it - Struts is the best web application framework to learn if you are a web developer wondering what to learn. Why? Because it will get you a job.

I've continued to receive a fair amount of calls and e-mails over the last couple of weeks - and they're all calling because of my Struts experience. Good luck in finding a company that wants you to build their web application using WebWork or Spring. Maybe someday I'll be lucky enough to hire employees for Raible Designs and build web applications in my own office with my own employees. Then we'll get to choose whatever technology we want to build customers' apps. Until then, I'll stick with Struts and continue to be an employed developer.

I strongly believe the best way to learn anything is to get paid to do it. I've learned Struts over the past couple of years, not because I wanted to, but because someone else wanted me to - and they paid me to do it. Of course, there are some companies that will probably pay you to learn WebWork or Spring, but most would rather not.

Another thing to consider is that WW and Spring will probably someday develop "migrating from Struts" documentation. Sounds like a good idea to me - until then, and until someone pays me to learn the others, Struts is #1 for me.

Now it's your turn to tell me why my logic is flawed... if you can. ;-)

Posted in Java at Oct 17 2003, 01:22:23 PM MDT 21 Comments
Comments:

In general you are right but which framework would you use if someone paid you to make a choice? I think it is important for web developers to know more then just one framework. What if you have a heavily data driven site... maybe you should consider Expresso or Keel. Maybe you have a highly dynamic site that needs to change at the drop of the hat this very moment... maybe JPublish. I could go on and on. Struts is fine... but don't limit your solutions to just one framework. We will never have just one framework just like we will never have just one programming language...

Posted by Kris Thompson on October 17, 2003 at 08:46 PM MDT #

One nice thing about Spring is that it seems possible to use Struts (or WebWork) for the actual web application, using its other pieces for business logic, data access, etc. (The only reason for the 'seems possible' is that I haven't done it yet, I hope to experiment with it soon.)

Posted by Chris Winters on October 17, 2003 at 11:22 PM MDT #

Tapestry - why? Because it rocks!

Posted by Erik Hatcher on October 18, 2003 at 04:04 AM MDT #

RE: Struts and Spring - Actually after reading the TSS article on Spring yesterday, I whipped up a little Spring plugin for Struts - http://www.twdata.org/struts-spring/ It allows you to use Spring to handle your actions and therefore use IoC features. I was suprised how nicely they fit together. Spring is really simple yet powerful...I'm very impressed.

Posted by Don Brown on October 18, 2003 at 05:11 AM MDT #

I posted my ideas about this here.

Posted by Geert Bevin on October 18, 2003 at 07:01 AM MDT #

[Trackback] Matt Raible posted his ideas about how to select a web application framework and I don't fully agree with his statements Following what Kris Thompson says, I'm in the position where I make the actual choices about which technology to...

Posted by UWYN's blog on October 18, 2003 at 07:13 AM MDT #

"Why? Because it will get you a job."... That's one thing, but in an article about 'which one should I learn', I expected to also see something more then just money. Sure, we all need to get paid, but in the end, I'd rather get paid less or search a little harder for a job doing what I like, instead of just following the market. If I had followed your idea, I would now be coding .Net....

Posted by Unknown on October 18, 2003 at 07:23 AM MDT #

Struts = too many artifacts = more code to write = more $$$ you can charge your client :)

Seriously though, I really don't understand why everyone's getting so worked up over Struts vs WW/X2/WW2/Keel/Maverick/Expresso/Spring/Tapestry. They are more similar than different, at least "theoretically speaking." If a Struts + Spring framework came out, I would strongly consider using it because of the other things Spring offers.

Geert trys to argue that using a DIY or less known framework is fine as long as it gets the job done for his client. Stop and think about what happens when you leave to go to your next gig, and some poor guys a couple of years down the road have to add new features to your home-grown framework. Consider the same scenario if you used a well know framework such as Struts...

Posted by Pratik Patel on October 18, 2003 at 09:40 AM MDT #

Pratik, imho that is the case for any software project that would go out of the hands of a small company (and many large ones I've seen). If there are no docs available in the application about the whole structure or how everything integrates, the next one that comes along is almost always in trouble. Your argument that using a very popular technology solves this problem, doesn't solve this issue at all. I had to take over the maintenance of GreenPeace's Belgian website which was written in PHP. Now I know PHP very well and I can tell you that this application is just a huge pile of crap with nothing worth maintaining and several days of work to just figure out how to get to even the simpliest feature. It's the fact that it is crap that lead the previous company to lose the project to me. Exactly the same things can happen with any framework or technology.

I can understand this argument *inside* the same company which is again a non-issue since normally you standardize internally on technologies and provide (in an ideal world) good design docs to all developers. Now honestly, isn't it part of running your business that you don't lose your projects to *another* company. That you are able to continue to satisfy your customer, don't get into a maintenance nightmare and continue to provide great support for great prices? I tend to think that you can do this much better if you use tools that suit you, that correspond to how your mind works, not by just using what everyone uses and swear regularly at how you don't feel comfortable with it. Of course, if you feel comfortable with struts, you should use it, just as you should use RIFE or Tapestry or ... if you feel comfortable with that.

Posted by Geert Bevin on October 18, 2003 at 10:04 AM MDT #

Pratik - your comment about too many artifacts if null and void when using XDoclet to generate your artifacts. ;-) Also, I agree with what Geert is saying about using the one you like and the one you're comfortable with - that's why I use Struts. As for learning/using other frameworks OVER Struts - I'd be more inclined to do so if more companies were hiring me to do so. The fact is that a lot of them don't have issues with Struts, but they start trembling when I mention XDoclet, Hibernate and other such time-saver tools.

Maybe companies will start wising-up to the other options, or allow me to persuade them to use these other frameworks - but so far I haven't seen that. Also, I haven't seen much good documentation for why I should use other frameworks over Struts. Sure, there's IoC and AOP - but you try explaining that to a manager-type and see if they agree.

Now if I were able to get on a project with a tech lead who was a bit more savvy - that would be a whole other issue. The sad truth is that the last time I was on a project with someone I could learn from was in 2001. This is why I blog so much - to learn from all you guys!

Posted by Matt Raible on October 18, 2003 at 10:46 AM MDT #

Since you stated your main criteria most folks should just go grab a VB book and start learning!

Posted by Easy on October 18, 2003 at 11:52 AM MDT #

Anyone even looked at Turbine? The new TDK 2.3 should be out any day now.... This does all of this. Granted its through a Monolithic Servlet with Services plugins but none-the-less...

Posted by Cameron Gray on October 18, 2003 at 12:04 PM MDT #

Yes I did, while it looks very powerful and interesting, it doesn't scratch my itch. I'm sure though that other people really like it.

Posted by Geert Bevin on October 18, 2003 at 12:21 PM MDT #

Forget Struts, give Cocoon (http://xml.apache.org/cocoon) a try and you'll never want to go back to the JSP world ever again ;)

Posted by Yannick Menager on October 18, 2003 at 11:31 PM MDT #

Anyone wants to sanction a weekend competition to build a "sample" app (auction, bookstore, etc.)? I would use iBatis/Struts, somone can pick other tools. Then the "organizer" would give out specs. Friday PM; get it done by End of Day Saturday, and FTP. Then we can compare notes. .V

Posted by Cekvenich Vi on October 19, 2003 at 12:05 AM MDT #

Vic - awesome idea. If we can get a company to sponsor this with real world requirements - that would rock! $100/hour sound fair? The winner gets paid a $2400 flat rate for their 24 hours?

Posted by Matt Raible on October 19, 2003 at 02:41 AM MDT #

Matt,

I was being cheeky w.r.t Struts artifacts - I use XDoclet as well, especially since I've based some stuff on appfuse!

Geert says "Now honestly, isn't it part of running your business that you don't lose your projects to *another* company. "

LOL, of course! But when you're a small one or two man shop, you obviously can't work on too many projects at once, and you have to factor in that someone else, whether it's the client's staff, or another external company, has to maintain and grow the system you've built if you're not available to work on it. Part of this means that you have to properly document your software, write it so it's readable, etc and part of this means using tools that can easily be adopted by those that come after you.

Also Geert says "Your argument that using a very popular technology solves this problem, doesn't solve this issue at all." I have to disagree on this, that it doesn't "solve this at all." You say you got this project based on PHP that took you a long time to figure out the simplest thing. PHP is well documented and you already knew PHP very well. What if the project had been written in something you didn't know at all and wasn't well documented? Not only do now have to learn about the system itself, you have to learn about everything "below" the system, be it the framework, libraries, or even programming language. If you're using a framework/library that isn't well documented, your task is monumental. If the framework/library is well documented, though the actual software written based on it is not, your task will difficult but at least it will be manageable.

Don't get me wrong, I'm not saying not you should use only tools and frameworks that are popular. I totally agree that you should use what you are comfortable with and use your best judgement. And sometimes you have to convince people to make a leap of faith. I remember convincing people to start using Java on the server-side instead of thinking it of just as client (i.e. applet) technology. That was back in 1998.

Posted by Pratik Patel on October 19, 2003 at 01:13 PM MDT #

Hi Pratik,

I guess I was a bit too extreme by say "doesn't solve this at all" ;-). You're right that the knowledge of exactly the same technology will benefit of course your endeavour of understanding the application structure. (side-thought: a framework is just one technology, there are so many involved ... do you only pick the most popular one everywhere then? Hmmm ... enforcing Oracle on all my customers will surely make the prices rise, not so sure if they'd be happy though)
Now in the case of a badly written application, you'll be in such deep double that learning a technology wouldn't matter much. However, if the technology has been carefully chosen and motivates the developers to write better code and maybe even by-design enforces a distinct seperation of concerns and integration of modifyable application and data flow, then the benefits of having a better written application outweighs by far the mess you get when an unmotivated developer sloppily writes an application to quickly obtain some working results because the framework doesn't feel comfortable.

Anyway, I think we're in fact mostly on the same line of thought. I'm just being difficult ;-)

Posted by Geert Bevin on October 20, 2003 at 06:27 AM MDT #

look at Echo/EchoPoint (http://echopoint.sf.net, http://echo.sf.net) but , please do, and read some doco at http://echo.sf.net. it is like Swing for the web, and it works (besodes other similiar framewroks like WingS, and WebOnSwing). And there is an IDE in prepraration (eclipse plugin), but IDE will be commercial. Echo and EchoPoint are open source.

Posted by domagoj on October 20, 2003 at 04:46 PM MDT #

Amen to Cocoon... I haven't got a lot of experience with any other frameworks, but you gotta love Cocoon. Sure the learing curve is steep but once you get to the top... ;-)

Posted by Robin Wyles on October 29, 2003 at 05:50 PM MST #

I think that WebOnSwing is the best option, cause you dont have two learn a new component framework, you just use Swing components (that everybody knows) to create html pages. It's like JSF or .NET webforms/webcontrols, but not specific for web, is more generic.

Posted by Robert Dyne on October 30, 2003 at 06:02 AM MST #

Post a Comment:
  • HTML Syntax: Allowed