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 News: GlassFish, free demo hosting for java.net projects and Facelets

Some interesting news from the AppFuse world:

Posted in Java at Jan 30 2006, 09:06:35 AM MST Add a Comment

[DJUG] Real World Mapping and Holistic Testing

A few weeks ago (January 11th to be exact), I attended a Denver JUG meeting where Scott Davis spoke about Real World Mapping (download presentation) and Holistic Testing (download). Below are my notes from the event.

The first-generation mapping web application was MapQuest. Second generation mapping webapps include Google Maps (now renamed to Google Local) and MSN Virtual Earth (now renamed to Windows Live Local). The funny thing is MapQuest had sattelite images way back when, but they dropped it b/c no one was interested.

I like how googling for "msn virtual earth" brings up earth.google.com as the sponsored link at the top.

MapQuest - simple example from the oldest player in the map space. The URL of the query results gives us our first glimpse into building a custom application. For example:

http://www.mapquest.com/maps/map.adp?address=1600+Pennsylvania+Ave+Nw&city=Washington&state=DC

Is using MapQuest and building URLs on your site hacking? No - it might be considered hacking, but they encourage you to use it by publishing a howto. Once you're familiar with the basics, you can begin to customize the URL, for example:

Add a title: title=The+White House
Change the zoom level: zoom=9 (0-10, 0 == world)
Even use good ol' Latitude/Longitude: ?latlongtype=decimal&latitude&38(whitehouse)

Why use Lat/Long? While addresses are more user-friendly, lat/long coordinates are more precise. All map services must "geocode" addresses into lat/long anyway in order to show the location on the map.

Did you know that Google is a huge dictionary? Just use "define: geocode". So how do you find your Lat/Long? There are a couple of simple ways to geocode a street address for free:

  • Option #1: URL harvesting from http://maps.msn.com - when you submit an address, the resulting URL has the lat/long in it (in the "C" parameter)
  • Option #2: Use http://geocoder.us. Find the latitude & longitude of any US address - for free. The US Gov't provides the data, they just display it. If you want to use this in your application, you'll have to screen-scrape to get the data.

Geocoder.us also offers a web services interface - RESTful based on URLs. You query for address, it returns XML. There's also SOAP, XML-RPC and JSON interfaces.

RESTful Web Services: If your GET request returns XML instead of HTML, it is called a "RESTful Web Service". To use REST in Java, you can use the HttpClient package from Jakarta Commons.

Yahoo Maps

Yahoo! Maps offers the same level of hackability as MapQuest. The parameter names change, but remain conceptually identical. They use "mag" instead of "zoom", "addr" instead of "address", etc. One thing Yahoo! can do that MapQuest can't is allow you to display your own data on the map (more at http://developer.yahoo.net/maps/).

For example, the URL below displays cities on the NFJS tour:

http://api.maps.yahoo.com/Maps/V1/annotatedMaps?appid=nfjs_cities&xmlsrc=http://www.davisworld.org/nfjs.xml. Appid must be registered with Yahoo, but it is free and the process is fast. Xmlsrc is an XML file describing your map (most of the name/value GET parameters are pushed into XML...). Nice! The document linked to in Xmlsrc is actually an RSS feed.

Web 2.0

The Yahoo! Maps Web Service is getting very close to what the pundits are calling "Web 2.0". Tim O'Reilly calls it "Web 2.0," Jonathan Schwartz calls it "The Participation Age".

What is Web 2.0? The there are no hard and fast definitions, the same basic ideas come up over and over:

  • Favor interactive web applications over static/passive web pages
  • Favor data/web services over fixed presentation/HTML
  • Allow/encourage your content to be integrated into other applications

2/3rds of things bought and sold on eBay are done through web services - not through their web interface.

Google Maps

Google Maps does have Web 1.0 functionality, with query parameters. However, unlike Yahoo and MapQuest, the names of their parameters are only 1-digit. For example, z == "Zoom", t == "Type" (m=map, k=image, h=hybrid map/image). The reason it's called "k" for images is because Google bought Keyhole. It's now called Google Earth and and apparently the OS X version came out today.

Google also supports gazetteering - which are "natural language" queries. For example, you can search for "colorado rockies denver co" and it'll bring up a picture of Coors Field.

But what moves Googles aquarely into Web 2.0 territory is their Maps API. Using Ajax and Google's API, you can develop your own location-based services using Google Maps. To use Google's API, you have to singup for key, but then you become a JavaScript programmer.

Now Scott is showing some JavaScript - 2 lines of JavaScript code - 1 line of HTML to get a map. The bare-bones code will give you a map w/o controls - and you can programmatically add them. There's an API for adding overlays, and you can even control if the drop-shadow for the popup shows up. I wasn't aware the popup window shows a shadow on the underlying map - that's pretty cool. Finally, you can respond to user events by adding event listeners to the different user actions.

Google now has competition - MSN Virtual Earth now called Windows Live Live. There is a website devoted to using Microsoft's API, but looking at Scott's example - the Google API is much cleaner. Interestingly enough, it also works best in IE.

If you want to learn more about this stuff, I encourage you to checkout Scott's Google Maps API book.

In the "Main Event", Scott talked about a whirlwind of open-source testing tools, including: JUnit, Cobertura, Groovy, EasyMock, HttpUnit, DbUnit and JunitPerf.

Before this talk, I'd never heard of Cobertura, but I have used jcoverage and EMMA . After seeing talk, and seeing that Mike Clark endorses Corbertura, I should probably check out. However, since there's already a AppFuse + EMMA HowTo, maybe I should just stick with that.

