Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Legacy product - what to do?



Permlink Replies: 23 - Last Post: Dec 11, 2017 12:29 AM Last Post By: Arthur Hoornweg
Mark Rose

Posts: 4
Registered: 5/9/00
Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 30, 2017 2:05 PM
Hello all,

I maintain a legacy product written in Delphi 2006 - I have to run the IDE in a Windows XP Virtual Machine and it's getting to the point where the product is getting very difficult to maintain - and really, I need to add features like high dpi support which is really just a hack with Delphi 2006. The product also uses an ancient version of Firebird and some components that seem to be no longer maintained.

So this is the question...

If I buy a new version of Delphi, does it have all nice things such as a built in ORM tool, like the Entity Framework in .net, that just all plays nicely and just works, all within the IDE seamlessly allowing model first or database first development ?

Professionally, I develop in C# with Visual Studio, it must be said, the tooling for .net and Visual Studio itself is incredibly polished- the Entity Framework might have it's niggles, but it works very well - it takes almost all of the SQL heavy lifting away from the developer so you can focus on the task at hand.

With Delphi I've been out of the loop for so long, - does the latest version have what C# calls LINQ - language integrated queries?

I develop mostly desktop apps in C# - I use WPF and it's a world away from the VCL - hard to get your head around at first, but once you do, it's very difficult to go back to the VCL way of programming - I know Delphi has Fire Monkey, how does that honestly compare to WPF? I assume it supports databinding?

I did download the Berlin starter edition of Delphi a little while ago when we were thinking about what to do with this project, and, whilst I accept that the starter edition is crippled purposefully, it didn't look like Delphi had moved on much since 2006 in terms of the IDE, or language - I assume Delphi has generics now?

Also, does Delphi/the VCL framework have anything comparable to WCF?

I suppose what I'm trying to get my head around is this - a full rewrite of the application in C# is going to take about a year... but I need to do a lot of work with it even if I stay with Delphi - such as replacing components that no longer work (mostly visual), upgrading the data layer, etc, server side components, and updating the UI - so is Delphi, the VCL a viable all in one solution that can be compared to Visual Studio, Entity Framework, Linq, WPF and WCF that just works out of the box? or is it time to bite the bullet and rewrite it?

Any opinions greatly received,

Mark

Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 30, 2017 2:46 PM   in response to: Mark Rose in response to: Mark Rose
Mark Whicker wrote:

If I buy a new version of Delphi, does it have all nice things such
as a built in ORM tool, like the Entity Framework in .net, that just
all plays nicely and just works, all within the IDE seamlessly
allowing model first or database first development ?

No. But there are 3rd party ones available for Delphi.

With Delphi I've been out of the loop for so long, - does the latest
version have what C# calls LINQ - language integrated queries?

No. But there are 3rd party implementations.

I know Delphi has Fire Monkey, how does that honestly compare to WPF?

Apples and oranges.

I assume it supports databinding?

Yes, some controls are DataBinding aware.

I did download the Berlin starter edition of Delphi a little while
ago when we were thinking about what to do with this project, and,
whilst I accept that the starter edition is crippled purposefully

VERY crippled.

it didn't look like Delphi had moved on much since 2006 in terms of
the IDE, or language - I assume Delphi has generics now?

Yes, it does, and has since Delphi 2009.

Also, does Delphi/the VCL framework have anything comparable to WCF?

No.

--
Remy Lebeau (TeamB)
Stefan Glienke

Posts: 601
Registered: 1/5/09
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 5, 2017 5:19 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:

With Delphi I've been out of the loop for so long, - does the latest
version have what C# calls LINQ - language integrated queries?

No. But there are 3rd party implementations.

Can you please show me those?

FWIW this is LINQ:

var customersGroupedAndOrderedByCountry =
  from c in customers
  group c by c.Country into customerGroup
  orderby customerGroup.Key
  select customerGroup;
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 5, 2017 5:43 PM   in response to: Stefan Glienke in response to: Stefan Glienke
Stefan Glienke wrote:

Can you please show me those?

A simple Google search would have done that for you, eg:

https://www.google.com/search?q=delphi+linq

--
Remy Lebeau (TeamB)
Stefan Glienke

Posts: 601
Registered: 1/5/09
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 6, 2017 5:38 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
A simple Google search would have done that for you, eg:

https://www.google.com/search?q=delphi+linq

Which is bs. What DevArt advertises as LINQ is no LINQ but some fluent interface to create SQL statements.
The LIN in LINQ stands for "language integrated".

There is no LINQ in Delphi.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Legacy product - what to do? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 6, 2017 11:48 PM   in response to: Stefan Glienke in response to: Stefan Glienke
Stefan Glienke wrote:

