Saturday, December 24, 2005

BDS 2006 in the works...

Well I installed BDS2006 lately and found some time to work with it. Here are my 'first' impressions.

  • Installation went smooth, taking about 25 minutes.
  • Converting D7 win32 applications went easy, only thing I had to change was the fact that the SQL property of a TADOQuery is now of type TWideStrings instead of TStrings. So I had to change on three location code like this : MyAdoQuery.SQL := AStringList to MyAdoQuery.SQL.Text := AStringList.Text. No problem what so ever.
  • Converting an Delphi 8 ASP.NET application was a bit confusing at first, because Delphi didn't see it as a ASP.NET application. Well it was my own fault, I had not all the files in my version control system included, copying it all from another PC worked well. As posted in an early entry I did have a few problems connecting to a SQL Server database with BDP in my ASP.NET application. The problem was that connecting to the database timed out. After struggling around with it for a while I found out that the problem was in the connection string. Where it says hostname I had ' localhost' changing this to '(local) or ' .' solved the problem. I still can not understand what the problem is with localhost. It could be a IIS problem, a SQL Server problem or a Delphi 2006 problem. Anyone...?
  • BDS2006 start up speed is fine. Especially starting up one personality is very fast, however don't try to load a project type from another one. :-)
  • Coding is fine. Live templates are cool, I had to get used to it though. Together integration is marvelous, ECO is even better!

Well time to pack up my old Delphi 7 and Delphi 8 and move all my projects over to BDS 2006.

Monday, December 19, 2005

I have it :-)

A few days ago BDS 2006 arrived! :-)
Because I'm rebuilding my house at this moment I had to find my PC between the building stuff (and dust) to install it. (My laptop has 256 Mb, I don't think it is a good idea to install it on that, perhaps I will try this later.)

Installation on my PIV 2,4 GHz with 512 Mb went smooth and took about 25 minutes.
Played a little and this beast is really fast and stable.
I got an error running an Delphi 8 ASP.NET application on my connections, somehow the 'old' connection components generated some error in the BdpConnectionStrings.xml file.
I remember such a problem during a Delphi 8 update, but I really don't have the time to investigate it now. Anyone reading this familiair with this problem? Any suggestion is much appreciated. By the way new connections are no problem at all.
(Maybe it is better to uninstall Delphi 8 first....)

The livetemplates are very cool and easy to use.
Well back to building, painting and other stuff, one thing is sure rebuilding your house during a Delphi release is no good idea. :-s

Thursday, December 15, 2005

Delphi 2006, editor shortcuts

Adam Markowitz has listed all the 'common used' short cuts in Delphi 2006.

I sure don't know (or use) them all, yet.

View the list here.

Wednesday, December 14, 2005

Live templates video

While waiting for my Delphi to arrive (back ordered next week :( ) Daniel R Wolf has a really great video on templates. (and more)

In the #3 video he shows how easy it is to make your own templates. These templates are really 'super man' food!

Watch them all here.

Tuesday, December 06, 2005

BDS2006 video's

While I'm still waiting for BDS2006 to arrive on my doorstep, there is a lot of information about BDS2006 from lucky ones who already got it!

A great introduction video (and more to come according the page) has been made by Daniel R. Wolf from Delphi-Praxis. The first video shows the VCL designer improvements and the live templates in the editor. Even if you don't speak German it is a great video. Super!

A lot information can be gained from all the blogs out there. My primary source is
http://www.delphifeeds.com and of course the Borland blogs.

It seems that BDS2006 really is a blast! :-)

And the waiting continues....... :(

Updated:
Looks like BDS2006 hits The Netherlands now. My supplier changed the tag 'Expected' to 'New!' yesterday 5-12-2006. (Santa Claus day to be specific :-) )

Tuesday, November 29, 2005

Delphi 2006 launch in Amsterdam

Today was the Delphi 2006 launch in Amsterdam, the Netherlands. The event was attended by about 200- 300 developers. (This is a wild guess...I did not count them.)

