Wednesday, October 19, 2005

Going for ECO

Delphi's ECO is a great benefit in the .net world compared to Visual Studio. As far as I know there is no such thing in Visual Studio (yet) that matches the brilliance of ECO.

Until now ECO was only available in the Architect SKU of Delphi. According to the feature matrix of Borland Developer Studio 2006 ECO will be in all SKU's available.
The only difference (according the feature matrix) between the Professional and higher SKU's are that the higher SKU's have autoform support for ASP.NET and State Machines.

As a professional SKU user that is great news. Besides the above mentioned differences it seems that the professional SKU only supports basic object-relational mapping and transparent local XML persistence.
That said you can conclude that for ECO with database persistence support a higher SKU is needed.

Anyway I will definitly upgrade my Delphi version to either professional or enterprise SKU!
Still some time to decide....

Thursday, October 13, 2005

Another 24 hours...

This sounds like a new movie, but according to Ander's blogpost it is another 24 hours BDNRadio event about BDS 2006 (Delphi, C#, C++ Builder, ECO, VCL etc.) This will happen on the 24 th october 2005.

This will be fun! (again...)

Monday, October 10, 2005

Borland announces Delphi 2006

In a press release Borland has announced Delphi 2006.

Delphi 2006 the Ultimate Force-Multiplier

Wow, that must have something to do with super man!

According the press release Delphi 2006 will be available for pre-ordering between oct. 17 and 1 december.

Saturday, October 01, 2005

Delphi, what is it for me?

There is a sort of discussion going on, about what Delphi really is. Nick Hodges blogpost Dignity is deadly, trickered Allen Bauer in his blogpost Passionate Producers = Passionate Customers. One opinion is that Borland drifted away from the barbarian attitude of the early days, and that it needs more guerilla marketing like the 24 hours of Delphi event.
Well Delphi certainly is not only an IDE, it is community a great technology and it is Passion!
Marco Cantu, also added two intresting blogpost, Delphi Passion and Delphi in Trenches (this post really hits the nail on the head, a great post)

Read the blogposts for the full story.

What is Delphi for me, and why do I love it?

For me Delphi is passion, it always helped me to deliver my software projects in good quality and in time.

With the new roadmap it is very clear that Borland is committed to Delphi. Listening to the roadmap BDNRadio show, you can only conclude that all the people involved in the developing of Delphi are passionated and extremely dedicated.
That and the growing list of bugfixes makes me feel very confident that the next versions of Delphi(DeXter, Highlander, Vista,...) will be competing for the title "best Delphi version ever". Go figure it out: VCL Win32, VCL Win64, VCL for .NET, VCL for CF, VCL for Avalon! ECO, .NET1.0, .NET2.0! Man this will be a beast.

Conclusion: Go Delphi!

Wednesday, September 28, 2005

Delphi roadmap information overflow...

Since yesterday (27/9) when the Delphi roadmap saw the daylight on the EKON 9 conference in Germany, Delphi future information is really exploding on the internet, so let's summarize here where to find all the information:

Eyewitness reports:
There is a lot of 'live' blogging from EKON 9 going on, to name a few:

Borland employees:
You will find lot's of information on the Borland blogging community, to name a few:

There are probably more, please let me know.

Well one thing is clear:

Delphi is still alive and kicking....

Update 29-09-2005:
There is a list of 'closed' (read fixed) bugs in Quality Central here, for DeXter.
I don't know if this is the complete list.

Tuesday, September 27, 2005

Delphi roadmap

Marco Cantu blogs about the, long wanted, roadmap for Delphi!

Highlights are:

  • DeXter (End 2005) providing ECO III, with Basic ECO for all version of Delphi.
  • Highlander (2006) VCL for Compact Framework and support for .NET 2.0
  • Delphi for Vista (2007) VCL for Avalon and Indigo support
  • Delphi/C++ for Win64 (2007) Native 64 bits compiler

Check out Marco's complete blog entry here. (there will be a photo soon, to proove this :-) )

Personally I really love the ECO basic support for all Delphi versions. Can't wait to jump on it!

All this was exposed on the EKON 9 conference, which is going on as I write. You can also read other 'hot' stuff from this conference on Bob Swart's weblog.

Updated:
First pictures of David I's keynotes sheets can be found on Daniel Wischnewski's weblog.

Wednesday, September 21, 2005

Delphi CLR multicast events explored

In a recent blogpost, I compared the C# and Delphi languages regarding to events. This time I will dig a little deeper in the Delphi .NET multicast events.

In the original Delphi VCL (since 1995), multicast events are not supported. Events, in VCL, are properties which can be assigned using the read/write methodoligy. They are limited to one handler for one event.
In Delphi .NET multicast events are, just like in C#, supported. In C# multiple listners(handlers) can be added and removed with the += and -= operators.
In Delphi for .NET you can achieve the same behaviour with the Include and Exclude methods.

The following example adds an extra handler to a button click:

Include(MyButton.Click, MyExtraEventHandler);

to remove it use:

Exclude(MyButton.Click, MyExtraEventHandler);

MyExtraEventHandler is a procedure declared as follows:

procedure TfrmMain.MyExtraEventHandler(sender : System.Object; e : System.Eventargs);
(Any procedure is OK as long as the parameters compare)

Note that adding a handler multiple times causes this handler to fire multiple times. Removing a non existing handler, however, does not generate a runtime error.

Adding multicast events to an object:

To use multicast events you must declare them using the add and remove keywords. Read and writing for those events are not allowed. The compiler will generate an error "Read/Write not allowed for CLR events".
You can, if you like, use single cast events using the read and write style, just as in the VCL. In fact you could use a TNotifyEvent, but that is another story)

An add/remove example:

TMyObject = class
private
FBeforeSomething : System.EventHandler;
public
property BeforeSomething : System.EventHandler add FBeforeSomething remove FBeforeSomething;
procedure FireTheEvent;
end;

You can add eventhandlers, just like the above example, using the include and exclude methods:
MyObject := TMyObject.Create;
Include(MyObject.BeforeSomething, AnEventHandler);
Include(MyObject.BeforeSomething, AnOtherEventHandler);

So compared to VCL read/write events CLR events are not that difficult to understand. The main differents is that they are hooked up using the Include and Exclude methods.

Tuesday, September 20, 2005

ECO, the movies

ECO, Borland's Enterprise Core Object technology, is the one technology I really would like to learn and to work with. This .NET technology keeps you focused on the bussines objects. ECO seperates your code from the way you persist your data.
ECO provides you with one technology, and several persistance possibilitys. (Database, XML)

Unfortunately this technology is only available for the Architect SKU and, even more unfortunately, I don't own this SKU. (yet)

The only thing left are the great video's that were posted today on BDN TV, which give you a nice introduction into the ECO 'space'.

MDA Tour 1 Eco modeling and UI
MDA Tour 2 Persisting your ECO space

Thursday, September 15, 2005

Wow I'm on BDN!

This morning I checked my blog stats, which should be between, 1 and 6 hits, for a normal day. (One for myself ;-) )

Guess what: It said 147 hits! Wow, spilled some coffee over my desk.
Where is that coming from? bdn.borland.com (Huh?)

Well, I am listed on BDN with a blogpost about events in C# and Delphi.

That is very cool. :-)

Oops, didn't quit expect that to happen, so I hope the english is not to bad ;)










'....and still counting...'


Wednesday, September 14, 2005

Delphi 2005 Fix Roll up

Allen Bauer has made a Fix roll up, including all the latest (unofficial or are they now official?)Delphi 2005 fixes and included a new fix concerning a bug while multiselecting non-visual components.

The complete story is here.

C# 3.0 LINQ video

LINQ stand for Language INtegrated Query. With LINQ you can integrate your database query's into the C# language.

Anders Hejlsberg himself shows LINQ in this video.

It looks great.

The LINQ MSDN project can be found here.

Tuesday, September 13, 2005

Delphi update on BDN

On BDN there is a (monthly?) Delphi update from Borland on the future of Delphi. Borland is still committed to Delphi, and Delphi is part of the ALM vision.

It is encouriging to see the commitment to quality:

"The renewed focus on quality extends to IDE performance, responsiveness, stability and usability."

Conclusion: Borland is commited to Delphi!

Now only hope Dexter will rock again!

Saturday, September 10, 2005

Tuesday, September 06, 2005

C# events compared to Delphi events

Events in C# are, like in Delphi (or should I say Object Pascal) just properties of a class. Events are method pointers that delegate a call to the calling class. Just as in Delphi for .NET you can add multiple event handlers to an event.

An event has three main parts:

1. A method pointer property
2. The raising of the event
3. An event handler

1. A method pointer property.
Delphi and C# have a lot standard method pointer types. The most common Delphi method pointer type is the TNotifyEvent. In C# (or in .NET framework) this is the System.EventHandler.
You can use this methods, but you can also make your own.

Defining a method pointer type:
In C#:
public delegate void OnSomething(object Sender, int Value);

In .NET you could, of course, store the parameters in a (derived) System.EventArgs object.

In Delphi:
TOnSomething = procedure(Sender : TObject; Value : Integer) of Object;

They are just types that must be available for the object that uses them.

The class that wants to raise the event must have a public property for it:
In C#:
public event OnSomething BeforeSomething;

In Delphi:
property BeforeSomething : TOnSomething read FBeforeSomething write BeforeSomething;
(Where FBeforeSomething is a private field of the same type)

2. Raising the event
In this example the BeforeSomething event is raised. If the calling class has assigned the property to the (event) class this one can raise it.

In C#:
public virtual void LetItHappen()
{
// The class should add a valid integer value for the event, here 10
if (OnSomething!= null) OnSomething(this, 10);
}
}