Remy Lebeau (TeamB) wrote:
A simple Google search would have done that for you, eg:

https://www.google.com/search?q=delphi+linq

Which is bs. What DevArt advertises as LINQ is no LINQ but some
fluent interface to create SQL statements. The LIN in LINQ stands
for "language integrated".

There is no LINQ in Delphi.

Of course there are no language integrated queries in Delphi. But there
are libraries that allow you to mimic it a little.

--
Rudy Velthuis http://www.rvelthuis.de

"The nourishment is palatable" -- Emily Dickinson, dying words
Stefan Glienke

Posts: 601
Registered: 1/5/09
Re: Legacy product - what to do? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 7, 2017 4:14 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB, MVP) wrote:
Of course there are no language integrated queries in Delphi. But there
are libraries that allow you to mimic it a little.

Mimic a subset a little. In this case LINQ-to-SQL.

In C# there is LINQ-to-Objects, LINQ-to-XML, LINQ-to-LDAP, using LINQ on RX, you can LINQ to everything.

You know what is sad? We could have had it too long ago... http://dannythorpe.com/2005/09/15/language-integrated-query-linq/
Mark Rose

Posts: 4
Registered: 5/9/00
Re: Legacy product - what to do? [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 7, 2017 2:19 PM   in response to: Stefan Glienke in response to: Stefan Glienke
Stefan Glienke wrote:
Rudy Velthuis (TeamB, MVP) wrote:
Of course there are no language integrated queries in Delphi. But there
are libraries that allow you to mimic it a little.

Mimic a subset a little. In this case LINQ-to-SQL.

In C# there is LINQ-to-Objects, LINQ-to-XML, LINQ-to-LDAP, using LINQ on RX, you can LINQ to everything.

You know what is sad? We could have had it too long ago... http://dannythorpe.com/2005/09/15/language-integrated-query-linq/

LINQ enables you to perform complex groupings, joins, etc over collections of your own business objects, totally abstracted any the database (via entity), but also with in memory collections using the same syntax, is an incredibly powerful language feature - it's a lot less brittle than databound components in Delphi.

i was genuinely surprised to learn that nothing like it exists natively within modern versions of the language looking at the devart extensions, the syntax is very much a fudge (i suppose this is to be expected as it doesn't have the benefit of compiler support)..

Edited by: Mark Whicker on Dec 7, 2017 2:19 PM
Rael Bauer

Posts: 228
Registered: 10/10/02
Re: Legacy product - what to do? [Edit] [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 7, 2017 9:37 PM   in response to: Mark Rose in response to: Mark Rose
On 2017/12/08 12:26 AM, Mark Whicker wrote:
i was genuinely surprised to learn that nothing like it exists
natively within modern versions of the language

I'm curious, do other modern languages (java, ruby, javascript,
python...) have a LINQ feature?

-Rael
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Legacy product - what to do? [Edit] [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 7, 2017 10:48 PM   in response to: Rael Bauer in response to: Rael Bauer
Am 08.12.2017 um 06:37 schrieb Rael Bauer:
On 2017/12/08 12:26 AM, Mark Whicker wrote:
i was genuinely surprised to learn that nothing like it exists
natively within modern versions of the language

I'm curious, do other modern languages (java, ruby, javascript,
python...) have a LINQ feature?

-Rael

ABAP/4 has this since ages ;-)

Greetings

Markus
Stefan Glienke

Posts: 601
Registered: 1/5/09
Re: Legacy product - what to do? [Edit] [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 7, 2017 11:35 PM   in response to: Rael Bauer in response to: Rael Bauer
Rael Bauer wrote:
Mark Whicker wrote:
i was genuinely surprised to learn that nothing like it exists
natively within modern versions of the language

I'm curious, do other modern languages (java, ruby, javascript,
python...) have a LINQ feature?

None of them has LINQ afaik - but:

Java has (since version 8) the stream api and lambdas which is equal to using C# IEnumerable extension methods (which is what LINQ builds ontop)
Ruby has the Enumerable mixin which makes it possible to do similar things
JavaScript uses prototypal inheritance and array prototype has numerous of the IEnumerable extension methods equivalent
Python has list comprehension which is equally powerful.

The closest we get there in Delphi that I know of is using the Spring4D collection types that then work similar to using the IEnumerable extension methods.
However there are a few limitations and Delphis ridiculously verbose anonymous method syntax makes it not very nice to use sometimes.
Rael Bauer

Posts: 228
Registered: 10/10/02
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 30, 2017 3:17 PM   in response to: Mark Rose in response to: Mark Rose
On 2017/12/01 12:05 AM, Mark Whicker wrote:
Hello all,

I maintain a legacy product written in Delphi 2006 - I have to run
the IDE in a Windows XP Virtual Machine and it's getting to the point
where the product is getting very difficult to maintain - and really,
I need to add features like high dpi support which is really just a
hack with Delphi 2006. The product also uses an ancient version of
Firebird and some components that seem to be no longer maintained.

AFAIK, There is not all that much difference between old versions of
Firebird and newer versions. Many component sets work in a similar way,
and may even provide a conversion tool from your components to theirs. I
would do a bit more research on that.

I need to do a lot of work with it even if I stay with Delphi - such
as replacing components that no longer work (mostly visual),
upgrading the data layer, etc, server side components, and updating
the UI -

so is Delphi, the VCL a viable all in one solution that can
be compared to Visual Studio, Entity Framework, Linq, WPF and WCF

One thing Delphi offers or tries to offer is backward compatibility. So
upgrading an old project may take some time, but a large amount of it
should still work in the latest version. Upgrading the project may be
simpler than you imagine it to be. I would try to upgrade the project
with as few changes as possible. Once it is working in a newer IDE, then
think about which parts you want to re-write...

As far as ORM is concerned, TMS Aurelius has some similarities to EF.
http://www.tmssoftware.com/site/aurelius.asp.

-Rael
Bernd Maierhofer

Posts: 161
Registered: 9/27/99
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 30, 2017 11:48 PM   in response to: Mark Rose in response to: Mark Rose
Mark Whicker wrote:

Hello all,

I maintain a legacy product written in Delphi 2006 - I have to run
the IDE in a Windows XP Virtual Machine and it's getting to the point
where the product is getting very difficult to maintain - and really,
I need to add features like high dpi support which is really just a
hack with Delphi 2006. The product also uses an ancient version of
Firebird and some components that seem to be no longer maintained.

So this is the question...

If I buy a new version of Delphi, does it have all nice things such
as a built in ORM tool, like the Entity Framework in .net, that just
all plays nicely and just works, all within the IDE seamlessly
allowing model first or database first development ?

Professionally, I develop in C# with Visual Studio, it must be said,
the tooling for .net and Visual Studio itself is incredibly polished-
the Entity Framework might have it's niggles, but it works very well
- it takes almost all of the SQL heavy lifting away from the
developer so you can focus on the task at hand.

With Delphi I've been out of the loop for so long, - does the latest
version have what C# calls LINQ - language integrated queries?

I develop mostly desktop apps in C# - I use WPF and it's a world away
from the VCL - hard to get your head around at first, but once you
do, it's very difficult to go back to the VCL way of programming - I
know Delphi has Fire Monkey, how does that honestly compare to WPF? I
assume it supports databinding?

I did download the Berlin starter edition of Delphi a little while
ago when we were thinking about what to do with this project, and,
whilst I accept that the starter edition is crippled purposefully, it
didn't look like Delphi had moved on much since 2006 in terms of the
IDE, or language - I assume Delphi has generics now?

Also, does Delphi/the VCL framework have anything comparable to WCF?

I suppose what I'm trying to get my head around is this - a full
rewrite of the application in C# is going to take about a year... but
I need to do a lot of work with it even if I stay with Delphi - such
as replacing components that no longer work (mostly visual),
upgrading the data layer, etc, server side components, and updating
the UI - so is Delphi, the VCL a viable all in one solution that can
be compared to Visual Studio, Entity Framework, Linq, WPF and WCF
that just works out of the box? or is it time to bite the bullet and
rewrite it?

Hi Mark,

the answer depends on how reusable your code is and how outdated the
components are. Since 2006 there have been quite a lot of changes both
in Delphi and in the 3rd party landscape. E.g. in 2006 there was a
DevEx grid, which now simply does not exist anymore, as well as some
libs regarding JEDI. I think, that is quite an effort to move from 2006
to Tokiyo.

The answer also depends on IF you want to use the new features, Delphi
has now or new libraries (Aurelius?) that are available now. But this
of course needs some learning too.

I too have a legacy app as well as the XP dev machine :-/ and I spent
quite a time for my decision how to migrate. I will use the opportunity
to target Mac, so I will switch to FireMonkey. Additionally I will use
Aurelius.So I do keep a lot that is business logic and will redo
everything that belongs to UI. This gives me the chance to have a
modern UI and a cleaner structure of my code.

Maybe you want to have a look at
http://www.midaconverter.com/ too.

HTH Bernd
Arnaud BOUCHEZ

Posts: 143
Registered: 2/17/02
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 1, 2017 1:00 AM   in response to: Mark Rose in response to: Mark Rose
Mark Whicker wrote:
Professionally, I develop in C# with Visual Studio, it must be said, the tooling for .net and Visual Studio itself is incredibly polished- the Entity Framework might have it's niggles, but it works very well - it takes almost all of the SQL heavy lifting away from the developer so you can focus on the task at hand.

Take a look at https://synopse.info/files/html/Synopse%20mORMot%20Framework%20SAD%201.18.html#SOURCE
It features Entity Framework (ORM) + WCF (SOA) + ASP (MVC) + NSubstitute (mocks) + Log4Net (logs) + Utf8Json (json with no allocation) in a single optimized package.
It works with Delphi 6 up to latest XE 10.2, so you can continue to use Delphi 2007 IDE if you wish: it will be natively Unicode (since it uses UTF-8 from the ground up), even on this older version of Delphi.
And it compiles also with FPC so you can target developement also for Linux or BSD.

I suppose what I'm trying to get my head around is this - a full rewrite of the application in C# is going to take about a year... but I need to do a lot of work with it even if I stay with Delphi - such as replacing components that no longer work (mostly visual), upgrading the data layer, etc, server side components, and updating the UI - so is Delphi, the VCL a viable all in one solution that can be compared to Visual Studio, Entity Framework, Linq, WPF and WCF that just works out of the box? or is it time to bite the bullet and rewrite it?

Don't rewrite.
The result will probably be less good, and a lot of time lost for sure.

Try to switch to a cleaner architecture, using best practices (like SOLID, Microservices, Mocks...) in Delphi, and reusing the existing code base and database.
Check http://blog.synopse.info/post/2014/09/12/Legacy-code%2C-mORMot%2C-and-database-sharing
and https://www.slideshare.net/ArnaudBouchez1/ekon20-mormot-legacy-code-technical-debt-delphi-conference
Michael Thuma

Posts: 104
Registered: 1/30/00
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 1, 2017 6:32 AM   in response to: Arnaud BOUCHEZ in response to: Arnaud BOUCHEZ
It's mainly about the time lost. Rewriting for the sake of rewriting is pretty expensive.

.net makes perfect sense if a developer is addicted to MS technologies and loves to play in spare time.

As you pointed out in the past putting all things together is complicated rather than helpful.

Most of these things very hype today were born at times when people with more sophisticated editors tried to manage hundred thousand of classes for example.

If there is a need to rewrite an application from scratch and the developer as well another one can handle the technologies and is willing to do so within a time frame of the product's life-time until now in the future still. Who will exploit the full potential of WCF in 10 years and who will be willing to learn to do so. This limits the applicability of all the goodness provided.

There no such thing as a WPF, ADO.net or WCF programmer. Such technologies stabilize for a certain period and 10 years later those technologies become either complex or out-dated. If one breaks apart the whole piece of software gets hurt.

No doubt that the whole .net framework as it is today as well as the Java framework are amazing pieces of software carefully hand-crafted to meet a broad majority of people's needs. In the bitter end the more complex a piece of software becomes the more straight, plain and more simpler the interacting parts have to be. There is nothing more evil than a dependency no longer satisfied. There are good reasons for Java and C# from the perspective on relying on metadata exposed maybe in order to document or navigate the class library framework but I doubt mixing all the concepts and tying those to special technologies offers leads to anything but another kind of Delphi third-party chaos even if the the framework does origin from one box.

I know it from the SAP/BW/BI. Programming was not allowed and a few places where logic (routines) resided were enough. That didn't make life simpler but on a long term opening up the staging process lead to programs that read data form everywhere at any time from another discrete and usually isolated part of the staging process. The amazing thing until opening up the staging for real ABAP programs was that everyone could simply and quickly follow a staging process by navigating it's definition - self documenting.

Arnaud BOUCHEZ wrote:
Mark Whicker wrote:

Don't rewrite.
The result will probably be less good, and a lot of time lost for sure.

Try to switch to a cleaner architecture, using best practices (like SOLID, Microservices, Mocks...) in Delphi, and reusing the existing code base and database.
Check http://blog.synopse.info/post/2014/09/12/Legacy-code%2C-mORMot%2C-and-database-sharing
and https://www.slideshare.net/ArnaudBouchez1/ekon20-mormot-legacy-code-technical-debt-delphi-conference

--
Delphi Programming is fun. Hilarious.
Michael Thuma

Posts: 104
Registered: 1/30/00
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 1, 2017 4:21 AM   in response to: Mark Rose in response to: Mark Rose
What is on the list in case of Delphi too:
Unicode migration.

The Firemonkey framework ist not the .net Framework. 'Delphi ist not Visual Studio'. Two different things.

From the maintenance perspective I don't see problems with Delphi.

You don't need an ORM or Linq to implement an application.

In my experience moving to the .net Framework does not make an application future-proof per se. Since you do have experience I think a one year rewrite makes sense, wondering if you don't have to add a second. If you don't finish in 'half-the time' things will become very expensive in one way or the other.

I would not invest money or life-time into an application without a total redesign concerning functionality and purpose. If some pays the migration, simply do it.

The only question is about benefit in the future for both you and the customer or the users. If you want to have future-proof software and take anything beyond sequence, iteration and selection :) Kidding. But don't rely on all the goodness ... especially not out of one box ... at once.