First David Intersimone gave an introduction to the new Delphi, the history and the future. He showed and discussed the Delphi roadmap.
Cary Jensen gave an overview of the improved IDE, showing the new productivity features. To name a few:
  • New refactorings
  • Live templates
  • Block completion
  • And more, much more...
  • ....

Especially the possibility to build and share your own templates is very nice.

After that Jason Vokes gave a small introduction of the ALM stuff (Starteam and CaliberRM) and an introduction to the C++ personality. A nice, C++ feature only, is Codeguard, which works in (debug mode) runtime to track bugs which are not spotted by the compiler. Looks like a great feature to me for Delphi. (in the future, that is)

After the break Jeroen Pluimers showed all the Together stuff. Really Live Source. The most of this seems to exist in the Enterprise and Architect SKU. This is very cool stuff, and I'm beginning to hang over to the Enterprise SKU already :-). But this was only the beginning....

Then it was time for Delphi's Golden Egg: ECO III.
Bob Swart (alias Dr Bob) gave an impressive ECO demo. He made an application in 3/4 of a hour without a single line of code. That means without a single line of Delphi or C# code.
He designed an UML Package, added classes with attributes, derived attributes and operations which he then used in a Delphi for .NET winforms application. All necessary coding was done in the Object Constrained Language (OCL) with small expression and statements. He also added a 'state machine' diagram to his model, using guards and..., well forgive me there was so much, but it looked relative easy to implement. He showed what the real power of ECO is: Give you the chance to focus on the business needs of the application. ECO takes care of all the underlying stuff. (like persistence mapping etc.)
Another great feature of ECO is the possibility to reverse engineer an existing database. Well Bob showed it in about, euh... 5 minuts. Sweet!
Jason Vokes had to drag Bob from the stage, because otherwise we still would be there. :-)

