Coffeehouse Thread

8 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Should I be using WCF?

Back to Forum: Coffeehouse
  • User profile image
    spivonious

    Brand new project, building a web site to expose some read-only data to clients.

     

    Which is "better"? .NET dll in web site's bin folder, or web site communicating with a locally hosted web service? I can't see us ever wanting to consume the functions/objects with anything other than .NET.

     

    Expandability and maintainability are the big ideas for this project.

  • User profile image
    vesuvius

    You can host the same WCF service in IIS, WAS, Windows Service or even a console application.

     

    The decision of what to choose (typically IIS or WAS) depends on the clients and how they need to access the service. If the clients are in a WAN then they typically will be using the HttpBinding (so will have to be IIS) but if they are on a LAN ( like you appear to suggest) then they will be using a NetTcpBinding so a console application will get you up and running in no time.

     

    If you are going the datsets route then this video should help. That said, WCF RIA services is one of the best productivity tools developed from Microsoft for a while, as it greatly simplifies the tedium of creating and maintaining services, but that is Silverlight only at present, though I think WPF support is due in version -> next

  • User profile image
    turrican

    WCF is pretty cool to use.

     

    If you absolutely just need to fetch data, you could just fetch them by some .ASHX as XML perhaps!?

  • User profile image
    Dr Herbie

    As much as WCF will give you the flexibility to change/expand at a later date, I would call YAGNI on this one (You 'Ain't Gonna Need It).

     

    If you want to play with WCF as a learning experience, go ahead, but if you're sticking to what the customer needs then just use a .NET DLL in the web app.  You might want to investigate what's required to convert the DLL to a WCF service at a later date and keep that in mind while writing it, but that's as far as you should go at the moment to meet the customer's needs.

     

    If it's a paying client, then expecting them to pay for over-engineering might be considered unprofessional (although I don't know the full context so it's a mild observation rather than an accusation).

     

    Herbie

     

  • User profile image
    spivonious

    Some more info:

    The main business of the company is environmental/pharmaceutical laboratory testing.

     

    Web server and DLL will be on the same LAN. Clients will access over the web. They've already paid for lab work; this is a free service for them to get their results/track their samples. Normally they'd be waiting until the entire group of samples was finished and results emailed and/or snail-mailed out.

     

    Are there any security bonuses to using WCF over a local DLL?

     

    Doc - is that pronounced "yanni"? lol  The "paying client" is the company paying my salary. I have a good understanding of how WCF works, but I haven't created anything real with it.  I'd guess it would add on a couple of weeks to a ~3-6 month project.

  • User profile image
    Dr Herbie

    spivonious said:

    Some more info:

    The main business of the company is environmental/pharmaceutical laboratory testing.

     

    Web server and DLL will be on the same LAN. Clients will access over the web. They've already paid for lab work; this is a free service for them to get their results/track their samples. Normally they'd be waiting until the entire group of samples was finished and results emailed and/or snail-mailed out.

     

    Are there any security bonuses to using WCF over a local DLL?

     

    Doc - is that pronounced "yanni"? lol  The "paying client" is the company paying my salary. I have a good understanding of how WCF works, but I haven't created anything real with it.  I'd guess it would add on a couple of weeks to a ~3-6 month project.

    YAGNI is an 'extreme programming' mantra (I hate the term 'extreme programming', but a lot of the philosophies makes sense).

     

    So if you use WCF you're going to cost your employers 2 weeks pay for which they gain .... ?

    If you can justify concrete, immediate gains for the cost then use WCF, if not then go with the simplest method to make it work.

     

    Herbie

     

     

  • User profile image
    vesuvius

    spivonious said:

    Some more info:

    The main business of the company is environmental/pharmaceutical laboratory testing.

     

    Web server and DLL will be on the same LAN. Clients will access over the web. They've already paid for lab work; this is a free service for them to get their results/track their samples. Normally they'd be waiting until the entire group of samples was finished and results emailed and/or snail-mailed out.

     

    Are there any security bonuses to using WCF over a local DLL?

     

    Doc - is that pronounced "yanni"? lol  The "paying client" is the company paying my salary. I have a good understanding of how WCF works, but I haven't created anything real with it.  I'd guess it would add on a couple of weeks to a ~3-6 month project.

    The more I hear of this the more I think that the ADO.NET Data service (I think they have changed the name) is more the best fit

     

    Typically you use it to access static/readonly data like a RSS feed without all the bells and whistles of WCF. It almost seems like you need a RSS feed with the updated lab results, then consuming that on the client machines.

     

    Do note that WCF is now a bigger library than windows forms, it is insanely powerful but will take you quite a bit of time to master if you need to include things like logging/instrumentation/security and so on, so I would try to take the easiest "less" technologically advanced solution.

  • User profile image
    spivonious

    Dr Herbie said:
    spivonious said:
    *snip*

    YAGNI is an 'extreme programming' mantra (I hate the term 'extreme programming', but a lot of the philosophies makes sense).

     

    So if you use WCF you're going to cost your employers 2 weeks pay for which they gain .... ?

    If you can justify concrete, immediate gains for the cost then use WCF, if not then go with the simplest method to make it work.

     

    Herbie

     

     

    Yep I'm looking for justifications for WCF, or really any service-based architecture (web services, .NET remoting, etc.), or if just using a local-to-the-webserver DLL is "good enough". I'd love to learn WCF but my employer doesn't like throwing money away. (go figure!)

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.