Just writing an application another way is, writing an application another way.

Mark Whicker wrote:
Hello all,

I maintain a legacy product written in Delphi 2006 - I have to run the IDE in a Windows XP Virtual Machine and it's getting to the point where the product is getting very difficult to maintain - and really, I need to add features like high dpi support which is really just a hack with Delphi 2006. The product also uses an ancient version of Firebird and some components that seem to be no longer maintained.

So this is the question...

If I buy a new version of Delphi, does it have all nice things such as a built in ORM tool, like the Entity Framework in .net, that just all plays nicely and just works, all within the IDE seamlessly allowing model first or database first development ?

Professionally, I develop in C# with Visual Studio, it must be said, the tooling for .net and Visual Studio itself is incredibly polished- the Entity Framework might have it's niggles, but it works very well - it takes almost all of the SQL heavy lifting away from the developer so you can focus on the task at hand.

With Delphi I've been out of the loop for so long, - does the latest version have what C# calls LINQ - language integrated queries?

I develop mostly desktop apps in C# - I use WPF and it's a world away from the VCL - hard to get your head around at first, but once you do, it's very difficult to go back to the VCL way of programming - I know Delphi has Fire Monkey, how does that honestly compare to WPF? I assume it supports databinding?

I did download the Berlin starter edition of Delphi a little while ago when we were thinking about what to do with this project, and, whilst I accept that the starter edition is crippled purposefully, it didn't look like Delphi had moved on much since 2006 in terms of the IDE, or language - I assume Delphi has generics now?