So what did we learn?

  • Delphi 2006 has lots of new productivity features for Win32, .NET (Delphi/C++/C#)
  • Delphi 2006 integrates Starteam and Caliber RM (Enterprise and Architect SKU)
  • Delphi 2006 Together integration is mature now
  • Delphi 2006 ECO III is the future of Software Development

For a few weeks I have been dubbing between the Pro and Enterprise edition. But now I now I want to use Together and ECO III so I will definitly go for the Enterprise edition.

It was a great afternoon......


Wednesday, November 23, 2005

Var injection and code completion

One of the great new things of Delphi 2006 is Var injection. It allows you to declare a variable in the middle of your code while the IDE takes care of placing it in the var section of your procedure. (At Nick's delphi blog post you can see how it actually works.)

No doubt, this kind of tricks boost your productivity!

Thinking it over, one of the things that, sometimes annoys me in Delphi coding is the fact that the procedure head in the initialization section of the unit must be the same as the procedure decleration itself. In fact this is no problem, but is has to be maintained during changes in, for example the parameters of the procedure.
For new procedures Code completion takes care of this when you create either the initialize or the procedure itself.

For example typing this in the initialization section of your unit:

procedure MyProcedure;

Clicking Control+SHIFT+C makes the procedure itself:

procedure TMyForm.MyProcedure;
begin

end;

This is great!, however adding an additional parameter in code (after rethinking the procedure) forces you to change the other manually. And that is in big units a lot of code cruising.

Would it be a good idea to use code completion also on existing procedures, so that for example editing the above procedure like this:

procedure MyProcedure(IForgotAParameter : Boolean);
begin
//Do some stuff
end;

....clicking Control+SHIFT+C updates the initialization section and vica versa.

Maybe the together support in Delphi2006 makes this easier?
Don't know, have to wait a little longer.........by the way 29 november 2005, Dutch Delphi 2006 launch in Hoofdorp. For more information click here.

Thursday, November 17, 2005

AJAX

Ajax is a new technology (in fact a combination of 'old' technology's) to drive your website. (I always thought it was our famous dutch football team from Amsterdam)
Ajax is hot(or hype). But what is it?

Ajax stands for Asynchronous Javascript And XML, it combines XML, HTML, DOM, Javascript and XMLHTTP. Bottom line is that it can solve the problem of many postbacks to your server by allowing you to load only parts of the webpage in the browser via XML.

For a good introduction and (.NET) example you better check out this dotnetbips article.
More on the technology can be found in this article.
Marco Cantu gave a BOF session on Ajax and Delphi at the BorCon, the slides can be found here.

Certainly will give this a try one day.

Thursday, November 10, 2005

DevCon papers, code and slides

The papers/code and slides from the DevCon sessions are available for download at :

http://bdn.borland.com/devcon05/delphi

Note that not all papers are submitted for download yet, probably because of the fact that DevCon has not ended yet.

Update:
Watch DevCon (or is it BorCon!?) keynote on BDN here.
Containing:

  • Opening video
  • Conference opening by David I
  • SDO by Rick Jackson
  • Tod Nielsen, the new CEO

Great stuff, must attend next year..... :-)

Wednesday, November 02, 2005

Incremental search.....supprise

Yesterday I was reading on the coding horror blog a rant about searching document files with Ctrl+F.
It said that Visual Studio has incremental search(Ctrl+I), which after I tested it is very usefull. I thought it is (was) a pity that Delphi does not (didn't) have incremental searching.

Today I read a comment on Nick Hodges blog entry Firefox my Delphi that Delphi has incremental searching from at least version 5!
Just click CTRL+E and it works.......

I must have missed something all this years, or this is one of the most secret shortcuts outthere. :-)

Tuesday, November 01, 2005

A must see ECO III video...

On BDN Henrik Jondell presents a BDNTV episode covering the new features of ECO III in Borland Developer Studio 2006.
In the 21 minutes during video Henrik show very cool (new and existing) ECO III features like:

  • Winform Autoforms
  • ASP.NET autoforms
  • Reverse engineering an existing database
  • Actions
  • State machines (finally have an idea what those are)
  • And much more...

A must see video indeed!

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.

Tuesday, July 19, 2005

The 24 hours of Delphi audio recordings

The audio recordings of the great '24 hours of Delphi' are now online.
Click here to listen to each session and get to know the faces behind the voices.

What is ECO anyway?

Peter Morris has written a BDN article on ECO, called 'What is ECO anyway?'. The article provides a great overview of ECO for the ECO-rookies (like myself).

You really should check this out!

Delphi CF Preview available now

According to Danny Thorpe's blogpost today, the Delphi for .NET Compact Framework Technology preview compiler (Wow that sounds just great) is now available for download. (D2005 registred users only).

If you don't have a PDA you can download the Microsoft WinCE emulator here.

Thursday, July 14, 2005

The day after: I won a price!

The 24 hour Delphi marathon was really cool!
And it becomes even cooler because I won a price!!!. I am now the proud owner of Mastering Delphi 2005 from Marco Cantu.

Thank you Borland !

:-)

Wednesday, July 13, 2005

Tuesday, July 05, 2005

Winforms, One point!

Today I encountered an easy problem in a Winforms application. I had to set the default button for a form. I know this can hardly be called a problem. :-)

Let me see, in Delphi the TButton has a Default and Cancel property, set them and go. In winforms however buttons do not have that properties $-), well ahumm, after a bit of looking around I finally(yes I admit) found it!
In Winforms the form it self has an property AcceptButton and CancelButton, so you don't have to set a button property. Thinking it over the winforms solution is more logical compared to the VCL solution, where you can set multiple Default buttons for one form, which of course is looking for trouble.

Well I guess (finally) one point for Winforms.

Wednesday, June 29, 2005

War of the OOPs?

Nick Hodges talks in this post about some quirks, regarding to OOP and the .NET Framework. Of course his statement "Microsoft doesn't quite get OOP" does generate a lot of dust and discussions out there.
Julian Bucknall replies in his own CodeFez entry stating "Nick doesn't quite get OOP", and Steve Teixeira's responses in his blog here.

I must say I agree a lot with the statements that Nick makes regarding the .net framework, although I can not oversee all the technical details (yet), I think:

- The .NET framework is far by mature, it takes a lot of code to make things happen.
- ADO.NET is not mature yet (I can not say that it is not designed properly, but it still misses some important pieces in my opinion). See my blogentry When has the data changed .
- OOP code is supposed to reduce the amount of code.
- Sealed classes should not exist.

