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.

Going to Colorado Software Summit? Bring your skis!

As I mentioned last week the Colorado Software Summit begins this weekend. I don't know what to expect weather-wise, but the Keystone forecast looks like it might snow a bit. A-Basin is open and tickets are only $49 per day. Since it's only a few miles from Keystone, I think I'll bring my skis and hit the slopes. If you're coming to the show and would like to join me, let me know.

Based on my schedule, I'm currently thinking of going Tuesday, Thursday or Friday morning. If the conditions are good, I may even go a couple times. Below are a couple pictures I took during the conference in years past. It'll be interesting to see what the weather is like this year.

Snow in Keystone Keystone

Posted in General at Oct 17 2008, 11:47:55 AM MDT Add a Comment

The Colorado Software Summit and Spring 3.0's SVN

In a little over two weeks, my favorite conference begins in Keystone, Colorado. The reason I like it so much is because it's an annual gathering (this will be my 4th year) with friends and it's somewhat like a vacation, except you get to learn a lot. This year I'll be speaking about Appcelerator and Spring 3.0.

A few weeks ago, I wondered How open source is Spring and expressed my frustration in not being able to find the source code. At almost the same time, SpringSource's controversial maintenance policy was announced. Developers booed, Free Spring was founded and SpringSource changed their tune. In addition, someone sent me the FishEye URL for Spring 3.0's SVN. From that, I was able to figure out how to get Spring 3.0's source code.

svn co https://src.springframework.org/svn/spring-framework/trunk spring-3.0

The only bad news is FishEye shows the last change as "17 September 2008 ... (21 days ago)". If Spring 3.0 M1 is supposed to be released any day now, you'd think there would be more SVN commits. Anyone from SpringSource care to comment?

Posted in Java at Oct 09 2008, 08:23:21 AM MDT 6 Comments

Talks for the Colorado Software Summit

I'm looking forward to another great year at the Colorado Software Summer in October. I submitted a couple abstracts back in April and have recently been granted the opportunity to change one.

The reason for the change is Yan Pujante (founder at LinkedIn) is going to do my talk on Building LinkedIn's Next Generation Architecture with OSGi and Spring. Since he's been very integral in writing the existing codebase, as well as the move to OSGi, it seemed more appropriate for him to do this talk. I'd like to keep my talk on Appcelerator, but I'm having a hard time deciding between four other options.

If you're planning on attending CSS this year, let me know which one you'd like to see most.

I could see changing the first option to Spring Web specifically. I could also see adding Rails and Grails to the 3rd choice. The 4th one is a lofty goal as the project has just begun. If we succeed, it could be a great talk.

Posted in Java at May 29 2008, 03:40:13 PM MDT 6 Comments

The Perfect Day for a Homecoming

Today was a great day and a terrific start to a fun-filled weekend. The morning, I delivered my last talk at the Colorado Software Summit then drove home on a beautiful Colorado day. See proof below:

Lake Dillon

I got home just in time to meet the tow truck who was hauling my bus home. The shop were it was at was too slow. I've been talking to MotorWorks Restorations (in the Springs) and I hope to get it into their shop w/in the next couple of weeks. After they've completed the body and paint (and possibly electrical), I hope to rebuild the engine, finish the interior and have it on the road by next summer.

Homecoming

I missed my delivery of Leopard this morning, but I can still get it before Monday if I can make it to the Fedex store before 7PM tonight. With happy hour starting at 5:30 and the Homecoming DU Hockey game at 7, this day just keeps getting better.

Hope y'all have a great weekend!

Posted in The Bus at Oct 26 2007, 04:25:30 PM MDT 2 Comments

Introduction to Grails with Scott Davis at the Colorado Software Summit

Grails According to Scott, today's Java-based web frameworks are partial solutions at best. They're only solving one piece of the puzzle - you still need to manage persistence, deployment, etc. all by yourself.

We're moving into a new era of web frameworks. The expectation now is a full-stack solution. Grails is a fully integrated modern Java web application in a box. It contains Spring, Hibernate, Quartz, Log4J, Jetty, HSQL, JUnit and Ant. You're not limited to using Jetty, you can type "grails war" and create a WAR that you can deploy to any application server. In a single zip/tar, you get the whole thing - including the database and servlet container. You get a lot of good default for free, but you're not limited to those defaults.

What does "modern" in a framework mean? It means it uses Convention over Configuration - Grails autowires components together based on naming conventions. Struts 1.x uses Configuration over Configuration - the more XML the better.

The Wisdom of Crowds - why are the many smarter than the few? What is the wisdom of crowds when it comes to web frameworks. Struts is the wisdom of crowds when it comes to web frameworks. It's based on sound principles (MVC) and was written by Craig McClanahan. He was the architect of "Catalina" Tomcat 4 and wrote Struts shortly thereafter. David Geary was contributor #2 to Struts. It has a proven track record and has a 60%-70% market share. Struts must be the perfect framework - especially since it has such a great pedigree.

