#3 “dorm, the Delphi ORM” bullettin

A veeery log time after the last dorm bullettin. But, as usual, I was been very busy on some projects (not only dorm) and the time goes by…

However, dorm has been extended, polished and improved over the last few months. Has been used in a couple other projects in my compoany (www.bittime.it).

So, here’s a small list of improvements and some other tips:

– ObjStatus support (more to come)

– TdormSession non-visual component. Check “samplesDelphiXE3TdormSession_Sample01formSample1.dproj”

– dorm is now in Continuous Integration (not for all supported databases, but I’m improving that)

– I’m integrating a JSON/DataSet/ObjectList mapper into dorm to be used in RESTful DataSnap/WebBroker (or not) http servers. More to come.

– Delphi XE3 Support

– Removes SuperObject as external lib. Now dorm uses an internal patched version.

– More demos added (Most noticeably id under “samplesDelphiXE3TODOManagerTODOManager.dproj”)

– Added samples using the new Visual LiveBinding feature in Delphi XE3

About the ObjSupport it’s worth to spend some words about it.

Since the beginning, dorm is completely “perisstence ignorant”: In other words, you can persiste what you want, you dont need to inherit from a specific class or implement a specific interface. This is a very powerful feature but make some internal dorm mechanism very complex. But I really WANT to have this feature, so I’ve added another “mode” to work with dorm: ObjStatus.

If dorm engine finds a property nemed “ObjStatus” of a specific type, it’ll use that property to track the object status (Clean, Dirty, Deleted).

In this way, I gained a *LOT* of speed compared to the prior version regarding persistence of complex objects graph.

eg.

procedure DoSomethingOnPersonByID(ID: Integer);
var
  p: TPerson;
begin
	p := Session.Load(ID);
	p.FirstName := 'Daniele';
	p.Car.Model := 'Civic';
	p.Phones.Add(TPhone.Create('555-555-33-22', 'Home'))
	Session.Persist(p); //generates insert, update, delete for related objects too
	p.Free;
end;

As Usual you can find the project code here https://code.google.com/p/delphi-orm/

#2 “dorm, the Delphi ORM” bullettin

This is the second post regarding a fast update on the last changes to the dorm project in terms of management and code.

  • Welcome to 2 new contributors: Marco Mottadelli and BraveCobra (this is the full list http://code.google.com/p/delphi-orm/people/list)
  • Added 2 new PersistentStrategy for MSSQLServer based on dbExpress (the 1st use the Embarcadero dbExpress driver, while the 2nd use the DevArt dbExpress driver)
  • Added another PersistentStrategy for MSSQLServer based on ADO (so also Delphi Professional users can use dorm with MSSQLServer)
  • The new mapping strategy is under development. There will be “3 levels” of mapping: Config File, RTTI Attributes and “Conventions Over Configuration” (CoC) (do you wanna check the code in dev branch? Click here)
  • Added more unittests
  • Roadmap updated
  • Introduction to dorm, now is a PDF document
  • The config file has been splitted in “Persistence” and “Mapping” for a more flexible configuration
  • Added packages (Thank you BraveCobra)
  • Added MappingCreator. Now you can create the mapping file using an existent database.
  • IWrapperList (a duck typed list) now is used EVERYWHERE! You can use whatever list from whatever library you want to use. The list must have only a specific methods named as following: Add, Clear, GetElement/GetItem, Count
  • Added FillList methods
There are plenty of new features still to come. Stay tuned!

#1 “dorm, the Delphi ORM” bullettin

This is the first post regarding a fast update on the last changes to the dorm project in terms of management and code.

  • Welcome to 2 new contributors: mrbar2000 and magnomp (this is the full list http://code.google.com/p/delphi-orm/people/list)
  • Added a PersistentStrategy for SQLite.
  • New Google Group related to dorm. Post your questions, comments and request here!
  • Added support for Generics Collections. No more needs of TdormCollection. You classes are completely decoupled from the framework.
  • A brand new mapping strategy is under development. There will be “3 levels” of mapping: Config File, RTTI Attributes and “Conventions Over Configuration” (CoC) (do you wanna check the code in dev branch? Click here)
  • Added more unittests
  • Roadmap updated
  • Initial support for MS SQLServer in a development branch (Thanks to Claudio Regonat)
There are plenty of new features still to come. Stay tuned!