Guest speaker @ Delphi Develpers Days in Rome

Uncategorized No Comments »

Next week I’ll be the guest speaker at the Delphi Developers Days held in Rome by (and with) Marco Cantù and Cary Jensen. Marco and Cary are very good speakers and very expert developers, so will be nice to be there with them and I want to thank them for inviting me.

My talk will be on May 17 and these are the details:

Title

Improving Code Testability Through Dependency Injection

Abstract

Create a highly decoupled system is not simple. Inversion of control principle help to understand what you have to do to accomplish this target. In this speech I’ll introduce the reasons behind the adoption of a IoC is a good thing for your software and your business. In the final part, will be introduced the dependency injection container contained in the Delphi Spring Framework (spring4d). There will be lot of examples to help to correctly understand this “new & better” way to do old things.

This is the page for register to the event

http://www.delphideveloperdays.com/#rome

See you there!

ITDevCon2012 - Call4Papers

Events, ITDevCon2012, Programming, bit Time Software No Comments »
ITDevCon2012

Dear potential ITDevCon speaker,

I’m building the agenda for next ITDevCon 2012 that will be held October 25th,26th in Verona (Italy), the same location of the past year.

The call for papers are officially open right now, so if you want to propose some speeches, I’ll be glad to see it.

As usual, for the Call4Paper I need:

  • Title (for every talk)
  • Abstract (for every talk)
  • Difficulty level (for every talk. Difficulty level is a scale from 1 to 3 with the following mean: introduction, intermediate, advanced)
  • Speaker’s photo
  • Speaker’s profile

I’m looking forward to your proposal. The call4papers ends at July 31st, 2012.

Send your proposal to call4paper(at)itdevcon.it.

Proposals will be evaluated and the speakers will be contacted ASAP.

This year topics will be the following:

TOPICS

  • What’s new in Delphi
  • FireMonkey
  • iOS development (iPhone, iPad, iPod Touch)
  • MacOSX development
  • Android clients for Delphi servers
  • Windows 8
  • Delphi best practices
  • Design Patterns
  • DataSnap
  • “Unusual” Delphi markets
  • TDD and Unit Tests
  • Agile methodologies
  • Dependency Injection
  • ORM
  • Software engineering
  • “Hands on” sessions for the most used Delphi frameworks (e.g. Delphi Spring Framework, OTL etc)
  • Mobile
  • HTML5/SVG/WebGL and Delphi
  • OOD/OOP
  • Web development with Delphi
  • Real OOP Delphi applications developments
  • Delphi fundamentals/advanced
  • Metaprogramming
  • Games
  • SOA/ROA
  • Architectures

Target audience

  • Software architects
  • Software developers
  • Project managers
  • IT managers
  • Trainers

The conference web site is http://www.itdevcon.it (2012 version is still under construction).

Do you want to see a particular topic or have a suggestion for ITDevCon2012? Let me know

Thanks and see you at ITDevCon 2012.

P.S. This year, ITDevCon will be even more amazing! Stay tuned!

dorm, “The Delphi ORM” and Spring for Delphi Framework

"The Delphi ORM", Spring4D, dorm No Comments »

Great news for all the dorm and Spring4D users!

As you probably know, finally has been announced the official Spring framework for Delphi.

There is a lot of good technology in Spring4D!

So, I’m glad to announce that in a future version (hopefully, the next one) dorm, “The Delphi ORM” will use Spring4D and will become the ORM part of Spring4D.

So, dorm will be part of the Spring4D framework.

More info to come, so stay tuned.

Delphi MVC Web Framework - “Hello World”

Delphi XE, Delphi XE2, Design Patterns, Embarcadero, MVC, RTTI, dorm 4 Comments »

