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.
You searched this site for "grails". 129 entries found.

You can also try this same search on Google.

Grails vs. Rails - My Thoughts

In a comment, Jared Peterson asked:

I'm curious if you have any thoughts on folks that might be trying to make a decision between Rails and Grails. I like the concept of "Allow Both", but what if you "have neither"?

If you were starting a new project, could choose either one, needed to interact with a lot of existing Java code (JRuby on Rails I guess), what would you pick?

A friend recently asked me "Can I solicit your honest, unadulterated opinion on Grails?" I think the e-mail I sent him may help Jared's question.

I think it's awesome. IMO, it's the same thing as AppFuse, but it has a DSL that's much simpler to learn and remember. Less code -> faster productivity. There does seem to be some maturity issues, but I think it'll get there. The question is - how fast can Groovy become. It's similar to Rails and Ruby in that you start using Grails and you think "This Groovy thing is kinda cool, I'd like to learn more." One of the reasons I really like it is the learning curve for experienced open source Java Developers is virtually flat. You can learn enough to be productive in a single day.

That being said, I think there's also a lot of cool stuff going on with RIA. IMO, Flex or GWT + Grails would be a really fun set of tools to develop with. Here's a excerpt from a write-up I recently did when analyzing Rails and Grails at LinkedIn (in January):

--------
Comparing Rails and Grails
They're both excellent frameworks. Rails is definitely more mature, but the environment is a pain to setup (esp. on Windows). Grails is very easy to setup for Java Developers. Grails needs a lot of improvement as far as hot deploy and stack traces. It's probably Groovy's fault, but its stack traces are hideous - rarely pointing to the class and line number in the first few lines.

As for hot deploy, it doesn't work nearly as well as it does with Rails. Rails' "script/server" starts WEBrick in a few seconds, while "grails run-app" can take up to 10 seconds (even on a brand new application). Even with its warts, Grails is simply awesome. I really, really enjoy writing Groovy code in IDEA and seeing immediate changes. I don't like "test-app" as much as I like Rails' "test:units" (or even better, "test:uncommitted"). It seems to be widely realized that Rails has a better testing story.

Rails is immediate, Grails is immediate 70% of the time.

Groovy is extremely easy to learn for Java Developers. Ruby is easy too learn, and possibly too powerful for OO rookies. Both are fun to program in and very capable of allowing greater developer productivity. If you know Hibernate, Spring, SiteMesh and JSP, you owe it to yourself to look at Grails. If you know these technologies well, you can learn Grails in less than an hour. You can be productive in the next hour and have an application running by the end of the day. That's not to take anything away from Ruby. I believe that Rails is an excellent platform as well. It's pretty cool that profiling and benchmarking are built into the framework and you can easily judge how many servers you'll need to scale.

I used IDEA while developing with both frameworks. IDEA has Rails and Groovy support available via plugins and they both worked quite well. The support for Grails was much better than Rails. Grails offers code completion, Ctrl+click on classes/methods, debugging and starting/ stopping the webapp from your IDE. Rails doesn't offer much in the way of Ctrl+clicking on class names/methods or debugging.
--------

Is there anything that Rails can do that Grails can't? Not as far as I can tell. I think it really comes down to developer passion and team preference. If you have experienced Java Developers that like the ecosystem and its tools, Grails makes a lot of sense. If you have experienced PHP developers or frustrated J2EE developers, they might enjoy Rails more. One thing that's very cool about both frameworks - learning one actually teaches you things about the other. They're so similar in many respects that knowledge is transferable between the two.

Of course, this is all just my opinion after working with both frameworks for a few weeks. For anyone who has tried both, what do you think?

In closing, here's an excerpt from a recent comment I left on Javalobby:

Of course, the hard part now is deciding between Django, Rails, Grails and GWT for your web framework. Then again, that's like having to choose between a Ferrari, Porsche, Lamborghini and a Maserati. No matter which one you choose, it's unlikely you'll be disappointed.

Posted in Java at Mar 07 2008, 05:12:00 AM MST 15 Comments

The LinkedIn Journey Continues

