Main

November 04, 2007

13949712720901ForOSX

Sure, count me in for voting for Java 6 on OSX. Not sure what 13949712720901ForOSX is? I'm not quite sure either. Google it.

November 03, 2007

Leopard Spaces + IntelliJ IDEA = Sadness

Looks like the new Spaces feature in Leopard doesn't work with some Java apps, including IntelliJ. Specifically, you can drag the window to various spaces, but when you click on the icon in the dock, the screen doesn't automatically navigate to the correct space.

My guess is that this has to do with the way IntelliJ creates the Swing-based windows it displays. Spaces probably is keying in on some hidden window and so it doesn't know where it should take you.

On the other hand, most apps properly support spaces just fine, even when multiple windows are open in different spaces. For example, Safari windows in two different spaces will simply cause spaces to alternate between the two windows every time you click on the Safari icon in the doc.

Here's to hoping Jetbrains fixes this soon...

Java Blog Posting Library

Does anyone know of any Java-based (or any other language, for all I care) utility or library that makes it easy to post blog entries to various blog systems (Blogger, MovableType, WordPress, LiveJournal, etc)?

Embarassing

Wow - this is embarrassing. Another one of those "I can't believe I haven't posted in so long" posts. But really, it's been 5 months since my last post, and 7 months since my second to last one. Ouch!

That is going to change, especially because I little side project I have going on involves a lot of blogging...

As for what I've been up to...

  • Got married a few weeks ago
  • Sold my company earlier this year (I don't think I ever actually blogged that - whoops!)
  • Been traveling a lot to Boston (50% of the time)
  • Speaking at various conferences (The Ajax Experience, STPCon, StarWest, etc) - mostly QA-related stuff
  • Not too involved in Struts and OpenSymphony, but I hope to be again soon
  • Still fairly involved in OpenQA

I think that's it. More posts soon...

Most Exciting Leopard Feature...

Forget all the whizbang stuff... Stacks, Dock, Time Machine, etc. And look past the fact that stupid Apple has decided to abort Java on OS X. As someone who travels a lot and loves his basic Dell keybaord, this is what I've been waiting for:

Leapard_keyboard.png

Yup - that's right. OS X will finally automatically change the keymapping for me between my laptop keyboard and my desk keyboard. Considering all the travel (and lounging on the couch) I do right now, I have probably gone in to this preferences panel over a thousand times just this year. Never again!

June 04, 2007

Fred Thompson, MerchantCircle, and small businesses

One of my very good friends, Kevin, as well as my old CEO back from my Spoke days, work at a company called MerchantCircle. Kevin recently opined about how the focus of MerchantCircle relates to the upcoming presidential election.

First, a quick note about what MerchantCircle does: think "social networks for businesses" and you kind of have the idea. Instead of focussing on the consumer, like review sites like Yelp and CitySearch do, they focus on the business. Businesses can "partner" with other businesses for coupon deals (think "friends"), create their own home page, (think "profile page"), and provide an official response for praise or criticism of their business.

I find his points interesting specifically because of the waves Fred Thompson is now making as he begins his candidacy. Fred Thompson is claiming that he, like Howard Dean, will use the power of the internet and social networks, to run a more effective campaign for less.

So far we've heard about Barrack's MySpace page, but I don't really think things like that are a good demonstration of how Web 2.0 can be utilized to improve our democracy. MySpace is, afterall, mostly about kids who can't even vote, or stoners who likely won't.

However, more focussed communities like MerchantCirlce (small businesses), Digg (high tech workers, perhaps?), or online schools (ie: University of Phoenix, etc) might provide an excellent conduit for engaging in deep, thought-provoking exchanges about specific issues.

Forget town halls, virtual town halls, or even debates - they are too general and end up suffering from the "law of diminishing returns" because their audiences cover such a broad base. I think engaging with a specific community about needs specific to them, on a mass scale, would really open our eyes up about the candidates. I would love to see an online chat with Digg users, or a forum for MerchantCircle users to ask tough questions.

Update: MerchantCircle just recently celebrated it's one-year birthday. Congrats to them. I love the idea of bridging local small businesses and the vastness of the internet.

My only complaint would be that they focus on the business owner and not the consumer, but that's not really a valid complaint because they readily point out to and integrate consumer-focussing sites, ending up being a companion to them more than a competitor.

April 10, 2007

Jive Forums 5.5: A quick review

I recently upgraded the OpenQA forums over to Jive Forums 5.5 (beta) and I am very impressed. We were using a pretty old version (4.2.1) and the difference was like night and day.

The upgrade

The upgrade was as simple as it can get

  1. Copy the new war file over the old one.
  2. Open the forums in the browser.
  3. Enter the administrators password to initiate the upgrade process.
  4. See a nice little list of steps that need to be completed, along with estimated times for each task.
  5. Done.

It really was that easy. Everyone should build software this good. The only other company I know that has a nice upgrade framework is Atlassian, and theirs is nowhere as elegant, nor does it provide the visual feedback that inspires confidence in a process that inherently introduces risk.

Reply by watches

By far my favorite new feature. Previously, the OpenQA forums have been using Jive's unique "email gateway" feature that allowed a mailing list and a forum to stay in sync. This let users choose the style of message delivery (web, RSS, forum watch email, mailing list membership, etc).

I chose RSS+web because I get enough email as is and hate being subscribed to random lists that I can't remember how to jump off of. Plus, I like knowing that my membership is part of the forums, which gets you little things like "reward points" for answering questions (something which obviously email doesn't have).

But whenever I traveled, I missed email. I wanted to be able to reply to the threads I saw in my RSS reader while offline in an airplane, but I couldn't. In the latest version of forums, Jive introduced a killer new feature: reply to watches by email.

Now I can watch my feeds in RSS, but when I know I'll be on the road coming up, I can turn on my email watches to the forum. Then, as each message comes in, I can reply to the watch notification itself and my response will automatically show up in the forums (and get sent out to the mailing lists, thanks to the gateway we're using). To me, this is the best of both worlds, and Jive did an excellent job with it.

My only complaint is that the subject the watches come in with is unique every time. This is due to how they sync up replies with threads. The downside of this is that my watch notifications won't get grouped together as a thread in my mail client, so it's a bit harder to follow conversations. I also had to modify the watch templates to include the entire thread instead of just the new message. This gives the required context that one would expect if they wanted to reply by email.

Wiki formatting

The new forums also allow for common formatting, often found in wikis, to be used in forum posts. This is nice because now I can format new replies by email and I know it'll look good for both audiences: text (email) and HTML (web and RSS).