This is the first “Hello World” for my Delphi MVC Web Framework.

  1.  
  2. program DelphiMVCWebFramework;
  3.  
  4. {$APPTYPE CONSOLE}
  5.  
  6. uses
  7.   System.SysUtils,
  8.   MVCEngine in 'MVCEngine.pas',
  9.   BaseController in 'BaseController.pas';
  10.  
  11. var
  12.   mvc: TWebMVCEngine;
  13. begin
  14.   mvc := TWebMVCEngine.Create;
  15.   mvc.AddRoute('/', procedure(Context: TWebContext)
  16.     begin
  17.       Context.Write('Hello World');
  18.     end).Start(8080);
  19.   ReadLn;
  20.   mvc.Free;
  21. end.

Features list (some of them are in the internal roadmap)

  • Completely MVC
  • Addressable with servername/controllername/actionname?par1&par2
  • Addressable with servername/controllername/actionname/par1/par2
  • Can also use anonymous methods as actions for very simple app (in the sample)
  • Really RESTful (Level 3 of the Richardson Maturity Model)
  • Fully integrable into WebBroker and DataSnap
  • Supports multiple resource rapresentations
  • Completely customizable routing using internal formatting or regex
  • Inspired to ASP.NET, Sinatra, Java Spring MVC, Java Restlet
  • Scriptable views support (Pascal, Razor, Lua)
  • Component based
  • Session support
  • ORM support using dorm
  • Classic TDataSet support
  • State server to support real loadbalancing using reverse proxy
  • Can be deployed as standalone (in the example), ISAPI dll and Windows Service
  • Fully support https
  • More to come…
  • This framework is still under development.

    Are you interested in? :-)

#2 “dorm, the Delphi ORM” bullettin

Uncategorized, dorm 3 Comments »

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

"The Delphi ORM" 1 Comment »

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!

Do you wanna see an enormous potential tool? Here’s the pascal for Java and Android

Programming 15 Comments »

Yes, this is very cool. I’m not a Java hater, in terms of language (and I dont want to start a language-war), but some Java features, IMHO, are a bit uncomfortable for me.
However, Java is very powerful and there are an enormous amount of good open source project for Java. So, seeing java libraries used in simil-pascal code (is not Delphi’s Pascal, but enough similar), is nice. In this way, you can use all the java libraries in Pascal!
I’d like to have this integration in Delphi IDE too with a good designer for Android activities.

I’m testing Oxygene for Java (form RemObjects) for a couple of things, specifically Android related.
This is my first console project in Oxygene for Java, just to see some code.

Oxygene for Java - Simple console app using specific Java libraries

Oxygene for Java - Simple console app using specific Java libraries

IMHO there is an enormous potential for the Delphi developer and for all the developers that need a unique language to do server, mobile and native ultra fast app.

I dream to have this technology into the Delphi IDE.

Duck Typing in Delphi

"The Delphi ORM", Delphi XE2, Programming, Uncategorized 8 Comments »

During a new dorm feature development, I’m faced a nice problem:

I want to have a generic access to a “kind” of list

Let’s say:

  1. procedure DoSomething(Obj: TMyListType);
  2. begin
  3. end;

But, I want to have that generic access without a Layer Supertype object, because I need to be able to use objects from other libraries or 3rd party. In this case traditional polimorphism is not usable, so I’ve opted for an interface…

  1. procedure DoSomething(MyIntf: IMyListInterface);
  2. begin
  3. end;

Cool, but I want to have that access without any change to that object. So implement an interface is not a viable solution. This is particulary true because the generics data structure in Delphi do not implement an interface. Will be nice to have a fully interfaced list and dictionaries in a future Delphi version.

So, how I could implement a generic access to a generic list?

  1. procedure DoSomething(MySomething: ???);
  2. begin
  3. end;

However, operations on that list are few and well known, so I’ve opted for a “DuckTyping“.

Introducing The Duck

Introducing The Duck

The name of the concept refers to the duck test, attributed to James Whitcomb Riley, which may be phrased as follows:

“When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck.”

So, in my case, I’ve created an Adapter object wich adapts the external interface (few, well know operations) to the “duck” inside it.