As you might know, I've spent the last several months working for one of the coolest clients ever: LinkedIn. They hired me back in July 2007 and I was impressed on day one. I was originally hired to help them evaluate open source Java web frameworks and try to determine if moving from their proprietary one to an open source one would help improve developer productivity.

After looking at all the options, I recommended we look at Struts 2 and Spring MVC - primarily because they seemed to be the best frameworks for a LinkedIn-type of application. Another Engineer and I prototyped with Struts 2 for about 6 weeks and came up with a prototype that worked quite well. While our mission was successful, we found a couple issues with Struts 2 and standard JSP that might actually hurt developer productivity more than it helped.

Following this project, I worked on the New Homepage Team, which is now visible to everyone that logs onto LinkedIn. My role was minimal, but it was still a very fun project to work on. You know those widgets in the right panel? I did the initial UI and backend integration for those. All the business logic, Ajax/JavaScript, CSS, and optimization was done by other folks on the team. Shortly after this project went live in November, I started prototyping again with Spring MVC + JSP.

The reason I was asked to prototype with Spring MVC was because they were using Spring on the backend, Spring MVC in a couple other projects, and a new project was being kicked off that used Grails. Rather than add another framework (Struts 2) to the mix, they wanted to see if they could suppress any further framework proliferation.

After a month of prototyping with Spring MVC + JSP, my results weren't as good as Struts 2. With Struts 2, I was able to use OGNL to do all the things their current JSP implementation allows them to do (call methods with arguments, use statics in EL, etc.). With standard JSP, a lot of this wasn't possible. If it was - it required writing lots of tag libraries and made it more cumbersome for developers to do certain things. At the end of that project, I determined that using FreeMarker might solve these problems. I also determined that neither Struts 2 nor Spring MVC would solve the ultimate problem of developer productivity. Neither framework would allow developers to go from make-a-change-and-deploy, wait-3-minutes-to-see-change-in-browser to make-a-change, save and wait-15-seconds-to-see-change-in-browser.

I recommended that this be the ultimate goal - to get rid of the deployment cycle and to allow minimal turnaround when deploying modified classes. After that problem was solved, it's true that moving to an open source web framework would likely provide an easier-to-remember API. However, the problem with moving to a new web framework would be that everything used to construct the existing site would suddenly become legacy code.

In the end, we concluded that the best solution might be to enhance the existing framework to be more like the available open source options. This would allow existing applications to keep using their code -- and if we enhance properly -- new applications can use a simpler, less verbose API and a templating framework that's easier to understand. We can make LinkedIn's version of JSP more like standard JSP while allowing its powerful EL to remain. We can add support for JSP Tag Libraries and Tag Files.

One of the benefits of moving to an open source web framework is there's a community, documentation and books that describe the best (or most common) ways to solve problems with the framework. LinkedIn has this, but it's all in code and no one seems to have a high-level of confidence that the way that they did it is the "best" way. Developers communicate well, but all the knowledge is stuck in their heads and inboxes - there's no way for new developers to search this knowledge and figure it out on their own without asking somebody.

By adopting an open source web framework, it's possible to solve part of this problem, but I think it's still going to exist - where a few engineers know how to use the framework really well (for the specific application) and the rest don't. We determined that regardless of open source vs. proprietary framework, what was needed was a set of developers that acted as authorities on how to develop web applications at LinkedIn. A UI Frameworks Team if you will. This would be their only job and they would never get pulled from this to work on projects or complete tasks related to LinkedIn's products. Some developers mentioned that they'd been asking for this for years, and some folks had even been hired for this. However, the formulation of this group has never happened and it's obvious (now more than ever) that it'd be awesome to have them.

The UI Frameworks Team
At the end of 6 months, it seemed my work was done at LinkedIn. I liked the idea of a UI Frameworks Team and recommended they start it with the authors of the existing web framework. They agreed this was a good idea. A few days later, I was pulled into the CTO's office and he offered me the job. He offered me the challenge of building this team and told me I could do it remotely (from Denver) and hire my own people to help me with it. I gulped as I realized I'd just been offered the opportunity of a lifetime. I knew that while this might not be the best option for LinkedIn, it certainly was an excellent opportunity for me. I said I'd think about it.

