Delphi Handbooks Collection


Delphi XE Handbook


Delphi 2010 Handbook


July 14, 2011

Delphi Relax Status Update, July 2011

I've realized I haven't blogged in quite some time about the current evolution of the Delphi Relax project, an open source extension to Delphi XE DataSnap REST architecture I'm working on.

I've realized I haven't blogged in quite some time about the current evolution of the Delphi Relax project, an open source extension to Delphi XE DataSnap REST architecture I'm working on.

Unluckily, given other commitments, I found some time to keep working on it, but not on the documentation. The overall project, as you might remember, has a database mapping layer, a JSON mapper including JavaScript generators that help building the UI in the browser, a scripting language to customize the HTML, and extensions to sessions management. it uses jQuery a lot, and jqGrid for tabular data.

New Areas and Extensions

The project is now at revision 101, and I keep posting additions and fixes. I've started creating a standard base WebModule to inherit from (which also simplifies the standard one generated by Delphi, which is a little too cluttered). For this I used an interceptor class (that is, the base class is called TWebModule and inherits from HTTPApp.TWebModule, because if not the Delphi IDE designed won't show the Web Actions editor. Not that this is really needed, but it is nice to keep it as an option, for customizing the behavior.

With the help of Matthias there is an initial unit testing skeleton, focused on database mapping. The unit test creates a new FireBird DB from  scratch and populates it, so it is very easy to set up, even if not terribly fast to run.

I made significant extensions to the in-memory tables management, including the ability to create a partial clone of a dataset (with a filter), but also the ability to add calculated fields to a ClientDataSet using anonymous methods. This is probably the nicest trick I've added, probably worth a demo and a good description, in a specific blog post (or video).

Other features, taken from the Udpate log, include:

* Sending emails in a thread, and accepting multiple recipients

* Added support for including an HTML fragment with the @Import command

* Added support for Currency fields

* Creating an active record mapped to an in memory table module

* Added a generic GetSessionData for HTTP Web requests (not the REST ones)

There is much more, of course, and the documentation and demos as lagging behind. But the project is progressing and I'm creating a new online shop for my company based on it. Finally, I'm blogging a little less because I'm now Google "Plussing", beside "Twitting". And I'm fighting with Dell to have my new PC (see my public Google Plus profile for info).... and I'm also getting a Mac.





 

4 Comments

Delphi Relax Status Update, July 2011 

Hello Marco, very usefull library. I like it and I'm 
testing it for usage.

Only one comment: in the rlxrazor.pas. I'm not sure if 
this is a good idea:

line 349

  // reparse for double processing
  if Pos ('@', Result) > 0 then
  begin
    Result := DoBlock (Result);
  end;

This piece of code will be fired if you render a page 
with an email or something with '@' injected in 
'onValue'.
Comment by Francis Ruiz [] on July 14, 21:26

Delphi Relax Status Update, July 2011 

Francis,

  good point. By default, you have to double @ in the 
script to get it in the output, but it might as well be 
that double processing messes up with it. Maybe we have 
to introduce an escape mechanism... on the other hand 
double processing is great for translating and than 
applying formatting rules, or the opposite.  
Comment by Marco Cantu [http://www.marcocantu.com] on July 14, 21:38

Delphi Relax Status Update, July 2011 

I agree with you, double processing is a very nice 
feature to forgive it.
Comment by Francis Ruiz on July 14, 22:54

Delphi Relax Status Update, July 2011 

Hello! how do I generate the ISAP Frimework Delphi 
Relax? I found the very practical Frimework. 
Congratulations!
Comment by Diego Campos [@diegocampos] on September 3, 12:45


Post Your Comment

Click here for posting your feedback to this blog.

There are currently 0 pending (unapproved) messages.