I must say that I probably only feel this way as a Delphi VCL developer since 1995.Anyway very intresting reads though, all that different opinions out there.

Thursday, June 23, 2005

Wednesday, June 15, 2005

A look in the kitchen called Delphi

Steve Trefethen has an intresting post about The Delphi R&D development Process. Really intresting to read how Delphi is made (...in Borland).

Monday, June 13, 2005

Hello DeXter

See the new Delphi IDE -> Delphi 2006 codename DeXter.

The video shows a C++ application build in DeXter.

DeXter:
  • Nice tabs
  • Nice little blue balls at the edge of controls
  • Looks fast

Some old Delphi papers

I moved some of my papers, formely hosted by The Software Developer Pages, to this weblog. The papers cover the Delphi basics on OOP programming and Database programming. They are now about five years old and based on Delphi 5, but I guess they are still pretty actual.

If you are intrested, here are the links:
Papers in English
Papers in het nederlands

Delphi and SDO

Borland is pushing hard the Software Delivery Optimization technology. It has until now always been difficult to exact point out what it is and how it fits in the Delphi IDE and our daily work as a software developer.

On BDNTv you can watch a serie of episodes, which explains SDO and show previews of how different part are integrated in de Delphi IDE.

To point out a few:

It is pretty sure that Delphi will fully integrate the SDO stuff in the future. I personally don't use it right now, but the integration will surely help 'playing' with it and later on using it.

Friday, June 03, 2005

The future of Delphi

On Bitwise Magazine, you can watch a video interview with David I. David talks about Delphi and about the future of Delphi. So if you wanna know where Delphi (Borland) is heading go over and watch it.

Some history

A post in the Borland non-technical newsgroup about the history of Delphi triggered me to dive in the history of computer languages.
You can find a complete overview of the history of computer languages here. There are 50 languages in this timeline chart.
It all starts in 1954 with Fortran. I am not sure if this is the first computer language ever because only 50 out of 2500! are shown.
Pascal 'starts' in 1970 and evolves to Turbo Pascal in 1983 and later on of course into Delphi(1995).
The charts shows relations between the languages. One particular is the one between Delphi and C# in the year 2000, so I guess C# really is Delphi's brother. :-)
The site has great resources to all kind of languages.

For the complete history 'From Pascal to Delphi' (including codenames and release dates) the guys at Dragonsoft made an overview here.
On Delphi Basics you will find a brief history on Delphi.

My history with Pascal/Delphi:
For myself the history with Pascal starts in 1989 with Turbo Pascal 3. (Can't remember the exact version)
A couple of years later I made a slight turn to Clipper, but I did not like the 'not existing' IDE, I guess Turbo Pascal already had an excellent integrated enviroment (Editor and Compiler in one IDE).
Clipper, of course, was great with databases, but I turned to Turbo Pascal 6 in combination with the TOPAZ toolbox, which was incredible with DBASE databases. (I can remember a book coverage with plumbers, plumbing the data into your application :) )
After that I used all Delphi versions except version 3.

For those who don't know yet you can download several old TP versions from the Borland Museum.

Wednesday, June 01, 2005

New online magazine: Bitwise Magazine

The BitWise Magazine has gone live, covering Delphi, Chrome and other languages, and also other computer related stuff.
It comes once a month and is worth checking out!

Friday, May 20, 2005

Delphi 2005 update 3 available

Delphi 2005 update #3 is available for download here.

Update 21-05-2005:
97 errors has been solved in this update. You can view them here in Quality Central.

Thursday, May 19, 2005

An unofficial comparison between VS and D7/D8/D2005

