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.

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.

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.

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