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:
Person.country.is(germany).and(Person.birthDate.after(someRandomDate));
Also check out ERXQ for a bunch of handy shortcuts for building qualifiers.
JavaMonitor
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
Migrations
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
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
ERXExpiringCache now supports reaping with a background thread, which makes it quite a bit safer
EROpenID
Chris Meyer donated all the patches necessary to bring EROpenID into compliance with OpenID 2.0.
WOLips.framework
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.
ERXPageTracker
Anjo added support for easily integrating with Google Analytics via the ERXPageTracker component.
ERXSQLHelper
Lots of additional cross-database SQL trickery added, like support for generating group by's, having's, and other more complicated SQL constructs.
ERTaggable
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 del.icio.us, 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.
ERXRssPage
Surprised this didn't exist already? Me, too. But finally there is a very easy way to generate RSS feeds with Wonder.
JSON and YUI
Anjo already wrote about his new JSON and YUI enhancements in previous posts.
ERXClickableContainer
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
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 http://webobjects.mdimension.com/wonder/ChangeLog.txt. 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!
Wednesday, February 27, 2008
This Week in Wonder
Monday, February 11, 2008
AjaxProxy now longer needs servlet.jar
This was a major annoyance, as you just couldn't be sure where to put this frigging jar. In /Library/Java/Extensions? In /Library/WebObjects/Extensions? In a jar? In the app?
What about people (Oh, my! The poor, unfortunate creatures!) that need to deploy in a servlet container?
So the best thing is to avoid needing servlet.jar when you can. And that's what we did.
It's currently untested, so please report on the mailing list if things don't work.
But the only thing to watch out for is if you actually instatiate a JSONPRCBridge object yourself, which you normally wouldn't do if you use the AjaxProxy. If you do, then now use the JSONBridge and you're all set.
YUI libs now can be hosted externally
The YUI library is currently about an 8 MB download... it just doesn't make sense to include it into Wonder. So you can now set the property er.yui.base=http://somewhere - where somewhere can be http://yui.yahooapis.com/2.4.1/build/ for example, as outlined here: http://developer.yahoo.com/yui/articles/hosting/.
Note that the Terms Of Service may prevent you from direct hosting with Yahoo.
Friday, February 8, 2008
RSS made easy
Some of you may have this already, but for those that don't: try the new ERXRssPage.