My Visual Studio (C#) project is still in progress and I have now some experience with the Visual Studio IDE.
So let's compare it with Delphi!

What I like about Visual Studio version 2003:
  • Automatic code generation for events
    If you want to use an event(delegate) of an object you can use the tab key to generate an event handler.
  • xsd design for datasets
    I haven't found this in Delphi yet.

Well thats it! I can not think of another something that makes me say Wow!

What I miss in Visual Studio 2003?

  • Structure view
    Although there is a Document Outline view, which does this trick in VS 2005 but is empty in VS 2003.
  • Code Explorer
    This one I really miss, code folding just does not do the trick for me.
  • Live Data
    Well what can you say, we are spoiled from Delphi 1 until now.
  • Code Completion
    There is code completion (see above) but it is much more implemented in the Delphi IDE. It is so much easier to type your property IsNice:Boolean; and then to click the magic keys(CTRL-SHIFT-C) then going to a class view and add a property where you must declare the Field yourself afterwards. (This might be a C# versus Delphi issue)
  • Code / Design tab at the bottom of the main view
    In VS you have in no time an never ending range of tabs (two for every form). In Delphi the form and design tab are at the bottom of the screen, so one at the top for each form.

Well just my 2 cents.


Stored Procedures or not....

Should you use Stored Procedures or Ad-Hoc SQL?
This question came up recently in a project. During investigating the issue I found a very good discussion via this Coding Horror blog entry. There is a great link there with a very detailed explanation (and discussion) of issue. (Pro's and contra's)

One of the things you will find in the discussion is that the 'SPs are secure by nature claim' is wrong or at least over judged. Only parameterized Stored Procedures and query's are secure for SQL injection attacks.

Conclusion:
Don't use Stored Procedures for granted, look at the specific situation, considering security, maintainability and performance.

Great discussion though!

Saturday, May 14, 2005

How to write maintainable code

How to write maintainable code is the one question that comes up everytime a developer designs a new application.
On this website I found the 'other way around approach' i.o.w. How to write Unmaintainable Code.

Quote from the website:

"if you follow all these rules religiously, you will even guarantee yourself a lifetime of employment, since no one but you has a hope in hell of maintaining the code. Then again, if you followed all these rules religiously, even you wouldn't be able to maintain the code!"

"You don't want to overdo this. Your code should not look hopelessly unmaintainable, just be that way. Otherwise it stands the risk of being rewritten or refactored."

Hahaha, this is funny!
So if you don't follow that rules, your code is maintainable!
; -)

Thursday, May 12, 2005

Borland Delphi Survey

On BDN there is a great Delphi Survey.
It shows pretty much what Borland has in mind for Delphi's future.

Go Delphi!

Wednesday, May 11, 2005

ADO.NET: When has the data changed?

I am still struggling with ADO.NET and databinding in particular.(see my earlier post 'In quest for the ADO.NET AfterEdit event') .

In this episode: When has the data changed?

In a datagrid
If I have a datagrid bind to a dataset-table, and I edit a value (without navigating to another record) the DataSet.HasChanges function returns true. That is correct! After that you can call GetChanges or AcceptChanges. (This is expected behavior)

In a textbox
If I have a textbox bind to a dataset-table-field and I edit the value (without navigating to another record) the HasChanges function returns false. (!?) In other words the change is not commited to the dataset.

But......
I can Accept those changes with AcceptChanges????? This is very strange!

Again: What am i missing?
(I know VCL's TDataSet! :-) )

Tuesday, May 10, 2005

D2005 the performance update

According to this blogpost by John Kaster, Delphi 2005 update 3 will be the performance update.

The following items will be updated/improved:

  • Slow Project Load Times with Modeling Enabled
  • Slow Response when Editing Models
  • Long Pause when Switching Between the Editor and Form Designer
  • Access violation removing breakpoint

I suppose it will be out any time now.

Sunday, May 08, 2005

My first PDA application

In Delphi 2006 there is a chance that the Compact Framework is supported. You can read here more about it. I don't have plans yet for PDA programming so I can wait till Delphi 2006. However curious about the whole thing I started searching and finally found a really nice tool from GrandaSoft for PDA form programming. It consist of two tools, first XSForms, a sort of runtime to install on your PDA and second XSDesigner, the IDE for designing the applications.

This tool allows you to make a PDA program without any line of code, with mulitple tabs, in no time what so ever! Really cool, hey I can program PDA's!
The forms are stored in XML and XSForms provides navigation between the records which are stored in a Pocket Access Database. The tool itself is still in development, and by now you can not code in it, but what the hack, you can make great applications on the fly and it is free for private use. For a test I made a Grocery List Manager (in dutch), and it looks like this:





Nah I don't use it yet for real, but it was fun to make. :-)
All with all a real nice tool to watch closely in the future.
I am really excited about PDA programming and looking forward (and hoping) to the VCL implementation of it.

Saturday, May 07, 2005

ECO Accelerating Development demo

I stated it before ECO makes the difference between Delphi (.NET) and the competition. It is a great technology, if only it could become available in a 'lite' version for the professional SKU it would IMO become THE development way for .net application with Delphi.

On BDNTV there is very (in depth) detailed demo about ECO II, a must have seen!

Wednesday, May 04, 2005

Trust in Borland

On BDNRadio you can listen to the replay of the Trust in Borland session with Borland CEO Dale Fuller.
David I talks here about an other update 'with dramatic performance improvements' in the pipeline for Delphi 2005.

Wednesday, April 27, 2005

Software Delivery Optimization, the movie...

I don't know all the details of this Borland vision, but watching the movie about it, presented by Boz Elloy is both intresting and amusing.

Though it is a bit long...

Monday, April 25, 2005

Playing with pricing and packaging

Michael Slinn, the new marketing guy at Borland, has a very intresting post about Delphi packages and pricing. He is kicking around some ideas about this issue.

One of the issues he brings up is an ECO Lite version for the Professional edition. I always felt that ECO could make the difference for Delphi on the pure .NET side. IMO providing this technology in Pro could make ECO a mainstream development technology for .NET applications, which (could) mean a huge benefit for Delphi compared with the competition!

Update 26-04-2005
The original post has been removed, but the discussion goes on.

Sunday, April 24, 2005

The Quest for the ADO.NET AfterEdit event

ADO.NET is an excellent way of working with data on a client in a disconnected world, no doubt about that, but it seems to me that it is lacking a lot of 'common used' features. I am not all that familair with ADO.NET yet, so it might as well be me lacking a lot of common knowledge. :-)

I am working on a .NET project, and with a Delphi VCL background you really miss a TNavigator for a starter.
So lets build a Navigator ourself. A navigator is a bunch of buttons (First, Prior, Next, Last, Insert, Delete, Post, Cancel etcetera)
A great advance of using a navigator that it encapsulate a lot of code, so that you spare extra code on each form where you use it. It also has the ability to context sensitive act to changes (read events) in the data that it is navigating. So make a control, give him a DataSet and a Table name and go........well it is not that simple!

It is bugging me few days now that I can not find any event in ADO.NET that 'tells' me that the data is edited. I mean at the first keystroke of the user, so that the Post and Cancel buttons of the navigator can become active.

Lets explore some events of the main ADO.NET components:

The DataTable
The datatable seems to me the most logic choice for such an event. It has the following events:
  • ColumnChanging
  • ColumnChanged
  • RowChanging
  • RowChanged

If you examine(try) this events you will notice that they all fire after the actual edit, and that is to late!

The DataView
The DataView has only a listchanged event which does not help us at all.

The DataRow
The datarow has a property RowState, which changes after an edit occurs, but it has no OnRowStateChange event.

The CurrencyManager
The CurrencyManager manages a list of bindingobjects, and that are our controls. The CurrencyManger has the following events:

  • CurrentChanged
  • ItemChanged
  • MetaDataChanged
  • PositionChanged

They sound promising, but again they fire after the actual keystroke.

So as far as I know there is no event in ADO.NET like the VCL TDataSet BeforeEdit and AfterEdit event. It seems to work in other way in .NET and the only solution I can think of is tracking the OnChange events of the controls on the form.

What am I missing?

Monday, April 18, 2005

Borcon 2004 papers online

It seems that the Borcon 2004 white papers are online now!
They can be found at the Borland Borcon2004 website.

You can find some good stuff there.

Wednesday, April 13, 2005

C# and his big brother

Lately I have been doing my first (real world) C# project. (Unfortunately I had to do it in VS2003 ;( )
C# must be Delphi's little brother! The language really feels like the Delphi language. Also the syntax, was not all that difficult to get used to.
I find my self programming 'Delphi code style' in C#.

For example in Delphi you write a function like this:

function ReturnANumber(SomeCondition : Integer) : Integer;
begin
Result := 0;
If SomeCondition > 100 then
Result := 101
else
Result := 102;
end;

You can not do this in C#, because it will return immediately to the caller, so I figured the following:

private int ReturnANumber(int SomeCondition)
{
int Result;
Result = 0;
If (SomeCondition > 100)
{
Result = 101

}
else
Result = 102;

return Result;
}

How about this function:

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

If you use this function for raising an event, well it could almost be Delphi :-)