In the meantime, I was given a project which you might've read about. They asked me to migrate a Rails application to Grails and try to determine if they really needed both frameworks. I spent 2 weeks coming up to speed on both and flew to Mountain View to deliver my conclusion. Here's an excerpt from an internal blog post I wrote.

As far as I know, Rails has been used at LinkedIn for well over 6 months and Grails has been used for a similar duration. Both projects that've used these technologies have enjoyed extreme success. Both projects have been fun for the developers working on them and both have improved the technologies/frameworks they're using.

Here's an interesting quote about the Rails application:

Another app you might want to look at is BumperSticker, our facebook app. Interestingly we heard through joyent that DHH (the creator of Rails) told them that BumperSticker is the biggest rails app in the world (in terms of page views) - we are closing in on 1 billion monthly page views and we have 1 million unique users per day (about 10 million installs on FB). It's a little trickier to setup in a dev environment since you need to be running on FB, but the code itself is pretty interesting since we've iterated on it a bunch of times and are making extensive use of third party libraries such as memcached.

This quote loosely translates to "We have some Rails Ninjas on staff and we've been quite successful in developing with it and making it scale".

Both platforms have allowed developers to iterate quickly and turbo-charge their productivity.

My Conclusion: Allow Both

Why?

If you have talented developers that can whip out kick-ass code with either platform, pay them and pay them well. Passion is the most important part of any job. If developers are passionate about the application they're developing and the language they're using (notice language is secondary) - they can do great things.

I know this probably isn't the answer you wanted to hear, but it's what I believe. I think both frameworks are very similar. I believe the knowledge you gain from learning one framework is transferable to the other. A lot of the things I learned about Rails worked with Grails. Ruby's syntax is similar to Groovy's.

There's a natural synergy between these two frameworks. The hard part is figuring out when to use which one.

The application that I was asked to port from Rails to Grails? The one that was launched last week - LinkedIn Mobile.

After doing this research, I stepped up to the plate and accepted the offer to start a UI Frameworks Team and recruited some kick-ass Java Developers I know to be the founding members. Last week, I flew out to Mountain View to do some kickoff meetings and start getting the infrastructure in place so we can document, support and release code like a well-oiled open source project. There's nothing saying we won't use an open source web framework as the underlying engine, but I think this should be an excellent chance to see the power of open source governance and development style in a corporate environment.

Director of Engineering, Core Experience
I should mention one last thing. If you're an experienced Java Developer/Architect with a passion and deep knowledge of UI development (JavaScript, CSS, HTML), we've got a Director of Engineering, Core Experience position with your name on it. I might even get to interview you if you apply for this job. Furthermore, whoever gets hired will likely work very closely with my team. What's not to like about that!? ;-)

Posted in Java at Mar 06 2008, 08:00:49 AM MST 19 Comments

David Sachdev on Web Framework Proliferation

David Sachdev left the following comment in my post about the Java Web Framework Smackdown at TSSJS in Vegas:

The number of web frameworks out there is just astonishing, and in alot of ways I think that there is need for some consolidation in some way, shape or form. If you work in the Java world there is a sense of consolidation in the ORM space these days with JPA (the Java Persistence API). Sure if you are working strictly with JPA it is a bit more limiting then working directly with Hibernate, iBatis, or TopLink - but you no longer worry that you have made a critical misstep in your architecture by tying yourself do a particular ORM implementation. Similarly Spring gives you that similar "loosely coupled" feel that if Google's Guice because appealing to you, you don't feel like you've wasted all your framework foo on Spring. But web frameworks....that's another story.

I think if you had asked me a few months ago, I would have told you that the industry is promoting JSF (Java Server Faces). Everything from support in the IDEs to the availability of AJAX frameworks...and of course a flexible life cycle that allows for alternate implementations and various code to plug or be weaved in to the life cycle. And that while JSF on its own left quite a bit to be desired, the JBoss Seam project really has filled in the gaps in JSF, and in fact brought Java web development closer in agility to the Rails and Grails of the world that tout quickly built and deployed web applications.