So what's wrong with Struts?

  • It's 7 years old
  • It's verbose and overly complex (reflective of the EJB 2.x era)
  • Splintered community: Craig moved on to JSF -> created Shale, then the WebWork merger
  • While Struts 1.x was an unqualified success, Struts 2.x can't seem to build that critical mass - it can't seem to reach The Tipping Point like Struts 1.x did

The Recipe for a Tipping Point: Contagiousness / viral, tiny "tweaks" to a proven model can yield big, disproportionate effects, the rise is not "slow and steady" - the effect is dramatic and immediate.

Ruby on Rails won the hype award. It's largely worth the hype, but it's not revolutionary - it's evolutionary. It has tiny tweaks to the proven MVC-driven approach: Convention over Configuration, Scaffolding and Unified Technology Stack.

The one thing that Rails is lacking is Java support. Grails, on the other hand, offers the same experience using known, proven Java solutions.

  • Rails => "replacement"
  • Grails => "upgrade"

Scott drank the Rails Kool-Aid for a while and enjoyed it, but found it difficult to switch from Ruby in the morning to Java in the afternoon. With Grails, he doesn't have to do as much context switching, as well as all the Java libraries are available - the ones you know and love.

You can drop groovy.jar into your classpath and write Groovy code. One nice thing about Groovy is you can rename your existing .java files to .groovy and they'll work just fine. Included Ajax support: Script.aculo.us and Protoype as well as YUI. YUI is battle-tested since it's used by Yahoo and very well documented. You can use "grails install-dojo" to install the Dojo toolkit. Grails has a wealth of plugins available at http://grails.org/plugins.

Now we're going to crack our nuckles and build some code - slides are over.

 grails create-app conference
 cd conference
 grails create-domain-class Speaker (add some fields)
 grails generate-all Speaker
 grails run-app

The impressive things about this set of commands is I was able to 1) download Grails and 2) run all these commands at the same time that Scott did. I was definitely impressed (I knew I would be). Auto-scaffolding - you can get the same thing as "generate-all", but it generates controllers and views at runtime in-memory. All you need to do is create a domain object (i.e. Talk) and then create a TalkController that has the following line in it:

def scaffold = Talk

As a test, I tried this at the same time that Scott did and got the following error. It looks like Grails/Jetty isn't smart enough to pick up new classes as they're added.

[263102] commons.DefaultGrailsApplication Class not found attempting to load class Talk
java.lang.ClassNotFoundException: Talk
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

Grails comes with a number of environments. Dev (the default) auto-reloads changes to Controllers, Views and even the Model (this is helpful for rapid development). Prod loads all items statically for maximum performance. To change the environments - you can change DataSource.groovy.

For some reason, adding/removing some properties on my Talk object and my application hasn't been the same since. Now when I try to access my TalkController, I see the following stack trace:

org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: difficulty of: Talk; nested exception is org.hibernate.QueryException: could not resolve property: difficulty of: Talk
	at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:640)
	at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
	at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:378)
	at org.springframework.orm.hibernate3.HibernateTemplate.executeFind(HibernateTemplate.java:342)
	at org.codehaus.groovy.grails.scaffolding.DefaultScaffoldDomain.list(DefaultScaffoldDomain.java:112)

I asked Scott about this error and he proved that removing properties from domain objects should work. I told him restarting Jetty didn't fix the problem and he suggested dropping the "Talk" table and letting Grails re-create it. Unfortunately, I have no idea where this database is, so that's difficult to do. Doh - now I realize what was causing the problem. Before I dropped the "difficulty" property, I had clicked on the column and that property was still referenced in the URL. When I'd refresh the browser, the stack trace occurred. I don't know if I'd consider this a bug or not.

dbCreate = hibernate.hbm2ddl.auto is used. When in development create-drop is used. In production and test environments, it uses update and saves the data between restarts.

You can turn off Hibernate's automatic schema alteration by commenting out "dbCreate" line in DataSource.groovy.

To run your application in Tomcat instead of Jetty, you can run "grails war" and copy the WAR to Tomcat. The WAR is created with the production environment by default, so you may need to pass in arguments or set environment variables if you want the WAR created in dev mode.

At this point, my battery died. Scott continued to cover how to order form elements (when using scaffolding) with "static constraints" and how to add validation rules. It was an excellent presentation and Grails definitely looks like a really cool web framework. The best part is I learned most of what you need to know to use it - in an hour!

I might have to try Grails soon - I love the concept of Life above the Service Tier and Grails would work nicely for serving up REST. I think YUI, GWT-Ext and Flex are probably the best frameworks for developing a SOFEA client. The question is - when using YUI, how do you download all pages in the application at once?

Posted in Java at Oct 25 2007, 07:03:42 PM MDT 19 Comments

Choosing a JVM Web Framework

