New Posts New Posts RSS Feed: n--tier sample
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

n--tier sample

 Post Reply Post Reply
Author
mjwills View Drop Down
Newbie
Newbie


Joined: 27-Apr-2009
Posts: 2
Post Options Post Options   Quote mjwills Quote  Post ReplyReply Direct Link To This Post Topic: n--tier sample
    Posted: 30-Apr-2009 at 7:22pm

Thanks - I'll have a play with that today.

Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 28-Apr-2009 at 10:24am
mj:

The "Adding and Deleting Entities" learning unit in the 200 Intermediate series includes insert / delete / update functionality with a WinForms front end.

It can be run n-tier with minor adjustments.  You can use the "N-Tier Configuration Starter" tool on the Start / IdeaBlade DevForce / Tools menu to create the client- and server-side configuration files, and to create folders with the files needed for client- and server-side deployment. Then you just launch the ServerConsole.exe program in the Server folder to start the BOS, and you're running n-tier on a single machine (BOS and client app in separate processes).

The part 2 tutorial in the "LINQ, Entity SQL, Deployment Tester", also in 200 Intermediate, steps you through the use of the n-tier configuration starter.

But note that all DevForce apps are logically n-tier, and standard procedure is to retrieve entities to the local cache, modify them locally as desired, create new entities locally, and ultimately save to a back-end datasource.  For this reason, any of our sample solutions can be deployed n-tier with the minor adjustments outlined above.

For new entities created locally, DevForce supplies temporary key values and performs primary and foreign key fixup at save time.  When you delete an entity locally, its DevForce EntityState gets set to EntityState.Deleted; when you then save to the back-end datasource, the deletion is consummated there, and the local entity's EntityState gets set to EntityState.Detached.   It subsequently gets treated as if it did not exist by all client-side operations.

Please let us know if you have further questions.
Back to Top
mjwills View Drop Down
Newbie
Newbie


Joined: 27-Apr-2009
Posts: 2
Post Options Post Options   Quote mjwills Quote  Post ReplyReply Direct Link To This Post Posted: 27-Apr-2009 at 2:25am
My current project (soon to finish) involved using Entity Framework over WCF. We ran into some issues with this approach (primarily around complexity involved with handling detached vs attached objects) so I thought I'd have a look at DevForce EF / WinClient.
 
Can someone point me to a simple n-tier sample application? Something that supports pulling back multiple instances of an entity (for display) and then insert / delete / update functionality. This would be very helpful in investigating whether the kind of issues we had with vanilla WCF / EF would be overcome with DevForce.
 
I recently watched IdeaBlade's Silverlight video from MIX09 - that kind of sample would be perfect (but with WinForms (preferred) or WPF client, accessing middle tier over WCF, with middle tier accessing SQL Server backend). Note that what it 'looks' like doesn't matter - but it does need to be reasonably easy for me to change / fiddle with (to allow some level of comparison with our existing approach).
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down