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.

Comparing Web Frameworks: Time for a Change?

I first came up with the idea to do a "Comparing Web Frameworks" talk in 2004. I submitted a talk to ApacheCon and it got accepted. From there, I outlined, created sample apps and practiced this talk before ApacheCon. Believe it or not, that was my first time speaking in front of a large audience.

Historical note: October 2004 was a pretty cool month - I discovered Rails and Roller had a 1.0 release candidate.

When I created the presentation, it was in large part due to all the WebWork and Tapestry folks harassing me on this very blog. I started using Struts in June 2001 (the same month 1.0 was released) and had used it successfully on many projects. Part of the reason this blog became so popular was I posted lots of tips and tricks that I learned about Struts (and its related project) while using it. After a while, the noise became too heavy to ignore it - especially after I'd tried Spring MVC. So in an effort to learn more about the the other frameworks, I submitted a talk and forced myself to learn them. It seems to have worked out pretty well.

With that being said, I think it's time for a change. The reason I originally wrote this was to educate developers on how the top Java web frameworks differed and encourage developers to try more than one. A while later, I realized there's different tools for different jobs and it's not a one-size-fits-all web framework world. It's not a component vs. request-based framework world either. There's lots of options now. When I've delivered this talk earlier this year, I've always felt like I've left quite a few frameworks out. The solution could be to add more and more frameworks. However, I don't think that's a good idea. The talk is already difficult to squeeze into 90 minutes and it's unlikely that adding more frameworks is going to help.

The change I'd like to do is to reduce the number of frameworks down to (what I consider) the top web frameworks for deploying to the JVM. What are those frameworks? IMHO, they are as follows, in no particular order:

  • GWT-Ext
  • Wicket
  • Grails
  • Flex/OpenLaszlo
  • Seam
  • Struts 2

The RIFE, Tapestry and ZK folks can start bitching now. Sorry - less frameworks make for a more interesting talk. Maybe I'll add you in the future and I can ask the audience which ones they want compared then we can choose four and go from there. Why don't I mention Spring MVC? Because I think Struts 2 is easier to learn and be productive with and I also like it's more open and active community. I've written applications with both and I like Struts 2 better. As for Flex vs. OpenLaszlo, I'm somewhat torn. It seems like learning Flex is going to be better for your career, but it's likely useless without the Flex Builder - which is not open source. However, at $250, it's likely worth its price. I know the Picnik folks used Flex for their UI - I wonder how much they used Flex Builder in the process?

What do you think? Are these the top web frameworks for JVM deployment today? The next time I give this talk is this Thursday at ApacheCon. I may try to re-write my talk and then give the audience a choice of old vs. new. The downside of doing the new talk is I won't have time to write apps with GWT, Flex or Seam. Anyone care to post their top three pros and cons for any of these frameworks?

Posted in Java at Nov 12 2007, 04:46:56 PM MST 50 Comments

SOFEA: Also known as SOUI

InfoQ asks Does the rise of Service Oriented UI (SOUI) means the death of server-assisted MVC? A similar thread was started on JavaLobby last week: Web frameworks peaking toward obsolescence. A month ago, TSS posted a whitepaper titled Life above the Service Tier.

As far as I can tell, Nolan Wright and Jeff Haynie haven't read the Life above the Service Tier article - where the very same architecture is called SOFEA. Nolan and Jeff are calling it SOUI. Is there a difference that you can see? I don't think there is. However, I do think there's a better acronym out there that could spark more interest in this type of architecture. After all, isn't the tipping point often triggered by good timing and clever marketing?

As I mentioned previously, I really like the ideas behind SOFEA/SOUI. However, I don't think it will replace the existing frameworks we use to develop web applications. Those have been very successful and will continue to be. The internet is growing - there's lots of room for new applications developed with new architectures. As long as this new architecture is scalable and maintainable, I can't think of a good reason why it won't succeed.

Posted in Java at Nov 12 2007, 10:36:41 AM MST 15 Comments

Introducing the Cadillac named Snow White