if Assigned(SomeMethodPointerType) SomeMethodPointerType(this);

Wednesday, March 23, 2005

Go VCL.NET or go Winforms?

I know it is discussed before, but lately there is a lot going on in the VCL.NET world, which can influence your descision.

To name a few:
  1. The discovery of the TADONetconnector, which provides a bridge between a .net datatable and the VCL TDataset.
  2. The increased possibility for a VCL.NET/Compact Framework edition.
  3. Avalon
1. The discovery of the TADONetconnector
This component makes it possible to retreive data from a .net dataset in a VCL TDataSet component. This is a very important issue because a lot of data today is retreived from ASP.NET webservices, which of course returns a .net dataset.
It is obvious that if you have to retreive a dataset from a webservice you would choose winforms over VCL.NET, but knowing this component you could use VCL.NET instead!
For more information please view Dr Bob's article TADONETConnector: using ADO.NET in VCL for .NET

2. VCL.NET/Compact Framework edition
There is a lot cooking in the Compact Framework world. Danny Thorpe discusses the possibility of a VCL.NET/CF edition. This would be really great! Although the functionality of a VCL.NET for CF will not be same as the VCL as we know I think it is a great extension of the VCL family.
For more information please view Danny Thorps blog.

3. Avalon
With Avalon in Microsoft's pipeline, the future of Winforms is not good. This means that sometime in the future it might be that you will have to convert your winform application to Avalon. Will this be easy? Well some say it will, and some say it won't.

