Friday, May 9, 2008

This Week in Wonder

Not the most exciting Week in Wonder, but they can't ALL be awesome :)

BugTracker
Attachments in BugTracker are now based on ERAttachments, and ERTags support has been added.

Migrations
Migrations now support creating blob columns without specifying a size (it appears most databases don't require it).

Migrations should work much more reliably with Derby.

Unique index declarations for Migrations now support passing the index length, which is necessary to support indexes on MySQL (which cannot exceed certain lengths).

Certain Migrations are now declared to be optional, meaning a failure of the plugin to generate SQL will not result in an exception, but instead a log error. Foreign keys is an example, as not all database support foreign key constraints, but it's not really a failure condition.

Migrations now support adding regular indexes (rather than just unique indexes).

ERAttachments
ERAttachments was converted from SQL-script-based migrations to api-based migrations. This should allow it to have much better support for other databases in the future.

Ajax
AjaxObserveField has a new "observeDelay" binding that gives better periodic refresh behavior. This is particularly useful for textfields so that it doesn't fire as often as it would with just the regular frequency setting. With frequency, if a change occurred within the frequency period, a request will fire. WIth observeDelay, the request will only fire after the specified observeDelay amount of idle time. So as long as you're typing, it won't fire. When you pause, it will then fire.

If you spell the name of an update container ID wrong, you will now get a javascript error from your update links and submit buttons telling you the specified update container could not be found rather than just getting an update with no response.

Batch Fetching
ERXBatchingDisplayGroup and ERXRecursiveBatchFetching have much better batch fetching behavior for to-one relationships to abstract entities (read: it works now vs ... it didn't before).

ERXBatchingDisplayGroup now supports defining and using prefetching relationship key paths.

ERXBatchingDisplayGroup now supports overriding the row count manually. If you have a better method of setting the number of rows in the results compared to the display group's, you can now set it yourself. For instance, if you know you're only ever going to fetch two pages, you could set your row count to page size * 2 and the display group will 1) not fetch more than the row count you set and 2) skip executing the count(*) query, which can potentially be expensive. If you guess too high, it will correct for you when it runs out of rows.

OGNL
Previously in OGNL, if you declared a helper function on a keypath and one of the elements of that keypath evaluated to null, WOOGNL was not able to identify which helper class to use. For instance, if you bound your value to "person.company.name|dosomething" and person was null, it would not know to use StringHelper.dosomething(..). Now when this happens, it will walk the keypath to figure out what classes are in use and properly pass a null to your helper function. This allows you to make helpers that can do null replacement (similar to valueWhenEmpty on WOString, but in the general case).

Misc
Instead of using ERXKey.append, you can now use ERXKey.dot, which makes sense when you read your code out loud, but more importantly it's three characters shorter, which is kind of nice.

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi!

    Can you write a bit more about "Better compatibility with FireFox 3's more aggressive caching of Ajax requests."? I had a problem with Firefox 3 ( http://terminalapp.net/firefox-3-javascript-evaluating-order-problems/ ), I'm interested to know if I need to worry more than that. :)

    Yours

    Miguel Arroz

    ReplyDelete