Something’s brewing in the labs…

Linas Naginionis
soundvibe
Published in
2 min readAug 1, 2012

Long time no see

It’s been a while since my last post. I wanted to share with everyone what’s going on lately in my daily work. I’ve seriously started worrying about Delphi as a language/development tool itself. Not in the way that it isn’t capable of doing something. It is very powerful and pleasant programming language. My biggest concerns about Delphi and it’s community are:

  • Lack of solid, powerful freeware open source frameworks. There are some (Spring 4 Delphi, Delphi sorcery, OmniThreadLibrary) but they are very young and also maturing very slowly or do not have features I would like to see.
  • Lack of modern concepts integrated into the IDE/language. MVC, MVVM, ORM, futures, async, await, auto properties, etc.
  • FireMonkey. I think Embarcadero should agree that it was wrong decision to use this framework in cross platform development.

So I’m planning to abandon Delphi. Of course, I will use it at work (because it is necessary) but I will be trying new languages/development tools from now on.

Having this decision in mind, I decided to give Delphi one more try. I’ve started to write my own ORM framework for Delphi (Codenamed “Marshmallow”). It will use new language features which were added from 2010 and will be inspired by .NET Micro ORM’s. More detailed information about my new project can be found here on bitbucket.

The main features should be:

  • Works with attribute based PODOs.
  • SQL as a query language or no queries at all
  • Easy transactions
  • Supports different databases (SQL Server, SQLite, ADO adapter, etc. )
  • Cross platform
  • Unit tested
  • Query logging with multiple listeners
  • One to many, many to one, many to many relationships
  • Lazy loading, nullable types
  • Can fetch lists of PODO’s (can optionally use Spring collections or native Delphi TObjectList<T>)
  • Paged fetches

So you can write something like this:

procedure Demo;
var
LCollection: IList<TCustomer>;
LCustomer: TCustomer;
begin
LCollection := TCollections.CreateList<TCustomer>(True);
Manager.Fetch<TCustomer>('SELECT * FROM CUSTOMERS', [], LCollection);
//do something with customer...
LCustomer := LCollection.First;
LCustomer.Name := 'Demo';
//update customer in the database
Manager.Save(LCustomer);
end;

Some of these features are already implemented. I have not decided what license to choose for this project. So if I will be happy with my ORM, I can change my mind about leaving Delphi.

What do you all think about ORM’s? Will you be interested in this project?

--

--