But the thing that you continue to hear is that programming in JSF is painful. And you hear that EVERYONE used to use Struts. And that it is time to move past Struts. And given that, you have to consider Webwork and the merger of Struts2 into that framework - and their claims of rapid development. But you also have to consider Spring WebFlow and how that may help solve your JSF ills given that everyone is building off of the Spring Framework and they have been so good about keeping the framework updated and integrating the best of what is out there while innovating themselves. And then if you are looking at Spring WebFlow, you kinda have to go "Wait, but what about Spring MVC?"

Given its age, you might quickly dismiss Spring MVC until you realize that Grails is build upon it. Grails, that web platform that every java developer is either working with, or intends to work with soon. (Come on, you all have made the Ruby/Rails, Groovy/Grails, JRuby decision in favor of G2, right? I mean all the flexibility of what is out there in the Java world on top of the JVM, with a language that doesn't suck the life outta you....) And then you have to wonder that if you build upon Spring MVC as well as using Groovy and Grails where appropriate, might you be able to make that killer app in half the time.

But wait, you didn't think your choices were nearly that simple did you? There is this wonderful software company out in Mountain View that we need to pay attention too. In Google We Trust, right? And even if you don't worship at the Temple of the G (TOTG) like Sprout, you don't want to ignore them. And, if you've looked at the Google Web Toolkit (GWT) and weren't at least slightly impressed, I would be surprised. And if you are looking at the GWT, you can't totally ignore Yahoo's YUI - maybe with some of the what Prototype, Scriptaculous, or DoJo offer you. And then someone will come over and point out Echo2 to you, and well you have to admit, their demo looks nice. And well, there is Adobe Flex, and OpenLaszlo - I mean after all isn't Web 2.0 all about Rich Internet Applications. And surely you've heard that the performance of Swing is so much better these days and the "power of the modern Java applet"

So at the end of it all, you've got yourself alot of R&D to do, and just as you thing you've got a good grasp for the offerings out there, new and improved versions are out. And don't worry, someone else is also busy working on a new and greater web framework that you have to consider.

Wow - that's quite a mouthful David. Well written!

P.S. The Early Bird Deadline for TSSJS is today.

Posted in Java at Feb 22 2008, 02:47:44 PM MST 6 Comments

Leasons learned from using Seam

Yesterday, I noticed the Seam Developers released a new seamframework.org site. It's great to see a web framework team eating their own dog food. Of course, if all open source framework developers were paid full-time to work on their respective project, we'd likely see more of this.

My favorite part of the new site is the Forums, which has an Atom Feed you can use to monitor topics posted. This morning, I noticed a topic from Daniel Hinojosa titled ANN: amazinggates.com is alive with Seam & lessons learned. In this topic, Daniel lists a number of lessons he learned from working with Seam.

We deployed our web site at amazinggates using JBoss Seam. I would lie if I said it was it easy, but the reason I had some issues is that I didn't believe a lot of documentation.

  • I had refused to use Facelets, instead I used JSP. All I can say to newbies is don't do it. You owe to yourself to drop JSP like a bad habit.
  • I had refused to use Seam Managed Persistence and ended with LIES.
  • I had refused to use Seam-Gen, and used my own folder structure. I still use my folder structure, but only after I used Seam-Gen and learned what I had to do to make my integration tests work.
  • I had used 2.0 when it was still in CR and Beta releases. Although that is neither my fault or the Seam's fault, the greatest result was that I learned tremendously what Seam had to offer, and I was able to provide JBoss with some bugs, and help users in the forum.
  • It took 8 hours to learn that Seam's AJAX4JSF solution was the best solution on the planet.
  • I used faces-config for page navigation. Ok, and that was just stupid.
  • I didn't know what components.xml was for the longest time. I'm really going to take part of the blame on this one. I read the documentation and even after reading it I still had no idea what components.xml was for. I realized that if the documentation said that components.xml maps components to names the way it does in Spring XML configuration. I wouldn't have spent that much time.
  • I had refused to use Renderer.render for email, because I didn't believe that the view should be the place for the rendering. So I was going to use a StringTemplate solution. That was dumb, it took a while for me to realize that generating emails in the view was the BEST place to do so.
  • Integration testing was a bitch. That wasn't my fault, or Seam's fault. It really was the Microcontainer's fault, and I hope that that ends up better in the long run. I heard through the grapevine that really no one is working on the EJB Microcontainer and it is still stuck in Alpha. Redhat needs to invest some people into it. It really is THAT important.

So, all in all, I love the new website, and I love what JBoss Seam has to offer. I am excited with what it has to offer, and I will still continue to build my business around it. Good work to the team that made JBoss Seam possible.

The one thing I noticed about Daniel's "Amazing Gates" site is it seems extremely fast. Do you think this is because of Seam or did he follow the rules for high performance websites?

Posted in Java at Feb 13 2008, 12:19:27 PM MST 3 Comments

Added a Tag Cloud

I added a tag cloud to this site tonight. Thanks to Rich Sharple's Hacking Roller : Tag Clouds, it was pretty easy. It's currently located in the bottom-right corner. Here's a glance at this site's most popular tags:

acegi appfuse denver grails gwt hibernate ibatis java jsf maven maven2 myfaces rails roller skiing spring springmvc stripes struts struts2 tapestry tomcat travel webframeworks wicket

Enjoy!

Posted in Roller at Feb 12 2008, 10:04:07 PM MST 4 Comments

Reviews: Getting Started with Grails, Rails for Java Developers and Groovy Recipes

Two weeks ago, I mentioned a number of books I was hoping to read to get up to speed on Rails and Grails quickly. Over the last two weeks, I was able to polish off three of these (listed in order of reading):

Below are short reviews of each book.

Getting Started with Grails
Getting Started with Grails The Good: This is the perfect book to learn the basics of Grails quickly. At 133 pages, I was able to read this entire book in one sitting. The first couple chapters are very introductory, but likely necessary for beginners. The good news is you start writing your first Grails application on page 7 (Chapter 3).

Chapter 4 (Improving the User Experience) is good in that it shows you how to do warning, error and confirmation messages. This is something often overlooked in web frameworks and Rails and its "flash" concept seem to have made it important again. I remember way back in 2003 when I complained about frameworks not allowing messages to live through a redirect - everyone said it was something you didn't need. Now it's a standard part of most web frameworks.

The Bad: Uses Grails 0.3.1. This is understandable since the book was written in 2006 and published in 2007. Also, it doesn't cover testing that much (5 pages). If testing is so easy with Groovy and if Grails has Canoo WebTest support built-in, it should be shown IMO.

Rails for Java Developers
Rails for Java Developers The Good: This was an interesting book for me because it uses AppFuse for many of its Java-based examples. Unfortunately, it uses the Struts 1.x version which is cumbersome and verbose as far as Java web frameworks go. The most impressive part of this book is how Justin and Stu do an excellent job of walking the line and not insulting Java nor developers using it. They provide an easy to understand view of Rails from a Java Developer's perspective. There's detailed chapters on ActiveRecord (as it compares to Hibernate), ActiveController (compared to Struts) and ActiveView (compared to JSP). This book has excellent chapters on Testing, Automating the Development Process and Security.

The Bad: This book was published over a year ago, so it uses an older version of Rails. This means some commands don't work if you're using Rails 2.0. It's also a little light on Ruby, so I didn't feel I learned as much about the language as I was hoping to. That's understandable as it's more of a Rails book than a Ruby book.

Groovy Recipes (Beta from Jan 3, 2008)
Groovy Recipes The Good: I really like the style of this book and that it shows you how to get things done quickly with code samples. It's very no-nonsense in the fact that it contains a lot of code and howtos. I really like Scott's writing style and found this book the easiest to read of the three. This may have something to do with my eagerness to learn Groovy more than anything. The most refreshing part about this book is how up-to-date it is. Because it's a Beta, it seems to contain the most up-to-date information on Groovy and Grails. After reading Getting Started with Grails and working with it for a couple weeks, the first Grails chapter seemed a little basic - but that's likely because I've figured out how to mix all those recipes already. The Grails and Web Services chapter definitely has some interesting content, but I've rarely had a need to implement these recipes in a real-world environment. I'd rather see recipes on testing the UI (with the WebTest plugin) and how to use GWT and Flex with Grails. If SOUIs are the way of the feature, this is a must.

The Bad: Not much information on testing with GroovyTestCase, mock objects or implementing Security. If one of Groovy's sweet spots is testing, why isn't there more coverage on this topic? The Java and Groovy integration chapter is especially good, but there's very limited information on Ant and Maven. It's likely the websites provide sufficient documentation, but the Maven section only fills 5 lines on an otherwise blank page. The biggest problem I have with this book is I really like the recipes writing style and would love to see more tips and tricks. At 250 pages, I was able to finish this book with pleasure in a few days.

What's Next?
Now I'm reading JRuby on Rails (Apress) and Programming Groovy (Pragmatic Programmers). Following that, I'll be perusing dead-tree versions of Struts 2 Web 2.0 Projects (Apress), Prototype and script.aculo.us (Pragmatics) and Laszlo in Action (Manning). If any publishers want to send me books on GWT and Flex, I'd be happy to add them to my list. ;-)

Posted in Java at Feb 09 2008, 11:34:57 AM MST 10 Comments

Grails 1.0 and JRuby on Rails on WebSphere

A couple of interesting things happened today that relate to my Grails vs. Rails quest for knowledge.

The first is that Grails 1.0 was released. This was apparently a huge event as it swamped Codehaus' servers for a couple hours. This morning, it was pretty cool to shake Graeme's hand and congratulate him on the release. I also got to meet Jeff Brown for the first time. Who needs to go to a conference when you get to talk to these guys at work? ;-)

