Matt RaibleMatt Raible is a Java Champion and Developer Advocate at Okta.

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.


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.

Core Animation with Bill Dudney

I'm sitting in Bill Dudney's talk called Core Animation on the iPhone: How to Build Animated UI's. All of the animations on the iPhone are done with Core Animation. Bill is going to start by doing a brief intro to Objective C. Objective C is a dynamic object-oriented language. It's C-based and has Smalltalk roots. Objective C is 2 files - one is a Header and one is the Implementation. They are marked with @implementation and @interface. Properties are declared with a @property keyword and a get and set method are created for you.

Layers are nothing more than 2-dimensional layers living in a 3-dimensional space. You don't need to know anything about OpenGL to use Core Animation. All of the complexity is pushed behind the API and everything runs on the video card. This allows you to get really, really good performance. Core animation is actually built into Keynote on OS X and bill is showing some demos right in his presentation.

You can build user interfaces on the iPhone with Views or Layers. The best way is to use a View with Layers and Events. The View listens for Events and do the right thing. There are several methods you can implement when writing a view: touchesBegan, touchesMoved and touchesEnded. These allow you to capture when a person touches the screen and they each take a set of NSSet objects, where one exists for each finger. On the iPhone simulator, you can use the Option + Mouse to simulate two fingers.

Animation in Core Animation is implicit. If you change a value on a layer, the layer is going to animate that property change. They can interpolate floats and integers as well as origin (width and height). If you change colors, it'll fade between the two colors. The default animation length is 1/4 of a second.

For the next 20 minutes, Bill did a bunch of live coding to show how easy it is to do animations, as well as how you can group animations together. It looked fairly easy if you know Objective-C.

The iPhone OS is Unix, so you should be able to use any Unix utilities on it. The Mac is really good at drawing. Quartz is the underlying drawing framework on the Mac and iPhone. It's basically an API for Illustrator/Photoshop that allows you to programmatically do what those programs allow. Anything you can do with Illustrator/Photoshop can be done programmatically with Quartz. All of that power that's available on the Mac is available on the iPhone. The final piece of drawing technology is OpenGL. The Cro-Mag Rally game was originally written 5 years ago for the Mac in OpenGL. The creators were able to port it to the iPhone in 1.5 weeks.

Bill then went into OpenGL and how you can use it to build a trackball application. Good presentation, great speaker. Even though Bill did a good job of explaining how animations work, it's obvious that you must know Objective-C to do this stuff. I can't imagine what the code behind some of the cool iPhone games (i.e. Monkey Ball, Asphalt4) looks like.

Posted in Java at Oct 23 2008, 04:03:18 PM MDT 1 Comment

Taking Apache Camel for a Ride with Bruce Snyder

Camel is a Java API that allows you to do message routing very easily. It implements many of the patterns found in Enterprise Integration Patterns. It doesn't require a container and can be run in any Java-based environment. Camel has a whole bunch of components - Bruce is showing a 6 x 10 grid with a component name in each grid. In other words, there's 60 components that Camel can use. Examples include: ActiveMQ, SQL, Velocity, File and iBATIS.

Chris Richardson asks "What's left inside of ServiceMix". Why use ServiceMix if you have Camel? ServiceMix is a container that can run standalone or inside an app server. You can run distributed ServiceMix as a federated ESB. Camel is much smaller and lightweight and is really just a Java API. ServiceMix 4 changed from a JBI-based architecture to OSGi (based on Apache Felix). They also expect to create your routes for ServiceMix 4 with Camel instead of XML. To process messages, you can use many different languages: BeanShell, JavaScript, Groovy, Python, PHP, Ruby, JSP EL, OGNL, SQL, XPath and XQuery.

Camel has a CamelContext that's similar to Spring's ApplicationContext. You can initialize it in Java and add your routes to it:

CamelContext context = new DefaultCamelContext();
context.addRoutes(new MyRouterBuilder());

Or you can initialize it using XML:

<camelContext xmlns="">

Camel's RouteBuilder contains a fluid API that allows you to define to/from and other criteria. At this point, Bruce is showing a number of examples using the Java API. He's showing a Content Based Router, a Message Filter, a Splitter, an Aggregator, a Message Translator, a Resequencer, a Throttler and a Delayer.

Bruce spent the last 10 minutes doing a demo using Eclipse, m2eclipse, the camel-maven-plugin and ActiveMQ. It's funny to see a command-line guy like Bruce say he can't live w/o m2eclipse. I guess Maven's XML isn't so great after all. ;-)

Camel is built on top of Spring and has good integration. Apparently, the Camel developers tried to get it added to Spring, but the SpringSource guys didn't want it. Coincidentally, Spring Integration was released about a year later.

Camel also allows you to use "beans" and bind them to Camel Endpoints with annotations. For example:

public class Foo {

    @MessageDriven (uri="activemq:cheese")
    public void onCheese(String name) {

Other annotations include @XPath, @Header and @EndpointInject.

Camel can also be used for BAM (Business Activity Monitoring). Rather than using RouteBuilder, you can use ActivityBuilder to listen for activities and create event notifications.

Bruce had quite a few folks show up for this presentation. I had trouble finding a seat because I was late. I think he did a good job of showing what Camel is and how you might use it.

Posted in Java at Oct 23 2008, 02:25:30 PM MDT 2 Comments