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.

Jack's got a bead stuck in his nose!

From Jack's Nose This morning around 9:45 AM, I got a call from Jack's Teacher. She said, "Jack's got a bead stuck in his nose!" I heard a screaming kid in the background, so the first thing I asked was - "Is that Jack?" She said yes, and I was out the door a few seconds later.

Several minutes later, I arrived at his school and picked him up to take him to the Emergency Room. His teacher handed me the bead you see in the picture on the right. This was a replica of the one he jammed into his nose. I figured the ER was the best place to go considering all I saw was blood when I looked in his nostril.

10 minutes later we were in the ER and within a half hour we were talking to a nurse. Julie arrived just as the doctor walked up to talk to Jack. The first thing he suggested was that Julie hold one nostril and give him a CPR-type breath/blow into his mouth. She tipped his head back, plugged the free nostril and "pop!" - it came right out!

I wish I'd known that trick early this morning. How cool would it have been to walk into Jack's class, grab him by the head and blow that sucker out like I knew what I was doing? The good news is now you have this knowledge and you can be the hero in your kid's class someday. ;-)

Posted in General at Feb 28 2008, 11:41:34 PM MST 16 Comments

Last Night's Selenium Users Meetup at Google

Last night, I attended the inaugural Selenium User Group meetup at Google's Campus in Mountain View. It was an excellent event, with many of the core committers on hand to present and answer questions. Each presenter had about 5 minutes to speak and we learned many things about the Selenium Project itself, what's coming in the future and how Google has standardized on Selenium as their integration testing tool of choice.

Patrick Lightbody started the meeting by going over a number of project statistics with pretty graphs and such. There were simply too many numbers to write down, so hopefully his slides will be published soon. I was pleased to see that Google did videotape the entire event, so it should be available online soon. I'll update this post when it it. Below are my notes from the event.

Jason Huggins, Test Engineer at Google
Selenium is a test automation framework. Some folks abuse it as a macro tool. There's two reasons Selenium became so popular: it was able to test Ajax before any other testing tool and it allows end-to-end workflow testing. Selenium works on any platform, with any browser and allows many, many languages. It's possible that other frameworks that are more focused are better. There are 4 Selenium products:

  • Selenium Core (TestRunner)
  • Selenium IDE (for Firefox)
  • Selenium Remote Control
  • Selenium Grid

Paul Hammant, Open Source Manager at Thoughtworks
Selenium 1.0 - beta this week. RC, Core, Grid and IDE together. 1.0 will be shipped in a few weeks. Compared to today, lots of bugs killed, documentation improved and a greatly improved Selenium IDE.

Selenium 1.1 will be shipped in a couple months. Selenium IDE will be enhanced to obey RC instruction ... becoming the best mode of operation when it ships.

Some experimental iPhone-Safari capability (dependent on SDK for iPhone).

Selenium 2.0 will hopefully be released this year. Roll in of WebDriver functionality and code. New model-based API. IE plugin and Safari plugin (not really a plugin, most likely uses AppleScript).