This morning I delivered my Choosing a JVM Web Framework presentation at the Colorado Software Summit. One of my goals for the talk was to get more audience participation and stories of how folks thought it best to choose a web framework. The room was packed and the crowd was interested, so we barely even used the slides I prepared. One of the most interesting things about the audience was that over 60% (of 50-60 people) were using Struts 1. Most of them came to learn about frameworks they might think about migrating too. Unfortunately, I didn't talk a whole lot about the frameworks and their features, but a few members had advice concerning frameworks *not* to use based on their experiences. Overall, it was a lot of fun to interact so much with the audience and hear their thoughts on web development for the Java Platform.

You can download a PDF version of my presentation from my presentations page. Thanks to all the folks who responded to my Stories Wanted post - I used many of these comments as part of the "Case Studies" in the presentation.

Posted in Java at Oct 23 2007, 02:20:13 PM MDT 3 Comments

Apache Roller, Acegi Security, LDAP and JA-SIG CAS

Earlier today, I delivered my talk on Apache Roller, Acegi Security and Single Sign-on. As part of this talk, I put together a couple of tutorials you might find useful:

NOTE: These tutorials are using Roller's trunk as we found some things to simplify LDAP integration tonight.

You can download a PDF version of my presentation from my publications page.

During the presentation I did a number of demos:

  • Installing Roller on Tomcat
  • Integrating Roller with Apache Directory Server
  • Integration Roller with CAS
  • Integrating CAS with LDAP

Rather than saving the demo for the end, I did it as the first part of my presentation. This worked extremely well - especially since I didn't have to worry about running out of time.

If you're using Roller, have you integrated it with LDAP or another SSO solution? If so, is it working well for you?

Posted in Roller at Oct 23 2007, 01:38:40 AM MDT 5 Comments

First Snow!

It usually snows in September in Denver. This year, it waited until today. It was awesome to wake up this morning and see the white stuff coming down. Bring on Ski Season - I'm ready!

First snow in Denver - Winter 2007

Bill mentions that A-Basin is open. If you're going to this year's Colorado Software Summit (starts today), you may want to bring your skis. Then again, who wants to ski greens? ;-)

Posted in General at Oct 21 2007, 12:02:30 PM MDT 2 Comments

Colorado Software Summit - are you coming?

Are you coming to the Colorado Software Summit this year? I'm excited to go because I wrote new presentations and I think they'll be a lot of fun to deliver. Also, as I've said before, I really enjoy this conference because it's so relaxing. It's a full-week long, which is a tough commitment, but I like to think of it as a vacation. You do have to deliver your talks 3 times each, so you still have to work every day, but there's also a great opportunity to learn from other speakers. And you don't feel rushed since each talk is given 3 times. This means you can treat some days like real vacation days where you only work a couple hours and others you can pack it in and get a brain full of stuff.

Here's my Choosing a JVM Web Framework abstract?

One of the most difficult things to do (in Java web development) today is to pick which web framework to use when developing an application. A few years ago, there were over 50 Java web frameworks available, most of them open source. Since then, the number hasn't gone down, but the quality of choices has certainly improved. Should you use the standard JSF, or something like Tapestry or Wicket? What about Struts' successor ? is Struts 2 better than Spring MVC or Stripes? And what about the slick-looking applications that Flex and OpenLaszlo can create? Should you use Rails on GlassFish or Grails with Groovy? Is ZK really the next best thing? Where does RIFE fit into all of this? The choice hasn't gotten easier over the years.

This session is a discussion about choosing the best tool for the job. Not only will various frameworks and their features be discussed, but so will important factors for choosing a web framework. Is ease of development more important, or future maintenance? Is the project community an important factor? All of these questions will be discussed and answers will be provided. If you are about to choose a web framework, or if you have an opinion about a web framework, this session is for you.

I think it's important to note that this talk is going to be a discussion. I don't plan on offering my opinions as much as I plan on extracting them from others. This talk probably wouldn't work with the Norway crowd (they don't like to participate much), but I think it'll work with the Colorado folks.

If you're attending ApacheCon this year, which talk would you rather attend - Comparing or Choosing? Or maybe "choosing" would fit in better as a BOF?

Posted in Java at Sep 24 2007, 06:44:03 PM MDT 9 Comments

[CSS 2006] Mike Milinkovich's Keynote

I'm sitting in Mike Milinkovich's Keynote at the Colorado Software Summit in Keystone, Colorado. Mike is the Executive Director of the Eclipse Foundation - his picture can be seen on his IT Conversations page. Mike had fun getting up here - driving through the snow - and waiting on the freeway for a couple hours while the "rock slide" was cleared.

Mike's presentation is titled "All About Platforms, Lessons learned from Eclipse". Mike used to work for Oracle, and he's been at the Eclipse Foundation for 2 years. Before that, he was at WebGain. The company that "would not believe that Visual Cafe sucked". He's been in the Tools Business for a long time, and has never bothered to learn Java. He used to do a lot in SmallTalk and that's they last time he programmed. The "repository thingy" in Visual Age for Java was his fault.[Read More]

Posted in Java at Oct 26 2006, 10:39:24 PM MDT