Forget Lesko, bookmark usa.gov

If you have a hankering for quick access to US government services, surf on by usa.gov. Originally, FirstGov.gov, the nation’s portal has evolved from a special project to a regular appropriation of the US Congress. Positioned as the US government’s answer to Google, the mission of usa.gov is to help find existing resources. Other US government sites create content, and usa.gov exposes it.

Ironically, a great way that usa.gov exposes content is by creating it. The site features a daily blog called “Gov Gab “ that is the handiwork of a handful of federal employees who work the Office of Citizen Services and Communications at the U.S. General Services Administration. The blogs mix a health dose of links with personal and professional anecdotes.

For those of us who surf to edit, other sites of note include the FTC’s Computers and The Internet section and the Usabilty.gov site. The former hosts vital advice on Internet security and privacy, and the later catalogs essential tips on creating easy to use sites.

For more about of award-winning and best-of-breed constituent portals, visit the Center for Digital Government and ComputerWorld’s Best E-Government Sites.

“What a country!”

Testing: Ajax Applications

On October 7, about two dozen RIT Computer Science students came for Salvatore’s famous Buffalo Wing Pizza, but stayed for the scintillating tales of Ajax testing derring do.

Of those present only a few had Ajax experience. (Not surprising, since Ajax is not part of the formal curriculium!) Happily, Ajax 101 was included in the talk (just for that eventuality). The presentation is available through SlideShare. The presentation covers several of my favorite testing tools, including:

Ajax Experience 2008, Day 3, At Your Service

The highlight of my testing tools talk turned out to be my new-best-friend, Hudson, an extensible continuous integration server. The talk was in one of the 90-minute slots, so I split the agenda between reviewing some of the available tools and demoing a simple-but-complete continuous integration workflow. (By complete, I mean that on every checkin, we build the distribution and run a suite of both unit and integration tests.) Originally, the demo was to include YUI Test, Selenium, and Cruise Control. At the last minute I switched in Hudson for Cruise Control.

Setting up Hudson has to be the easiest/hardest thing I’ve ever done. (The previous runner-up being using iBATIS for Query-By-Example database searches.) Most CI servers are designed to run as standalone critters. Hudson runs as a standard Java web application, and it is configured using a web UI. (A clean and elegant UI, I might add.) The totally cool part is that the server can be installed by dropping the hudson.war into our favorite Java container … or running it standalone from the command line!

Download the WAR, run

> java -jar hudson.war

and up pops Hudson, at your service, ready for configuration. (The one prerequesite being a recent Java executable on your system path.)

By default, Hudson stores its jobs in your home directory (even on Windows), so once it’s running, you can just have at it. Tell Hudson where to checkout your project from SVN or CVS, check a box or two, and you are good to go. (Other SCMs also supported) For extra credit, you can indicate an Ant file to run along with Hudson’s default build. (Other build systems also supported.) Fill out a few more fields in the web UI, and you’ll be getting an email nag whenever the build or test suite fails.

With a continuous integration server in place, the remaining trick is to export Selenium tests to JUnit (or C#, or Ruby, or Python) to run both acceptance tests and any JavaScript unit tests. While running YUI Unit won’t trigger a JUnit failure out-of-the-box, we can use Selenium to watch for the outcome of the tests on the test logger. If “Failed:0” doesn’t materialize, then we know the YUI test failed.

Summing up: If you have a chance to go to Ajax Experience 2009, I’d say: “take it”. The organizers always manage to come up with a nice mix of introductory and advanced presentations, many by the people who are creating the technologies we use – people like Brendan Eich, Nicholas C. Zakas, and John Resig, to name a few. Even better, it’s a great chance to mingle with other real-live developers all trying to do the very same things you are trying to do. (And then discovering your organization isn’t so backward, after all!)

Ajax Experience 2008, Day 2, Return of the YUI

My AM presentation turned out to be a lively event. The audience of twenty-odd souls was a mix of Struts 1 and Struts 2 users, and several had already started using Ajax in their applications. The balance of the audience seem pleasantly surprised at how easy it can be to use Ajax with “conventional” framework. The talk centered on a Ajax JSP tag library called “Ajax TagParts”. The creator, Frank Zammetti, a friend of mine, and he was kind enough to join me on the stage for a special bonus demonstration of JSONP (or “JSON with padding”). In only a few lines of code, Frank hooked up with Yahoo maps and popped up any given ZIP code. Another special guest was Bill Scott of NetFlicks, who has been busily moving some of their assets to Struts 2 this year. After the talk, Bill, Frank, and some others stuck around to exchange war stores.

The highlight of my afternoon was “Test Driven Development with YUI Test” with Nicholas Zakas, who created the library. My first talk tomorrow also covers YUI Test, so this talk was a must-see for me. At one point, the presentation mentioned the Selenium testing tool, which prompted a question about how to automate unit testing with JavaScript (thanks Mike!). Nicholas remarked “That’s a good question!”, and mentioned that there was another testing presentation tomorrow. Not one to miss an opportunity, I jumped in with a quick overview. Hopefully, that bit of marketing might draw a few more folk away from Crockford’s “Good Parts” talk!

Everything has been running smoothly, though one snag is that I managed to lose a dental cap this afternoon. On the plus side, the loss might encourage me to speak more slowly, to avoid scratching my lip on the rough edges. Happily, Adobe TV is only capturing the slides, and not my newly gapful grin!

Ajax Experience 2008, Day 1, Microsoft to ship jQuery with Visual Studio

I’m attending the Ajax Experience in Boston this week. The big news here is that Microsoft will be shipping jQuery with Visual Studio, promising that it will be a stock version, and not yet-another fork of infamy. At AE 2008, John Resig, jQuery creator (and RIT alumnus), mentioned that Microsoft “would not be getting a free pass”. Any patches submitted by a Microsoft engineer will receive the same scrutiny as any other. (Historical footnote: back in the day, when IBM first started to use the Apache HTTP server, the very first patch submitted by an IBM engineer was in fact rejected. OSS developers are a tough bunch!)

Elsewhere, people are hailing the m$(jQuery) announcement as a sign that “The war between business models is over. Open source has won.“ Microsoft has been warming up to open source for some time now. The Ajax libraries in ASP.NET are already open source, Microsoft is now aplatinum sponsor of the Apache Software Foundation, and here at the Ajax Experience, where open source rules, Microsoft is spreading the love by hosting a cocktail party for 300 hardcore JavaScript enthusiasts.

Techno-politics aside, the jQuery news bodes well for Ektron and VanDamme Associates. Ektron already bundles a customized version of jQuery, and we are coming to rely on jQuery for added value features, like streaming media. Of course, there are “interesting times” ahead, as we all try to stay on the same jQuery page.

Meanwhile, Day One at the conference has been a series of lively tutorials and scintillating keynotes. (Seriously, Ajax folks are a fun crowd!) The smorgasbord of presentations starts tomorrow, with one of mine launching at the crack of 9am. (Meaning: I have to keep a clear head despite the Microsoft party tonight!)