Philippe Hanrigou (http://ph7spot.com)
Testing is good! Selenium is awesome! However, end-to-end web testing is slow. It is and always will be slow. How do you solve this problem? You solve it the same way we've solved slow traffic in the past - by building more lanes. Rather than one browser testing everything, Selenium Grid allows multiple lanes and 20 browsers. Features include:

  • Faster Builds, Faster Feedback!
  • Easy Install and Everyday Use
  • No Need to Change Your Tests
  • Leverage Your Existing Computing Infrastructure

One of the best parts about Selenium Grid is you can download and have it running in 10 minutes or less. Selenium Grid comes out-of-the-box with Amazon EC2 support.

Jennifer Bevan, Lead from Selenium Farm Project at Google
As of Friday, Google has over 50 teams running over 51K tests per day on internal Selenium Farm. 96% of these tests are handled by Selenium RC and the Farm machines correctly. The other 4% are partly due to RC bugs, partly to test errors, but isolating the cause can be difficult. Selenium has been adopted as the primary technology for functional testing of web applications within Google. That's the good news.

The bad news is Google is pushing the limits of Selenium. Using Selenium (RC + Core) at this scale exposed certain issues not originally anticipated as high-impact. IE/XPath slowness has a high impaction given that can only run one test at a time. Tests can cause many conditions from which RC cannot easily or automatically recover (for example, tests that don't call stop() in every exit path). Unexpected browser dialogs, popups, etc. eventually cause timeout exceptions.

Googlers expect that RC will work for the most part, but they want it to be more reliable, with better performance. So they have:

  1. Created utility methods to improve performance when examinging large tables, overlaying domain-specific languages, etc.
  2. Deployed retry policies based on failure reason.

Looking to the future - Google has not yet reached their expected usage of Selenium RC. Some projects cannot use the Farm until RC supports session-level configuration (not server-level). Many just want RC to be more reliable. So Google will:

  1. Continue to contribute to RC, Core and to user-created helper libraries.
  2. Keep doing so until all failed tests are not Selenium's fault.

Dave Astels, Google (Driving Selenium with RSpec)
Using RSpec, you can create a very easy-to-read Story with Scenarios that can be read (and likely written) by practically anyone. Dave then uses a small script to load up the stories and run them in Selenium. When he runs the script, the scenario is spit out and test pass/fail information. Learn more at rspec.info.

Alex Chaffee, Mad Scientist at Pivotal Labs (The Selenium/Ruby Project that Must Not Be Named)
What is Polonium? It's also known as Selenium RC Fu or Selenium On Rails 2 or Funkytown. It has simple extensions to Selenium RC:

  • wait_for
  • element assertions
  • launching/managing servers locally

Blackbox testing you're sitting out of the box and send in stuff. In whitebox testing, you get to open up the box and look at stuff. With Selenium, you can do Graybox testing, where you are doing blackbox testing (against the UI) and querying your database (or other resources) at the same time.

Dan Faulich, Sr. QA Engineer at Redfin Corporation (How Not to Run a Successful Open Source Project)
The first thing you don't want to do is support everything. The second thing you don't want to do is write your project in JavaScript. While it's great that almost anyone can hack on it, running in a sandbox sucks. Don't use a language that's bound by other people's security restrictions. Don't roll your own multi-language remoting. It's written using XML + XSLT and its such a pain in the ass to maintain that Dan is the only one that fixes bugs.

Shinya Kasatani, Developer of Selenium IDE
Selenium IDE is a Firefox extension that can record and play back tests in your browser. It can translate the recorded tests to many languages.

Selenium IDE 1.0 adds support for TestSuites. Another new feature is better recording features - it detects when the DOM is modified. Shinya has a demo where he uses the new IDE to test the Dojo Dijit Theme Test Page. Apparently, this doesn't work in the current version.

The Goal of Selenium IDE is to get more people interested in test automation of web applications and to help their projects to be successful.

Haw-bin Chai, Developer at CommerceHub
XPath is a powerful selection took, but it'd be great if we could use something like "article 5" instead of the cryptic //table[5]/tbody/... syntax.

Why UI-Element? Traditional locations can be ugly and they don't convey purpose. UI-Element is a Selenium Core extension and has Selenium IDE integration. It's written in 100% JavaScript. Examples:

ui=frontPage::topStoriesCountry()
ui=listingPages::article(index=5)
ui=listingPages::articleSource(articleIndex=1)

The UI Map is in JavaScript shorthand. It contains logic to map ui locators to traditional locations. Each UI element implements getLocator(), then you add a page set and add an element - all in JSON Format.

Simon Stewart on Web Driver
What on earth is Web Driver? One of the main problems with Selenium is it's written in JavaScript and it's too easy to hack. WebDriver is an idealized browser which allows you to do browser things like call get(URL), findElement(By.xpath()) and getTitle(). WebDriver is similar to Selenium RC, but it's not written using JavaScript. It's written in the native languages for each browser, which allows you to break out of the JavaScript Jail. The IE Driver is written in COM (C++). The Firefox Driver is written as a Firefox extension. Safari uses Apple events.

Soon there won't be a WebDriver project ... because it will be part of Selenium!

WebDriver likely won't be part of the core until Selenium 2.0 later this year. One of the nice things about WebDriver is you can implement different browsers. Out-of-the-box, it will support all the major browsers, as well as HtmlUnit with JavaScript turned off.

I had a great time learning more about Selenium and how most of its problems will be solved in the near future. The beers afterwards weren't so bad either. ;-)

Update: Videos of this event have been posted.

Posted in Open Source at Feb 26 2008, 03:51:56 PM MST 10 Comments

The Ski Train

This morning, I woke up at 5am, packed up the car, dragged Abbie and Jack out of bed and headed to downtown Denver to catch the Ski Train to Winter Park.

Ski Train

The kids were pretty groggy when I woke them up at 6, but perked up pretty good when they realized what we were doing. It probably didn't help that they didn't get to bed until 10pm last night (DU Hockey game).

I called earlier this week to buy tickets and they told me they were sold out. They recommended getting there at 6:15am to buy some from folks selling them. We were able to buy tickets (in different rows) and then waited until 7:15 for the train to leave.

I've always enjoyed traveling by rail and today's trip was no disappointment. It did take three hours to get up there, but the views were great and the kids loved the 29 tunnels along the way. The "breakfast car" was a big hit too - breakfast burritos, donuts, bagels among many other things. Our seats kinda sucked because they didn't have a window, but we moved to another car and found some that had a great view.

Two things I really like about the Ski Train are 1) you can leave stuff on the train and 2) it drops you off less than 50 feet from a lift. Abbie and Jack both rode the T-Bar lift for the first time in their lives today and pulled it off without a hitch. Abbie can not only ski all by herself, but she can get up when she falls and even puts her own skis on. Jack (3 and 1/2) still seems to be a little young for skiing as he refuses to do "pizza" - mostly because it slows him down. We had a heckuva time today and I'd recommend the ski train to anyone in Denver that's looking for an easy way to the mountains with beers on the way home. We arrived back in Denver at 6:30pm - a 2 hour nap for the kids.