The main benefit of unit testing is it facilitates change. Unit tests are a safety net. It simplifies integration - if you "trust" the individual pieces, then using them in the larger picture is much easier. Unit testing makes your code "self-documenting" - rather than relying on Word documentations that get stale immediately, unit tests are always an up-to-date reflection of the code base. Enforces a loosely-coupled architecture - because your code is being consumed by two different entities (unit tests and application), best practices naturally occur. For example, coding to interfaces instead of implementations.

At this point, I decided to stop taking notes. Thanks for the great talks Scott!

Posted in Java at Jan 27 2006, 08:12:38 AM MST 3 Comments

This week at Apache with Ted Husted

Ted Husted gives a nice review of what's happening at Apache with Struts and Roller. Pretty cool to see him offering Struts Training as well. I wonder if most Struts 1.x users will upgrade to Struts Action 2.0 (a.k.a. WebWork)?

Posted in Java at Jan 27 2006, 07:13:09 AM MST 1 Comment

Learn about WebWork 2.2 and Tapestry 4.0 via Podcasts

podcastI've said in the past that Podcasts are boring. I still think this is true for the most part, but that's largely because most of them aren't appealing to me. However, this week I've found a couple of good ones. Tapestry 4.0 and WebWork 2.2 have recently been released, and now you can listen to interviews with both project's primary developers: Patrick Lightbody of WebWork and Howard Lewis Ship of Tapestry/Hivemind. The easiest way I've found to subscribe and listen to podcasts is to download iTunes. You also may want to checkout The Java Podcasters article on ONJava.com.

I hope to upgrade both Equinox and AppFuse to these releases in the near future, I just need to find the time. I also hope to change the default web framework in AppFuse to Struts Action 2 as part of AppFuse 2.0. This will allow us to ditch Struts and WebWork and only support 4 web frameworks (SA2, Spring MVC, Tapestry and JSF).

Posted in Java at Jan 26 2006, 08:22:02 AM MST 4 Comments

Does JPOX suck?

There's an ongoing effort in Roller to migrate from Hibernate to JDO. Mostly, this is due to Apache's silly rule about no L/GPL dependencies - even if they're downloaded separately. I think this is a valiant effort, especially if JDO performs as well as Hibernate.

However, it was interesting to see the following message on the mailing list this morning:

i have experience using jdo, and jpox in particular, with a commercial product. first, you probably already know this, but jdo is dead (from a spec perspective anyway). it will be phased out in favor of ejb3 persistence. maybe that transition will be graceful, maybe not. i see jpox has ejb3 on their roadmap, but not sure what that means.

second, jpox has really, very atrocious performance issues. the jpox folks admit that performance is a low priority, as they are an ri. if someone wants the details on this, i can dig them up.

Interestingly enough, this message is from a Sun employee. It's interesting to hear someone from Sun say that "jdo is dead". What are you thoughts? Should Roller change their persistence backend just to satisfy Apache?

Of course, now you'll tell me your favorite Apache-licensed persistence framework and why it's worked so well for you. The real question is - are you willing to re-write Roller's backend using it? ;-)

Posted in Java at Jan 25 2006, 10:57:56 AM MST 31 Comments

Spring Workshops from Virtuas

I'm pleased to announce that my company, Virtuas, has decided to start offering public workshops for many prominent open source projects. These include Spring, Geronimo, Tomcat, Hibernate and JSF/MyFaces.

I'll be teaching the first Spring course in Denver February 21st - 24th, followed by one in Boston in mid-March. It should be a fun class, especially since I'm adding a bunch of stuff regarding Spring 2.0. Since I know you're going to ask the price -- and it's not posted on virtuas.com -- it's $2,495 per person for 1-4 people from the same company/group/etc., $1,995 per person for five or more people.

In other Virtuas news, we've recently signed partnership agreements with IBM and Covalent. We also re-worked our site with Andreas Viklund's "andreas08" theme from Open Source Web Design. Thanks to the power of Drupal, all we had to do to change the whole site was modify one PHP template and one CSS file. Thanks to both Andreas and Drupal for vastly simplifying our new look-n-feel.

Update: It looks like Andreas's theme has been made into a Drupal theme. Nice.

Posted in Java at Jan 24 2006, 05:06:14 PM MST 10 Comments

Back from Cancun

We arrived back in Denver after an awesome week in Cancun. There's no real good stories to tell, just lots of fun, laughter and relaxation with family. Below are some pictures from our trip, as well as many others on Flickr.

Family Photo Mimi and Abbie on the Beach Cancun Sunset

Cancun Sunset from Villas Nizuc View from our condo Beach by Villas Nizuc

Right before I left last Saturday, I released AppFuse 1.9, then went to watch the Broncos vs. Patriots at Invesco Field. Today, it's the Steelers. It's pretty cool to come home to a town this excited. Go Broncos!!

Posted in General at Jan 22 2006, 11:02:04 AM MST 6 Comments

Off to Cancun!

See you in a week! :-D

Cancun

Posted in General at Jan 15 2006, 07:31:50 AM MST 3 Comments

Hmmmmmm

This will make you have second thoughts about purchasing a MacBook, eh?

..."They can't get enough Core Duo (chips)," said my source. He also said that if he were me, he probably wouldn't order one of the new MacBook Pros. I asked if there would be MacBook replacements for the 17-inch and 12-inch PowerBooks, but he said, "Oh, it's much cooler than that. Much cooler." - Leander Kahney

Posted in Mac OS X at Jan 12 2006, 04:37:17 PM MST 3 Comments

MacBook Pro

Thanks Steve. Much appreciated.

MacBook Pro

Purchased. Fully-loaded. Ships in February. :-D

Posted in Mac OS X at Jan 10 2006, 12:21:21 PM MST 22 Comments