New Posts New Posts RSS Feed: DomainModel for Multiple Client
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

DomainModel for Multiple Client

 Post Reply Post Reply
Author
Vonzkie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 01-Aug-2011
Location: PH
Posts: 133
Post Options Post Options   Quote Vonzkie Quote  Post ReplyReply Direct Link To This Post Topic: DomainModel for Multiple Client
    Posted: 01-Aug-2011 at 11:31pm
Hi,

To give you an overview of our Company's project, we need to have a Data Access Layer
that can be distributed to different .NET Clients such as Silverlight, WPF, Winforms.

I was able to create an n-tier Windows Form application using Devforce by separating 
the DomainModel class with the WinForm Project and accessing it in 2-tier or n-Tier
mode by enabling the "Distributed" property on the App.Config.

Same as true with the Silverlight project, by using the Devforce Silverlight Template.

But what I want to accomplish is to reuse the DomainClass I created in the Windows forms 
Application and use it with my Silverlight project.

How can I do that? How can I generate the client-side generated code by just reusing 
the existing DomainModel class?

Hope you can help me guys.

Thanks,
Von
Back to Top
robertg View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 15-Mar-2011
Location: California
Posts: 87
Post Options Post Options   Quote robertg Quote  Post ReplyReply Direct Link To This Post Posted: 02-Aug-2011 at 2:19pm
Von,
 
I think that there are probably a number of ways to do this, any of which would be acceptable. This is how I would do so...
 
1) Open the solution that I'm going to use as the foundation for this.
2) Add a new project for the second client that I'm adding to the solution.
3) Change the default namespace for my new project to match the namespace for my old project.
4) Add a "Shared Code" folder to my new project.
5) Add a link to any code I want to share (Add -> Existing Item -> Select File -> Change from "Add" to "Add as Link"
 
I'm I'm correct that your main concern would be managing your code without having to sync multiple copies of your DomainModel class, or trying to keep track of homing it in multiple places, this should solve your problem. If you don't want to keep your projects in one solution, you should be able to add links to  your existing code files in other solutions, in the same way as 5) above.
 
Yours,
Robert
Back to Top
Vonzkie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 01-Aug-2011
Location: PH
Posts: 133
Post Options Post Options   Quote Vonzkie Quote  Post ReplyReply Direct Link To This Post Posted: 02-Aug-2011 at 7:51pm
Hi Robert,

Thanks for the reply. 
That answers my need. :)

Regards,
Von
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down