Secondly, I found an article by Ryan Shillington that shows how to deploy a Rails application to WebSphere. To me Rails + WebSphere seems like the last thing a Rails advocate would want - but who knows. In my experience, most developers that use WebSphere don't do it by choice.

For companies that have invested a lot of time and money into the JVM as a platform, it seems like Grails is the clear winner over Rails. However, the line gets blurry when you start talking about JRuby. I think JRuby will get there, but I don't believe it's there yet. If you look at the two major JRuby on Rails success stories (from Oracle and Sun), they've had to fix performance issues as part of their projects. With big companies investing in the platform, it's highly likely performance will be fixed in the near future. I believe both the Groovy and JRuby teams have said performance enhancements are their top priority for their next releases.

I think the biggest news related to performance of dynamic languages on the JVM is the new Da Vinci Machine project.

This project will prototype a number of extensions to the JVM, so that it can run non-Java languages efficiently, with a performance level comparable to that of Java itself.

Dynamic languages on the JVM seem to have a very bright future.

I got involved with Struts and Spring just before their 1.0 releases. Is it simply a coincidence that I happened to start looking into Grails right before its 1.0 release?

Posted in Java at Feb 05 2008, 11:32:12 PM MST 1 Comment

How do you get up to speed on Rails and Grails quickly?

