locked
Which design strategy is best suited? RRS feed

  • Question

  • You create an application by using MS Visual studio .NET 2008 and .NET framework 3.5
    Component will return custom business objects. We plan to develop a design strategy that meets following
    requiremtns.
    The component can be consumed by client applications by using minimum amount of code

    The least amount of network bandwidth is consumed.
    We need to implement the design strategy by using the minimum amount of development effort.

    Which option should we use?

    A. Develop the component as Webservice. Return business objects as XML.
    b. Develop component as WCF. Return business objects as serialized binary objects
    c. Develop component as WCF. Return business objects as Javascript object notation objects
    d. develop component as Webservice. Return the business objects as strings that contain the values
        of the properties concatenated and separated by a comma.

    Monday, April 23, 2012 7:19 PM

Answers

  • Given your scenario I say:

    1 - Webservices should be considered as legacy, WCF is the way
    2 - Develop a WCF REST Service that returns your Business Objects as JSON

    Hope it helps,
    Fernando

    Tuesday, April 24, 2012 2:05 AM
  • Agree with Fernando.

    In addition, since bandwidth optimization is a prime requirement for you you should also look at using use WCF Compression. An example can be found at http://msdn.microsoft.com/en-us/library/cc138373(v=vs.90).aspx

    Tuesday, April 24, 2012 2:52 PM
  • c. Develop component as WCF. Return business objects as Javascript object notation objects

    A RESTful style WCF service using the webHttpBinding and returning JSON is going to be the best in terms of network performance. JSON has smaller packets than XML (roughly half the size if you view Fiddler), easier to work with Ajax clients, and is more efficient to parse than XML.

    Thank you,


    Thursday, April 26, 2012 8:05 PM

All replies

  • Given your scenario I say:

    1 - Webservices should be considered as legacy, WCF is the way
    2 - Develop a WCF REST Service that returns your Business Objects as JSON

    Hope it helps,
    Fernando

    Tuesday, April 24, 2012 2:05 AM
  • Agree with Fernando.

    In addition, since bandwidth optimization is a prime requirement for you you should also look at using use WCF Compression. An example can be found at http://msdn.microsoft.com/en-us/library/cc138373(v=vs.90).aspx

    Tuesday, April 24, 2012 2:52 PM
  • c. Develop component as WCF. Return business objects as Javascript object notation objects

    A RESTful style WCF service using the webHttpBinding and returning JSON is going to be the best in terms of network performance. JSON has smaller packets than XML (roughly half the size if you view Fiddler), easier to work with Ajax clients, and is more efficient to parse than XML.

    Thank you,


    Thursday, April 26, 2012 8:05 PM