Board index » delphi » To mix or not no mix (comes from non-technical thread)

To mix or not no mix (comes from non-technical thread)

Hi, i'm wondering the following:
The OOP purists say that everything in an application must be objects,
so if i'm creating an application i should have the customer object, the

invoice object, and so on.
Right now i'm using Delphi's OOP capabilities "just" to create
development objects (controls, componentes, some generic classes, form
inheritance, etc) but not "real world equivalent objects" like persons
and inheriting to create customers, employees, ...
I know it can be done, but from my point of view it could be more a
problem than an improvement on my applications and cronograms
particullary with data bound applications. I'll be comeme reinventing
all what Delphi has gave me (bound controls, datasets, and so on) when
using the "only objects" approach.
I think that the RAD concept relies on OOP for code re-use, component
creation and VCL expansion more than for "real world databound objects"
dessign.
And that a mix of an OOP language but not a completely OOP application's

dessign fits better.
Am i wrong? bye

--
Guillermo Casta?o Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
Guiller...@GrupoMillennium.com
http://www.GrupoMillennium.com

 

Re:To mix or not no mix (comes from non-technical thread)


"Guillermo Casta?o A" <Guiller...@GrupoMillennium.com> a crit dans le
message news: 3CFCBFD3.BF631__BEGIN_MASK_n#9g02mG7!__...__END_MASK_i?a63jfAD$z__@GrupoMillennium.com...

Quote
> I think that the RAD concept relies on OOP for code re-use, component
> creation and VCL expansion more than for "real world databound objects"
> dessign.
> And that a mix of an OOP language but not a completely OOP application's

Using the original data-aware controls that Delphi provides can actually
slow down development. Getting the correct events to intercept, etc. can be
difficult.

We OO 'purists' do not make work for ourselves, just for the fun of it; we
have found out the advantages of good design, reusability, encapsulation,
etc. and, although we take a lot of time up front to put the various layers
(OPF, MVP) in place, we then start to save time and effort.

Several solutions to using data-aware controls with business objects do
exist; they are good at what they do, but are, of necessity a best fit
solution rather than the ideal.

I am working on a generic MVP framework that will provide an alternative to
the TDataset mentality. It is not an easy thing, because Delphi tends to
lead you into RAD before you get to learn how to do quality.

I have consulted on several projects, and the ones that adopt an OO
approach, take longer to get the initial release in place, then they start
saving a *lot* of time and effort.

Joanna

Re:To mix or not no mix (comes from non-technical thread)


Joanna, you talk about OPF and MVP. What is this?
Thanks
Udo

Quote
"Joanna Carter" <joan...@btinternet.com> wrote:
>"Guillermo Casta?o A" <Guiller...@GrupoMillennium.com> a crit dans le
>message news: 3CFCBFD3.BF631__BEGIN_MASK_n#9g02mG7!__...__END_MASK_i?a63jfAD$z__@GrupoMillennium.com...

>> I think that the RAD concept relies on OOP for code re-use, component
>> creation and VCL expansion more than for "real world databound objects"
>> dessign.
>> And that a mix of an OOP language but not a completely OOP application's

>Using the original data-aware controls that Delphi provides can actually
>slow down development. Getting the correct events to intercept, etc. can be
>difficult.

>We OO 'purists' do not make work for ourselves, just for the fun of it; we
>have found out the advantages of good design, reusability, encapsulation,
>etc. and, although we take a lot of time up front to put the various layers
>(OPF, MVP) in place, we then start to save time and effort.

>Several solutions to using data-aware controls with business objects do
>exist; they are good at what they do, but are, of necessity a best fit
>solution rather than the ideal.

>I am working on a generic MVP framework that will provide an alternative to
>the TDataset mentality. It is not an easy thing, because Delphi tends to
>lead you into RAD before you get to learn how to do quality.

>I have consulted on several projects, and the ones that adopt an OO
>approach, take longer to get the initial release in place, then they start
>saving a *lot* of time and effort.

>Joanna

Re:To mix or not no mix (comes from non-technical thread)


"udo" <udo_ma...@yahoo.com> a crit dans le message news:
3cfcc9c2$1_1@dnews...

Quote

> Joanna, you talk about OPF and MVP. What is this?
> Thanks
> Udo

Object Persistence Framework & Model View Presenter

Joanna

Re:To mix or not no mix (comes from non-technical thread)


Joanna,

           regarding your MVP framework that you posted. There would
 seem to be a bug in the way it handles commands.

In the demo provided if you select a string(any but top one), and then
select "move up", from the context menu.

