Architecture of WCF application???? RRS feed

  • Question

  • Hi,
         I am developing WCF windows application which is going to be stand alone application......

    i have designed the architecture like this.

    Main application--------------output willl windows application.
    Client application------------output will be class lib project..which will have all UI design and forms n all.
    ControlLib---------------------Containing all the controls and user controls.
    WCF service application-----Here all the services....

    Now i would like to know where should i keep the DataAccess layer class which will contain connection string etc n all????

    i believe business logic will be implemented in services....

    So should i keep the Data access layer class in WCF service application???? make that also service????

    Basically i am new to WCF and i am trying to learn WCF through real time development...

    So plz guide me how to go about it???

    Friday, June 12, 2009 5:26 AM

All replies

  • The projects you mentioned, other than WCF Service Application, seems Presentation layer projects.


    Here is the detail how it can be designed on server side:

    1. Interfaces Layer (This project will have all the service contracts. Only interfaces)
    2. Data Entity Layer (Here you can create your own custom data entities, data contracts, OR use Entity Framework)
    3. Facade Layer (Implement Service Contracts and delegates calls to Business Objects Layer)
    4. ServiceHost Layer (can be window service)
    5. Business Objects Layer (Here you can put all the business logic)
    6. Data Access Layer (Database interaction code comes here)

    Friday, June 12, 2009 3:08 PM
  • Hi Attiq.

          Thanks for your suggestion..I need one favor if it is possible for you. Can you just make one small project with one form and one text and combox and button????

    i am getting confused as i see the articles on internet then i see they do all the data access and contract implementation in WCF service module only.

    Plzz it would be really great help to me...

    Saturday, June 13, 2009 5:08 AM
  • n my email is abhi0410@gmail.com.
    in a case if you are sending.

    Saturday, June 13, 2009 5:21 AM
  • Hi Attiq,

    Nice break down of the layers. I wonder in the presence of LINQ and Entity Frame work, do we still need Data Access Layer? To me, LINQ to SQL is basically merges the Data Access Layer and the business logic layer.

    Here is a nice article that talks about how to create WCF solution file. You can down load the code too for a sample project.


    Suresh Jakka.
    Monday, June 22, 2009 6:26 PM
  • Hi Suresh
                Thanks a lots of the for the link...But i am not able to find the link where i can download the code sample.
    Could you jus guide me??

    Wednesday, June 24, 2009 8:15 AM
  • Hi Abhishek,

    I just tried sending the code to your gmail account but it bounced...

    Wednesday, July 15, 2009 12:33 AM

  • Hi Suresh.my email id is abhi0410@gmail.com

    its Zero and not 'O'.....i mean not alphabet..

    otherwise try on this abhishek.ranjan750@gmail.com

    Plz do try to send again.
    Wednesday, July 15, 2009 6:49 AM
  • Abhi,

    I just sent that to your email and let me know if you receive it...


    Wednesday, July 15, 2009 8:10 PM
  • hi Suresh.
                    Got your sample...Thanks....

    i did see 3 demo...n i could understand why your wrote BadClient and Badclient service.... :-)

    In completedemo

    you have written proxy class in the different class lib....How to generate that class????

    OR is it better the proxy class by right click on Reference and add service reference????

    your code do gives me good idea....i will try to add the business logic layer and Data Access Layer too for accessing the Database...

    if possible do guide me there too..

    Plus when i make client as startup project and run and click the button on form to run then i get this error.

    "Could not find endpoint element with name '' and contract 'WcfTraining.Service.IGreetings' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element."

    Thursday, July 16, 2009 9:20 AM