But what I was really impressed with was the customizations. Jive supports a link syntax similar to Confluence (Atlassian's wiki) that uses square brackets. Unfortunately, the OpenQA forums use square brackets a lot due to the fact that people post xpath expressions all the time, such as

//div[contains(@id, 'border-box')]

This, of course, produced some bogus links. What impressed me is that I could drill in to the wiki formatting settings and individually turn off link support. Even more: when I turned it off, it no longer appeared in the help guide! That's the way software should work all the time.

Other stuff

THe OpenSymphony Forums have had integrated web chat support for a while, written by yours truly. However, the OpenQA ones never did because I didn't want to maintain the code going forward. While it isn't quite as nice as the OpenSymphony forums, Jive Forums now comes with an integrated web-based group chat. This is a great way to host meetings and to help people out in real time.

The features I'm missing from the OpenSymphony forums are:

  • Ability for chat transcripts to be easily searchable and accessible. I did this by posting the chat log to the forums every 24 hours, but other solutions are possible too
  • When in the forums, being notified that activity is happening in the forums (new message posted). I did this with a "chatbot" in the OS forums, but again, this could be done other ways, such as XMPP watches, etc.
  • Tying chat rooms and forums together such that the people in the associated chat room are listed along side the forum as "now chatting". Even better, their expertise level (reward points) are shown, so people can immediately tell if experts are ready to help them in real time.

The good news is that a lot of this stuff will likely end up in some sort of integration between Openfire and Clearspace (think of it as Forums + blogs + wiki + content management + etc).

Overall, Forums 5.5 was a great improvement. I'm looking forward to Clearspace, when hopefully my little nit-picks will be addressed :)

April 09, 2007

Atlassian outlines how to build great software

All software development organizations, take notice: Atlassian builds software right and the result is continually great software. I can't speak for Crowd (haven't used it), but I certainly know that the process defined in this article certainly will put your project on the path for success (in terms of technology... of course if the idea sucks, a nice dev process won't save you!):

Basically we have taken the following steps:

  1. Move from CVS to SVN
  2. Move from Ant to Maven 2
  3. Add some level of test coverage, and build this into our development process
  4. Add integration tests for the Crowd Console
  5. Hook all this up with Cargo and Maven 2
  6. Drop it into a continuous integration server

(Via Atlassian Developer Blog.)

The only thing I think they could improve on is the use of JWebUnit/HtmlUnit. They should really step up to Selenium, especially considering how often bugs crop up due to inconsistencies across web browsers. But still, that is merely an incremental improvement to their very solid foundationl. On top of that, JWebUnit has an abstraction layer on top of Selenium, so it should be an easy switch.

April 02, 2007

IDEA Really is That Good

Saw this post, titled IntelliJ IDEA Just Works, the other day:

Sebastiano Pilla wrote a very interesting article about his experiences with the top four IDEs. After testing each one according to his criteria, his pick was IntelliJ IDEA:

    “IDEA simply worked without getting in my way with arbitrary limitations. Where it shines is in the editor, the configurability and the speed at which everything operates: in a “shopping list” of features it might lose to the others, but it wins because the implementation and the design feel more consistent to me.”

The lesson is clear. Comparing IDEs by simple feature lists won’t necessarily find you the best IDE. You need to actually try it to be sure it will be right for you. Look for an IDE that boosts your productivity by doing what you expect it to do without getting in the way, i.e. it ‘just works’. A feature list might tell you a feature is there, but it won’t tell you how well it works.

(Via http://blogs.jetbrains.com/idea/feed/atom/.)

At my new place of employment (more on that soon), just about everyone uses Eclipse. As someone who has used Eclipse both in the past and more recently, I consistently find myself trying to explain why IDEA is so good.

This is my attempt to explain my favorite "features". I say "features" because many of these aren't the type of bullet-point features you might see in a direct comparison (ie: "EJB3 Support", etc), but rather little nuggets that really do make the difference and make me more productive:

Way smarter code complete

Can go beyond the basic support provided by eclipse and can even narrow the completion down to only objects that are type-safe. That is: it won't show you a variable that, if selected, would result in a compile error.

Camel case understanding

When finding classes, doing code complete, or just about anything else, IDEA understands that when you type "fUM" you really mean "fanstasticUserManager". It's a nice touch that saves a lot of typing.

Smart inspections

People who write code in IDEA often write code that is not as clean, and that is due to IDEA's built in smart inspections. It can do things like highlight when an "if" statement can be simplified, or when a null check will always be true.

Easy to act on

Once one of these warning or error inspections pop up, IDEA makes it trivial to take action on it and fix it. Got a missing import? Alt-Enter. Have a redundant if statement? Alt-Enter. See an unused parameter? Alt-Enter. Usually IDEA will give you a few options, such as removing the offending code, changing it, or even suppressing the warning for the statement, method, class, project, or globally.

It knows what you mean

IDEA is smart. It keeps track of how I name my variables and learns over time. At first, if I am creating a new variable of type BananaSundae, it'll recommend bananaSundae, sundae, and banana, in that order. But, over time, if I keep naming my BananaSundaes simply "ba", it'll start prompting that.

Best HTML editor in the world

This is not an understatement. Ruby-fanatics even admit their beloved TextMate has nothing on IDEA (right Dion?). Heck, at my company, our VP of Marketing (who gets hands-on w/ web design) now uses IDEA and swears by it. Why? Because it speaks fluent CSS, HTML, and JavaScript. And all those nice inspections work here too. It'll highlight unused CSS declarations. It'll help you find usages for JS functions and CSS classes. It'll even point out the fact that "0px" is redundant and can simply be "0"... and you don't have to delete "px"... remember, just press Alt-Enter!

More

I could go on and on, but this list would literally end up being numbered in the hundreds. The point is: IDEA really does do a ton of small things that make programming faster, easier, cleaner, and less error-prone. I can't tell you how many times I open up code written in Eclipse and immediately see lots of yellow dashes where the code could be cleaner (ie: e.printStackTrace uses, redundant code, synchronized blocks on non-final variables, etc).

And most importantly, it never gets in the way. In fact, it even makes it easy to tell it not to get in the way: if there is an inspection you just don't want to see anymore, Alt-Enter and there is an option right there to turn it off forever.

I'll part with this little nugget: the other day I was tracking down a reported bug that the screencapture capability of HostedQA was cropping incorrectly. I opened up the relevant class and IDEA immediately showed me the problem:

smart_idea.png

Can your Eclipse do that?

March 01, 2007

Speeding up Apple Mail

Speeding up Apple Mail:


Apparently this is a well known performance boost for Apple Mail users - I wish I'd known about it sooner! I'd been having all sorts of problems with performance and Mail.app hanging, and this simple trick has it like new again.

I have to wonder why such a thing isn't done by Mail.app itself given how bad it did get over the course of the last 6 months.

(Via Brett Porter.)

Worked great for me. Pretty amazing little trick!

February 27, 2007

Faster Feedback: from TDD to CI and Beyond

It's a long read, but well worth it: check out Faster Feedback and Why You Want It: From TDD to CI and Beyond from the IDEA guys. They really are spot on, and lot of what is said there goes back to the same philosophy that drives IDEA excellence.

I'm really looking forward to what JetBrains continues to pump out - they have an amazingly solid platform (IntelliJ IDEA) to build upon.

Do it: use ridiculously long test method names

"Dan North" (tastapod!) has a good write-up on what he is calling "BDD": Behavior Drive-Development.

He does a much better job than I can do discussing all these items, but the thing that struck me is that almost all his conclusions can be reached by following just one piece of advice: make your test methods really expressive.

I started doing this in 2004 and it has been a huge help. My tests are more focussed, and because of that, I write more tests because it doesn't take as much thought/energy. And in writing more tests, I often design my code better, and ultimately produce software faster. As a nice side effect, quality has gone up, but that is not the primary reason for TDD or BDD.

Unfortunately, Dan's examples of test methods were rather weak - often the agiledox crowd uses really simplistic examples. So I thought I'd give some examples of some of my methods from HostedQA:

  • parsingHostHandlesHttpAndHttpsAsWellAsOptionalPorts
  • findingAnAccountByNameWorksAfterCreatingAnAccountOfTheSameName
  • creatingNewAppConfigReturnsSameIdAsTheIdSetOnTheAppConfigReference
  • findingAppConfigsForAProjectReturnsThemInAlphabeticalOrderByName

And my personal favorites (broken up with a space because they are so long):

  • updatingAppConfigWithoutResourcesThat UsedToBeAssociatedWithItCausesThoseReferencesToBeDeleted
  • deletingAPopulatedProjectCausesAllChild EntitiesToAlsoBeDeletedAndTheProjectIsCompletelyDeleted

Kind of annoyingly long methods? Absolutely. But not only, as Dan points out, is it easier to know what went wrong when a failure occurs, it is also almost brainless to implement these tests (and thereby design your application in the most direct manner possible).

If my test requires that I test that "updating an app config without resources that used to be associated with it causes those references to be deleted", it's really easy to know what I need to test - it's literally spelled out for me.

As a small note: Dan recommends that tests usually have "should" in front of them. I prefer to think that all my test methods (I use TestNG, so I don't have "test" in the method names) have "test that" prepended in front of the sentence. Ie: "test that adding X and Y results in Z" becomes addingXAndYResultsInZ.

Next Gen Testing Tools

What Problem Would Next-Generation Functional Testing Tools Solve?:

Various people have tried various structures including table driven things (like FIT/FITnesse) and Domain Specific Languages. But none of these approaches has quite succeeded in transforming the state of the practice the way JUnit did for unit testing.

(Via Ruminations.)

Elisabeth Hendrickson has posted several posts on next gen testing tools recently.

With HostedQA, which, by the way, recently had some major developments I'll be announcing soon, I tried to attack two main problems that crop up when writing very rich tests like functional and acceptance tests: infrastructure and * maintenance*. I'm sure that there is a lot to do on the reporting front as well, but I'm leaving that alone for now. :)

By infrastructure, I mean challenges like setting up the test environment, keeping it in a consistent state, ensuring you have all the tools/browsers/databases/whatever always available for automation, running your tests in a timely manner, etc. All of these are much more challenging that JUnit, simply because JUnit only concerned itself with in-memory state and fixtures that could be recreated in milliseconds, not minutes or hours.

When I talk about maintenance, I mean the issue of describing tests in a way that is usable by the test writer and evolving the test as the product and requirements evolve. Again, with JUnit test description was easy: the test writer had intimate knowledge with the item being tested and was able to write it in the same language. For complex testing, there are literally a handful of languages being tested (SQL, Java/Perl/Ruby/etc, HTML, JavaScript, Flash, PL/SQL, etc), so right off the bat there is a big disconnect between the simplicity of JUnit and this problem.

I'd like to dive in to the solutions I've come up with for both of these, but it's getting late and I'm already in the wrong time zone. But I promise to follow up in the next day or two on how HostedQA has addressed infrastructure and maintenance problems, all with the goal of making functional testing as ubiquitous as JUnit is.

For now, I leave you with this: These are the two biggest challenges that I see with this type of testing. Do you agree? Disagree? What is your biggest barrier to entry for this type of testing?

Why IntelliJ IDEA Customers Keep Coming Back

Why IntelliJ IDEA Customers Keep Coming Back:

Brian Pontarelli has a passion for the keyboard and makes some good points about usability and support in regards to Java IDEs, specifically IntelliJ IDEA and Eclipse. The comments after the main post are especially interesting, such as where some commenters argue over whether a reported issue counts as either a severe bug or a missing feature. I mean, come on. Does it really matter? The point is that it interferes with Brian's experience of usability and productivity. I've been saying it for a while: It's not about feature lists, it's about usability and productivity. You won't find usability or productivity on a feature list, but it can easily be the most important deciding factor on whether or not to choose one piece of software over another. JBuilder was marketed on the length of its feature list, and look where it got them.

(Via idea.log.)

Spot on. Feature-for-feature, Eclipse has most of what IDEA has. Most of the same refactoring, most of the same plugins, etc. But it doesn't have the intangibles that don't fit on a feature list.

I was just demoing IDEA to a coworker (who is an Eclipse user) and he was very impressed at the subtle things I showed him that Eclipse just completely glosses over:

  • Intentions everywhere: see an error or warning? Press F2 to jump the cursor there and press Alt-Enter to bring up a toolbar that can usually fix it immediately. For example:
    • A variable not being set anywhere? Generate a setter!
    • A variable not being read anywhere? Generate a getter!
    • A parameter not being used? Assign it to a field and/or create a new field!
    • A private function not being used? Delete it!
    • A method call not matching the args being passed in? Change the signature!
    • A method doesn't exist that is being called? Create it!
    • etc etc - the list is literally hundreds and hundreds of little nuggets like this
  • Smart code completion: Eclipse and VS.NET have basic code completion that offers up the list of variables in scope. IDEA goes so much further. In addition to type-specific code completion (only show things that are actually type-safe), it will even suggest variable names and other values based on your usage patterns in the past.
    • Do you always name your ProductManager variable prodMgr? IDEA will notice that and start suggesting that as you code complete a new variable definition.
    • Editing an XML file? IDEA will see the unique words and allow you to press ctrl-space and prompt you for those words. Perfect for configuration files where you often repeat the same strings several times.
    • The above also works in i18n resource bundles, even for the values of the keys. Just today "foo.desc" expanded to "foo.description" and "Desc" expanded to "Description". Once you're used to it, everything just flows..

There are a ton more examples I could provide, but the general rule of thumb is that while most IDEAs might match it feature-for-feature on a check list, none go nearly as deep. And it is that depth that makes IDEA users so much more productive.

Re: Testing Ajax

Testing Ajax?:

I ran across an interesting article entitled “Improving Test Coverage of Ajax Applications” in which the author likens the challenges of testing Ajax applications to that of testing traditional GUI apps. While some newer frameworks (like Selenium) are positioned to actually verify Ajax-ian behavior, they can lead to a false sense of security because of the complexity associated with the combination of actions in using a GUI.

(Via Test Early.)

I posted the following comment to the entry above, but I think it important enough that I bring it up here as well. I'd be interested in hearing about ideas that can help make expressing tests for AJAX applications easier:

Absolutely - Selenium and other tools are now available to help, but there are still real challenges in describing these new types of interactions. The old-school tools (SilkTest, QTP, HttpUnit, etc) either didn't understand the concept of multiple user transactions in a single page or didn't have the technology to deal with AJAX at all.

Selenium helps with the AJAX/multiple user transactions issue, but it still requires testers to express the desire to "click on button X, wait for Y to appear" in their tests. I think there is still room to make this easier to understand and test against, possibly by integrating with AJAX and/or web-based frameworks, and thereby understanding the interactions at a deeper level.

Good for Atlassian

Confluence 2.4 - Baby Steps:

Confluence 2.4 would be developed in a strict six week time-box from inception to release. Anything we had done at the end of those six weeks we'd ship.

(Via Atlassian Developer Blog.)

Atlassian has always been a company I admire greatly. They put engineering first and foremost and let their products sell themselves. I'm really glad to see that they are continuing to push the envelope with short release cycles and lots of automated testing. They have a few interesting things just around the corner that will make watching this experiment that Charles blogs about even more interesting.

Of course, Atlassian wouldn't be able to do any of this without their huge library of automated tests. I'm told they use HtmlUnit for most new tests, and HttpUnit in older tests. Now if I could only get them to try out Selenium, or even better, HostedQA. :)

January 22, 2007

MusicBrainz: Good Mac Client?

Anyone know if a good Mac client exists for MusicBrainz? The only one I've found is iEatBrainz, but it runs like crap on an Intel mac because it isn't a Universal Binary.

Any other good solutions for dealing with large amounts of poorly tagged audio files?

November 02, 2006

New Toy: Sony 60" LCOS 1080p TV

I don't think I'll be leaving my living room for a while...

TV.jpg

October 03, 2006

Pre-loading VMs to optimize automated testing

A really cool feature we recently added to HostedQA was the ability to pre-load virtual machines in order to optimize automated testing. At first, I wasn't sure if this was going to have any real user experience impact. But after having built it, I wish I'd done it sooner.

It turns out, if you have the RAM and you're using VMs for automated testing, you should really think about pre-loading your VMs ahead of time. Then instead of waiting several minutes to kick off your automated tests, they can begin right away.

Now granted that if your test suite takes 10 hours, then a 3 minute gain isn't that important. But that's not the use case that this is designed to optimize. Instead, this feature, and the general concept of pre-loading VMs, is all based around the use case of creating new tests.

Why creating? Often when someone writes a complex test case that depends on the entire system being deployed and working properly, they don't want to go too far without verifying they are on the right track. They do this by running the test. Now your 10 second test actually takes 10 seconds to run, instead of 3 minutes and 10 seconds. Suddenly, the environment is much more hospitable for test creators.

September 28, 2006

Selenium 0.8 Released

Selenium 0.8 Released:

Version 0.8 of the web application functional testing tool Selenium has been released.

Jeff Xiong explaing the new features...

(Via Ajaxian Blog.)

I'm especially excited about this release because of the implications with our HostedQA and AutoQ products. The reason is because I started the initial work on the multiWindow mode (though, admittedly, the rest of the Selenium dev team was absolutely required to make it finally work properly) for the very purpose of providing a frameless testing infrastructure for HostedQA.

We've actually been using this multiWindow/frameless mode in our products for a while in our products. The result is that instead of seeing your application inside of an iframe, your app runs in its own window, more accurately reflecting the real world usage.

You can see some example screenshots of what it looks like by checking out some of our opensource projects reports.

September 12, 2006

Announcing AutoQ 1.5

Hot on the heels of the HostedQA 1.5 announcement, we're also pleased to announce that, as will always be the case, AutoQ 1.5 has also been released.

AutoQ provides all the same features as HostedQA, but with the convenience and assurance of being hosted behind your firewall. No matter which option you choose, you can be confident you're using the most cost-effective and feature complete QA automation solution for today's web applications.

Announcing HostedQA 1.5

Today we have a lot to share and are excited to announce that HostedQA 1.5 has been released.

The first and most important announcement we want to make is the immediate availability of our new product, AutoQ. AutoQ offers all the same advanced features that HostedQA does, but is packaged so that you can deploy it behind your firewall. Both are being offered as a pay-as-you-go subscription model, and both continue to be the most cost-effective and feature rich automated acceptance testing platform available.

You can download a trial of AutoQ immediately by signing up for a free trial of HostedQA. In doing so, you'll receive a link to the AutoQ download as well.

We have a ton of new features that are now available in HostedQA version 1.5. In the coming days we will go in detail to each of these new features, providing screenshots and detailed analysis for how they improve QA automation. They are:

  • Full screen capture
  • Screen resolution options
  • Extremely fast VM startup
  • Shell scripting support
  • Many UI improvements
  • First class Ruby on Rails support
  • Support for Linux
  • Multiple virtual machines

See below for a detailed description of each of these features.

UPCOMING FEATURES

As always, our most important upcoming features are the ones our customers want. So if you've got any ideas or requests, please send them to support@autoriginate.com and we'll be sure to give them the priority they deserve. In addition to any user-requested feature, we're also working on:

  • Continued improvements to the UI
  • Ability to create your own custom virtual machine
  • Ability to log in to a remote virtual machine
  • Improved virtual machine capabilities, such as "snapback" support in between tests, ensuring better test state management
  • Notifications by email and IM
  • Additional browser support, such as Opera and Netscape

NEW FEATURES

  • Full screen capture
  • Screen resolution options
  • Extremely fast VM startup
  • Shell scripting support
  • Many UI improvements
  • First class Ruby on Rails support
  • Support for Linux
  • Multiple virtual machines

Full screen capture

As you may already know, HostedQA has an innovative feature that takes a screenshot of the client desktop after every step in a test. This is a great way to visually see where a test is breaking, but it also is a fantastic tool for manual testers to use to quickly scan for problems in the UI that may not be caught by automated testing. Today, we've taken this one step further with the introduction of the takeFullScreenshot command. Using this command, you can instruct HostedQA to take a snapshot of the entire page in your browser, not just the visible portion. HostedQA will automatically scroll vertically and horizontally, stitching the final screenshot together.

Screen resolution options

Now you can specify what resolution you want your client tests to run under. You may choose from 640×480, 800×600, or 1024×768. This is a great feature for allowing manual testers to visually see if there are any problems viewing your application at lower resolutions. Combined with our advanced screenshot capabilities, this is a perfect feature for manual testing. We promise to continue to make HostedQA an invaluable tool for both manual and automated testing, as we understand that both are equally important.

Extremely fast VM startup

One of the top concerns from our users was that starting up virtual machines (VMs) was taking too long, especially in a hosted environment. We heard you and made some drastic improvements. No longer does it take 2-4 minutes to start up the VM. Now, the most popular VMs are pre-loaded, ready to be used. This means that under most circumstances, it takes a matter of seconds, not minutes, to kick off a test. We're very happy about this new capability and plan to continue to add more hardware to HostedQA that will allow us support even more VM options and faster startup times.

Many UI improvements

As we said in our August Update, improving the UI is important to us. We continue to make incremental improvements. This month we spent most of our time on pages that contain a form. The biggest improvement by far can be seen in the Deployment Settings page, where the form for editing or creating new Deployments is now drastically easier to follow.

Shell scripting support

Sometimes uploading a zip file, a database snapshot, and an application isn't enough for QA automation. So to make automating your deployment easier, we've added support for DOS batch scripts and Unix shell scripts. Now you can upload a script and indicate whether it should run on startup or shutdown. A great use for this could be if you are building a product that is completely self contained, such as a J2EE web application that has a bundled Tomcat server. Simply upload the entire zip file and write a shell script that launches the bundled Tomcat by hand.

First class Ruby on Rails support

We're very excited about this one. Ruby on Rails is making a lot of waves in the web development space, and rightfully so. There are tons of new projects, internally and externally, that are using Ruby on Rails to quickly build web-based applications. While Ruby on Rails support could have been done by using our new shell scripting capabilities, we wanted to go one step further and make Ruby on Rails a first-class citizen in HostedQA. Now you can upload a zip file of your Rails-based application and we will automatically run the bundled WebBrick server and configure the application to run against the local test database. This is just one more way HostedQA makes web-based testing as painless as can be.

Support for Linux

Up until today's release, HostedQA only provided Windows-based VM snapshots for running both the server and the client. Some of our users wanted to test on their production environments so we've added Linux support. As of today, you can now select the following VMs for both the server deployment environment and also the client side browser environment: Windows XP w/ Service Pack 2 and IE6, Windows XP w/ Service Pack 2 and IE7, and Linux CentOS 4.0 (aka RedHat Enterprise 4.0). We will continue to make additional VMs available as they are requested, so if there is an environment you want but don't see, just let us know.

Multiple virtual machines

Before today's release, you had to run your server and client on the same virtual machine. This presented a problem, especially if your application was meant to run on Linux but needed to be tested on Internet Explorer. Today, this is no longer a problem. You may now specify different VMs for the Deployment and the Client, and HostedQA will automatically take care of launching one or two VMs as needed. We want you to test in an environment that is similar to production, and we're helping you do that with this feature.

Note: This entry is a cross post from the Autoriginate blog, found here.

September 05, 2006

Know PHP? Want to work by the SF ballpark?

A good friend of mine is looking for some PHP wizards. The startup is interesting, the people are smart, and the location rocks (right next to the San Francisco Giants ballpark, where I used to live). See if the following matches you (or someone you know), and if so ping me and I'll get you introduced.

And for you Java guys that read my blog (most of you): don't be put off by PHP. Remember, Resin can run PHP now, and so there is an opportunity to mix Java and PHP if it makes sense.

Who We Are
LicketyShip is a technology startup angel backed by some of the brightest minds in the Silicon Valley . Named a Top 5 Startup by Fortune Magazine, LicketyShip aims to deliver items consumers order online in 2 hours, direct from retail stores.

Here's a brief article that describes what we're up to:
www.techcrunch.com/2006/05/11/kozmo-nostalgia-try- licketyship /

Who We're Looking For
We're looking for 1 exceptionally talented PHP Programmer/Designer to join us in our quest to change the face of e-commerce. The warrior we're looking for will not be just an employee – he will become the 5th member of a tight-knit team.

If you consider yourself one of the best PHP Programmer/Designers on earth, have a fire burning deep within you to be part of a meaningful, successful company, and want to be a member of a strong, dedicated team just as passionate about technology as you, then this may be the only job you'll ever have to apply for.

Our Lifestyle
Our homebase is the infamous Third Floor at 625 2nd St. in San Francisco , just across from the ballpark in the South Beach/South Park area. Some of our good friends and neighbors are VideoEgg, Ruby Red Labs, Spot DJ, Odeo, and Buzz Logic.

Startup life is a blast - we go out together, eat many meals together, and even occasionally hit the punching bag together (best company purchase we've ever made) :-p

We work like a family, and we're all in it for the same reason - we absolutely LOVE what we do, and we wake up every morning excited about what the new day will bring.

Your Job

  • Be an active co-owner of the company, have daily input in strategy and technology decisions
  • Design, build and improve a front-end web system that will be seen and used by millions

Your Skills

  • Master of PHP & MySQL
  • Master of HTML & CSS
  • Master of Photoshop (& Illustrator a bonus)
  • Expertise in AJAX
  • Proven success in developing large-scale applications
  • Willingness to work with us late hours!
  • Ability to leap tall buildings in a single bound
  • College Degree in Computer Science or equivalent, Masters, PhD a major plus

Next Step
If this job sounds like its for you, send your resume to: mydreamjob@licketyship.com SUBJECT: I Am A PHP Warrior. Or just leave a comment on this blog or email me at plightbo@gmail.com and I'll get you in touch.

September 01, 2006

Joel on Software... on crack

This just blew me away. Joel is living on another planet if he thinks that FogzBugs is a unique enough product to warrant building a custom compiler. What a nut.

And the reasons he states for doing it... uhh, Java?

August 31, 2006

AutoQ: non-hosted version of HostedQA

Autoriginate is releasing a sister to HostedQA called AutoQ. You can read more about it here and get in line to be the first to try it out! It should be interesting making a product that is both SAAS and enterprise software. Anyone know any other companies doing something similar?

Running IE6 on OS X

Just found that CodeWeavers is running a 60 day trial for their beta software, CrossOver. Setting up IE6 to run on my mac (no virtualization, no dual booting) was completely painless - the CrossOver installer downloads the setup.exe and runs it for you.

So now my Mac can do:

ie6_icon.png

ie6_screen.png

Pretty slick stuff!

August 28, 2006

Help Wanted: Stealth Project

If anyone is interested in taking on some extra part time work (maybe 5-10 hours a week) for a stealth project in the area of social networking (can't say more at this point), backed by a very solid team with a proven track record, let me know.

The technologies we're working with include a mixture of things from Project Able and things from RIFE. Right now we're only interested in bringing in people who are highly trusted and have some spare time. So if you're one of my opensource acquaintances and have the time, let me know. Sorry, if I don't know you it is best that you not ask to get involved right now.

Requirements include:

  • Self-starter, able to work without much direction.
  • Available for part time work (5-10 hours a week, maybe more later).
  • Excited to get involved in an early stage startup.
  • Extremely skilled with Java and Java web applications.
  • Very knowledgeable with SQL and large scale database deployments.
  • Solid understanding of JavaScript, AJAX, and CSS a plus.
  • Experience with RIFE, iBatis, and Spring a plus.

August 23, 2006

JDK Logging: not as bad as I thought

I have previously complained about JDK logging. Thanks to Niall's comment in my original entry, however, I solved problem #2 in my original complaint, and making my original solution to problem #1 acceptable now.

So for those who wish to use JDK logging and want a nice wrapper class, here is a wrapper that works well for me:

/**
 * Poritions of this code are fall under the following license:
 * 
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hostedqa.utils;

import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;

/**
 * @author <a href="mailto:plightbo@gmail.com">Patrick Lightbody</a>
 *
 * Portions of the class have been borrowed from commons-logging,
 * which was created by:
 *
 * @author <a href="mailto:sanders@apache.org">Scott Sanders</a>
 * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
 * @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
 */
public class Log {
    private Logger logger;

    public Log(Class clazz) {
        logger = Logger.getLogger(clazz.getName());
    }

    public void severe(String msg, Exception e) {
        _log(Level.SEVERE, msg, e);
    }

    public void severe(String msg, String... args) {
        _log(Level.SEVERE, msg, null, args);
    }

    public void severe(String msg, Exception e, String... args) {
        _log(Level.SEVERE, msg, e, args);
    }

    public void warn(String msg, Exception e) {
        _log(Level.WARNING, msg, e);
    }

    public void warn(String msg, String... args) {
        _log(Level.WARNING, msg, null, args);
    }

    public void warn(String msg, Exception e, String... args) {
        _log(Level.WARNING, msg, e, args);
    }

    public void info(String msg, Exception e) {
        _log(Level.INFO, msg, e);
    }

    public void info(String msg, String... args) {
        _log(Level.INFO, msg, null, args);
    }

    public void info(String msg, Exception e, String... args) {
        _log(Level.INFO, msg, e, args);
    }

    public void fine(String msg, Exception e) {
        _log(Level.FINE, msg, e);
    }

    public void fine(String msg, String... args) {
        _log(Level.FINE, msg, null, args);
    }

    public void fine(String msg, Exception e, String... args) {
        _log(Level.FINE, msg, e, args);
    }

    private void _log(Level level, String msg, Exception e, String... args) {
        if (logger.isLoggable(level)) {
            // Hack (?) to get the stack trace.
            Throwable dummyException = new Throwable();
            StackTraceElement locations[] = dummyException.getStackTrace();
            // Caller will be the third element
            String cname = "unknown";
            String method = "unknown";
            if (locations != null && locations.length > 2) {
                StackTraceElement caller = locations[2];
                cname = caller.getClassName();
                method = caller.getMethodName();
            }


            LogRecord lr = new LogRecord(level, msg);
            lr.setThrown(e);
            lr.setParameters(args);
            lr.setSourceClassName(cname);
            lr.setSourceMethodName(method);

            logger.log(lr);
        }
    }

    public Logger getLogger() {
        return logger;
    }
}

August 22, 2006

HostedQA is now free for opensource/not-for-profit use

Today we're pleased to announce that HostedQA is now available free of charge for any opensource or other qualifying not-for-profit organization.

If you're interested in trying it out, just sign up for a free trial and we'll convert your account to a permanent one once we've verified your project's status.

August 21, 2006

Able: Hibernate/JPA support?

I'm eager to try out Hibernate/JPA support with Able. Does anyone have experience using either of these and want to help take a stab at building it out? I'd want to use annotations and conventions as much as possible. Other nice to have features would include:

  • Minimal or zero XML configuration
  • If XML configuration is used, a nice way to reload the Hibernate session/configuration when changes occur (such as we do with iBatis)
  • Extensive use of annotations
  • Ideally I'd like to link the WebWork validation/type conversion rules in with the ORM rules

Let me know if you're interested in this.

August 20, 2006

Project Able Mailing List

For those that want to get involved with Project Able, there is a mailing list for all OpenSymphony sandbox projects. Simply sign up for the sandbox@opensymphony.com mailing list by sending an email to sandbox-subscribe@opensymphony.com and you'll be on the list.

August 14, 2006

Project Able: a complete Java web stack

Project Able is a full Java-based web development stack designed to make web development painless. In a sense, it is an attempt to bring together quality opensource tools in one cohesive stack, similar to what Rails has done for Ruby, while also encouraging common practices I've used in software engineering for a long time.

It is very similar to projects such as Trails, Grails, and AppFuse. However, there are a few key differences:

  • The stack components are different (WebWork, Spring, iBatis, etc).
  • In addition to the basic framework, Able also encourages common development techniques and patterns (more below).

Overview

Able was started for two reasons:

One: with the success of Ruby on Rails, it was clear there was a demand in the web development for a streamlined stack. In the Java world, there has been a long fascination with building up a hodgepodge of components in to a custom stack. But often, all we really want is to get started right away.

Two: having recently built HostedQA and BigBark in a very short time period, I realized that there was a common pattern for building web apps that I had been following for years. Able is an attempt to ingrain those patterns and techniques in to a single starting point for new webapps.

When looking at a framework like Rails, one quickly starts to see that Rails isn't just a web framework and therefore similar to WebWork or Struts. In fact, it is much more: it provides the database layer, a build infrastructure, a testing infrastructure, and more. In short: it provides the complete package all under one roof.

Not a Library

Able is not a library. It is not like RIFE or like WebWork or Hibernate. Able is, instead, a starting point for building webapps. The code inside of Able becomes the code in your application. It is meant to be adjusted and mutated as your project goes on.

Of course, Able will evolve too, but for the most part your only need for Able will be when you start your work. Some, however, may wish to look at Able as a way to streamline their existing web development process. But most will checkout Able from SVN the day they start their project, and then never look back.

Part of the reason I'm doing this is because the more and more I've been using (and developing) opensource, the more I've found it is easier to simply grab a copy of the latest release of Library X and either fork it or provide hooks in to little known APIs that allow me to control the inner guts. At the end of the day, I've found that if I had simply just had the entire project's code checked in to my project, I would have been more efficient.

In many ways, this is like code generation. That isn't to say that there aren't libraries that Able depends on (there are), but rather the extensions done to those libraries aren't delivered as another library, but rather source code you are free to modify and improve over time.

I think this will provide the best and easiest way to get started quickly and still allow for a lot of freedom to change things moving forward.

The Parts of Able

Able can be split up in to two parts:

  • Components - these are the libraries Able depends on (iBatis, Spring, WebWork, etc).
  • Development patterns - these are the techniques used in Able that we encourage other projects to adopt (upgrade framework, build profiles, test fixtures, etc).

Components

Able uses the following components/tools:

Each of these libraries is the leader or considering one of the leaders in the space it occupies. They were all picked by me as personal favorites for various reasons. In the future, if people are curious, I'd be happy to go in to detail why each one was picked.

I imagine that the Spring and iBatis picks may be cause for some concern among certain people, but know that most of these choices were primarily based on three criteria:

  1. Does the framework provide control and insight in to what it is doing?
  2. Does the framework fail fast when it can?
  3. Does the framework allow for hooks in to it to let me customize it in unique ways?

If two particular frameworks pass that test equally, it ultimately came down to personal style. The good news is that with Able, you are free to just modify the source as you see fit. That's one of the advantages I see with distributing Able as a project rather than a library/framework.

Development Patterns

Able also addresses very common development processes and packages them up in a ready-to-use form. They are:

  • Clean URLs in WebWork (ex: /profile/1/view). The IDs in the URLs are automatically extracted and turned in to parameters using the following convention: /profile/1/view becomes /profile/view?profileId=1.
  • Convention/annotation-based WebWork action configuration (no xwork.xml file at all). Simply create a class in the proper package and your action is configured. JSPs are assumed as the default result, but you can override them with a @Result annotation.
  • Additional support for common web techniques, such as the "Flash scope" (Redirect-After-Post pattern), simple checkbox support, and an easy way to mark WebWork actions as "page partials" that should not be decorated by SiteMesh.
  • A configured QuickStart setup (QuickStart is part of WebWork) that allows for quick deployment of your application during development.
  • A nice DAO wrapper around iBatis that utilizes Java 5 generics quite nicely, as well as provides support for multiple database vendor syntaxes.
  • Support for reloading iBatis configuration files during deployment to ease development (thanks to Steve Grimm for this!).
  • An upgrade framework that tracks your current build and helps take you to most up to date version (can be used for database changes and other changes). For more info, see here and here.
  • A test fixture built on TestNG and optimized for Java 5, utilizing code from Spring that ensures your Spring container is set up properly on every run. This helps integration testing immensely.
  • A concept of build profiles, including a development (default) and production profile. Here you can specify things like an in-memory database, a MockMailService, and anything else you'd like to use to streamline development.
  • IDE project generation specifically tailored for IDEA that automatically configures your IDEA project with Run/Debug profiles for launching the webapp and running integration tests. Your team really can simply "checkout and go". (Note: IDEA 6.0 will provide the ability to save Run/Debug settings in ipr and iml files, making this feature less useful. But until IDEA 6.0 comes out of beta, it is still a big help.

Examples

Let's take a look at an example of a few of these key items:

Clean URLs

Typically, Java-based web applications require fairly ugly URLs such as foo.action or foo.do. Not only do these URLs expose their implementation, they are just more painful to work with. Able helps by adopting a more REST-like URL strategy where the URL itself actually encodes some of the data typically found in query parameters.

For example, a typical WebWork URL might look like:

/viewPerson.action?personId=1

Using Able, we instead encourage a URL like this:

/person/1/view

Not only is the URL more concise and descriptive, it actually makes writing HTML easier. For example, using the viewPerson.action style, an update form might look like:

<ww:form action="editPerson">
    <ww:hidden name="personId" value="%{person.id}"/>
    <ww:textfield label="First Name" 
                  name="person.firstName"/>
    ...
</ww:form>

You now can simply do:

<ww:form action="/person/${person.id}/edit">
    <ww:textfield label="First Name" 
                  name="person.firstName"/>
    ...
</ww:form>

Similarly, I've found this style reduces the need for things like the ww:url tag and other mechanisms to make URL generation easier to deal with. By simply making the URLs themselves easier, there is little need to use those wrappers anymore.

The automatic parameter application only works for numeric values currently. Perhaps in the future we'll support Strings and other types, though that requires a bit more work to distinguish a String from a legitimate sub-directory.

Directories are handled by the convention-based configuration (discussed next). The actual underlying implementation of this ActionMapper can be found in the AbleActionMapper class.

Convention-based configuration

Another pain I've experienced with WebWork is growing configuration files. The fact is that most of what was in those files was based on the same pattern over and over. Able takes those common patterns and makes them a standard convention. The rules for the conventions are:

  1. Actions must be stored in com.opensymphony.able.actions.
  2. Sub-packages in that package are treated as directories.
  3. Actions must be named in the style FooAction, meaning classes that don't end in "Action" won't be mapped.
  4. Results are assumed to be found at /path/to/action-resultValue.jsp. For example, if com.opensymphony.able.actions.foo.BarAction returns "success", then Able will look for /foo/bar-success.jsp.
  5. If that JSP can't be found, Able will try /foo/bar.jsp. This is done because there is a common pattern of sharing the same JSP for several result values.
  6. If you need to do override the conventions for result mappings, such as to provide a redirect, you can do so with the @Results annotation.

An example annotation for a redirect might be:

@Results(values = {
    @Result(name = Action.SUCCESS, type = Redirect.class, 
            location = "http://www.hostedqa.com")
})
public class FooAction extends AbleActionSupport {
...

The interceptor stack is hardcoded and includes support for the flash scope, partial page rendering, and better checkboxes (see the next topic for more). If you need to change the interceptor stack, you'll need to edit the class AbleConfiguration.

You can even tweak the file to do a combination of reading in an xwork.xml file and also using convention-based configuration - it's up to you. However, having built two medium-sized applications using this style so far, I've found it is often easier to deal with the 10% exception cases by structure the class hierarchy.

I have had one case, for example, where I have an empty action class that simply extends another class. This is an alternative to action aliasing that actually turns out to be fairly nice to work with. But again, you are free to change AbleConfiguration as you see fit.

Common web development techniques

There are a few common web development techniques that either aren't supported by WebWork or aren't in WebWork's scope. Either way, Able provides the following features:

  • A complete implementation of the "flash scope" or Redirect-After-Post pattern.
  • Better support for boolean checkboxes, specifically making submission of unchecked checkboxes easier.
  • A way to tag your actions as @Partial, which forces SiteMesh to not decorate the rendered view. This makes doing AJAX with SiteMesh very simple.

Flash scope support

Using the annotation-based result mapping (see above), you can replace a Redirect annotation with a Flash annotation. It behaves almost exactly the same, except that the subsequent request that you've redirected (flashed) to will have the original action pushed on to the stack. This means you can display content from the previous action (such as a confirmation message) easily.

Example:

@Results(values = {
    @Result(name = Action.SUCCESS, type = Flash.class, 
            location = "/person/${person.id}/view")
})
public class FooAction extends AbleActionSupport {
...

Seamless un-checked checkbox support

Embarrassingly, WebWork has never made supporting un-checked checkboxes easy. The problem lies in the fact that HTML doesn't submit a form value if the checkbox is not checked. Able fixes this by changing the WebWork checkbox template to actually render out two form items per checkbox: the checkbox itself and a hidden field.

Then an interceptor is applied that compares the hidden field and adds the value to the parameters to apply to your action if checkbox was not found (therefor not checked).

Partial page identification

People who use SiteMesh love it, but I've found that often SiteMesh users structure their URLs in a way that makes using SiteMesh simpler, rather than ways that make their URLs make more sense. Common URL patterns I've seen include "/secure" or "/member" (to have a root path that the logged in decorator should show) as well as "/partial" (to have a root path that shouldn't be parsed).

This happens because SiteMesh makes it easy to map URL patterns such as /secure* or /partial* to specific decorators, or to be excluded.

With the increased use of AJAX, SiteMesh users find themselves needing to exclude much more content than they have in the past. The @Partial annotation, when applied to an action, allows for you to easily make some actions render back just partial HTML (to be used by Prototype's Ajax.Updater, for example) without placing all your partial actions under a common URL root such as /partial*.

iBatis DAO wrapper

Using Java Generics, there is a base DaoService class you can extend for additional service classes for new entities. It encourages a practice of one service per entity (Foo -> FooService, Bar -> BarService, etc). The DaoService provides a Dao<T> object specifically for that entity. You can then do things like:

public User findById(long userId) {
    return dao.selectSingle("byId", userId);
}

public User findByEmail(String email) {
    return dao.selectSingle("byEmail", email);
}

public User findByFirstNameOrLastName(String firstName, 
                                      String lastName) {
   return dao.selectSingle("byFirstNameOrLastName", 
                           firstName, String lastName);
}

public List<User> findByUpdatedAfterDate(Date updatedAfter) {
    return dao.select("byUpdatedAfter", updatedAfter);
}

The key thing here is that the DAO object uses var-args and Generics. The var-args usage is unique in that the name of the query (ex: "selectByFirstNameOrLastName") gets parsed for "and" and "or" keywords and then the parameters are placed in to a map with those keys. In the case of findByFirstNameOrLastName(), the iBatis query looks like so, found in User.xml:

<select id="selectByFirstNameOrLastName" 
        resultMap="user" parameterClass="java.util.Map">
    SELECT user_id, username, email, first_name, 
           last_name, password_hash, 
           creation_date, update_date
    FROM users
    WHERE first_name = #firstName# 
          OR last_name = #lastName#
</select>

The same applies for delete, update, and insert.

In addition to this, the DAO layer also looks for queries named "foo-vendor", where vendor is something like "hsql" or "postgres". This lets you write your application to work on multiple databases. Even websites should do this, simply for the fact that using an in-memory database helps with testing/development but you'd want to use a real database in production.

Upgrade framework

The best way to understand the upgrade framework is to look at my previous blog entry on the subject.

Build profiles

One thing that I really like that Rails encourages, and that I think most developers have done for years, is using the concept of build profiles. Out of the box, when you run "mvn install" you get a different build from when you run "mvn -Pprod install". Looking at pom.xml, you can see that the "prod" profile simply copies over config.prod.xml to config.xml when building the webapp.

Inside of config.xml (the default/dev profile), a MockMailService is used, as well as JDBC url that indicates to Able to use an in-memory database and a sample database script (sample.sql) to populate initial data. This makes developing much easier, and encourages a "checkout and go" philosophy.

Inside of config.prod.xml, a real MailService is used and a real postgres database is specified. Tests are also skipped, since we assume that by the time you are ready for production you don't need to run your tests.

Using this pattern, you might want to introduce a "staging" or "qa" profile as well.

Getting Started

Are you interested in getting started today? Great, welcome aboard! Right now Able is nothing more than code checked in to OpenSymphony's sandbox SVN repository. You can find it at:

https://svn.opensymphony.com/svn/sandbox/able

Once you've checked out the code, simply do the following:

  1. Make sure you've downloaded maven 2.0.4 and have it in your PATH
  2. Make sure you've got the TestNG plugin (TestNG-J) downloaded and installed in IDEA.
  3. Run "mvn install".
  4. Run "mvn idea:idea" to generate your IDEA project files ("maven eclipse:eclipse" should work to