Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 95063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:35:58+00:00 2026-05-10T23:35:58+00:00

I recently asked this question: Expose XML or Objects – thanks all for the

  • 0

I recently asked this question: Expose XML or Objects – thanks all for the responses.

One point to clarify.

  • The API will always be accessed remotely (i.e. as a service), most probably via webservices or WCF.

I agree that in theory a strongly typed API exposing objects as the inputs/outputs is the right way to go. However, I feel that there is still an argument to be made for exposing XML. As I see it the reasons for using XML are:

  1. The business rules can be written by business analysts in Schematron.
  2. The interface is weakly typed, but as soon as it is called the data can be validated against data and business rules.
  3. The service’s implementation will be simpler. There won’t be any need to create an domain object model.
  4. The XML schema is already defined (we have a data dictionary of schema).
  5. Using web services technology means that an XML based API will not need to change as new car ‘types’ are added, e.g.

    void AddNewCar( string newCarXml )     string[] GetCars( /* some query conditions */ ) 

    If we used an object based API then adding a new type would require a new query method defining the possible derived types that could be returned (see extending web services). Updating the web service like this would require this services and all existing clients to be rebuilt and redeployed.

What does an object based API give us? A strongly typed declarative interface. It does not provide any more abstraction than XML (XML is itself an abstraction). What does the object based API cost? It costs an entire set of domain objects which will need business rules and data validation.

So, what is my question? Give me an un-defeatble, unarguable reason why I should go with objects.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:35:59+00:00Added an answer on May 10, 2026 at 11:35 pm
    • Objects can perform better (thinking binary serialization here).
    • Objects can have stronger simple type validations.
    • Objects allow you to put the validation and business rules closer to the data structure definition.
    • Objects by their nature allow you to write simpler business rules and validation, since much of that is embedded in the object definition itself.
    • Objects can also define behaviors.
    • .Net makes it simple to turn Objects into Xml and back again via serialization, giving objects most of the same benefits as xml.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 104k
  • Answers 104k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can also use the Scheduled Tasks feature (on the… May 11, 2026 at 8:38 pm
  • Editorial Team
    Editorial Team added an answer Usually you will create two DLLs: One that contains an… May 11, 2026 at 8:38 pm
  • Editorial Team
    Editorial Team added an answer DIVs, unstyled, will always fill 100% of the parent element.… May 11, 2026 at 8:38 pm

Related Questions

I recently asked this question: Expose XML or Objects - thanks all for the
I have been asked recently to produced the MIPS (million of instructions per second)
I recently asked this question and worked out that the reason a single email
I recently asked this question: Compiler error referencing custom C# extension method Marc Gravell
I recently asked this question: Dynamically Query a Database to check for value And

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.