SOA Governance: An Enterprise View
Michael Poulin explains the necessity for SOA governance to ensure an Enterprise SOA's success, relying on concepts from the OASIS SOA Reference Model and Reference Architecture.
- SOA,
Tracking change and innovation in the enterprise software development community
Posted by Floyd Marinescu, Stefan Tilkov on Dec 26, 2006 09:00 AM
The debate about JSON vs. XML as a data interchange format has begun in blogspace, following JSON inventor and architect at Yahoo Douglas Crockford's talk at XML 2006 JSON, the fat-free alternative to XML (ppt). JSON is a data interchange format whose design goals were to be textual, minimal, and a subset of JavaScript; it supports two structures: objects (unordered collections of name/value pairs) and arrays (ordered sequences of values), as well as four simple types: strings, numbers, booleans, and null. Some of the main points Douglas raises for why JSON is well-suited as a data-interchance format were:Mike also commented his own opinion that he sees JSON as a good solution for browser-server communication, "but not a serious contender for interoperability purposes...will we see JSON substituting for XML in SOAP messages, RSS feeds, etc.? Will people store JSON persistently? That will require JSON-flavored APIs, schema/'data contract' languages, query/transformation languages, apps, etc. "
- JSON took a very different approach than XML in a couple of areas: there is no version number because the spec is declared stable forever; it takes a non-draconian “be liberal in what you accept and conservative in what you produce” philosophy to be friendly to supersets (such as YAML www.yaml.org, which is big in the Ruby world)
- The JSON folks are agitating for the infrastructure vendors to support a JSONRequest API http://www.json.org/JSONRequest.html that addresses some limitations in XmlHttpRequest for AJAX environments.
Mike also commented his own opinions that while XML isn't as elegant, it is more sturdy and flexible. JSON may look simpler now but it's own limitations will become apparent once people start testing it in new scenarios. The argument that JSON is better because it is more elegant "doesn't bode well for its ultimate success" if you consider historical examples of more elegant technologies that lost to more widely adopted heavier technologies, such as LISP vs. C.
- There seemed to be a lot more JSON fans than XML fans in that thread (maybe because the original post was just a wee bit inflammatory)
- JSON may be something like 100x faster to parse than XML in today's browsers (but I doubt very much if the best JSON parsers are anywhere near that much faster than the best XML parsers ... it would be interesting to know!),
- JSON parsing ends up with something akin to a typed "business object" rather than an untyped DOM tree
- To do that in XML requires yet another layer or two of cruft (a schema and a databinding tool)
- The bottom line argument for JSON comes down to elegance -- it does what is does simply and cleanly, and simply refuses to worry about many of the things that complicate XML such as metadata (attributes), comments, processing instructions, a schema language, and namespaces.
The sweet spot for JSON is serializing simple data structures for transfer between programming languages. If you need more complex data structures (maybe with some kind of schema for validation), use XML. If you want to do full blown RPC use SOAP or XML-RPC. If you just want a light-weight format for moving data around, JSON fits the bill admirably.What do we lose from not using XML? The ability to use XML tools. If you’re someone who breathes XSLT that might be a problem; if like me your approach when faced with XML is to parse it in to a more agreeable data structure as soon as possible you’ll find JSON far more productive.
XML co-inventor Tim Bray also commented that JSON exists "to put structs on the wire", whereas: with XML "it’s assumed that you might want to stream it in by the gigabyte, or load it into one of a many different in-memory data structures, or run a full-text indexer over the contents, or render it for human consumption, or, well, anything." Tim went on further to position when ot use one vs. the other:
Sam Ruby took a closer look at the bytes going over the wire; Robert Sayre noted two advantages: As JSON is not XML, it is a lot easier to embed XML or HTML content.
- Use JSON... if you want to serialize a data structure that’s not too text-heavy and all you want is for the receiver to get the same data structure with minimal effort, and you trust the other end to get the i18n right, JSON is hunky-dory.
- Use XML if you want to provide general-purpose data that the receiver might want to do unforeseen weird and crazy things with, or if you want to be really paranoid and picky about i18n, or if what you’re sending is more like a document than a struct, or if the order of the data matters, or if the data is potentially long-lived (as in, more than seconds) XML is the way to go.
Folks tried from the beginning to make XML right for data as well as documents, and even though I think the effort made XML more useful than its predecessors, I think it's clear folks never entirely succeeded. XML is much better suited to documents and text than records and data.While claims that JSON is re-inventing XML may be debateable, it is a fact that Douglas Crockford did invent a new keyboard layout. :)
Hibernate without Database Bottlenecks
Alternatives in the .NET Space: Open Source, Frameworks and Languages @ QCon SF Nov 19-21
Introducing application infrastructure virtualization and WebSphere Virtual Enterprise
Scale your applications without punishing your database
JProbe Freeware – Eclipse Plugin for efficient memory analysis and diagnosis
I think that both have their advantages. So why not support both? I wrote Jettison to support exactly this scenario with CXF. It is a StAX implementation which reads/writes JSON. This means you can write an XML web service and have a JSON web service with a little bit of extra configuration. It supports multiple ways of mapping JSON and XML including a simple 'mapped' convention and the BadgerFish convention as well. I have a full sample and walkthrough on my blog here if anyone is interested. There are also some more docs here for CXF JSON support.
Michael Poulin explains the necessity for SOA governance to ensure an Enterprise SOA's success, relying on concepts from the OASIS SOA Reference Model and Reference Architecture.
This article covers setting up a RichFaces portlet using JBoss Portlet Container and JBoss Portlet Bridge, deploying a RichFaces portlet, and RichFaces capabilities.
This article discusses scalability worst pratices including The Golden Hammer, Resource Abuse, Big Ball of Mud, Dependency Management, Timeouts, Hero Pattern, Not Automating, and Monitoring.
Obie Fernandez shares his experience selling consulting services for both Thoughtworks and Hashrocket and give tips how Ruby developers can work with clients.
Jeffries and Hendrickson derive Agile practices from the natural laws of software development. They don't just say "Be Agile!", but they explain why Agile practices make perfect sense.
Jinesh Varia talks about the architecture of one of Amazon's web services called Alexa. Jinesh explains how Amazon has reached scalability, performance and reduced costs for the Alexa service.
David Douglas and Robin Dymond discuss about companies adopting Agile, but don't go all the way, resulting in failure and rejection of it, and predictably having a negative impact on Agile's future.
Kenji Hiranabe talks about Toyota's development process of a new car. Kenji shares his experience meeting Nobuaki Katayama, former Chief Engineer at Toyota, and the lessons he learned from him.
1 comment
Reply