Also, does Delphi/the VCL framework have anything comparable to WCF?

I suppose what I'm trying to get my head around is this - a full rewrite of the application in C# is going to take about a year... but I need to do a lot of work with it even if I stay with Delphi - such as replacing components that no longer work (mostly visual), upgrading the data layer, etc, server side components, and updating the UI - so is Delphi, the VCL a viable all in one solution that can be compared to Visual Studio, Entity Framework, Linq, WPF and WCF that just works out of the box? or is it time to bite the bullet and rewrite it?

Any opinions greatly received,

Mark


--
Delphi Programming is fun. Hilarious.
Kim Madsen

Posts: 362
Registered: 12/13/99
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 1, 2017 7:45 AM   in response to: Mark Rose in response to: Mark Rose
Hi,

Refactoring existing applications always is a pain in the a...
But sometimes it is needed to be able to progress the application.

Rewriting to another language can be a choice, but one need to remember
that the grass seldom is greener on the neighbours lawn.

Professionally, I develop in C# with Visual Studio, it must be said,
the tooling for .net and Visual Studio itself is incredibly polished-
the Entity Framework might have it's niggles, but it works very well -
it takes almost all of the SQL heavy lifting away from the developer so
you can focus on the task at hand.

You definitely need to look at kbmMW's ORM which imo (Im very biased
being the creator of it, I know ;) but anyway....) is absolutely a
thrill to work with, and a breeze when updating datamodels.