Then instead of clicking on another entry you select the context menu
again, do this until entry is the top one. When you select the context
menu this time, instead of the "move up" menu being disabled it is
enabled. If you now select it the top string disapears!

David Fisher

Quote

> > Joanna, you talk about OPF and MVP. What is this?
> > Thanks
> > Udo

> Object Persistence Framework & Model View Presenter

> Joanna

Re:To mix or not no mix (comes from non-technical thread)


Quote
> Joanna,

>            regarding your MVP framework that you posted. There would
>  seem to be a bug in the way it handles commands.

Could this file (MVP framework) be posted again? Our current frame work is
lacking in this area.

Thanks,

Terrence Koehn
Orion Law Management System

Re:To mix or not no mix (comes from non-technical thread)


"David Fisher" <Da...@Fisher72.fslife.co.uk> a crit dans le message news:
3cfd1578_2@dnews...

Quote
> In the demo provided if you select a string(any but top one), and then
> select "move up", from the context menu.

> Then instead of clicking on another entry you select the context menu
> again, do this until entry is the top one. When you select the context
> menu this time, instead of the "move up" menu being disabled it is
> enabled. If you now select it the top string disapears!

This is due to the fact that you have not re-established a Selection.

I will look at it, but see if you can work out how to fix it, this will help
you to understand how it all works.

Joanna

Re:To mix or not no mix (comes from non-technical thread)


"Terrence Koehn" <koe...@pacbell.net> a crit dans le message news:
3CFD2B03.F9E5D...@pacbell.net...

Quote
> Could this file (MVP framework) be posted again? Our current frame work is
> lacking in this area.

I will put it in b.p.attachments

Joanna

Re:To mix or not no mix (comes from non-technical thread)


Hi and thanks for your answer.
I have some coments. I'm not starting a fight, just arguing a little.
1. Building a parallel model to Delphi datasets will not bring you down when
new Delphi releases become available? In other words: isn't there the risk to
not be able to use future enhancements?
2. I don't think that datasets are a problem. Compared with all the other
databound approaches i think they're easy to use, fast and powerful. Maybe only
the PowerBuilder datawindow is better. And the lot of events give me power and
control. Isn't?
3. Don't know if quality and RAD are in contrary sides. I think that the Delphi
RAD point of view can have an excellent quality depending of the project
dessign and management. The hybrid approach can create fast, reliable and high
quality applications.

I have a final question: in your experience, how much time the OOP approach
saves on future version compared with the initial efforce and compared with the
same process on the hybrid model? Does the initial efforce can be reduced in
future projects?

Thanks a lot for your valuable point of view and experience. bye
--
Guillermo Casta?o Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
Guiller...@GrupoMillennium.com
http://www.GrupoMillennium.com

Re:To mix or not no mix (comes from non-technical thread)


"Guillermo Casta?o A" <Guiller...@GrupoMillennium.com> wrote in message
news:3CFD48C9.7838AF74@GrupoMillennium.com...

Quote

> I have a final question: in your experience, how much time the OOP
approach
> saves on future version compared with the initial efforce and compared
with the
> same process on the hybrid model? Does the initial efforce can be reduced
in
> future projects?

There are two important aspects:

1. Regardless of future projects, the *current* project will benefit greatly
from a well designed framework. You should see far fewer bugs related to the
overall architecture and changes / enhancements will be much easier to
implement.

2. The framework is what is reusable in its entirety, it will not have to be
developed again (though may continue to be enhanced). Interfaces and classes
such as IListModel/TListModel, ISubject/TSubject, as Joanna describes,
implement a lot of common functionality that can be reused in every future
project.

So in short, it takes a lot more thought initially to implement and learn to
use such a framework, but it will save a great deal of time and help produce
much better quality apps for every subsequent project. You *must* include
the savings in bug-fixing and maintenance that comes *after* development as
well as the savings in development itself.

--
Wayne Niddery (Logic Fundamentals, Inc.)
RADBooks: http://www.logicfundamentals.com/RADBooks/delphibooks.html
Those who disdain wealth as a worthy goal for an individual or a society
seem not to realize that wealth is the only thing that can prevent
poverty. - Thomas Sowell

Re:To mix or not no mix (comes from non-technical thread)


Under no circumstances i discuss the necesity of a stable, reliable and proved
framework to create applications. I completely agree with that.
I already have a framewrok my own and i think almost every real world Delphi
developer have one (or at least they should).
But... must be that framework use OOD for real world objects? My framework of
course uses OOP for components, forms and so on. But knowing the big differences
between the logic of one application and another (even at database level) i
though that having a TPerson, TAccount, TCustomer and so on wasn't (and isn't)
very productive at the end. Nop?
Thanks
--
Guillermo Casta?o Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
Guiller...@GrupoMillennium.com
http://www.GrupoMillennium.com

