A Simple start with MVP in Delphi for Win32, Part 2

Some month ago I wrote a simple article about an MVP variant called PassiveView. That example was very simple. Now I’ll present a more “advanced” version of that example. The main problem with first example was the following method: procedure TfrmCalculatorView.FormCreate(Sender: TObject); begin //Link controls with related interface IFirstOperand := TGUIEdit.Create(EditFirstOp); ISecondOperand := TGUIEdit.Create(EditSecondOp); ICalcResult := TGUIEdit.Create(EditResult); IOperators := TGUISelectableList.Create(ComboOperators); IError := TGUIEdit.Create(EditError); //link view and presenter FPresenter := TCalculatorPresenter.Create(Self); //<<– THIS IS THE BAD LINE end; The “BAD” line links the View with the Presenter but it’s in the view code, so this is meaning that View KNOWS the…
Continua a leggere →

New beta version for DataSnap Filters Compendium

I’ve been very busy lately with some Delphi related events here in Italy Delphi “Porte Aperte” (organized by Marco Cantù and bit Time Software) Ready for the change? IT happens (organized by bit Time Software) so I havent too much time for my personal open source project. But now I’ve released new beta version for DSFC. This release address a problem with the cypher filters. Cypher filters arent completely compatible with the previuous version, so you need to rebuild the server and the client if you want to use this new version of DSFC. There are one known issue: Cannot…
Continua a leggere →

A simple Dependency Injection Container for Delphi

As wikipedia says: “Dependency injection (DI) in computer programming refers to the process of supplying an external dependency to a software component. It is a specific form of inversion of control where the concern being inverted is the process of obtaining the needed dependency. The term was first coined by Martin Fowler to describe the mechanism more clearly.” Many of us have already read this historical article from Martin Fowler about dependency injection pattern, but actually there isn’t a real framework for implement dependency injection in Delphi. There are already the following implementation for DI in Delphi Emballo (work with…
Continua a leggere →

News and small fixes for DataSnap Filters compendium

DataSnap Filters Compendium has been used by many users so far. I’m planning to do some change in hash filters (that do not will affect already written code) but until new version will ready I have 3 nice news about DSFC: 1. Now the project is on Google Code. 2. Franco Perana, the first contributor to the project, has fixed and optimized the LZO filter. 3. Have you used DSFC and do you want to see your application listed in the “Application Using DSFC”? If yes, leave a comment on this post with some details of your application amd I’ll…
Continua a leggere →

JSON support in Delphi2010, a simple example

During last ITDevCon in Verona (ITALY) I talked in a session with title “Marshal and UnMarshal in Delphi 2010″ (we have published some photos about this great conference here). In the first part of the session I’ve talked about JSON and many attendees were very interested in JSON and his application in everyday programming. I’m a real JSON fan so I decided to write this post about JSON support in Delphi2010. In my session I talked about serialization and deserialization, in this post I’ll show an example of code to do some JSON generation. program JsonTypes; {$APPTYPE CONSOLE} uses SysUtils,…
Continua a leggere →

My Speeches at ITDevCon 2009 (Italy, Verona)

Tomorrow I travel to Verona to the ITDevCon the Italian Delphi Conference. The conference will be at 11-12 november, and will be REALLY great! You can see the time table here. At this conference I will speak about: Marshal e UnMarshal in Delphi 2010 Enterprise Data Access patterns in Delphi Delphi e i messaging systems… ZeroMQ + AMQP e ActiveMQ + STOMP My speeches will be in italian language only. See you in Verona!

DataSnap Filters Compendium

What’s DataSnap Filters Compendium DataSnap Filters Compendium (DSFC) is a compendium of 9 filters for DataSnap 2010. The filters are divided into 3 groups: HASH MD5 MD4 SHA1 SHA512 CIPHER Blowfish Rijndael 3TDES 3DES COMPRESS LZO HASH filters The HASH filters helps avoid to any spiteful person to modify datasnap message through an “Man in the middle” attack (http://en.wikipedia.org/wiki/Man-in-the-middle_attack). Functioning is basing on an easy principle. After sending the message, the filter calculates the hash of the message and tags along it to the message. When the message gets to destination, the filter recovers the hash calculated by the client…
Continua a leggere →

Custom Marshalling/UnMarshalling in Delphi 2010

Introduction Some days ago, Embarcadero has presented the new version of RAD Studio, 2010. The are many new features, but you can find in a lot places around the web, so I won’t repeat them here. One of the things widely requested from all Delphi programmers all over the world over the past few years, including myself, is certainly a new and more powerful RTTI. The new system of RTTI has finally arrived, and pave the way for a large number of applications. One area that has benefited from the new RTTI is for sure the marshaled objects. Marshaling is…
Continua a leggere →