does the latest version have what C# calls LINQ - language integrated
queries?

kbmMW has something along those lines, although using a unified SQL
dialect. It can be used for searching on any supported database (MySQL,
Oracle, MSSQL, PostgreSQL, SQLite, Interbase/Firebird), and it can be
used for searching within documents like JSON and XML.

I probably will extend it for searching within objects too.

WPF?

Firemonkey is quite similar in capabilities.

I would recommend you to take a look on some of the many blogposts about
kbmMW, to get an idea about some of its features.

https://components4developers.wordpress.com/tag/kbmmw/

Use the search to locate what you are looking for. Some things to look
for could be "scheduler", "REST", "JSON"

best regards
Kim/C4D

On 30/11/2017 23.05, Mark Whicker wrote:

Hello all,

I maintain a legacy product written in Delphi 2006 - I have to run the IDE in a Windows XP Virtual Machine and it's getting to the point where the product is getting very difficult to maintain - and really, I need to add features like high dpi support which is really just a hack with Delphi 2006. The product also uses an ancient version of Firebird and some components that seem to be no longer maintained.

So this is the question...

If I buy a new version of Delphi, does it have all nice things such as a built in ORM tool, like the Entity Framework in .net, that just all plays nicely and just works, all within the IDE seamlessly allowing model first or database first development ?