Diamond White Today I completed something I've been hoping to do for a couple months now - I bought a new car! I started looking a few weeks ago and today I let Janet the Used Car Sales Lady talk me into buying a 2004 Cadillac Escalade. I was planning on buying a used Yukon, but took a fully-loaded one for a test-drive this morning and found it to be sluggish and kind of a rough ride. Since I like the look of the Escalade, I decided to test-drive one of those this afternoon. 2 hours later, I'd made a screaming deal that I couldn't pass up. I wanted the shorter SUV, but ended up with the longer one. Oh well, I went from a car to an SUV to get more room so I don't feel too bad.

The main reason I wanted to get an SUV (and a big one at that) was because I've found my Honda Accord to be too small to cart the kids around in. While it works, it's tough to pack any sort of gear (bikes, skis, etc.) with us. I know, I could have boughten a roof rack and taken my 12" subs out of the trunk to free up some room, but I was ready for a truck. After the Blizzard of 2006, I didn't want to get snowed in for days at a time. Also, the kids and I got Winter Park/Copper Ski passes so I want to be able to take them skiing a lot this winter.

Disclaimer: I realize this is about the least green thing I could do and I'm not helping the environment at all. My only justification is 1) I had a very low carbon footprint the first 16 years of my life growing up at the cabin with no electricity or running water and 2) I don't really drive a whole lot. I averaged around 7,000 miles a year on my Honda - having only 36,000 miles after 5 years. With this one, I'll probably drive it a fair bit this winter and hardly drive it at all next summer and beyond. By then, hopefully the Bus is done and I can cruise around town in the sweetest ride I've ever owned.

As for the name "Snow White" - that was Abbie's idea. We'll see if it sticks.

Update: I forgot to mention one of my favorite features - a direct iPod hookup. I can navigate playlists from the stereo in the car. The display is only limited to 8 characters, but it's a lot better than broadcasting over FM.

Posted in General at Nov 10 2007, 10:34:06 PM MST 9 Comments

Upgrading AppFuse to Spring 2.5

Last night, I spent a few minutes upgrading AppFuse to Spring 2.5 RC1. According to InfoQ, Spring 2.5 is a drop-in upgrade for Spring 2.0. However, if you're using Maven, it's not quite that easy. The good news is it is easy, you just need to change your pom.xml a bit. The steps I used to upgrade AppFuse are listed below:

  • Add a repository for Spring's milestone releases:
    <repository>
        <id>spring-milestone</id>
        <url>http://s3.amazonaws.com/maven.springframework.org/milestone</url>
    </repository>
    
  • Change artifactId of "spring-mock" to be "spring-test".
  • Change version to be 2.5-rc1.

At this point, if you're using "spring" as your artifactId (instead of the smaller fine-grained dependencies), you'll likely get the following error in a Spring MVC application:

java.lang.NoClassDefFoundError: 
org/springframework/web/servlet/handler/AbstractUrlHandlerMapping

This happens because Spring MVC is no longer included in the uber spring.jar. You'll need to add a dependency on "spring-webmvc" to solve this problem. Unfortunately, this JAR is dependent on the fine-grained modules, so you may have to modify your pom.xml to depend on the fine-grained modules - or exclude them all from spring-webmvc.

The good news is Spring has excluded all the invalid commons-logging dependencies for you so you don't have to anymore.

After getting all the dependencies straightened out - I ran the integration tests:

org.springframework.beans.NotReadablePropertyException: Invalid property 
'fileUpload' of bean class [org.appfuse.webapp.controller.FileUpload]: Bean 
property 'fileUpload' is not readable or has an invalid getter method: Does the 
return type of the getter match the parameter type of the setter?

Looking at uploadForm.jsp, I'm guessing the problem happens because of the following code:

<spring:bind path="fileUpload.file">
<input type="file" name="file" id="file" class="file medium" value="<c:out value="${status.value}"/>"/>
</spring:bind>

Confirmed - changing the "path" attribute to "file" fixes the problem. I also found out that setting the "value" on an <input type="file"> doesn't work, so wrapping the field with <spring:bind> doesn't make a whole lot of sense anyway.

To conclude, it doesn't look like the first release candidate of Spring 2.5 is exactly a drop-in upgrade for Spring 2.0, but it's pretty darn close. I'm sure by the time it's released, it will be. I'd encourage you to try 2.5 in your Spring-dependent projects to see if you find any issues.