On the otherhand VCL has a great history of transitions from different platforms(Win16-> Win 32->CLX->VCL.NET) so there is a great possibility that the VCL will make it into an Avalon version. Will this be easy? Well some say it will, and some say it won't.

In my opinion VCL.NET is a great choice, but that of course is from a Delphi developer point of view.

Sunday, March 20, 2005

What about VCL for .NET on CF?

This is one of the questions Danny Thorpe asks hisself in his blogentry about Delphi for .net running on the Compact Framework.
Really encouraging to see the progress and it looks like in Delphi 2006 there will be support for the Compact Framework. Even VCL.NET for CF could be a possibility!!

Well that would really drive VCL.NET into a prominent place for .net framework development!

Updated 22-3-2005 20.00:
More info via Allen Bauers blog entry: VCL.NET on CF? We control the horizontal.....

Updated 22-3-2005 20.41:
Well it is cooking for VCL.NET/CF :-)
Danny Thorpe blog entry: WinForms, Compact Frameworks, and Outhouses

Thursday, March 17, 2005

VB.NET end of story?

There seems to be a lot going on in the VB and VB.NET scene.
About 100 VB MVP(Microsoft Most Valued Professionals) signed a petition because they don't like the future of VB aka VB.NET. (Via The Blah-Blah blog)
31-march-2005 official Microsoft support on VB6 stops, meaning that all applications written in VB are unsupported, which of course is not a good thing. (Considering the great amount of current VB applications)
Note: Porting VB6 applications to VB.NET is not as easy as porting a VCL application to VCL.NET.
They will end up with a winform application, which finally will be replaced with the upcoming Avalon thing. (And how will that go?)

Imo there is a great opportunity for Borland here to attract VB developers towards Delphi.
Steve Trefethen made an overview of resources for converting from VB to Delphi.

Well you can only conclude that Borland did a great job on VCL.NET.

Saturday, March 12, 2005

The Datamodule and .NET Framework

In Delphi we are used to place our dataset controls on a datamodule. This offered natural seperation between the GUI (the form) and the business logic. In .NET however there is no such thing as a datamodule. If you want to use the data components you must place them on your form.
Well that is now the one place where you don't want them to be!

