locked
Newbie basic design question RRS feed

  • Question

  • Hi,

    I want to create an application that targets both website and smartphone users.  Because I only want to do the backend work once I want to use a webservice with which the clients will communicate.  I want to use SOAP, REST or ...  to communicate from the service => client (be it website or smartphone).  The database backend is SQL Server.

    What I have at this time is the database design and the entity model and the generated model that goes with is.

    My next question is: where do I go from here?  Do I need to turn off the autogenerated model in the entity model, do I need to use POCO?  Do I start on the WCF side?

    I already created a WcfDataService and this exposes everything to the outside which is nice but I need security on this as well: only logged in users can see their own orders, ...

    I hope my questions are too generalistic, it's just a lot of new technology for me to experiment with and find my way in.

    Thanks in advance.

    Tuesday, September 6, 2011 12:10 AM

All replies

  • Hi Let me take shot at the answer: - To start out with you have the database modeled and set up which is good - Now coming to OR mapping scenario - Entity Framework is one of the solution which is the easiest available as of now on the MS Stack. EF allows you to do 2 way of programming - DB First meaning you have the DB ready, use EF to model the entities based on the DB or Code First meaning, you hand craft the entities and the EF creates the database for you at runtime if its not there. Code first gives you granular control over how you want things to be. It allows you to control the db context and the entities you want to expose. - Having finished the modeling stuff now its time to expose the data to the outside world. You have couple of choices here. You can have a WCF services which aheres to WS-* specification or create a WCF REST Sevice which is based on the REST pattern (without much SOAP overhead plain HTTP communication) and the new breed and my favorite OData or Open Data Protocol. You can create OData in .NET using WCF Data Services technology - Having finished the service part now you have the authentication and authorization part. There are many ways in which the authentication can be achieved. Here is one of the articles that i wrote which aggreagtes all the authentication related posts from WCF Data Services team. Here is the link : http://kashyapas.com/odata/odata-and-authetication/ Hope i was able to provide some insights to your question here. regards Lohith http://about.me/kashyapa @kashyapa PS: If you think this answered your question please mark it as answer.
    regards kashyapa
    Tuesday, September 6, 2011 11:43 AM