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

Can I use vcl.net with Asp.net

3 views
Skip to first unread message

tao lin

unread,
May 15, 2006, 9:59:40 PM5/15/06
to
Hi,

I just convert my win32 vcl code to vcl.net. It's quite impressive that how
easy it is. But now I want to use my old code in a asp.net project. My
vcl.net libary include IBX component, DataModule, ClientDataSet and JCL but
don't have any visual component such as treeview etc. Is it possible use it
within Asp.net?

Cheers,

Tao


Nick Hodges [TeamB]

unread,
May 16, 2006, 1:21:54 AM5/16/06
to
tao lin wrote:

> Is it possible use it
> within Asp.net?

Sadly, while it was easy to move your VCL/Win32 app to VCL/.Net,
reusing that code in the ASP.NET world won't be easy at all. In fact,
I wouldn't really recommend trying it. All the ASP.NET controls are
expecting ADO.NET datasets, so all the code utilizing TDataset
descendants won't be of much use.

--
Nick Hodges -- TeamB
Dunn Solutions Group -- http://www.dunnsolutions.com
Read my Blog -- http://www.lemanix.com/nickblog

tao lin

unread,
May 16, 2006, 5:24:52 AM5/16/06
to
Thank you for your reply, Nick.

I have already replace my DAL from IBX to nhibernate. So I am not so worry
about the TDataSet issue (of course, need take some time to rewrite it). So
if I want to use my business logic (vcl.net) code from my asp.net web app
(C#), what dll I should create by using D2006? A package or a library?

Cheers,

Tao


"Nick Hodges [TeamB]" <nickh...@gmail.com> wrote in message
news:44696172$1...@newsgroups.borland.com...

Nick Hodges [TeamB]

unread,
May 16, 2006, 7:45:40 AM5/16/06
to
tao lin wrote:

> A package or a library?

Always use packages in .Net, unless you want to do the Win32 interop
trick that Delphi can do.

Unknown

unread,
May 16, 2006, 7:53:58 AM5/16/06
to
On Tue, 16 May 2006 21:24:52 +1200, tao lin wrote:

> Thank you for your reply, Nick.
>
> I have already replace my DAL from IBX to nhibernate. So I am not so worry
> about the TDataSet issue (of course, need take some time to rewrite it). So
> if I want to use my business logic (vcl.net) code from my asp.net web app
> (C#), what dll I should create by using D2006? A package or a library?

As long as your code contains pure Delphi code you should be fine. If
you have references to VCL.NET components then you may or may not have
problems.
Although in theory a VCL.NET control could run under ASP.NET there are
issues other than what Nick mentioned (ASP.NET controls expect .NET
Datasets). Most VCL controls are tied to the GUI even if they are not
visible (for example TTimer requires a message loop) and are often not
designed for multi-threaded use.

To answer your other questions you can either create a package for
your common code or just use the units directly.

--
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com

tao lin

unread,
May 18, 2006, 12:17:26 AM5/18/06
to
Hi, Marc

Do you have any brief list which classes are/aren't support
threaded-safe in VCL/VCL.net? I do remember I read some article talking
about this but I cannot find the link by google any more.

Cheers,

Tao

tao lin

unread,
May 17, 2006, 6:16:45 AM5/17/06
to
Very good point, Marc. I have nearly forgot VCL is not design for
mult-threaded use. So I will remove the VCL.Net components as many as
possible from my existing code.

Thank you, Marc!

Tao

"Marc Rohloff [TeamB]" <"on request"> wrote in message
news:c84sop7yuvvr$.dlg@dlg.marcrohloff.com...

0 new messages