What's the best way to learn Rails and Grails and satisfy one of my New Year's Resolutions (read more) at the same time? Books:

Thanks to connections with publishers, I was able to get PDFs of most of these for free. The only ones I paid for were the beta books (Groovy Recipes and Programming Groovy) from the Pragmatic Programmers. I doubt I'll read them all, but I've had fun so far.

I polished off Getting Started with Grails in a few hours. I expect to finish Rails for Java Developers this week. I used to hate reading PDFs, but I've enjoyed reading these books. A 30" monitor might have something to do with it.

After honing my Grails and Rails knowledge, I hope to become a GWT and Flex Ninja. For those GWT and Flex experts out there, what are the best books for those technologies? By "best", I mean the most advanced and up-to-date.

Posted in Java at Jan 31 2008, 11:29:19 AM MST 10 Comments

Is there room for both Rails and Grails in a company?

For the last week, I've been knee deep learning more about Rails and Grails. The reason is because I think developers (and companies) are going to have a hard time deciding which framework is best for them. The real question is: do they both do the same thing or are their different applications for each? Is "Grails vs. JRuby on Rails" a "Struts 2 vs. Spring MVC vs. Stripes" argument - where they're all so similar it probably doesn't really matter which one you choose?

Of course, the Stripes folks will object, but I really don't think it's that much better than Spring MVC 2.5 or Struts 2.1. Sorry guys. ;-)