Professionally, I develop in C# with Visual Studio, it must be said, the tooling for .net and Visual Studio itself is incredibly polished- the Entity Framework might have it's niggles, but it works very well - it takes almost all of the SQL heavy lifting away from the developer so you can focus on the task at hand.

With Delphi I've been out of the loop for so long, - does the latest version have what C# calls LINQ - language integrated queries?

I develop mostly desktop apps in C# - I use WPF and it's a world away from the VCL - hard to get your head around at first, but once you do, it's very difficult to go back to the VCL way of programming - I know Delphi has Fire Monkey, how does that honestly compare to WPF? I assume it supports databinding?

I did download the Berlin starter edition of Delphi a little while ago when we were thinking about what to do with this project, and, whilst I accept that the starter edition is crippled purposefully, it didn't look like Delphi had moved on much since 2006 in terms of the IDE, or language - I assume Delphi has generics now?

Also, does Delphi/the VCL framework have anything comparable to WCF?

I suppose what I'm trying to get my head around is this - a full rewrite of the application in C# is going to take about a year... but I need to do a lot of work with it even if I stay with Delphi - such as replacing components that no longer work (mostly visual), upgrading the data layer, etc, server side components, and updating the UI - so is Delphi, the VCL a viable all in one solution that can be compared to Visual Studio, Entity Framework, Linq, WPF and WCF that just works out of the box? or is it
time to bite the bullet and rewrite it?

Any opinions greatly received,

Mark

Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 1, 2017 9:34 AM   in response to: Mark Rose in response to: Mark Rose
Am 30.11.2017 um 23:05 schrieb Mark Whicker:
Hello all,

I maintain a legacy product written in Delphi 2006 - I have to run the IDE in a Windows XP Virtual Machine and it's getting to the point where the product is getting very difficult to maintain - and really, I need to add features like high dpi support which is really just a hack with Delphi 2006. The product also uses an ancient version of Firebird and some components that seem to be no longer maintained.

So this is the question...

If I buy a new version of Delphi, does it have all nice things such as a built in ORM tool, like the Entity Framework in .net, that just all plays nicely and just works, all within the IDE seamlessly allowing model first or database first development ?

Professionally, I develop in C# with Visual Studio, it must be said, the tooling for .net and Visual Studio itself is incredibly polished- the Entity Framework might have it's niggles, but it works very well - it takes almost all of the SQL heavy lifting away from the developer so you can focus on the task at hand.

With Delphi I've been out of the loop for so long, - does the latest version have what C# calls LINQ - language integrated queries?

I develop mostly desktop apps in C# - I use WPF and it's a world away from the VCL - hard to get your head around at first, but once you do, it's very difficult to go back to the VCL way of programming - I know Delphi has Fire Monkey, how does that honestly compare to WPF? I assume it supports databinding?

There is some framework independent way of databinding afaik built in
now (never really used it): It is called life binding and can be done
graphically afaik.


I did download the Berlin starter edition of Delphi a little while ago when we were thinking about what to do with this project, and, whilst I accept that the starter edition is crippled purposefully, it didn't look like Delphi had moved on much since 2006 in terms of the IDE, or language - I assume Delphi has generics now?

1. Don't use the starter edition to evaluate!!! Download the proper
trial version, even if that's the architect one but since there's a
feature matrix PDF available somewhere you can mostly findout which
parts are missing in the lower editions.

2. The IDE did improve on a few places, for instance your BDS2006 has a
very nasty bug which sometimes leads to eating all RAM up to 2 GB
thus completely stalling the IDE for a few minutes until the .NET GC
finally kicked in and the memory got released. The IDE started
working again thenb. That is fixed in D2007. Also some refactorings
work better, it has included navigation features from a former 3rd
party product named Castalia like jumping ti interface or
implementation section or to a arbitrary method or like showing via
coloured line in the editor which code part is covered by some if
statement... Small but quite helpful additions.

3. ErrorInshight is a bit less error inside, means less false positives.

4. Yes, Generics are supported since D2009 and it also contains generic
collection classes. It supports anonymous methods as well, has a new
threading library with some nice features and contains a completely
new DB framework called FireDAC with support for most RDBMS, Firebird
included. For Firebird it included support for Backup/Resstore, at
least the old but still working GBAK API.

5. VCL got some additoons as well like some Win10 style controls or the
ability to be styleable, some styles included and a stile designer
included as well.

6. The IDE has another new feature called GetIt, which is the start for
a package/3rd party components manager/store. As of now it only
contains free versions or demos, but it sometimes simplyfies getting
stuff installed.

7. There are debug visualizers available nowadays as well, means you can
click a magnification glass icon in the debugger to get the first 100
or so entries of a TStringList displayed and if needed you could
write your own ones. In Tokyo they did something for better generics
support for that one and a few 3rd party ones like for TBitmap do
exist.

