Default value handling

by Matthew Noonan 23. October 2006 18:28

I don't know why it didn't occur to me, but I developed a plan on how to do default value handling (client-side) in EasyObjects, and I forgot to include it in the 1.2 release. So, as of today, I will add this feature (if the approach remains feasible and maintainable) to EO 1.2. I won't go into technical details just yet, but the basic plan is to recognize certain common SQL functions (such as GetDate(), sysdate, NewID(), etc.) and to recognize numeric defaults. Anything else will be treated as a string value, which will negate the use of custom functions and other errata that would cause the EO code to break. The "ApplyDefaults" method will be overridable, so if you have some custom function, you will have to override the generated defaults and add your own client-side code.

I know server-side default processing has been requested, but EO will have to undergo a nearly-complete rewrite in order to accomplish this, and obviously that's just too big a task for this release. Client-side defaults will at least allow for displaying the values in a new grid row. We'll get to server-side defaults in EO3.

I welcome your comments on this issue.

Comments

1/10/2007 2:00:00 AM #

Hi Matthew,

I'm new to Easyobjects and I'm starting to enjoy using it. I have a question regarding the "ApplyDefaults" is this function/method already included in EasyObjects.NET 2.0 CTP? This is the version I'm using right now. If not do you intend to include it and when?

Thanks

Jayson Belmonte United States

1/10/2007 2:00:00 AM #

Hi Jayson,

This feature is not currently in the CTP, but definitely will be in the upcoming release of 2.0. I almost have all the structure in place, so if things don't get too crazy around here, I expect to release 2.0 this month.

Matt

Matthew Noonan United States

Comments are closed