Thursday, June 22, 2006

My SOA mind map

My way to remember what SOA is about

SOA Basic Design Principles (ASIG)

  • Abstraction – Reduce and factor out details to focus on higher conceptual representation of an object (OO principle)
  • Standardization – The service need to use open standards and communicate in a formulized way
  • Independence – Each service needs to be a black box! The service will run independent of each other and could be deployed on different environments.
  • Generalization – The service needs to be fine grained enough to be efficient but course grained enough to be reusable.


SOA Features (FRISC)

  • Flexibility – Loosely coupled services are very flexible as they can be used in a number of systems
  • Reusability – The holy grail of system development. The ability to develop application components in a way that they can be reused by other applications.
  • Interoperability – Standardized way of communication between business services.
  • Scalability – Services are independent of each other and so can easily be scaled individually where required.
  • Cost efficient – Reuse of existing business services reduce need for duplication and development and testing in new applications that re-uses these services (e.g. Service to get Postcodes)

Tuesday, June 06, 2006

JAXP and JAXB

6/6/6 The number of the beast -- Get to know JAXB.

The introduction
Java Architecture for XML binding (Article, Sun March 2003)

My short version of this article

JAXP - Java API for XML Processing
  • Provides SAX and DOM
    • Used to scan XML documents and break it up to pieces that are made available to the application.
  • Differences Between SAX and DOM
    • SAX starts from the beginning of the document and passes each piece to the application as it finds it. Nothing is stored in memory.
    • DOM creates a tree of objects in memory that hte application can navigate through and access and manipulate data.
    • Difference - SAX cannot update data to the XML file but in DOM we can.
JAXB - Java Architecture for XML binding
  • Another Java API that can make it easier to access XML documents
  • Check out the example (Accessing an XML Document, JAXP and JAXB) or just be happy with the fact that: "Using JAXB instead of JAXP, there is no need to create and use a parser using and no need to write a content handler with callback methods. What this means is that developers can access and process XML data without having to know XML or XML processing".
  • Using JAXB, you would:
    • Unmarshal the document into Java content objects. The Java content objects represent the content and organization of the XML document, and are directly available to your program.
  • What is a schema?
    • A schema is an XML specification that governs the allowable components of an XML document and the relationships between the components.
  • JAXB requires that the XML document you want to access has a schema, and that schema is written in the W3C XML Schema Language
  • Binding a schema means generating (using a binding compiler) a set of Java classes that represents the schema. The binding compiler generates a set of interfaces and a set of classes that implement the interfaces. (Eg: books.xsd would generate BookType.java, BookTypeImpl.java etc.)
  • Unmarshalling an XML document means creating a tree of content objects that represents the content and organization of the document. The content objects are instances of the classes produced by the binding compiler. See example (how to unmarshal the XML document)