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.

AppFuse vs. Grails vs. Rails

In the comments of my Choosing a JVM Web Framework, Graeme Rocher writes:

no offense Matt, but I fear you are a grossly inappropriate person to be writing such a study given your past history of claiming frameworks like Grails are competitors to AppFuse. Any such study will come laced with doubts over its honesty and I'm sure this doesn't just apply to Grails.

In the post Graeme linked to, I said:

I think Grails and AppFuse are more likely competitors rather than compatible. Grails uses Spring, Spring MVC and Hibernate under-the-covers, whereas AppFuse uses the raw frameworks. Of course, it would be cool to allow different classes w/in AppFuse to be written in Groovy or JRuby. At this point, I think it's probably better for users to choose one or the other.

Since writing that post a year ago, I've changed my opinion about AppFuse being competitors with Grails or Rails. Why? Because they're different languages. I don't think you should choose a web development stack first. I think you should choose your language first. For those that choose raw Java, I think AppFuse provides a good solution. To be more explicit, here's a private conversation that David Whitehurst (author of The AppFuse Primer) and I exchanged.

David: Have you been looking at Ruby on Rails any? And, if so, I'm sure you're as impressed by those who command the language as I am. But, I think the J2EE web application is not dead yet. Do you think any comparison of the complexity of AppFuse vs. Rails should be mentioned in the book?

Matt: I'm highly aware of Rails, have attended talks and tutorials on it, even bought books about it - but I've never written an app, done a tutorial or used it in the real-world. I'm afraid of it. I'm almost certain I'd like it, and I'd likely like Grails as well. However, the reason I stick with pure Java is because that's where my clients' demand is and hence the consulting dollars for me.

It's probably also possible to create AppFuse for both Rails and Grails. I believe Rails' Streamlined in much like AppFuse. I like to think of AppFuse as language agnostic - it's always been designed to eliminate ramp up time. While Rails and Grails simplify the programming API and make it possible to develop code with less lines of code, it'd be nice to have user management, file upload and other things like AppFuse has. When I start using these frameworks, it's likely I'll develop some sort of features like AppFuse has and use them on projects. Of course, if they already have all the features of AppFuse via plugins, I wouldn't reinvent the wheel - I'm simply use what's already there and be happy about it.

I don't know if it's relevant to mention Rails, but it probably doesn't hurt. There's no reason to ignore the competition if they're indeed competition. I don't see them as competition, and I almost don't see Grails as competition either. AppFuse (in its current state) is for developers that've chosen to use the language and frameworks that AppFuse supports. It's not trying to solve everyone's problems - it's merely trying to simplify things for those using the frameworks it supports.

There's nothing saying that AppFuse can't have a Rails or Grails version in the future. For me, it'll happen if I start developing applications using these frameworks and see the integration needs like I saw with the Java frameworks. The good news is most of these frameworks have done the integration work, so it's really just a matter of creating features or using plugins.

David: I keep getting these "dream-squasher" friends of mine showing me Rails, Grails, and how wonderful Ruby is. It's impressive, but I'm not convinced that big business is ready to adopt it any time soon.

Matt: As a Java programmer, I think you'd be a fool to ignore Rails or Grails and not at least be familiar with them. There's no reason to discount technology until you've used it on a real-world project - at least 6 months or longer - IMO.

Just because you're productive in Ruby and like it - that doesn't make you a bad Java programmer.

I hope this clears up any confusion on how I feel towards Rails or Grails. I would welcome the opportunity to use them on a project. If I was starting a products-based company, I certainly would give them a shot in the prototyping phase. However, I'm a consultant that makes money from clients hiring me to explain/do what I know best. At the current time, that happens to be open source Java frameworks.

I do plan on learning a plethora of other frameworks, in other languages, I just haven't had the time yet. When I do, I hope that I can somehow become proficient enough to help companies adopt them as well. However, to build up that experience and expertise will likely take years. I think this is how lots of companies feel. Can you blame them for not "jumping ship" on their current skills and knowledge?

Of course, then you have the Relevance guys who seem to be doing exactly what I hope to be doing in several years from now. Not only do they specialize in Java and its frameworks, but they also do consulting and training around Rails, Grails and Ajax. I can't help but admire them tremendously.

Posted in Java at Aug 08 2007, 10:22:34 AM MDT 13 Comments
Comments:

Great post. I've been wondering what your opinion on Rails has been for a while, ever since you poked fun at the idea of switching over to Rails. I think you are over-estimating the time it would take you to learn Rails. Most of your knowledge, (HTML, CSS, JavaScript, SQL, Object-Oriented Programming) carries right over into Rails. Once you read through a few ruby/rails books, watch a few Peepcodes and Railscasts, and get a chance to build an app or two in Rails, you'll be pretty close to being an expert. You are right though, you should definitely fear Rails. Once you put any preconceived notions you have about Rails aside and fully embrace doing things the Rails Way, you'll never look back.

Posted by Paul Barry on August 08, 2007 at 05:47 PM MDT #

I touched on Java being relevant in large enterprises last year. I don't think things have changed much, but at least the architects are talking about RoR now. I've also been meaning to check out JRuby on Rails which sounds interesting.

Posted by Gavin Terrill on August 08, 2007 at 06:05 PM MDT #

Thanks for clearing that up Matt. Good to hear you're branching out ;-)

Posted by Graeme Rocher on August 09, 2007 at 08:37 AM MDT #

We love you too, Matt. ;-)

Posted by Justin Gehtland on August 10, 2007 at 12:44 AM MDT #

I find it's easy to get into analysis-paralysis w/ the Java frameworks out there. All the flexibility is a curse and also a blessing. For all its faults (it is a young framework after all), Rails does have a benefit of a largely captive audience. JRuby on Rails looks promising, but it's still pretty rough around the edges.

