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);

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