If it is a Spring MVC vs. Struts 2 type of argument, then it seems to make sense for a company to standardize on one -- don't you agree? Does it make sense to allow both frameworks in a company if they're so similar?

Google has had much success in restricting its allowed programming languages to C++, Java, Python, and JavaScript. Shouldn't other companies do something similar? It seems like a good idea to restrict allowed web frameworks to a few as well. For companies with successful Java infrastructures, it seems logic to allow one Java-based web framework and Rails or Grails for getting things done as fast as possible.

Here's the sticking point: Ask any Rails developers and they'll say Rails wins hands down. Ask any Grails developers and they'll say Grails is the easy choice because it builds on top of Java's strong open source projects. Blah, blah, blah - where's the objective voice that's identified the "sweet spot" for each?

The Relevance guys, particularly Stuart Halloway, has a post about How to pick a platform. The logic in this post seems to imply that both frameworks do solve the same problem - just in different ways. Stu seems to recommend Rails for most applications, because Ruby is a better language. He says Grails might win if you have "an established team of Spring ninjas".

I know Stu and believe he does know his stuff (in both Java and Ruby). So is this the definitive guide on which framework to choose? If you have a staff full of Java developers, they should start learning/using Rails rather than doing the easier transition to Groovy, which they pretty much already know?

I don't know what the answer is, but that's what everyone seems to be saying. The problems is, the authorities on this matter (Rails vs. Grails) are often "head honchos" in companies that have a vested interest in seeing their respective framework/platform succeed. Since the Relevance team employs some Grails developers, it seems they're less biased. But who knows.

Is Rails really head and shoulders better than Grails? I don't think so, but I've only been programming with both for a week.

Posted in Java at Jan 30 2008, 11:48:14 AM MST 11 Comments

The future is now -- Java development in 2008

In The future is now -- Java development in 2008, Andy Glover writes:

The year 2007 was full of exciting plot twists, punctuated by growing excitement about dynamic languages, the open source evolution of the JVM, and the rise of Google as a strategic contributor to the Java community. The question is, what does all that tell us about the year ahead?
...
And so, despite some rumors to the contrary, I would argue that Java isn't going anywhere but up in 2008. Rather than peer into a crystal ball and try to divine the future, let's reflect on the major events and trends of the past year. Taken together, they reveal all we need to know about what's ahead in 2008.

He concludes the article with:

An African proverb states that Tomorrow belongs to the people who prepare for it today. Thus, the future of Java (at least for the next year) has already been brewing for some time. The events of 2008 will largely be shaped by the JVM itself, as languages like JRuby and Groovy grow in popularity and eventually gain enterprise-wide adoption. The promise of using Java to develop consumer mobile applications also seems more accessible than it has for some time, given Google's foray with Android and Sun's with JavaFX Mobile. Most of us will also be concerned with leveraging the emerging multicore systems and looking to Java 7's java.util.concurrent packages for answers. Lastly, open source Java and the business model surrounding it will continue to grow.

I agree that learning about JRuby and Groovy is a good way to be prepared for the future. Reading Ola Bini's Practical JRuby on Rails Web 2.0 Projects and/or Stuart Halloway and Justin Gehtland's Rails for Java Developers seem like good ways to get started with JRuby. With Groovy, Groovy in Action has received a lot of good reviews. For Grails, it's a bit more difficult as it's evolved so quickly w/o any updated books. I like the look of Scott Davis's Groovy Recipes, but that won't be released until March.

One thing to note: just because you learn these languages and frameworks doesn't necessarily mean you'll find a new job doing them. In my experience, there's still way more Java jobs than there is Rails or Grails jobs. I sat on a Consulting Panel last night at Denver's Ruby on Rails user group (DeRailed) and this was confirmed (at least for Ruby) by the recruiters on the panel. There were three recruiters and combined they've only seen 2 Rails positions in the last 6 months.

So if you're looking for a new job, I doubt you're going to find one that allows you to leverage your new-found JRuby/Groovy skills out of the gate. However, I do believe you can leverage these tools in your existing jobs and hopefully make your development life more efficient.

Posted in Java at Jan 25 2008, 09:03:18 PM MST 5 Comments