Posted by Kenneth Lee on August 10, 2007 at 01:23 AM MDT #

As a developer at a company that has a high interest in developing lots of applications for various clients quickly and efficiently, I'm interested in RoR, however, I question its enterprise-readiness. Maybe I'm being naive, but when I think about the out-of-the box functionality in JEE, such as remoting, security, messaging, along with all the presentation layer frameworks out there, it's hard to think about abandoning such a vast toolset.

I've had the pleasure of working on a project using Apple's WebObjects recently. I'm surprised this framework isn't more popular. It has great code generation features and in terms of persistence, EOF requires very little coding - you don't even have to create entities. In fact, it makes Hibernate feel like it's more work.

Posted by Geoff Raeder on August 18, 2007 at 02:04 PM MDT #

I'm a java programmer who has recently taken up Rails. My experience is so far:
  1. Rails is beautifully architected, illustrated by its keen balance on pluggability with gems, plugins and engines with generators that create skeletons (or scaffolding) for common tasks, and the resultingly small amounts of code you then have to write to do great things.
  2. Rails uses 'convention over configuration' -- which is fine except when the conventions aren't all that clear (what I call 'magic'). I've started a blog on all this trying to help java programmers with this magic: http://www.julianonsoftware.com/java2rails
  3. Ruby still doesn't have a JIT compiler so it's slower. However YARV, due end of 2007 is due to help this: http://en.wikipedia.org/wiki/YARV
  4. Java is backed by high profile vendors with big marketing budges. Rails will probably not ever get there but the essence of its innovation is being ported -- JRuby, Jrails, Groovy, grails, etc -- and as such, I'm not expecting to see Enterprise Ruby happening any time soon. Enterprise JRuby is another thing however, as the infrastructure is already invested and java developers can seep slowly into the 'Rails ways of thinking'. Same for Microsoft as well.

Posted by Julian on August 29, 2007 at 10:16 AM MDT #

I don't really understand all the buzz surrounding rails, and grails. I have one application in rails right now. I feel It lacks flexibility and the developer is stuck with mongrel on the web server side.
What I don't get is, well, if this is about lines of code and auto generated crud etc.. well you can encapsulate all the way up to makeBlogFromDB(). Why not use andromda, Appfuse auto generates as well.
What I want to know is, what does Matt think about Jboss Seam :)

Posted by Richard Corsale on August 31, 2007 at 05:53 PM MDT #

I am a Java developer, and I have tried using Rails. It is very easy to use, and does a lot of things very quickly. However, I have realized that it is not suitable for me to develop complex applications, because I am not very familiar with HTML, CSS, and JavaScript. It takes a lot of time to work with Javascript, and it just does not seem logical enough like Java (no debugging support etc). If RoR had a framework like ZK/Echo2 or even GWT -where I do not have to use JavaScript/CSS etc, I would use Rails. Otherwise, it becomes too complex to develop web applications. I agree that other standard Java Web UI frameworks like Struts/JSF/Tapestry also require JavaScript knowledge, but the presence of frameworks like ZK/Echo2/GWT allows me to avoid JavaScript and work completely in Object Oriented Java.

Posted by sparqle on September 04, 2007 at 05:34 PM MDT #

I am a RoR developer and i understand your point of view, but by the other side i am sure that developing web applications on Ruby takes much less time and its very much fun for developers, also java has "no rapid turn around", you have to compile 100 times, and its not true that to develop in rails you need knowledge of Javascript because it has rjs code so that you dont need to know javascript.

Posted by rodrigo on November 30, 2007 at 02:28 AM MST #

You've got other similar competitors too in the form of iWebMVC.
(Uses Spring & Hibernate & Dojo 7 DWR).
I had a look at code and liked what it generated.
And ther is Sculptor too.
Haven't ever been able to totally get my head around it though...
I've just read Groovy in Action and and definately going to be looking into Grails in more detail. The one thing where I think apps with a pure Java pedigree will still win is when you have a lot of heavy computation. Groovy is like Smalltalk. Everything is an object. Dierk and the guys wheo wrote Groovy in Action pointed out that currency based arithmetic was done in cents due to the poor performance of BigDecimal on their first big commercial app. That makes me a little weary, but I think Grails brings a lot to the table and from first impressions it looks a lot easier than AppFuse. (which I think is great too!).
Has anyone looked at Skyway Builder yet?
Keep seeing Google ads all the time on it..

Posted by Jeremy Flowers on January 07, 2009 at 07:19 PM MST #

I always wonder what people mean by "enterprise ready". Several high traffic websites out there are built with Rails, Twitter probably being the most popular one. Qype.com is Europe's largest local review website and runs almost completely on Rails (except for the search). XING uses Rails on the Web and app layers. Those are all massive websites with millions of page impressions each month.

There are countless plugins for Rails to extend its functionality and it still grows very quickly. Plus, testability on Rails (Ruby in fact) is lightyears ahead of any Java framework I used. A major downside for many devs may be the weak IDE support for Ruby and Rails (even though I use Eclipse extensively, Aptana/RadRails just didn't quite cut it for me), but this is likely to change soon.

Oh and, today you can certainly use other webservers than mongrel with Rails, such as lighttpd and Apache mod_rails.

Posted by Matthias on April 16, 2009 at 08:24 PM MDT #

Regarding whether Rails is "enterprise"...

I do consulting for Dow Jones and the Wall Street Journal and it's currently used in mutiple apps- both Ruby and JRuby. And this is definitely an "enterprise" environment with messaging, SOAP, heavy security layers, etc...

Posted by AnothaOpinion on June 24, 2009 at 08:51 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed