Matt RaibleMatt Raible is a Java Champion and Developer Advocate at Okta. developer.okta.com

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.

My WebWork Experience

Yesterday I began converting a small application from Spring MVC to WebWork. By the end of the day I was pretty much finished, but shot an e-mail off the the user's list to figure out a few more things. Today was spent incorporating that knowledge and making the app follow more WW "best-practices". Below is a list of things I discovered:

  • WebWork's documentation is actually quite good. I was able to figure out most things just by reading it. I'm still surprised that most web app frameworks don't describe a simple CRUD operation as their first example. In my experience, CRUD is 80% of a webapp's job.
  • WebWork integrates with Spring quite nicely. It's interesting to see that Spring has most of its MVC Framework support as part of the core, but WW has its own. I wonder why? Who cares, it works!
  • WebWork is a bit better than Spring MVC in that they have a mechanism for saving/displaying success messages. However, it doesn't live past a redirect, so you're still stuck putting messages in the session. Struts (as of 1.2.1) allows you to use a saveMessages(session, messages) call - and subsequent JSP tag to display (and automagically remove). Like it or not, Struts seems like the easiest solution for developers to use.
  • There's no clean mechanism for cancelling validation when a user clicks on a "cancel" or "delete" button. Struts supports cancelling using it's <html:cancel> button and it's pretty easy to detect "delete" and cancel validation in a form's validate() method. I ended up using an onclick handler for my cancel button and not worrying about validation on delete. This is the way I did it with Struts for years. Spring is cool in that it has a processFormSubmission() method that you can override before validation kicks in.
  • With Commons Validator, I'm used to specifying generic validation messages like "errors.required={0} is required.". This is possible with WW by using "errors.required=${getText(fieldName)} is required.". However, WW is a bit unique in that validation rules and ResourceBundles are defined on a per-action basis. I like having a central location for all my messages - like Spring and Struts have. I know it's possible with WW, but I'm trying to develop a "best-practices" sample app.
  • I really dig that fact that you can use one JSP tag to render an entire <tr> in a table. This <tr> ends up having a label and an input field - which is very cool IMO. I did find some issues with the XHTML output, but found it very easy to submit patches. Good stuff.
  • The config files (xwork.xml and validators.xml) must be in WEB-INF/classes. This is because they're XWork configuration files, and XWork is a non-web framework. It would be nice if I could put these in WEB-INF - where the rest of my config files (Spring, SiteMesh, etc.) reside.
  • Many of the JSP tags require you to use "'literal value'" - where you put single and double quotes back-to-back. IMO, this is just ugly and I'd much rather put some sort of indicator that it's a dynamic value - i.e. ${...} or #.
  • I couldn't get client-side validation to work. Seems cool though.

My experience with WebWork has been quite pleasant. I received excellent support from the mailing list - even though it took me a while to subscribe. The mailing list archives are woefully out-of-date, but this is a general java.net problem - not a WW issue. Maybe they should create a forum until the mailing lists get back on track?

Hopefully this last day and a 1/2 will make it much easier to implement WebWork in AppFuse. Thanks for the support gents - now I'm off to learn Tapestry!

Posted in Java at Jul 21 2004, 03:41:58 PM MDT 8 Comments
Comments:

From what I heard, Tapestry has a steep learning curve. Maybe you can let us know how it works out for you. Also, based on you 1.5 days' of hard work, do you see anything WebWork2 can do that Struts 1.2 can't? Is it worthwhile to pick up WebWork2? Learning Spring and Hibernate is hard enough (although your AppFuse starter app makes it a lot easier).

Posted by Eric Ma on July 21, 2004 at 07:51 PM MDT #

I've heard that Tapestry has a steep learning curve too - but all I'm doing is a simple master/detail app that talks to some business delegates that are managed by Spring. How hard can that be? I also want to have sorting/paging of the list screen (like displaytag), which Tapestry supports. I also hope to implement validation and success/error messages. Sounds simple enough - hopefully I'll have an answer tomorrow or Friday. As far as WW2, it doesn't seem to offer a whole lot over Struts - but it is simpler and it allows you to directly access your domain objects - which I like. I think also think its JSP tags (and Velocity macros) offer a lot more functionality than Struts' do. After working with Spring's MVC though, I <em>really</em> like its clean separation of controllers and view technologies. Of course, WW has this too - but it doesn't support as many views as Spring (i.e. PDF and Excel).

