Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Integration services

Integration services

Scheduled Pinned Locked Moved Design and Architecture
csswcfhelptutorialquestion
2 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sprague295
    wrote on last edited by
    #1

    We have to create some integration web services and were thinking about best practices. Should we favor flattening out the object model or be verbose (leave less room for interpretation/error)? Example 1. Complex Types – The employeeListItem would be used to provide summary information about the employees. The salaryEmployee and hourlyEmployee would be used to provide details. (‘Salary’ or ‘Hourly’) Example 2. Flatten objects – Just one type here all the details are provided in one object. When an employee is of type ‘Salary’ the ‘hourlyRate’ and ‘hoursPerWeek’ will be unused. (‘Salary’ or ‘Hourly’) Of course our objects are not as simple as this example but this general idea. So what would you guys favor 1 type or 3 types in this scenario?

    P 1 Reply Last reply
    0
    • S sprague295

      We have to create some integration web services and were thinking about best practices. Should we favor flattening out the object model or be verbose (leave less room for interpretation/error)? Example 1. Complex Types – The employeeListItem would be used to provide summary information about the employees. The salaryEmployee and hourlyEmployee would be used to provide details. (‘Salary’ or ‘Hourly’) Example 2. Flatten objects – Just one type here all the details are provided in one object. When an employee is of type ‘Salary’ the ‘hourlyRate’ and ‘hoursPerWeek’ will be unused. (‘Salary’ or ‘Hourly’) Of course our objects are not as simple as this example but this general idea. So what would you guys favor 1 type or 3 types in this scenario?

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      There's a lot more to this question than this. Is this object going to be used on its own, or is it going to be in a collection? Instinctively I'd go with a normalised version of the object, but it really does depend on a lot of other factors. In the end, you're going to have to do a bit of profiling and work out what the size of the object you are going to be passing over the wire is, and if it's acceptable to you. Unfortunately, there's no magic bullet that we can apply here. This one's up to you.

      Deja View - the feeling that you've seen this post before.

      My blog | My articles

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups