Book Review: “ZeroMQ” (PACKT Publishing)

Introduction Some days ago I was contacted by a representative from PACKT Publishing asking me to write a review for their last book about the ZeroMQ library. In 2009 I was looking for a fast, very fast, messaging system for a complex project and I meet ZeroMQ. At that time there was the 1.x version and I wrote a Delphi wrapper for the C dll that some days later has been included in the official ZeroMQ distribution. Now, after 4 year since then, I’m using ZeroMQ for a lot of things. I’ve talked about ZeroMQ to the popular ITDevCon (The…
Continua a leggere →

How to serialize a TList of objects with Delphi

Some weeks ago a customer asked to me if it is possibile serialize a TList of objects. “Hey, you should use a TObjectList for this”, I said, but he absolutely needs (I dont know why) of a TList. This is the (simple) sample code tested with Delphi XE2 Update4. Enjoy. unit Unit4; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TForm4 = class(TForm) Button1: TButton; Memo1: TMemo; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; TPerson = class private FName: String; procedure SetName(const Value: String); published property Name: String…
Continua a leggere →

Delphi MVC Web Framework – “Hello World”

This is the first “Hello World” for my Delphi MVC Web Framework. program DelphiMVCWebFramework; {$APPTYPE CONSOLE} uses System.SysUtils, MVCEngine in 'MVCEngine.pas', BaseController in 'BaseController.pas'; var mvc: TWebMVCEngine; begin mvc := TWebMVCEngine.Create; mvc.AddRoute('/', procedure(Context: TWebContext) begin Context.Write('Hello World'); end).Start(8080); ReadLn; mvc.Free; 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…
Continua a leggere →

Duck Typing in Delphi

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: procedure DoSomething(Obj: TMyListType); begin … 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… procedure DoSomething(MyIntf: IMyListInterface); begin … end; Cool, but I want to have that access without any change to that object. So implement an interface is not a…
Continua a leggere →

ITDevCon 2011, recap

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…
Continua a leggere →

App Android ITDevCon2011 disponibile sul Market (ITALIAN)

Manca solo una settima all’inizio di ITDevCon2011. Per permettere a tutti gli iscritti (e far decidere chi è ancora indeciso) di sfruttare al meglio i due giorni di intensa formazione, abbiamo appena pubblicato l’applicazione ITDevCON2011 sul’Android Market. Trevete il programma completo della conferenza, i profili degli speaker e informazioni sugli sponsor. Inoltre, potrete definire i vostri speech preferiti in modo da essere avvisati subito prima dell’inizio dello speech. Potrete votare e commentare ogni speech. Potete commentare da subito inserendo le vostre aspettative per lo speech o alcune delucidazioni sul contenuto. Il voto invece sarà possibile solo a speech avvenuto. Dal…
Continua a leggere →

ITDevCon2011 Android App

In less that a week, ITDevCon2011 will begin. To allow all members (and to let decide who is still undecided) to take advantage of the two days of intense training, we have just published the application ITDevCON2011 on the Android Market. You’ll find full conference program, speaker profiles and information about the sponsors. In addition, you can define your favorite speeches in order to be alerted immediately before the start of the speech. You can vote and comment every speech. You can comment now by entering your expectations for the speech or some clarifications on the content. The vote, however,…
Continua a leggere →

ITDevCon 2011 Time Table

Yes, it is a bit late, but this year has been really difficult to choose between all the speeches proposals arrived from all over the world. The new Delphi XE2 version (and the RAD Studio XE2 Suite too) are really full of new cool features and many of the best delphi developers want to show what can be done in Delphi XE2. Great situation! However, also this year, there will be many talks and many speakers. For the first time there will be 2 plenary sessions with more than one speaker in the main TObject hall. During these sessions all…
Continua a leggere →

In the core of LiveBindings expressions of RAD Studio XE2

WARNING! I’ve been authorized by EMBARCADERO to write about RAD Studio XE2. RAD Studio XE2 is full of nice and exciting features. One of the most awaited of them is the LiveBindings. The LiveBindings is available to the VCL and the new FireMonkey framework and allows to connect a property object to another using an expression and a set of observers. Let’s say Edit1.Text “is binded to” Person1.Name also in a bidirectional way. The “link” between a property (or a group of properties) and another property can also be very complex. The following is an example of a complex bind…
Continua a leggere →

DataSnap Mobile Connectors in RAD Studio XE2

WARNING! I’ve been authorized by EMBARCADERO to write about RAD Studio XE2. RAD Studio XE2 is full of nice and exciting features. One of the most interesting IMHO is the DataSnap extension called “Mobile Connectors”. In the past, I’ve talked about connecting and using your datasnap REST service with Android, creating ad-hoc json messages and manually parsing the returned json messages. With RAD Studio XE2 this is no longer needed. If you have a DataSnap REST service, you can automatically generate the proxy connector for the major mobile platforms. Yes, just like you have been doing with Delphi or C++…
Continua a leggere →