Re:To mix or not no mix (comes from non-technical thread)


"Guillermo Casta?o A" <Guiller...@GrupoMillennium.com> wrote

Quote
> I know it can be done, but from my point of view it could be more a
> problem than an improvement on my applications and cronograms

Good to go into it with your eyes open.

As both Joanna and Wayne have pointed out, there are up-front costs for OO
analysis and design that you have to be willing to pay. OO is a lot like
computation itself: if a notepad meets your needs, then don't bother writing
a speadsheet.

That being the case, you have to be honest about what you might want to fix
about your current approach, and honest about what it's worth to you to fix
it. There will be a lot of late nights when you have to remind yourself of
those goals. Initially, anyway<g>.

Quote
> I think that the RAD concept relies on OOP for code re-use, component
> creation and VCL expansion more than for "real world databound objects"
> dessign.

If Borland could do 90% of your visual work for you by giving you a great
set of objects to descend your programs' visual interfaces from, then why
shouldn't you code the things you deal with repeatedly in the same style? In
principle, 'GUI interface' is a problem domain that a programmer has to
solve, not essentially different from those of customer contact management,
job tracking, or any other problem domain. The VCL is indeed a great example
of some of the benefits of OO design.

Quote
> And that a mix of an OOP language but not a completely OOP
> application's dessign fits better.
> Am i wrong?

In general I agree with Joanna and Wayne that the benefits of OO design
start early and compound rapidly. But YMMV.

bobD

Re:To mix or not no mix (comes from non-technical thread)


"Guillermo Casta?o A" <Guiller...@GrupoMillennium.com> wrote in message
news:3CFD74CF.F7196BC4@GrupoMillennium.com...

Quote
> But... must be that framework use OOD for real world objects? My framework
of
> course uses OOP for components, forms and so on. But knowing the big
differences
> between the logic of one application and another (even at database level)
i
> though that having a TPerson, TAccount, TCustomer and so on wasn't (and
isn't)
> very productive at the end. Nop?

Ok, I'm still not sure whether you are questioning the kind of framework
classes that Joanna presents, or just Domain classes such as TPerson, etc
you mention here.

The kind of interfaces and classes Joanna presents are useful (reusable) in
virtually any application. Specific implementations of Domain classes may or
may not find reuse in subsequent applications.

I also find practically every project I do is vastly different and/or for
different clients. As a result there are many classes I develop that will
never see reuse in future apps. That does not lessen their value and benefit
in the current app. So the answer is yes, OOD is very much applicable to
real-world objects. These real-world objects will be Model objects in
Joanna's framework. E.g. you could create a descendant of the TListModel
that holds TPerson or TAccount objects and create other classes as she
describes to present  and update these objects. IOW, if you do not design
such Domain classes then you will not be able to take advantage of a such a
framework.

It may *seem* unproductive to take a lot more time up front to design all
these domain classes and creating diagrams to describe the relationships
between the classes, but you will end up spending a lot less time in the
actual development phase and even less time bug-fixing later. At worse case
you usually break even on when a project is delivered, but you deliver a
much better app. Even if it takes longer, you will still save time and money
in the long run because of better design and better quality.

--
Wayne Niddery (Logic Fundamentals, Inc.)
RADBooks: http://www.logicfundamentals.com/RADBooks/delphibooks.html
Those who disdain wealth as a worthy goal for an individual or a society
seem not to realize that wealth is the only thing that can prevent
poverty. - Thomas Sowell

Re:To mix or not no mix (comes from non-technical thread)


Quote
> The kind of interfaces and classes Joanna presents are useful (reusable) in
> virtually any application.

And are relatively easy to write unit tests for.

Cheers,
Jim Cooper

_____________________________________________

Jim Cooper      jcoo...@tabdee.ltd.uk
Tabdee Ltd      http://www.tabdee.ltd.uk

TurboSync - Writing Palm conduits with Delphi
_____________________________________________

Re:To mix or not no mix (comes from non-technical thread)


mmm, i think i undertand now your framework concept and i get it's benefits.
Just another question: how do you deal in that framework with the UI? Can you
use the already existing databound controls or you must populate them yourself?
thanks
--
Guillermo Casta?o Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
Guiller...@GrupoMillennium.com
http://www.GrupoMillennium.com
Go to page: [1] [2] [3]

Other Threads