The adapter is useful because I can use the compiler checking that the RAW RTTI access doesn’t allow.

Write an “RTTI adapter” using the new Delphi RTTI, is very simple. This is the code of the class TDuckTypedList that allow to use any object as a “list”. How I can define that the object is actually a list?

The criteria is:

If the object has
- An “Add” method with one parameter of type TObject (or descendant);
- A “Count” property;
- A “GetItem” method that have an integer parameter and return an object;
- A “Clear” method;
then, that object is a list.

So I can write the following:

  1. DuckObject := TDuckTypedList.Create(Coll);  //the adapter
  2. for x := 0 to DuckObject.Count - 1 do
  3.   DoSomething(DuckObject.GetItem(x));

I’ve done some speed tests comparing this way to the classic static way, and the speed is almost the same because the RTTI lookup is cached in the constructor of the adapter. So, so far so good.

This solution is already in use inside the dorm code in a feature branch.

Full code is available in the dorm SVN

Any comments?

dorm, “The Delphi ORM”, officially published at ITDevCon

Projects, Uncategorized, dorm 11 Comments »

As all the attendees have seen, at the last ITDevCon, I’ve officially published dorm as an OpenSource project.

dorm, The Delphi ORM

dorm, The Delphi ORM

You can find the project on google code: http://code.google.com/p/delphi-orm/

An introduction to dorm is available on google docs.

dorm begins as a my personal project more than one year ago, and now is sponsored by bitTime Software that offers custom development, consultancy, mentoring and so on.

Why dorm?

These are my personal reasons of because I’ve started to write dorm:
I WANT an ORM for Delphi… but:
I dont want (or I cant) change my database
I want persistence ignorance
I want to access to the «metal»
I want to persist PODO
I don’t hate SQL, but I know that 90% of it is boilerplate and errors prone

First example

Insert and retrieve object with dorm

Insert and retrieve object with dorm

You can persist anything you want.
bitTime actively use dorm, so it’s continuosly updated and evolved.

Repeat, you can find the project on google code and an introduction to dorm is available on google docs.

Let me know what do you think about.

Do you need an ORM like dorm in Delphi?

ITDevCon 2011, recap

Delphi XE2, Embarcadero, Events, ITDevCon, ITDevCon2011, Programming, Uncategorized No Comments »

Last Friday ended the third edition of ITDevCon, the European Conference on Delphi and its related technologies.
ITDevCon this year was even bigger and funny.
There have been more present, more sponsors, more speakers, more topics and a lot of people with the desire to learn new things and improve their every day work.

A special thanks goes to all the speakers who participated and the sponsors who have contributed their support to make this conference a major event for the European community Delphi.

I hope that the content and the organization is liked to you at least half of how much it is liked to me.
We are organizing slides, videos and examples for each speech to put it all on-line available to participants at the conference as soon as possible. You will receive an email informing you of how to download all the material available.
In the coming days, on the conference website (www.itdevcon.it) we will post all the pictures we have done in these three days.

If you have any photos that you want to see published, send them to me, we’ll publish it on the official website.

Some friends (and speakers) already blogged about the conference:

DavidI
http://blogs.embarcadero.com/davidi/2011/10/24/41413

Paweł Głowacki
http://blogs.embarcadero.com/pawelglowacki/2011/10/30/39392

Primoz Gabrijelcic
http://www.thedelphigeek.com/2011/10/itdevcon-2011recap.html

Marco Cantù
http://blog.marcocantu.com/blog/itdevcon2011_summary.html

And now, Daniele Teti :-)

ASAP I’ll publish the slides of every speeches.

If you want to see the tweet about the conference, you can go here.

Here’s some photos from the conference.

During the “Country Evening” some of us have been singing with the good “Tex Roses” friend (an italian country band). Probably there are at least 15 video documenting my “performance”!

Here’s the video recorded by Primož (the Delphi Geek)

I thank again all those who have spoken and all those who have attended to ITDevCon.
See you next year.

– Daniele

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in