Wednesday, February 27, 2008

This Week in Wonder

I thought it might be kind of useful to summarize the commits to Project Wonder that don't end up getting a top-billing article of their own for folks who don't just sit waiting for their wonder-cvs mailing list phone to ring.  We end up having to do this when we write release notes each year, anyway, so this might give us a head-start.

Given that this is the first one, I thought I'd catch us up for 2008.  So bear with me, this might be a big post :) I hope to do this on a semi-regular basis, maybe once a week.

ERXKey and Chainable Qualifiers
There are many ways to construct qualifiers in code, but there's often a trade-off between verbosity and type safety.  ERXKey and chainable qualifiers add  pretty cool balance that provides very readable qualifiers while also ensuring type-safety and compile-time checking.  For example:;

Also check out ERXQ for a bunch of handy shortcuts for building qualifiers.

JavaMonitor was open-sourced in WebObjects 5.4 and slurped into the Project Wonder tree. Anjo has already cleaned things up quite a bit and has started making this old dog do some new tricks.
* Lots of code cleanups
* "Bounce" Action
* Refuse New Sessions bug fixes
* "Statistics" action

Lots of new things on the database migration front.
* support for changing allows null constraints
* support for renaming tables and columns
* support for defining unique indexes

AjaxSelectionList is a component for rendering selectable list views with full keyboard navigation support. Think of it as a WOPopupButton with component renderers for each node.

ERXExpiringCache now supports reaping with a background thread, which makes it quite a bit safer

Chris Meyer donated all the patches necessary to bring EROpenID into compliance with OpenID 2.0.

When combined with a recent WOLips nightly and extending ERXComponent, WOLips.framework provides some very slick debugging tools, like the ability to click on arbitrary components in your web browser and have the corresponding component in WOLips. Check out the screencast at the mDimension build site. Anjo added support for click-to-open in all of the ERD2W components as well.

Anjo added support for easily integrating with Google Analytics via the ERXPageTracker component.

Lots of additional cross-database SQL trickery added, like support for generating group by's, having's, and other more complicated SQL constructs.

Based on the Rails acts_as_taggable plugin, ERTaggable provides a very easy way to drop in support for tagging arbitrary entities in your application along with several useful components for inputting and displaying tags (slick tab-completing like, tag clouds, etc).

Ajax Partial Submits
Due to the way WO handles missing form values during a submit, getting partial submits to work properly with Ajax.framework has been a problem for quite a while. The partial submit problem has finally been solved, and in a way that does not require custom input tags. Check out ERXAjaxContext for more info.

Surprised this didn't exist already? Me, too. But finally there is a very easy way to generate RSS feeds with Wonder.

Anjo already wrote about his new JSON and YUI enhancements in previous posts.

Need a clickable div that fires an action like a WOHyperlink? ERXClickableContainer is your man.

currencyAmount / amount prototypes
These prototypes had some shoddy definitions in some of the databases. This has been corrected to be a fixed precision number in all of the supported databases. Double-check your apps on this one.

General Ajax Improvements
The html generation of Ajax submits has been substantially size-optimized. If you had lots of Ajax submits on a page, your page just got a lot smaller. Also, the long-standing bug that could cause an update area to disappear under clicking-to-fast-in-just-the-right-circumstances has finally been fixed. The bad man is gone.

URL Rewriting
If you've been using ERXApplication's _rewriteUrl method, for the common case where you just want to pop off the /cgi-bin/WebObjects/YourApp.woa and replace it with something .... not 30 characters long, check out the er.extensions.ERXApplication.replaceApplicationPath.pattern and er.extensions.ERXApplication.replaceApplicationPath.replace properties.

Turn off Secure
If you develop with DirectConnect (or you're too lazy too setup SSL on your dev Apache), you've probably been stuck by your secure=true links or forms in development. Never again ... Just set er.extensions.ERXRequest.secureDisabled=true and all https:// URLs will be disabled. Note that this will ignore you if isDevelopmentMode is false, just to prevent you from hurting yourself.

AjaxObserveField was useful for observing single form elements, but was a big of a pain for observing a set of them. You can now wrap a set of form elements in an AjaxObserveField and it will observe all of them for you. You no longer have to set your own unique id's on each of the fields.

Those are the ones that stood out to me as I skimmed the ChangeLogs. For all of the gritty details, you can read them in all of their glory at Apologies to any commits that I may have overlooked -- let me know if I missed something deserving (and I'm sure this is totally skewed towards my own commits :) ).

There was a lot to go through, and we're only about 60 days into 2008!

1 comment:

  1. Re: "Turn off secure", Apple has great, step-by-step instructions for configuring SSL with a self-signed certificate. This makes it easy to get SSL working on a dev machine.