Off course you could make your own class and code your way out, but I find it very usefull if you can visually design your data layer. On the other hand you could use VCL.NET and have full profit of the datamodule again. :-)

In Winforms however there is a very easy way to simulate the Delphi datamodule. It takes just two steps to get one:
(Open a new winform application)
The steps are for Delphi 8 and might be a bit different for Delphi 2005.

1. Choose File - New - Other, choose folder Delphi for .Net projects - New Files.
Choose: Component for Windowsforms
You will now have a component in your project which is a non visual container where you can place non visual components.
2. Drop BdpConnections and adatapters on the component and add the component to the uses of the form.

Off course this works also in Visual Studio 2003.

Well it maybe not the most elegant solution, but it works fine and gives you more control in seperation your GUI and data layer.

Delphi 2005 update 2 available

Delphi 2005 Update 2 is available for download at the Borland Developer Network.
Over 200 bugs has been fixed in this update, so it is a must have for Delphi 2005 users.

Monday, March 07, 2005

Using ADO.NET in VCL for .NET

In early posts I have mixed both worlds to enable use of ADO.NET in VCL.NET and vica versa.
Bob Swart has an article about TADONETConnector component which enables you to feed ADO.NET datasets to VCL for .NET clients.
I have not noticed this component before, but it seems to connect the ADO.NET world and VCL.NET world in a perfect way!
The article also describes a way to consume a ASP.NET webservice in a VLC for .NET client!

Thursday, March 03, 2005

The return of ActiveForms

According to an article on Chris Bensen's blog it seems that the ActiveForms will return in Delphi 2005 in update 2.

Could this be a sign that D2K5 update 2 is coming soon out the pipeline?

Wednesday, March 02, 2005

New BDS IDE (aka Delphi 2006 ??)

On the Borland Developer Network you can watch a video, which shows the new Borland Developer Studio IDE (Should be Delphi 2006).
The video demonstrates a C++ Builder project within Delphi. It also shows improved switching between the new docked IDE and the classic undocked IDE.

Enjoy!

Monday, February 28, 2005

The real story behind CF and ASP.NET Designers

On the Borland blog Danny Thorpe talks about the lack of supporting in Delphi 2005 for the .NET Compact Framework. It appears that the CF designers are Visual studio specific and that building own designers is an economic decision. It appears than Borland is heavily negotiating with Microsoft on this matter.

Steve Trefethen is blogging that the same applied to the ASP.NET designers, but that Borland decided to build their own designers instead of waiting for Microsoft to open it up.

Well it is clear that Borland takes all the necessary actions to get the stuff going in Delphi 2005 but that alot depends on Microsoft's strategy on that.
Must be very frustrating for Borland I guess.

Wednesday, February 23, 2005

Interview with Danny Thorpe about Delphi .NET

On the ServerSide.NET there is a video tech talk with Borland Chief scientist Danny Thorpe. He talks about his work and Delphi for .net.

Very intresting!

Wednesday, February 16, 2005

Delphi 2005 and the Compact Framework

Marc Rohloff has published an article on BDN about developing applications for the compact framework with Delphi 2005 and C#. (PDA etc.)

Delphi 10 years young

At the Software Development conference, 14 february 1995, Delphi 1 was born!
Delphi 1 produced powerfull standalone exes, with the ease of VB and the power of C++. Marco Cantu has collected a lot of material from that conference on his website.
Also the Borland Development Community celebrates this 10 years with 'old' articles about the project, codenamed Delphi. You can also listen to a phone interview with Anders Hjelsberg, Gary Whizin, and Zack Urlocker, the original creators of Delphi.
At codefez you can read an eye witness report from Nick Hodges : Happy birthday Delphi . Really intresting to read this one.

Delphi was good from the beginning, and still is on of the best development tools for Win32, and .Net development out there.

Congratulations Borland!!

Wednesday, January 05, 2005

Grow your self a beard!

This article explanes why you are a better programmer, if you grow yourself a beard!

From the article:
Not the law is clear? There is a beard - there is a success.
There is no beard - you are guilty.

:-)

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...