Posted by Matt Raible on July 21, 2004 at 08:03 PM MDT #

Just got to work. Starting my 2nd cup of coffee after chugging the 1st. Can't remember what "CRUD" stands for. Some acronymfinder.com suggestions:

Chopper Riding Urban Dwellers

Let's see, Matt's a biker and lives in Denver, but I think it's a different type of bike.

Coloradans Running Ultra Distances

Well, Matt's in Colorado, but he prefers programming marathons.

Create Read Update Delete

Ah. I knew it sounded familiar. I probably would have figured that one out once the coffee kicked in. :)

Posted by Kelzer on July 22, 2004 at 07:23 AM MDT #

What I found outstanding about Spring/WW integration is that you can use Spring to instantiate your Action classes and wrap them in Spring transactions using BeanNameAutoProxyCreator. And you can do this with a single ObjectFactory class, which is much nicer than using the ExternalReferenceResolver. Take a look at the xwork-optional package.

Posted by Jason on July 22, 2004 at 11:17 AM MDT #

Hi Matt! I definitely recommend to buy "Tapestry In Action" if you want to get started with Tapestry. Unfortunately the online documentation is partially outdated. And the book covers details about the very interal aspects of Tapestry.

Posted by Lars Hoss on July 23, 2004 at 09:30 AM MDT #

Matt. Do you have a copy of the small application you are working on available to look at?

Posted by Rick Lawson on July 23, 2004 at 09:34 AM MDT #

Rick,

Unfortunately, there isn't an open source version of the app I'm working on. I'm doing it for Open Logic and it'll be a part of the next version of Blue Glue. I also ported the MyUsers app from Spring Live to use Maven for Open Logic.

Sorry, I don't mean to market Blue Glue - but that's what I'm writing this app for.

Posted by Matt Raible on July 23, 2004 at 09:40 AM MDT #

Dear Sir / Madam Web development partnership! We as a company (GenX Infotech) are based in PUNE India. We are a group of Web developers & BPO based company, As far as web development is concerned we work on asp/php/flash/java platforms on web technologies. We have been working with a few US &UKbased companies for their web development work. And our US Based clients prefer to work with us due to major cost saving which almost comes to half or even 1/3rd of what you spend on Web Development in the US .We are Located in India and here we have abundance of technical experts in all IT fields. So we would request you to provide us with your clients web development work as your company can do the design work and we as a company can do the development work for you. Please let me know if we can mutually work on same, where we do the development work for your design company. If you are a web development company then you can outsource your web development to save cost which will earn u double your profit. We also provide DATA CONVERSION, FORMS PROCESSING, CHEQUE PROCESSING, DATA ENTRY, E- ACCOUNTING, CLAIMS PROCESSING & SCANNING. As far as rates are concerned we are very flexible on that Issue and hence we provide the best cost cutting solutions to our clients in the UK&USA. Few references for our previous work you can kindly visit the below mentioned web sites n http://www.fireorice.com n http://www.gurussoftware.com, n http://www.agoranet.cc, http://www.edix.com n http://www.theiceman.com, http://www.info-sun.com n http://www.gurusonsite.com, http://www.yourchevysource.com n http://www.longboatobserver.com, http://www.boydgaming.com n http://www.thomtillier.com, http://www.mansoorbaig.com n http://www.mergingpoint.com n http://www.stardustlv.com n http://www.genxinfotech.com n http://www.kamagranow.com It would be great if you can give us a chance to work for you as it would allow us to prove our expertise!If you need to speak to any of our clients for any of the references do let us know.meanwhile you can talk to Rob Krajenke 3250 Pine Creek Dr. - Brighton, MI 48114 248-250-2478 rob@iTVGroup.com so that you feel a bit comfortable with working with us now. For any clarification please do revert back to us. you can chat with us on msn ID Genxinfotech@hotmail.com and mansoorbaig@hotmail.com to discuss your work with us. waiting for your reply Thanks&Regards mansoor

Posted by Mansoor baig on November 05, 2004 at 03:57 AM MST #

Post a Comment:
  • HTML Syntax: Allowed