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.

Google Goods at the Colorado Software Summit

This morning, I woke up early and attended Dion Almaer's talk on Google Gears. Dion works at Google in the Developer API group and is a member of the Google Gears development team. This presentation is called How to take your Web Application offline with Google Gears.

Dion starts with a video that Google Developers made. It's a parody of Dick in a Box, but it's called API in a Box. This was by far my favorite part of the presentation and it all went downhill from there. ;-)

Gears is a browser plugin that adds a database and a JavaScript API that allows applications to "go offline" and use these resources to store data. It does not do anything to handle synchronization of data back to the online database.

Gears has three modules as part of its API: LocalServer, Database and Workerpool.

The Database is embedded using SQLite. Google contributed Full Text Search to it and the entire database is 250K. Below is an example of how you might use the API:

var db = google.gears.factory.create("beta.database", "1.0");
db.open("database-demo");
db.execute("create table if not exists ...");
...
var rs = db.execute("select * from Demo order by Timestamp desc");
while (rs.isValidRolw()) {
    var name = fs.field(|);
    ...
}

During the rest of the talk, I tuned in and out, but caught a number of interesting tidbits:

  • GearShift - DB Migrations for Gears.
  • Database Query Tool - one-page browser-based application that can be added to existing applications to add a query browser.
  • Gears in Motion - full database tool for creating databases, modifying tables, inline-editing, etc. After building your database, you can export the SQL for use in a Gears application.
  • Syncing is not a part of Gears because it's a very difficult problem to solve - especially when you have huge data.
  • The best way to implement synching is to start simple, like Zoho Writer. It's like Google Docs, but allows you to read your documents off-line. The next version they're planning on allowing offline editing.
  • You should plan on allowing your application to run - possibly by using cookies to store the data and create a "CookieBaseContent" implementation that gets chosen instead of "GearsBaseContent". In other words:
    content = hasGears() ? new GearsBaseContent() : new CookieBaseContent();
    
  • Debugging is a pain - you can simplify by using helper functions that allow you to clear the database.
  • Google's Read/Write JavaScript API looks like some really cool stuff. It solves the cross-domain problem and is (at its core) a clever bundling of browser hacks. It's not specific to Google's APIs and can be used in any Ajax application.
  • Gearsmonkey - uses Google Gears with the Firefox Greasemonkey plug-in to take other's applications offline.
  • Dion uses Greasemonkey to add keystrokes to GMail and remove ads from Facebook.
  • Wikipedia has an offline version that's powered by Gears. It uses iframes to cache pages with Gears and was developed by Google. It's unannounced by Dion didn't say I couldn't blog about it. ;-)
  • Dojo offline has a sync framework.
  • Vortex is an offline toolkit that builds on Gears.
  • GWT has Gears support - all you have to do is drop a JAR in your classpath. If you don't like using Gear's JDBC-esque API - maybe you can use Hibernate with Gears?

Dion ended by talking about how Adobe Air is great for desktop-like applications that you can easily build with Ajax technologies. Silverlight is impressive, but only for media applications - you have to draw components yourself. Java Applets may make a comeback. The browser plugin has been rewritten to be fast as well as have full support for Java Web Start. It's possible that Gears + the Java Plugin can make it possible to use Java technologies (i.e. Hibernate or JPA) to talk to the browser's database. Firefox and WebKit are adding database components to their next major releases - so offline applications should become even easier to develop in the future.

Overall, this was a great talk - largely because Dion is a great speaker and made it fun and interesting.

After Dion's talk, I delivered my Web Framework talk and had some lunch while trying to get Rockies tickets (no luck). After lunch, I attended Bill Dudney's Comparing Spring & Guice talk. I learned some things about Guice I didn't know and enjoyed his comparison of the two Dependency Injection frameworks.

One question that Bill couldn't answer is how Spring 2.5's annotation support stacks up against Guice. Is it as full-featured as Guice? Does it add additional features and keep up with Guice for performance? What about wiring up objects without annotations - does it allow you to autowire your classes based on naming patterns without annotations in your code? What I'm hoping for is a DI framework that allows me to autowire classes using rules/conventions rather than annotations. I'm fine with using annotations for edge-cases, but it seems like a lot of the DI I do these days could be configured up-front and used for the entire application (rather than having to wire up each class).

Overall, it was a great day at the Colorado Software Summit.

View from our condo at CSS

Posted in Java at Oct 23 2007, 05:46:56 PM MDT 4 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