Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VCL.NET support for ECO... a light winks on

1 view
Skip to first unread message

David Clegg

unread,
Jul 22, 2005, 4:40:07 AM7/22/05
to
I'd love to have ECO support VCL.NET, and was ruminating over this fact
earlier today, when a thought dawned on me.

The only thing that really makes ECO a WinForms technology is its
support for .NET WinForms binding via the
Reference/Expression/CurrencyManagerHandle components, and the
EcoAutoForm stuff. The other underlying services and frameworks are not
really dependant on WinForms at all.

For the life of me, I can't see why it wouldn't be feasible to use
VCL.NET as your presentation framework, and still have full access to
the EcoSpace IPersistenceService, IUndoService, IDirtyListService,
IOCLService etc. The only thing you'd lose is the ability to have your
domain objects bound to your GUI, which isn't really a big deal to me
as I was in the habit of manually populating from my BO classes with my
last few development projects. Hang on...

<type, type, compile, mumble, type, compile>

OK, now I've quickly thrown together a prototype to test my theory. It
uses the assembly that my currently under construction WinForms and
ASP.NET ECO apps uses, and simply shows all instances of the Course
class from my model in a TListView. It does, however use a
PersistenceMapperClient to talk to my ECO server application, and this
all worked out of the box (as expected). I've uploaded it to
.attachements in case anyone is interested.

Its only a proof of concept thing, but seems to strengthen my belief
that there is no reason why ECO and VCL.NET are mutually exclusive. It
only has the code for the VCL.NET app, and includes the binaries for
the assembly containing my model, and for the ECO server (connection
hardcoded to tcp://localhost:8000/PocketCaddyServer). The ECO Server
has a PersistenceMapperBDP which is talking to an InterBase database
with the hardcoded path of POCKETCADDY.GDB (also included in the zip),
but I see no reason why PersistenceMapperXML couldn't be used in the
VCL.NET client for testing. I only chose to use my ECO server to
further re-inforce the whole proof of concept deal.

Am I missing something here? Is there any fundamental reason why my
cunning plan wouldn't work?

--
Cheers,
David Clegg
dcl...@gmail.com

Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489 :-)
Now supports Google Groups searching with Dyna-extend(tm) technology!

QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com

"Marge, it takes two people to lie. One to lie and one to listen." -
Homer Simpson

Peter Morris [Droopy eyes software]

unread,
Jul 22, 2005, 5:11:28 AM7/22/05
to
Hi

> Am I missing something here? Is there any fundamental reason why my
> cunning plan wouldn't work?

Not really. I believe that the only incompatibilities with ECO + VCL.net
are
1) I have heard you cannot drop expression handles etc onto your forms
(haven't tried it myself)
2) Databinding

It would be possible to create a TDataset descendant that would allow you to
do the "databinding" in VCL.net, there was a dataset component in Bold.


--
Pete
====
ECO Modeler, Audio compression components, DIB graphics controls,
FastStrings
http://www.droopyeyes.com

Read or write articles on just about anything
http://www.HowToDoThings.com

My blog
http://blogs.slcdug.org/petermorris/

David Clegg

unread,
Jul 22, 2005, 5:21:02 AM7/22/05
to
Peter Morris [Droopy eyes software] wrote:

> Not really. I believe that the only incompatibilities with ECO +
> VCL.net are 1) I have heard you cannot drop expression handles etc
> onto your forms (haven't tried it myself) 2) Databinding

Yeah, thats what I figured. And my (admittedly basic) proof of concept
VCL.NET app seems to add weight to the feasibility.

Even with the code required to populate the GUI elements, I can still
see huge benefits from using ECO with VCL.NET. Perhaps I'll create a
VCL.NET front end as an alternative to my current WinForms one

(Hmm...gotta stop doing that. My todo list is starting to rival John
Kasters <g>)

--
Cheers,
David Clegg
dcl...@gmail.com

Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489 :-)
Now supports Google Groups searching with Dyna-extend(tm) technology!

QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com

"Hello? Operator! Give me the number for 911!" - Homer Simpson

Jonas Hogstrom [Borland]

unread,
Jul 22, 2005, 5:27:59 AM7/22/05
to
David Clegg wrote:

No, you are completely correct. There is nothing in Eco that prevents
you from using VCL as a presentation layer. All of the Assemblies other
than the Borland.Eco.Windows.Forms (and .web/.vcl) does not have any
dependencies on any gui architecture). The only thing that the
vcl-assembly contains is a VCL-based dequeuer (that hooks VCL OnIdle).

The Eco handles inherit from System.ComponentModel.Component, so they
can actually be created (in code) and added to a VCL form, but you can
not register the Eco DLLs as VCL components in the IDE (I'm not quite
sure why). Further more, there is nothing in the Eco handles that makes
them exposed as Datasets. There is a VCL class called TListConnector
that acts as a bridge between an IBindingList (winforms thing) and a
TDataSet. We have not done any tests with this component ourselves, but
it might prove useful.

Using Eco with VCL will require quite alot more work than using
winforms.
/Jonas

Craig Stuntz [TeamB]

unread,
Jul 22, 2005, 9:22:03 AM7/22/05
to
Peter Morris [Droopy eyes software] wrote:

> 2) Databinding
>
> It would be possible to create a TDataset descendant that would allow
> you to do the "databinding" in VCL.net, there was a dataset component
> in Bold.

Or custom controls like Bold had.

Or just wait for Avalon.

--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
news server: http://info.borland.com/newsgroups/guide.html

David Clegg

unread,
Jul 22, 2005, 9:41:48 AM7/22/05
to
Craig Stuntz [TeamB] wrote:

> Or custom controls like Bold had.
>
> Or just wait for Avalon.

Like I stated in my original post, having an unbound GUI doesn't bother
this little black duck in the slightest. I was more concerned with
proving my assertion that ECO and VCL.NET can play nicely together.

WinForms makes it easier, but VCL.NET can still get you there in the
end. My current ECO WinForms GUI is nearly finished, so I won't bother
re-writing it at this stage, although I might create a VCL.NET variant
just to show it can be done, and with the hopes that other ECO users
may benefit.

It may also go some way to showing the "what use is VCL.NET? I want a
native .NET solution" crowd that VCL.NET is just as much a first class
.NET citizen as WinForms is.

--
Cheers,
David Clegg
dcl...@gmail.com

Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489 :-)
Now supports Google Groups searching with Dyna-extend(tm) technology!

QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com

"Oh, yeah, what are you gonna do? Release the dogs? Or the bees? Or the
dogs with bees in their mouth and when they bark, they shoot bees at
you?" - Homer Simpson

Holger Flick

unread,
Jul 22, 2005, 6:28:25 AM7/22/05
to
David Clegg wrote:

> Yeah, thats what I figured. And my (admittedly basic) proof of concept
> VCL.NET app seems to add weight to the feasibility.

Hi David,

how did you get the ECOSpace.pas-file into your VCL.NET app? Did you
just add an EcoSpace? Furthermore, do the toolbar items on the bottom
appear by themselves?

Hope you will write a data pump from ExpressionHandle to some sort of
VCL.NET datasource :-)

Regards,
Holger


--


ELKNews - Get your free copy at http://www.atozedsoftware.com

David Clegg

unread,
Jul 22, 2005, 9:47:25 AM7/22/05
to
Holger Flick wrote:

> how did you get the ECOSpace.pas-file into your VCL.NET app?

File|New|Other|Delphi for .NET Projects|New ECO Files|EcoSpace :-)

> Furthermore, do the toolbar items on the bottom
> appear by themselves?

They're all present and accounted for. What you have to remember is
that the EcoSpace isn't dependant on WinForms in any way and is just a
standard .NET class, which VCL.NET applications have no problems
consuming.

--
Cheers,
David Clegg
dcl...@gmail.com

Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489 :-)
Now supports Google Groups searching with Dyna-extend(tm) technology!

QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com

"Hey, we didn't have a message on our answering machine when we left.
How very odd." - Homer Simpson

John Kaster (Borland)

unread,
Jul 28, 2005, 5:46:00 AM7/28/05
to
David Clegg wrote:

> My todo list is starting to rival John Kasters <g>

You DON'T wish!

--
John Kaster http://blogs.borland.com/johnk
Features and bugs: http://qc.borland.com
Get source: http://cc.borland.com
If it's not here, it's not happening: http://ec.borland.com

John Kaster (Borland)

unread,
Jul 28, 2005, 5:47:09 AM7/28/05
to
Jonas Hogstrom [Borland] wrote:

> Using Eco with VCL will require quite alot more work than using
> winforms.

With current implementations, at least ;)

David Clegg

unread,
Jul 28, 2005, 5:51:45 AM7/28/05
to
John Kaster (Borland) wrote:

> You DON'T wish!

Indeed <g>

The ECO VCL.NET articles 90% finished, BTW. Should be able to submit it
tonight or tomorrow.

--
Cheers,
David Clegg
dcl...@gmail.com

Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489 :-)
Now supports Google Groups searching with Dyna-extend(tm) technology!

QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com

"With $10,000, we can be millionaires!" - Homer Simpson

Peter Morris [Droopy eyes software]

unread,
Jul 28, 2005, 12:33:49 PM7/28/05
to
I look forward to reading it!


John Kaster (Borland)

unread,
Jul 28, 2005, 1:23:09 PM7/28/05
to
David Clegg wrote:

> The ECO VCL.NET articles 90% finished, BTW. Should be able to submit
> it tonight or tomorrow.

Excellent.

David Clegg

unread,
Jul 28, 2005, 4:28:44 PM7/28/05
to
Peter Morris [Droopy eyes software] wrote:

>
> I look forward to reading it!

Don't expect any radical ECO insights. For example, the model I use in
my article consists of 1 class with 4 attributes :-)

--
Cheers,
David Clegg
dcl...@gmail.com

Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489 :-)
Now supports Google Groups searching with Dyna-extend(tm) technology!

QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com

"I know I'm not usually a praying man, but if you're up there, please
Superman, help me!" - Homer Simpson

Peter Morris [Droopy eyes software]

unread,
Jul 28, 2005, 5:50:34 PM7/28/05
to
That's okay, I have never bothered looking at VCL .net, let alone in
combination with ECO, so it will be interesting :-)


David Clegg

unread,
Jul 28, 2005, 6:01:03 PM7/28/05
to
Peter Morris [Droopy eyes software] wrote:

> That's okay, I have never bothered looking at VCL .net, let alone in
> combination with ECO, so it will be interesting :-)

Put it this way. If you know ECO, and you know VCL, its not rocket
science <g>

--
Cheers,
David Clegg
dcl...@gmail.com

Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489 :-)
Now supports Google Groups searching with Dyna-extend(tm) technology!

QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com

"If the Bible has taught us nothing else, and it hasn't, its that girls
should stick to girl's sports, such as hot oil wrestling foxy boxy and
such and such" - Homer Simpson

Tao Lei

unread,
Jul 28, 2005, 8:31:16 PM7/28/05
to
If VCL.net support Eco, then I can use Eco with IntraWeb, that sounds great.

"David Clegg" <dcl...@gmail.com> wrote news:xn0e5bimy...@newsgroups.borland.com...

David Clegg

unread,
Jul 28, 2005, 8:37:08 PM7/28/05
to
Tao Lei wrote:

> If VCL.net support Eco, then I can use Eco with IntraWeb, that sounds
> great.

There is no data binding support, but there is no reason why ECO and
VCL.NET can't be used together. Keep an eye out for a BDN article
demonstrating how easy it is. Its 90% written, and I hope to submit it
for publishing this weekend.

--
Cheers,
David Clegg
dcl...@gmail.com

Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489 :-)
Now supports Google Groups searching with Dyna-extend(tm) technology!

QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com

"All right, brain. You don't like me and I don't like you, but let's
just do this and I can get back to killing you with beer." - Homer
Simpson

Tao Lei

unread,
Jul 28, 2005, 9:32:59 PM7/28/05
to
Thank you for your good work, sir.

"David Clegg" <dcl...@gmail.com> wrote news:xn0e5bmot...@newsgroups.borland.com...

Jesper Hogstrom [Borland]

unread,
Aug 16, 2005, 4:40:05 AM8/16/05
to

"Jonas Hogstrom [Borland]" <jonas.h...@borland.com.guesswhattoremove>
wrote in message news:42e0...@newsgroups.borland.com...

> The Eco handles inherit from System.ComponentModel.Component, so they
> can actually be created (in code) and added to a VCL form, but you can
> not register the Eco DLLs as VCL components in the IDE (I'm not quite
> sure why).

VCL components need to be compiled with a specific attribute iirc. The ECO
components are not.

--Jesper


0 new messages