opinions on architecture for smart client project RRS feed

  • Question

  • I would really appreciate any best practice tips on how to architect a small learning project I've taken on.  In order to learn all of this cool stuff (read WPF, WCF, and Linq) I'm taking a small pre-existing LOB project and decided to re-code it into a WPF smart client offline app.  I'm envisioning it as follows: UI uses WPF which connects to a WCF service.  The WCF service will hold a reference to a class library (i.e. dll) that contains all of the business logic.  All of the methods in the WCF service will essentially be wrapper methods around their related dll methods. 


    Thinking here is that by making the WCF service just a gateway to the dll business logic, I can also place the dll on the client for offline support and still have access to all business logic when offline (for maintenance I would be updating the client dll whenever its server cousin is updated using the click once automatic updates).  The class library will use Linq to Sql for interacting with the database.  When the app is offline, the user will be limited to only being able to create new records that will be saved to a local xml file (via Linq to Xml) and of course whenever the app re-establishes a network connection, all records in the xml file would be submitted to the database (envisioning something like an OnNetworkConnectionEstablised event which would check for these files and delete the files after they have been submitted to database). 


    So, is this a feasible architecture.  Any comments or tips would be greatly appreciated.  Thanks for your help!

    Monday, August 27, 2007 8:09 AM

All replies

  • I have been working in a design similar than yours, but with some differences.

    First, I haven’t decided yet if I’m going to use Linq to Sql or the Entity Framework (EF) as the data access technology. In my opinion Linq is simpler but the EF has more enterprise features.

    Second, instead of using Linq to XML in the client side, my idea is to use SQL Express in the client, having the exact same db in both sides, client and server. A secondary process would take care of the databases synchronization when the connection is reestablished. In this approach I can have the same DAL-BLL code in both sides, and WCF will allow me to choose different communication protocols between the client and the server side.


    Good luck!

    Saturday, September 22, 2007 8:13 PM