8. A database explorer has been integrated into the IDE as well and
afaik a visual query builder (I haven't used that one yet).

=> so quite a few new things you didn't saeem to have detected so far. ;-)

Greetings

Markus
Mark Rose

Posts: 4
Registered: 5/9/00
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2017 3:20 PM   in response to: Mark Rose in response to: Mark Rose
Thank you everyone for your comments - it's given me something to think about.

I didn't write this in my original post, but I've been a user of Pascal since in the 1990s using every version of Delphi right up until 2006 and I was really forced into having to learn C#, as at work I was asked to integrate a couple of systems both of which only have a C# API.

The difficult thing for me is that in coming to a decision about what the best way forward is, I also have to consider whether investing in Delphi for 3-5 years (or more) makes any sense - not in terms of cost (although it isn't cheap, and unless i'm missing something, you need enterprise for client/server DB access - I got that in 2006 Pro?), but in terms of ecosystem and community.

The most disappointing thing for me is that despite a feature matrix that's 25 pages long, Delphi doesn't have an ORM tool in the box, or in fact, several of the nice things that have been in .net and Visual Studio for some time and much of the 3rd part component landscape has evaporated.

I accept that the VCL is mostly a widget library rather than a full framework, but the things that the .net framework does is pretty amazing and the fact that it C# modern language makes revisiting Pascal code rather painful, it might be worth the pain, but it's hard to see.

I will download the latest evaluation version and see how broken my project is, my gut tells me, even though it will be initially painful, for the long run, a rewrite is probably the best way forward.
Peter Mellish

Posts: 1
Registered: 2/7/00
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2017 10:29 PM   in response to: Mark Rose in response to: Mark Rose
As far as client/server DB access goes, you could buy the professional version
and a separate db access product.

I did this with UniDAC from DevArt and am very happy with the solution. One
advantage is you get very fast support from DevArt. They also sell an orm
product called EntityDAC.

Jim

Mark Whicker <> wrote:
Thank you everyone for your comments - it's given me something to think about.

I didn't write this in my original post, but I've been a user of Pascal since
in the 1990s using every version of Delphi right up until 2006 and I was really
forced into having to learn C#, as at work I was asked to integrate a couple of
systems both of which only have a C# API.

The difficult thing for me is that in coming to a decision about what the best
way forward is, I also have to consider whether investing in Delphi for 3-5
years (or more) makes any sense - not in terms of cost (although it isn't
cheap, and unless i'm missing something, you need enterprise for client/server
DB access - I got that in 2006 Pro?), but in terms of ecosystem and community.

The most disappointing thing for me is that despite a feature matrix that's 25
pages long, Delphi doesn't have an ORM tool in the box, or in fact, several of
the nice things that have been in .net and Visual Studio for some time and much
of the 3rd part component landscape has evaporated.

I accept that the VCL is mostly a widget library rather than a full framework,
but the things that the .net framework does is pretty amazing and the fact that
it C# modern language makes revisiting Pascal code rather painful, it might be
worth the pain, but it's hard to see.

I will download the latest evaluation version and see how broken my project
is, my gut tells me, even though it will be initially painful, for the long
run, a rewrite is probably the best way forward.
Bernd Maierhofer

Posts: 161
Registered: 9/27/99
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 4, 2017 11:16 PM   in response to: Mark Rose in response to: Mark Rose
Mark Whicker wrote:

Thank you everyone for your comments - it's given me something to
think about.

I didn't write this in my original post, but I've been a user of
Pascal since in the 1990s using every version of Delphi right up
until 2006 and I was really forced into having to learn C#, as at
work I was asked to integrate a couple of systems both of which only
have a C# API.

The difficult thing for me is that in coming to a decision about what
the best way forward is, I also have to consider whether investing in
Delphi for 3-5 years (or more) makes any sense - not in terms of cost
(although it isn't cheap, and unless i'm missing something, you need
enterprise for client/server DB access - I got that in 2006 Pro?),
but in terms of ecosystem and community.

The most disappointing thing for me is that despite a feature matrix
that's 25 pages long, Delphi doesn't have an ORM tool in the box, or
in fact, several of the nice things that have been in .net and Visual
Studio for some time and much of the 3rd part component landscape has
evaporated.

I accept that the VCL is mostly a widget library rather than a full
framework, but the things that the .net framework does is pretty
amazing and the fact that it C# modern language makes revisiting
Pascal code rather painful, it might be worth the pain, but it's hard
to see.

I will download the latest evaluation version and see how broken my
project is, my gut tells me, even though it will be initially
painful, for the long run, a rewrite is probably the best way forward.

BTW:
https://www.amazon.de/Working-Effectively-Legacy-Robert-Martin/dp/013117
7052/ref=sr_1_1?ie=UTF8&qid=1512458115&sr=8-1&keywords=working+with+lega
cy+code

--
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 5, 2017 9:22 AM   in response to: Mark Rose in response to: Mark Rose
Am 05.12.2017 um 00:20 schrieb Mark Whicker:
Thank you everyone for your comments - it's given me something to think about.

I didn't write this in my original post, but I've been a user of Pascal since in the 1990s using every version of Delphi right up until 2006 and I was really forced into having to learn C#, as at work I was asked to integrate a couple of systems both of which only have a C# API.

The difficult thing for me is that in coming to a decision about what the best way forward is, I also have to consider whether investing in Delphi for 3-5 years (or more) makes any sense - not in terms of cost (although it isn't cheap, and unless i'm missing something, you need enterprise for client/server DB access - I got that in 2006 Pro?), but in terms of ecosystem and community.

The most disappointing thing for me is that despite a feature matrix that's 25 pages long, Delphi doesn't have an ORM tool in the box, or in fact, several of the nice things that have been in .net and Visual Studio for some time and much of the 3rd part component landscape has evaporated.

I accept that the VCL is mostly a widget library rather than a full framework, but the things that the .net framework does is pretty amazing and the fact that it C# modern language makes revisiting Pascal code rather painful, it might be worth the pain, but it's hard to see.

I will download the latest evaluation version and see how broken my project is, my gut tells me, even though it will be initially painful, for the long run, a rewrite is probably the best way forward.

Another option is pro with the client/server DB addon.
But bear in mind: a rewrite causes at least one thing: new bugs! ;-)

