Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Data Aware Controls are Delphi's strength



Permlink Replies: 9 - Last Post: Dec 2, 2017 6:46 AM Last Post By: Rudy Velthuis (...
Robert Gilland

Posts: 20
Registered: 2/24/03
Data Aware Controls are Delphi's strength
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 7, 2017 3:56 PM
This is just a rant.
But I am sick of having to maintain thousands of lines of codes.
When I could have done the same job, with memory datasets and data aware controls, and a few lines of code!

Why have so many coders missed the strength of Delphi and that is Data Aware Controls?
Latest incarnations of Delphi like FireMonkey, have is my opinion stuffed up Delphi by not providing Data Aware FireMonkey options.

Rant Over.

Edited by: Robert Gilland on Nov 7, 2017 4:02 PM
Wolfgang Lemmer...

Posts: 8
Registered: 3/14/01
Re: Data Aware Controls are Delphi's strength
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 7, 2017 11:36 PM   in response to: Robert Gilland in response to: Robert Gilland
Robert Gilland wrote:
This is just a rant.

same here:

I'm sick of having to maintain an application with hundrets of forms with massive use of data aware controls with no chance to test one of the binding or specification with automated (unit)tests.

Robert Gilland wrote:
Why have so many coders missed the strength of Delphi and that is Data Aware Controls?
I don't understand why we must discuss the massive benefits of unit tests in 2017 in the delphi community Yes, MVW* needs some code - but this code normally you don't see. A binding between a field of your data/business layer and a component of your user interface, needs one, maybe two lines of code - and all of this code could be unit testet and therefor maintainig is easy because you can't break existing code...

Robert Gilland wrote:
Rant Over.
Best regards :-)

*MVW = Model View Whatever. And yes, I don't know your code, I don't know if it's testable,...

Dominique Willems

Posts: 591
Registered: 10/26/99
Re: Data Aware Controls are Delphi's strength
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 8, 2017 3:19 AM   in response to: Wolfgang Lemmer... in response to: Wolfgang Lemmer...
Wolfgang Lemmermeyer wrote:
I'm sick of having to maintain an application with hundrets of forms
with massive use of data aware controls with no chance to test one of
the binding or specification with automated (unit)tests.

Good rant! I moved away from data-aware controls almost a decade ago.

And Firemonkey, imho, is a great blessing, and not because it's
cross-platform, on the contrary, despite of it.
Abdullah Kauchali

Posts: 6
Registered: 4/3/02
Re: Data Aware Controls are Delphi's strength
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 8, 2017 6:41 AM   in response to: Robert Gilland in response to: Robert Gilland
Robert Gilland wrote:
This is just a rant.
But I am sick of having to maintain thousands of lines of codes.
When I could have done the same job, with memory datasets and data aware controls, and a few lines of code!

Why have so many coders missed the strength of Delphi and that is Data Aware Controls?
Latest incarnations of Delphi like FireMonkey, have is my opinion stuffed up Delphi by not providing Data Aware FireMonkey options.

Rant Over.

I agree. There was a time in the mid 2000s (peak OO stage) when everyone and their pet dog was emulating Java-shop style requirements decomposition, the linchpin of which was the dreaded ORMs. The irony of it was that while rage was MVC, MVVM, MVP etc ... TDataset & data aware controls already had those patterns in-built!

The real power of Delphi is TCustomDataSet and its ancestors. That is where the RAD was. Still is. IMO.

Wayne Niddery wrote an excellent article once on this: https://edn.embarcadero.com/article/28156

Don't see him posting much these days. Hope he's doing fine!

AK

Michael Thuma

Posts: 104
Registered: 1/30/00
Re: Data Aware Controls are Delphi's strength
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 9, 2017 6:02 AM   in response to: Robert Gilland in response to: Robert Gilland
In general I agree. Don't code if declarations work for you.

---

Programmers write code ;). The IDEs today (also 10 years ago) already allow to benefit from information provided by a certain kind of code insight facility a lot more than meta data offered by the components.

---

You can use the box data bindings provided with the appearance of Firemonkey out of the box.

There is a fistful of pitfalls in the beginning (for example the handled flag is confusing, when assigning a value). You can implement your own functions and add those to expressions. Imo the problem starts with grids. Getting used to that kind of programming can be pleasant but also on SAP/BW (where assigning such rules while moving data along in the staging area was the favored alternative) is to complicated for many programmers but a lot more intuitive for those who addressed the design from the business perspective.

---

The strength of 'Delphi' is that you can build both the components and use them. Class frameworks and classes are here to be used. I still think that a vast majority of people simply use components or classes. The moment you have to/ forced to combine both roles into one Delphi starts to suck. That's a contradiction to a certain degree. You simply shift the complexity to another part of the software and doing so you finally hope to be in the position to reuse that component.

So Delphi is neither coding nor clicky clicky programming. It's both and half baked from both perspectives at the same time.

---

In general you are right. It's better to do something the way it's meant to be. The way you suggest is also very welcome here at my site. FireDAC definitely allows (the first component set that really did) to build GUIs for example without having to code. FireDAC does origin from an integrated approach that relied on a model file ...

---

If you have a solid data model in the DB, do the checks there. That works. The problem started with the interpretation of BLOBs. Nexus DB knows that a picture is a picture for example. Currency and rounding is another thing ...

In order to make both the GUI components consistent with the underlying data type you needed the concept of domains implemented in the DB. This simply leads to validation outside the controls and moves the consistency checks to a certain kind of model at the app-tier.