There were a lot of groups on the train and it does seem like an awesome way to enjoy a ski day with friends or co-workers. I'd highly recommend it if you ever get the chance.

Posted in General at Feb 24 2008, 10:09:47 PM MST 5 Comments

What's the Java Job Market like in Denver?

I recently received an e-mail from someone asking me a number of questions about Denver's Java Job Market. He's moving from Seattle to Denver and asked me the questions below. Since Denver is one of the best places to live on Earth, I figured some other folks might like to hear my answers.

-------------------------------------

For senior architect types, is the market strong?
I believe it is. I haven't looked for a local gig in quite some time, but when I did back in June - there was lots of opportunities.

Any good employers you could recommend?
Not really, I've done contracting for the most part for the last 11 years. I've always enjoyed smaller companies. The best place to find Java jobs is by subscribing to the Denver JUG Jobs mailing list. There's jobs posted several times per week (both full time and contract).

Any companies to avoid?
Not that I know of.

For senior types, what type of salaries or hourly rates should I expect to find?
I think you'll be lucky to make over $100K as a full-time employee. You can certainly work your way to 110-120K after a couple years, but I think it's tough to hire into that. I'd expect 90+. As a contractor, you can expect $60-70/hour. There's definitely opportunities to get 90-100/hour, but they're hard to find because you have to eliminate the middle-man (recruiters).

Are Colorado Springs or Boulder good options for looking for jobs?
Boulder is definitely hopping. Colorado Springs - not so much.

Are contract positions good in Denver?
I've always liked contract positions.

Any recruiters that would be good talk to?
Lauren Ford is a good resource I've worked with in the past. You can tell her I sent you if you send her an e-mail.

Anything else you'd recommend?
If you can, get a gig downtown. Baseball Season starts in April and downtown has a buzz about it that's very enjoyable. Either that or Golden so you can be close to Mountain Biking.

-------------------------------------

One thing I forgot to mention in my reply is how valuable LinkedIn has become when searching for jobs. I've always believed being well connected is the key to career success and LinkedIn allows you to use the power of network very easily. You may think I'm biased because I work there - but how do you think I got the job there in the first place? ;-)

Posted in Java at Feb 22 2008, 09:59:22 PM MST 2 Comments

David Sachdev on Web Framework Proliferation

David Sachdev left the following comment in my post about the Java Web Framework Smackdown at TSSJS in Vegas:

