• Linas Naginionis
Software Craftsmanship

Something’s brewing in the labs…

Something’s brewing in the labs…

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?

9 thoughts on “Something’s brewing in the labs…

  1. David Taylor

    Just noticed your ORM up on BitBucket. Looking good from what I can see. Will you provide source access anytime soon?

    I am a longtime ORM user starting with Hibernate going back to the early days when Spring and Hibernate were shiny and new. I have also been using (and developing) InstantObjects for many years now and have been looking for time to develop an ORM like the one you have created.

    1. Sound Vibe Post author

      Thanks for the interest. Been working really hard on this project. Yes, I’m planning to provide source code anytime soon. Just need to finish implementing some things and decide on project’s licence.

  2. ken

    Thank you for the effort and time you have put into this application. I just installed it (v0.1.0.342) but it seems to be quite sophisticated (and more straight-forward) than other apps. Please continue your efforts. When better stability and more advanced help file are released I will happily contribute a donation in appreciation. It required care to avoid the imbedded ads and re-routs on the softpedia site. DL directly from soundvibe.net would make me feel better.. Thank You for supporting the freeware community. Ken Shute

  3. Graeme

    Have you ever heard or looked at tiOPF (originally known as TechInsite Object Persistence Framework). It was open sourced back in 1999 and has been growing from strength to strength ever since. Looking at your “main features” list, tiOPF supports all that and more. Multiple backend persistence layers, switchable at runtime or compile time, very well unit tested (1600+ unit tests), uses design patterns extensively, clear separation between business object and persistence code, visual ui binding via model-gui-mediator design pattern, works with Delphi and Free Pascal, cross platform (tested on Windows, Linux, FreeBSD) etc.

    http://www.tiopf.com

    or

    http://tiopf.sourceforge.net

    1. Sound Vibe Post author

      Yes, I’ve heard of tiOPF. One of the reasons why I’ve decided to write my own ORM framework was that all other Delphi frameworks were built based on the old Rtti which has many limitations. I like that I can annotate my model with some attributes without the need to inherit from the specific class, I am not forced to use published fields or properties, I can implement lazy initialization in very elegant fashion, etc…

  4. Pitty

    Hi…

    Congratulations for the effort.

    My team are very exciting about this features and we would like to test and collaborate with you to make your framework to takeoff.

    We have a lot of problems syncronizing transactions between our objetcs and data and we are searching some ORM framework that use annotation to make things happens.

    So, when you have some code to share, please let me know.

    Cheers !!!

    1. Sound Vibe Post author

      Hey,

      I was on vacation so couldn’t reply earlier.

      I’m always open for collaborators. Code is already available but since there are more testers than number of people bitbucket allows to share code with I need to find some other way to do this.

Leave a Reply

Your email address will not be published. Required fields are marked *

*