Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Web services + design question

Options
  • 08-01-2008 4:57pm
    #1
    Registered Users Posts: 610 ✭✭✭


    Hi all,

    Have a problem at the moment with a new project i have started. System is a filing management application. Back end sql server 2005. Database design mostly done at this moment in time. the system is to be delivered over the web via hand held devices (windows mobile application) and pcs (asp.net). Both have uses. Pcs will be for searching and admin work. hand helds will be for check in and out files and dealing with requests and sign off on file acceptance.

    My problem is that im trying to implement a layer where all database access is via web services to ensure compatibility across display methods. No real experience with web services so not sure if i should be implementing a single web service with each method returning datasets when dealing with objects over primitive types? or creating a class for say a File object and passing back arrays of these objects?

    What would be the correct or preferred way of implementing this keeping in mind caching and response times.


    Any help or comments welcome.

    Cheers

    N.


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    If all you consumers are going to be .Net than I would go with datasets, if they're not .Net then you may have to parse the XML returned with each dataset yourself which could be a headache.


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    As Phil said, use Datasets for all your returns.

    From there you can pass that datasets and put them into your business objects. Your datalayer should just deal in datasets not complex types.

    With your WS, just have 1 web service and different method calls. You can always overload them if need be. That way its just 1 reference that needs to be updated to have all your data access

    You can implement caching on your web service as well, if you so need. For DB access look at connection pooling and MARS if you are using SQL 2005. You can also use HTTP endpoints if you so desire, but thats another thing.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    Like the others said, use datasets instead of complex types. And IMHO it's fine to use primitive types in many cases aswell, for e.g. if you want to get the status of a file, just pass back the status id, not a whole dataset containing the whole file row.

    And try to just use a single web service. Remember your web service class can be just an interface to the functionality, each method can draw on functionality in other classes


  • Registered Users Posts: 610 ✭✭✭nialo


    Cheers for the replies. was talking to a few ppl and data transfer object were mentioned as the preferred way of returning objects as appose to coding datasets..

    for the moment it looks like this application is purely .net based so think ill go with the datasets cause its easier! :)

    Thanks for the advice..

    N.


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    Download the Web Services software factory and the Enterprise Application blocks..

    They will shorten your development time


  • Advertisement
  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    ^^ what Ginger said.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    And consider the web client software factory for your ASP.Net interface, I've been using it a bit lately and it's pretty cool.

    I'm not sure but I believe there's a mobile client software factory too. Could be worth looking into.


  • Registered Users Posts: 610 ✭✭✭nialo


    Ya im currently using the enterprise application block for the current framework we have. but will look into the others.


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    There is a Smart Client one as well as the Web Apps one

    http://msdn2.microsoft.com/en-ie/practices/default(en-us).aspx


Advertisement