The number of web frameworks out there is just astonishing, and in alot of ways I think that there is need for some consolidation in some way, shape or form. If you work in the Java world there is a sense of consolidation in the ORM space these days with JPA (the Java Persistence API). Sure if you are working strictly with JPA it is a bit more limiting then working directly with Hibernate, iBatis, or TopLink - but you no longer worry that you have made a critical misstep in your architecture by tying yourself do a particular ORM implementation. Similarly Spring gives you that similar "loosely coupled" feel that if Google's Guice because appealing to you, you don't feel like you've wasted all your framework foo on Spring. But web frameworks....that's another story.

I think if you had asked me a few months ago, I would have told you that the industry is promoting JSF (Java Server Faces). Everything from support in the IDEs to the availability of AJAX frameworks...and of course a flexible life cycle that allows for alternate implementations and various code to plug or be weaved in to the life cycle. And that while JSF on its own left quite a bit to be desired, the JBoss Seam project really has filled in the gaps in JSF, and in fact brought Java web development closer in agility to the Rails and Grails of the world that tout quickly built and deployed web applications.

But the thing that you continue to hear is that programming in JSF is painful. And you hear that EVERYONE used to use Struts. And that it is time to move past Struts. And given that, you have to consider Webwork and the merger of Struts2 into that framework - and their claims of rapid development. But you also have to consider Spring WebFlow and how that may help solve your JSF ills given that everyone is building off of the Spring Framework and they have been so good about keeping the framework updated and integrating the best of what is out there while innovating themselves. And then if you are looking at Spring WebFlow, you kinda have to go "Wait, but what about Spring MVC?"

Given its age, you might quickly dismiss Spring MVC until you realize that Grails is build upon it. Grails, that web platform that every java developer is either working with, or intends to work with soon. (Come on, you all have made the Ruby/Rails, Groovy/Grails, JRuby decision in favor of G2, right? I mean all the flexibility of what is out there in the Java world on top of the JVM, with a language that doesn't suck the life outta you....) And then you have to wonder that if you build upon Spring MVC as well as using Groovy and Grails where appropriate, might you be able to make that killer app in half the time.

But wait, you didn't think your choices were nearly that simple did you? There is this wonderful software company out in Mountain View that we need to pay attention too. In Google We Trust, right? And even if you don't worship at the Temple of the G (TOTG) like Sprout, you don't want to ignore them. And, if you've looked at the Google Web Toolkit (GWT) and weren't at least slightly impressed, I would be surprised. And if you are looking at the GWT, you can't totally ignore Yahoo's YUI - maybe with some of the what Prototype, Scriptaculous, or DoJo offer you. And then someone will come over and point out Echo2 to you, and well you have to admit, their demo looks nice. And well, there is Adobe Flex, and OpenLaszlo - I mean after all isn't Web 2.0 all about Rich Internet Applications. And surely you've heard that the performance of Swing is so much better these days and the "power of the modern Java applet"

So at the end of it all, you've got yourself alot of R&D to do, and just as you thing you've got a good grasp for the offerings out there, new and improved versions are out. And don't worry, someone else is also busy working on a new and greater web framework that you have to consider.

Wow - that's quite a mouthful David. Well written!

P.S. The Early Bird Deadline for TSSJS is today.

Posted in Java at Feb 22 2008, 02:47:44 PM MST 6 Comments

Selenium Users Meetup in Mountain View on Monday

From Patrick Lightbody's blog:

Next week in Mountain View, CA, we'll be hosting the world's first Selenium Users Meetup. If you're in the area and are even remotely interested in development methodologies, QA, or automation, come on by. The event is on Monday, February 25 from 6:30PM to 9:00PM. You can find out more here.

I'm pleased to report I just booked my flight to Mountain View and I'll be attending. Should be a good time for sure: killer location, cool topic, great people - what more could you ask for?!

Posted in Java at Feb 21 2008, 03:45:29 PM MST Add a Comment

Java 5 Sucks according to Clinton Begin

I stumbled upon Clinton Begin's blog this evening and found his only post about how much he hates Java 5:

Anyone who knows me has already knows that I'm no fan of Java 5. Honestly, since Java 5 was released, Java has dropped from 1st to 4th on my list of languages that I consider when starting a new application. It was such a disappointment to me, both because of the poor implementation of the new features, as well as the omission of some fairly basic features.
...
I'm looking to Ruby, Groovy and C# 3.0 before I look to Java. Not so much because those languages are better than Java 5, but more because Java 1.4 was better than Java 5. Java is going downhill at the hands of Sun and the JCP. Sad, sad, sad...

Clinton has some very good points in his rant. Unfortunately, I don't think anything is being done to fix them.

For those that don't know, Clinton is the inventor of iBATIS and one of the heros of the Java Community that took on .NET when they said had a version of the J2EE Petstore that was one-third the lines of code (LOCs) and 28 times faster. Most of the JPetStore links don't work anymore, but you can read the announcement on TSS.

Clinton is also one of those no-bullshit type of people I really enjoy hanging out with. I've had several beers with him at many conferences and have always enjoyed his perspective. However, there's something that smells about this rant of his. If he hates Java 5 so much, and loves Java 1.4, why doesn't iBATIS implement a 1.4 feature? An enhancement request to support for JDBC 3 Generated Keys in iBATIS has been open for almost 3 years! C'mon Clinton - it would've taken you less time to implement this than to write your rant. ;-)

Posted in Java at Feb 20 2008, 11:28:45 PM MST 9 Comments

Dynamic Language Shootout: Groovy vs. Jython vs. JRuby

Travis Jensen has an interesting post titled Our Dynamic Language Shootout:

...
For a variety of deployment reasons, we've decided that whatever we choose will be deployed on the JVM. As a result, this comparison is for the JVM versions of the languages, e.g. JRuby, Jython, and, of course, Groovy, which has no other deployment option. I want to also clarify that I have the most experience with Python and I really like the language. There is no doubt that the language influenced me in my evaluation, but I really tried to remain objective in spite of that.
...
As I did the evaluation, I tried to come up with a broad spectrum of important information. Others at my company gave feedback on the important characteristics. In the end, these are the features that we felt were most important: the interaction between Java and the selected language, the IDE support, the learning curve, existing web frameworks, and the existing community support for the JVM implementation of the language.

His conclusion: Groovy.

I don't think it should surprise you at this point that we chose Groovy. Even being openly biases towards Python first and Ruby second (hey, it's cooler :), I could not, in good conscience, choose either of them for melding into our existing environment.