In Delphi:
procedure
TSomeClass.LetItHappen;
begin
if Assigned(FOnSomething) then FOnSomething(Self, 10);
end;

You must check if the property is assigned else you will get an access violation.

The code for C# and Delphi is amazingly similar. You can make it more similar if you like:

private bool Assigned(object AObject)
{
if (AObject != null)
return true;
else
return false;
}

the C# code then could be:
if Assigned(OnSomething) OnSomething(this, 10);
;-)

3. The eventhandler
In the calling object you should first make an event handler method:
(Suppose the calling is SomeObject : TSomeClass)

In C#:
private void MyBeforeSomething(object Sender, int Value)
{
MessageBox.Show(Value.ToString());
}

In Delphi:
procedure
TSomeClass.MyBeforeSomething(Sender : TObject; Value :
Integer);
begin
ShowMessage(IntToStr(Value);
end;

The last thing you should do now is assigning the property:

In C#:
SomeObject.BeforeSomething += new OnSomething(MyBeforeSomething);

A new handler is added to list of handlers (or listners). You can remove them by using '-='

In Delphi:
SomeObject.BeforeSomething := MyBeforeSometing;

In Delphi for .NET you can also add multiple handlers (listners) for an
event, using the Include en Exclude methods.

Events in C# are basically the same as in Delphi. C# must be Delphi's little brother, no doubt about that.
More information on events in C# can be found on MSDN here.

Thursday, August 11, 2005

Received my copy of Mastering Delphi 2005

Although the book is not yet in the stores (here in the Netherlands) I received today my copy of Marco Cantu's Mastering Delphi 2005. (Woohoo)

I won this copy on the Delphi 2005 24 hour marathon.

Thank you Borland!

Tuesday, August 09, 2005

ASP.NET Tech-Ed 2005 presentations

Intrested in ASP.NET? Specific ASP.NET 2.0?

Check out the online presentations and demo's from the Tech-Ed 2005.

Want a free 17 hours Microsoft ASP.NET training? (worth $349,-)
Check it out here.

Wednesday, August 03, 2005

Hybride .NET Applications

Recently I have been working on a .NET project in Delphi 7. I hear you think, yeah right this guy needs a vacation. Well the last part is certainly true, I need a vacation.
Well the story is as follows.

This project needs to show flow diagrams based on related data in a database. ASP.NET is a very good way for generating dynamic flow diagrams. It can be used to read the data from the database and create the (mostly image)controls dynamically on a webpage. So the webbrowser can be used to view the diagram.
The maintenance application however is a win32 Delphi application hosting a webbrowser component. The choice for Win32 Delphi 7 was based on skills and existing library's.
More specific "Why not a win32 application?" or "Why not a .NET application?"
Well the answer is skills, existing code base and last but not least speed. I just can not build my apps faster then using Delphi 7.
But again with a browser in the application I can fully use the .NET features from the webapplication. It is just a matter of good interfering the browser in the beforenavigate2 and ondocumentcomplete event, so that user thinks it is one application.
In this way I can pick up a browser navigate, cancel it and take it over with a win32 form.

The webapplication is written in Delphi 8, which was not always that easy because of the rough site of Delphi 8.
However I feel that I can fully profit of the .NET framework and Win32 in a single application.

I call it a Hybride .NET Application.

Friday, July 29, 2005

Clever overloading

In C# you can not set default values for method parameters like in Delphi. So you can not make a method like this:

private int DoSomething(int Start, int End = -1);

The only way to 'simulate' this is using an overloaded method.

What is overloading?
Overloading gives you the possibility to name two methods the same, but they must have different parameters. So in a way you can simulate the default parameters.
In Delphi you must mark this methods as overloaded in C# you can write your methods without any keyword.

When using overloading for 'default' purposes it should be considered that if you don't do this clever you will be put up with two methods with almost te same code, so it is wise to follow the rule that the method with the fewest parameters calls the other one.

So in the DoSomething method:
(A very stupid function indeed :) )

private int DoSomething(int Start, int End);
{
if (End !=- 1)
return Start + End;
else
return Start + 1000;
}

private int DoSomething(int Start);
{
return DoSomething(Start, -1);
//So do not do this, you will end up with two same code paths:
// return Start + 1000;
}

Friday, July 22, 2005

Making up for .NET 2.0

Visual Studio 2005 and .NET Framework 2.0 will be released in november 2005. Although I am still exploring (and sometimes struggling) with .NET 1.1. it is time to make up for .NET 2.0.

Some things will break, moving from 1.1 to 2.0. Microsoft released a 'List of Breaking Changed' here.

More compatibility issues can be found here.

Updated 29-07-2005
For specific ASP.NET upgrade issues you can look at the upgrade center here.
And for conversion issues here.

Use an image as your UIBarButtonItem

Using an image as your UIBarButtonItem in your navigationcontroller bar can only be achieved by using a common UIButton as the BarButtonItem...