In different views to same underlying data structure the constraints applied to a record are getting stronger and stronger over the time starting with pretty weak checking when the record is being created. The moment you change constraints you must propagate the changes across all parts accessing the records especially from the web for example. In the end you have to introduce default values where NULL was used before. This breaks the logic of other applications accessing the data. So it's more wise to validate in the data-module for example which is a certain kind of 'app-tier' oder 'data-buffering'-tier.

Navigating visually breaks the flow.

---

Robert Gilland wrote:
This is just a rant.
But I am sick of having to maintain thousands of lines of codes.
When I could have done the same job, with memory datasets and data aware controls, and a few lines of code!

Why have so many coders missed the strength of Delphi and that is Data Aware Controls?
Latest incarnations of Delphi like FireMonkey, have is my opinion stuffed up Delphi by not providing Data Aware FireMonkey options.

Rant Over.

Edited by: Robert Gilland on Nov 7, 2017 4:02 PM

--
Delphi Programming is fun. Hilarious.
al nickels

Posts: 173
Registered: 7/16/09
Re: Data Aware Controls are Delphi's strength
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 14, 2017 6:15 AM   in response to: Robert Gilland in response to: Robert Gilland
I am amazed when I see these posts. The strength of Delphi has always been in using data aware controls with memory table structures like Clientdatasets or FDMemtables. This level of higher productivity goes back over 20 years and is one of my primary reasons for selecting this product for development. These components let you isolate the database from direct user interaction and many other features that are not available in other environments to this date.

Robert Gilland wrote:
This is just a rant.
But I am sick of having to maintain thousands of lines of codes.
When I could have done the same job, with memory datasets and data aware controls, and a few lines of code!

Why have so many coders missed the strength of Delphi and that is Data Aware Controls?
Latest incarnations of Delphi like FireMonkey, have is my opinion stuffed up Delphi by not providing Data Aware FireMonkey options.

Rant Over.

Edited by: Robert Gilland on Nov 7, 2017 4:02 PM
Yogi Yang

Posts: 57
Registered: 12/23/06
Re: Data Aware Controls are Delphi's strength
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 28, 2017 8:39 PM   in response to: al nickels in response to: al nickels
al nickels wrote:
These components let you isolate the database from direct user interaction and many other features that are not available in other environments to this date.

Like for example which other environments you are referring to?
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Data Aware Controls are Delphi's strength
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 2, 2017 6:46 AM   in response to: al nickels in response to: al nickels
al nickels wrote:

I am amazed when I see these posts. The strength of Delphi has
always been in using data aware controls with memory table structures
like Clientdatasets or FDMemtables.

One of the strengths. And I guess people use slightly more
sophisticated setups for database work these days.

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

"You need only reflect that one of the best ways to get
yourself a reputation as a dangerous citizen these days is to
go about repeating the very phrases which our founding fathers
used in the great struggle for independence."
-- Attributed to Charles Austin Beard
Marcello O.DIAS

Posts: 23
Registered: 7/16/16
Re: Data Aware Controls are Delphi's strength
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 14, 2017 7:09 AM   in response to: Robert Gilland in response to: Robert Gilland
I completely agree.
People say that with MVC you can change you presentantion layer in a breeze.
Last year I migrated an Intraweb 4 application to Intraweb 14,no backward compatibility.
All I dead was write a parsers(same could be done with the Delphi parser.)
If tomorrow they want to migrate it to UNIgui or IW17 all I have to do is change my parser,the
magic happens is some days.
The presentation layer was never a problem,the code that deals with it is the problem,if you're good at oop,
and Visual Form Inheritance,you dont have to write much code also.
So is very hard to sell MVC to me.
I'm trying to study Angular.Dart,looks like Delphi,you bind components to events,just dont use the IDE.
There was also a Dart Designer,so basically they just dont bind evertything with an IDE,and feel they're much
smarter than us.

Marcello

Robert Gilland wrote:
This is just a rant.
But I am sick of having to maintain thousands of lines of codes.
When I could have done the same job, with memory datasets and data aware controls, and a few lines of code!

Why have so many coders missed the strength of Delphi and that is Data Aware Controls?
Latest incarnations of Delphi like FireMonkey, have is my opinion stuffed up Delphi by not providing Data Aware FireMonkey options.

Rant Over.

Edited by: Robert Gilland on Nov 7, 2017 4:02 PM
Clement Doss

Posts: 76
Registered: 3/26/00
Re: Data Aware Controls are Delphi's strength
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 24, 2017 1:46 PM   in response to: Robert Gilland in response to: Robert Gilland
Hi

But I am sick of having to maintain thousands of lines of codes.
When I could have done the same job, with memory datasets and data aware controls, and a few lines of code!

Basically use the right feature for the right Job. I read a lot of articles saying that "true OOP never requires TDataset".
I'm OOPing the hell out of Object Pascal using TDataset where my structures are dynamic: User can Add or Remove fields and the application deals with it. Very fast! Already deals with old and new values! Very easy to update only modified fields.
Lot's of states are standard, so I use TDataset as a layer and I create Query from specific vendor where required.

But ORM also has it's charms. For example, when I request a readonly dataset, it is unmarshaled in a structure that I use directly on a VirtualList. No delay populating a TDataset (Event memory dataset is slower than using a VirtualList).

Anyway, Delphi allows you to do many things: With great power comes great responsibility LOL

Clément
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02