Greetings

Markus
Larry Hengen

Posts: 6
Registered: 1/23/98
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 8, 2017 9:26 AM   in response to: Markus Humm in response to: Markus Humm
A lot of companies I know use Pro with ADO for Data Access to a client/server database, or a proprietary DAL for a specific database. ADO may not be as fast, or as versatile as FireDAC but it's a free option.

There are several good ORM options for Delphi. Just because they don't come in the same box doesn't mean it is a bad thing. Look at how EMBT let their data access layer stagnate to the point they needed to replace it with FireDAC. I would choose an open source option or one from a vendor with a good reputation over EMBT, since they have lots of QA issues (regressions).

Your point that C# is a more modern language with lots of functionality is valid. C# is now X platform, and native as well, with a larger community. Experience with C# is certainly an advantage when it comes to contracts and employment. I dislike some of the newer language constructs and still find it hard to read when compared to Delphi. It really comes down to what technology you want to invest your time in, and the potential pay off.

Markus Humm wrote:
Am 05.12.2017 um 00:20 schrieb Mark Whicker:
Thank you everyone for your comments - it's given me something to think about.

I didn't write this in my original post, but I've been a user of Pascal since in the 1990s using every version of Delphi right up until 2006 and I was really forced into having to learn C#, as at work I was asked to integrate a couple of systems both of which only have a C# API.

The difficult thing for me is that in coming to a decision about what the best way forward is, I also have to consider whether investing in Delphi for 3-5 years (or more) makes any sense - not in terms of cost (although it isn't cheap, and unless i'm missing something, you need enterprise for client/server DB access - I got that in 2006 Pro?), but in terms of ecosystem and community.

The most disappointing thing for me is that despite a feature matrix that's 25 pages long, Delphi doesn't have an ORM tool in the box, or in fact, several of the nice things that have been in .net and Visual Studio for some time and much of the 3rd part component landscape has evaporated.

I accept that the VCL is mostly a widget library rather than a full framework, but the things that the .net framework does is pretty amazing and the fact that it C# modern language makes revisiting Pascal code rather painful, it might be worth the pain, but it's hard to see.

I will download the latest evaluation version and see how broken my project is, my gut tells me, even though it will be initially painful, for the long run, a rewrite is probably the best way forward.

Another option is pro with the client/server DB addon.
But bear in mind: a rewrite causes at least one thing: new bugs! ;-)

Greetings

Markus
Arthur Hoornweg

Posts: 414
Registered: 6/2/98
Re: Legacy product - what to do?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 11, 2017 12:29 AM   in response to: Larry Hengen in response to: Larry Hengen
Larry Hengen wrote:
A lot of companies I know use Pro with ADO for Data Access to a client/server database, or a proprietary DAL for a specific database. ADO may not be as fast, or as versatile as FireDAC but it's a free option.

+1 for ADO. Not just because it's free, but because it works so well and documentation is everywhere to be found. If you want to target Firebird or Interbase, I can highly recommend the IBProvider driver. I have never found ADO slow, but I take pride in crafting efficient queries.

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02