Update: I was successfully able to migrate AppFuse from using the uber JAR to fine-grained JARs. However, I ran into a couple issues in the process. The first is that even though I'm including spring-aop in the appfuse-service module, it's not pulled in for the web frameworks (which depend on appfuse-service). Explicitly declaring spring-aop as a dependency for the appfuse-web module fixes this. Secondly, I had to modify my Acegi Security exclusions so it wouldn't include dependencies that no longer exist in 2.5.

<dependency>
    <groupId>org.acegisecurity</groupId>
    <artifactId>acegi-security-tiger</artifactId>
    <version>${acegi.version}</version>
    <exclusions>
        <exclusion>
            <groupId>org.springframework</groupId>
            <artifactId>spring-dao</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.springframework</groupId>
            <artifactId>spring-remoting</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.springframework</groupId>
            <artifactId>spring-support</artifactId>
        </exclusion>
    </exclusions>
</dependency>

Posted in Java at Nov 07 2007, 08:27:20 AM MST 3 Comments

The last external hard drive I'll ever need?

LaCie 2big Network (2-disk RAID) Today I pre-ordered a 1TB LaCie 2big Network (2-disk RAID) hard drive. Looks pretty beefy eh?

Why did I get this? Because it's time to get serious about backup. I currently have 3 external hard drives and none of them are big enough to backup everything. I also tend to use them as alternative storage rather than backup. I'm running out of space on my Linux box ... the list goes on. In reality, you can never have too much disk space can you?

I have a 250 GB Lacie d2 that I'm using on my MacBook Pro with Time Machine. I also have a Lacie Rugged that I use when I travel. I try to backup before I go to do major things - like a training class or speak a conference. That way, if my laptop dies, I can use someone else's Mac and be good to go. If there are no Macs, I keep all my materials in Subversion. Lastly, I have a 200 GB Maxtor that I use as a backup on my Windows box.

My ideal solution is 1) each machine has its own backup hard drive and 2) each machine can store files on a central server. I used to use Samba on Linux, but it seems easier to use my Airport Extreme and a big ol' drive like this Lacie. What's your setup and/or advice?

January 30, 2008 Update: Because of the feedback on my post, I never purchased this hard drive. I still need a back up solution and I'm thinking of using Apple's new Time Capsule. If it works with Windows and Linux - I'm sold.

Posted in General at Nov 06 2007, 03:17:07 PM MST 12 Comments

Going to see Fake Steve Jobs Tonight

One of the perks of working at LinkedIn, and being out in Mountain View this week, is I get to attend a talk tonight where Guy Kawasaki interviews Fake Steve Jobs. It's my first trip to the Computer History Museum, so it should be a fun show. If you're not able to make it tonight, it looks like they'll be live streaming the event from the LinkedIn blog.

My only question is - do you think FSJ will act like Jobs or himself? I'm hoping for the former.

Update: That was an awesome event. Thanks to LinkedIn for hosting it and for Fake Steve for the great stories behind his journey.

Update 2: The LinkedIn Blog has videos from the event.

Posted in Mac OS X at Nov 06 2007, 02:41:15 PM MST Add a Comment

Happy Birthday Abbie!

5 years sure goes by quick when you're a parent. It's hard to believe that 1) I started blogging over 5 years ago and 2) Abbie turns 5 years old today. It's pretty cool to be able to look back at previous birthdays: the birthday, #1, #3 and #4. I don't know what happened for #2, but I sure feel bad for not blogging the event.

Congratulations kiddo - you've turned into a beautiful (and awfully smart) little girl.

Pretty Girl

P.S. Don't tell her I called her a "little" girl - she's obviously a "big" girl. ;-)

Posted in General at Nov 05 2007, 12:37:24 PM MST 3 Comments

Roller and Struts 2 BOF at ApacheCon next week

ApacheCon Are you going to ApacheCon in Atlanta next week? If so, you might want to mark your calendar for the Roller + Struts 2 BOF on Wednesday night. It's from 8:30 - 9:30 in "Room 3" (whatever that means) and free beer will be sponsored by Atlassian. Thanks Guys!

Apparently, projectors aren't provided for BOFs, so we are in need of a projector to do a small presentation. If you happen to have a "projector connection" in Atlanta next week, please let me know.

Posted in Java at Nov 05 2007, 08:25:26 AM MST Add a Comment

