Home All Groups Group Topic Archive Search About

Best practice for sharing code between ASP and Winforms apps?

Author
7 Jun 2006 4:44 PM
JDC
Hi all,

I've got a situation where I need to create a Windows Forms application
as an admin tool which is driven by the same data as an ASP.NET
application.

Luckily my 3-tier-ish design means my data and business objects will
cope quite well with this, but I'm wondering what the best way to do
this is?

I'm not sure I want both apps in the same folder, but I want some of my
classes shared between the apps.

Can anyone who's done this comment? Any articles I should read?

Cheers, JC

Author
7 Jun 2006 6:28 PM
Kevin Spencer
Just put your business assemblies into the app folders of both applications.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

A lifetime is made up of
Lots of short moments.

Show quote
"JDC" <jeremy.d.coll***@gmail.com> wrote in message
news:1149698649.684690.290940@f6g2000cwb.googlegroups.com...
> Hi all,
>
> I've got a situation where I need to create a Windows Forms application
> as an admin tool which is driven by the same data as an ASP.NET
> application.
>
> Luckily my 3-tier-ish design means my data and business objects will
> cope quite well with this, but I'm wondering what the best way to do
> this is?
>
> I'm not sure I want both apps in the same folder, but I want some of my
> classes shared between the apps.
>
> Can anyone who's done this comment? Any articles I should read?
>
> Cheers, JC
>
Author
7 Jun 2006 7:29 PM
JDC
OK, let me check if I've got this right. I add a new class library
project to my web application solution, and move my shared classes into
that .dll project. Then I reference that .dll in my Windows Forms app?


Kevin Spencer wrote:
Show quote
> Just put your business assemblies into the app folders of both applications.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> Professional Chicken Salad Alchemist
>
> A lifetime is made up of
> Lots of short moments.
>
> "JDC" <jeremy.d.coll***@gmail.com> wrote in message
> news:1149698649.684690.290940@f6g2000cwb.googlegroups.com...
> > Hi all,
> >
> > I've got a situation where I need to create a Windows Forms application
> > as an admin tool which is driven by the same data as an ASP.NET
> > application.
> >
> > Luckily my 3-tier-ish design means my data and business objects will
> > cope quite well with this, but I'm wondering what the best way to do
> > this is?
> >
> > I'm not sure I want both apps in the same folder, but I want some of my
> > classes shared between the apps.
> >
> > Can anyone who's done this comment? Any articles I should read?
> >
> > Cheers, JC
> >
Author
7 Jun 2006 7:39 PM
Kevin Spencer
Well, it's better if you include the class library project in the solution.
You can include the same projects in many different solutions.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

A lifetime is made up of
Lots of short moments.

Show quote
"JDC" <jeremy.d.coll***@gmail.com> wrote in message
news:1149708562.239975.145220@j55g2000cwa.googlegroups.com...
> OK, let me check if I've got this right. I add a new class library
> project to my web application solution, and move my shared classes into
> that .dll project. Then I reference that .dll in my Windows Forms app?
>
>
> Kevin Spencer wrote:
>> Just put your business assemblies into the app folders of both
>> applications.
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>> Professional Chicken Salad Alchemist
>>
>> A lifetime is made up of
>> Lots of short moments.
>>
>> "JDC" <jeremy.d.coll***@gmail.com> wrote in message
>> news:1149698649.684690.290940@f6g2000cwb.googlegroups.com...
>> > Hi all,
>> >
>> > I've got a situation where I need to create a Windows Forms application
>> > as an admin tool which is driven by the same data as an ASP.NET
>> > application.
>> >
>> > Luckily my 3-tier-ish design means my data and business objects will
>> > cope quite well with this, but I'm wondering what the best way to do
>> > this is?
>> >
>> > I'm not sure I want both apps in the same folder, but I want some of my
>> > classes shared between the apps.
>> >
>> > Can anyone who's done this comment? Any articles I should read?
>> >
>> > Cheers, JC
>> >
>
Author
9 Jun 2006 7:46 AM
JDC
That makes sense. Thanks for the advice.

Kevin Spencer wrote:
Show quote
> Well, it's better if you include the class library project in the solution.
> You can include the same projects in many different solutions.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> Professional Chicken Salad Alchemist
>
> A lifetime is made up of
> Lots of short moments.
>
> "JDC" <jeremy.d.coll***@gmail.com> wrote in message
> news:1149708562.239975.145220@j55g2000cwa.googlegroups.com...
> > OK, let me check if I've got this right. I add a new class library
> > project to my web application solution, and move my shared classes into
> > that .dll project. Then I reference that .dll in my Windows Forms app?
> >
> >
> > Kevin Spencer wrote:
> >> Just put your business assemblies into the app folders of both
> >> applications.
> >>
> >> --
> >> HTH,
> >>
> >> Kevin Spencer
> >> Microsoft MVP
> >> Professional Chicken Salad Alchemist
> >>
> >> A lifetime is made up of
> >> Lots of short moments.
> >>
> >> "JDC" <jeremy.d.coll***@gmail.com> wrote in message
> >> news:1149698649.684690.290940@f6g2000cwb.googlegroups.com...
> >> > Hi all,
> >> >
> >> > I've got a situation where I need to create a Windows Forms application
> >> > as an admin tool which is driven by the same data as an ASP.NET
> >> > application.
> >> >
> >> > Luckily my 3-tier-ish design means my data and business objects will
> >> > cope quite well with this, but I'm wondering what the best way to do
> >> > this is?
> >> >
> >> > I'm not sure I want both apps in the same folder, but I want some of my
> >> > classes shared between the apps.
> >> >
> >> > Can anyone who's done this comment? Any articles I should read?
> >> >
> >> > Cheers, JC
> >> >
> >
Author
8 Jun 2006 12:51 AM
GhostInAK
Hello JDC,

Mmmmm... The GAC is yummy.

-Boo

Show quote
> Hi all,
>
> I've got a situation where I need to create a Windows Forms
> application as an admin tool which is driven by the same data as an
> ASP.NET application.
>
> Luckily my 3-tier-ish design means my data and business objects will
> cope quite well with this, but I'm wondering what the best way to do
> this is?
>
> I'm not sure I want both apps in the same folder, but I want some of
> my classes shared between the apps.
>
> Can anyone who's done this comment? Any articles I should read?
>
> Cheers, JC
>
Author
9 Jun 2006 7:48 AM
JDC
Tasty, perhaps, but a little complex to prepare. I think I'll stick
with the basic xcopy flavour for the time being :-)

Cheers, JDC

GhostInAK wrote:
Show quote
> Hello JDC,
>
> Mmmmm... The GAC is yummy.
>
> -Boo
>
> > Hi all,
> >
> > I've got a situation where I need to create a Windows Forms
> > application as an admin tool which is driven by the same data as an
> > ASP.NET application.
> >
> > Luckily my 3-tier-ish design means my data and business objects will
> > cope quite well with this, but I'm wondering what the best way to do
> > this is?
> >
> > I'm not sure I want both apps in the same folder, but I want some of
> > my classes shared between the apps.
> >
> > Can anyone who's done this comment? Any articles I should read?
> >
> > Cheers, JC
> >

AddThis Social Bookmark Button