If I were starting from scratch on a project, my choice would be very different. If I wanted to target the JVM, I would choose JRuby (at least until Jython 2.5 and Django are available); if I wasn't targeting the JVM, then it would be, for my Python, but I'd be equally comfortable choosing Ruby.

Well written Travis - I look forward to reading more about the new life you're breathing into your stilted development practices.

Posted in Open Source at Feb 20 2008, 12:08:29 AM MST 12 Comments

Awesome Weekend in Tahoe

This weekend in Tahoe was absolutely incredible. I've never skied in a place so beautiful. Not only were the views spectacular, but the weather was terrific. On Sunday, we skied in t-shirts while the thermometer read 58°F. While I love the powder and Colorado snow, there's nothing like Spring Skiing. If you ever get a chance to visit Lake Tahoe, I highly recommend you jump at the opportunity.

View of the Lake Miller and Vial

The Perfect Ski Day Lake Tahoe - Last Run

For more pictures, see Lake Tahoe 2008 on Flickr.

Posted in General at Feb 19 2008, 11:31:51 AM MST 5 Comments

What are the best runs at Heavenly?

Lake Tahoe, Skiing on Diamond Peak, North Shore Lake Tahoe As mentioned previously, this weekend some college buddies and I will be heading to Lake Tahoe for a weekend of skiing, gambling and boozing (in no particular order). One guy has a free suite at Harrah's Lake Tahoe. I heard there's a gondola directly from the casino to the slopes of Heavenly. Is that true?

Let's assume it is true and I'll be skiing Heavenly all weekend. For those that've skied there - what are the best runs? I'm looking for bump runs, chutes, steep stuff and cruisers with a view. Thanks in advance for any advice.

Posted in General at Feb 14 2008, 11:43:38 AM MST 3 Comments