RE: Life above the Service Tier

Yesterday I wrote the following:

I hope to develop with Flex, Grails, GWT or YUI + Struts 2 in the next 6 months. These seem like the most exciting technologies for Java web development in 2008.

This post is meant to explain why I think these are the most exciting technologies going forward.

A few weeks ago, a very interesting paper was posted on TSS: Life above the Service Tier. In this paper, Ganesh Prasad, Rajat Taneja and Vikrant Todankar introduce a new architectural style they're calling SOFEA, for Service-Oriented Front-End Architecture. To summarize:

The principles of SOFEA are:

0. Decouple the three orthogonal Presentation Tier processes of Application Download, Presentation Flow and Data Interchange. This is the foundational principle of SOFEA.

1. Explore various Application Download options to exploit usefully contrary trade-offs around client footprint, startup time, offline capability and a number of security-related parameters.

2. Presentation Flow must be driven by a client-side component and never by a server-side component.

3. Data Interchange between the Presentation Tier and the Service Tier must not become the weakest link in the end-to-end application chain of data integrity.

4. Model-View-Controller (MVC) is a good pattern to use to build the Presentation Tier.

Their paper can be downloaded from Life above the Service Tier.

I read this paper earlier this week and enjoyed reading it as well as thinking about the concepts it introduces. First of all, I believe SOFEA only applies to web applications and isn't a valid architecture pattern for web sites. While it may work for web sites, the traditional mechanisms (serving pages from the server side) seems to work well and isn't going away anytime soon.

So if SOFEA is the way of the future for developing web applications, where does that leave all the web frameworks that serve up pages server-side? This includes all Java web frameworks, Ruby on Rails and PHP. I think it leaves them in an interesting situation. They can still be usable if they can serve up the Application Download and the Data Interchange, but otherwise, they seem pretty much useless with this new architecture.

Is a SOFEA architecture a silver-bullet? I doubt it as there's still a lot of unanswered questions. How does SOFEA solve i18n and validation? Is it possible to re-use server-side validation rules in the client-side architecture? Granted this is probably a client-side framework feature rather than a SOFEA concept, but I still think it deserves some thought.

I don't know if i18n is that much of an issue for most applications. Most of the gigs I've consulted on in recent years were English-only, with no plans for internationalization. Validation is often server-side too. However, I believe server-side validation is often done simply because the web framework being used did not provide good client-side validation. How does i18n work in a JavaScript application? Can you bundle i18n scripts in the Application Download and have those read on the client-side - or do you serve up a different version of the application for different locales?

I think the most interesting part of SOFEA is how simple the backend becomes. With Spring and Hibernate (and some type of remoting) it should be easy to develop your SOA backend. But how do you publish those services? Do you still use a web framework on top to handle validation and such, or do you just markup POJOs with @WebService annotations?

Will 2008 be the year for SOFEA applications? It's definitely possible. I'm thinking of starting a Denver SOFEA user group to discuss and promote this architecture style. If I did - would you be interested in attending?

Posted in Java at Nov 02 2007, 12:03:49 PM MDT 13 Comments

Google Code for Educators

Google Code for Educators looks like some really great stuff from Google.

This website provides teaching materials created especially for CS educators looking to enhance their courses with some of the most current computing technologies and paradigms. We know that between teaching, doing research and advising students, CS educators have little time to stay on top of the most recent trends. This website is meant to help you do just that.

In the Tutorials area, you will find a set of online tutorials to which you can point students to learn basic concepts in important new technologies, or if you need a refresher.

In the Sample Course Content area, you will find materials such as lecture slides, readings, problem sets and projects that you can download to use in your own course. All these materials are distributed under a Creative Commons license, so you are free to use and modify these materials according to the terms of the license. This area includes sample course content developed by CS Faculty from various universities and Google engineers.

In the Video Lectures area, you will find a set of video-taped lectures from Google Video on our technology areas. These videos are great opportunities for students and faculty to hear directly from some of the current pioneers in high-tech.

In the Tools section you will find a set of tools and resources to help you get started with the material highlighted on the site. This area includes tools developed by Google engineers, as well as links to external resources.

Posted in Java at Nov 02 2007, 11:22:22 AM MDT Add a Comment