Presentation is loading. Please wait.

Presentation is loading. Please wait.

Component-based Software Engineering: XML

Similar presentations


Presentation on theme: "Component-based Software Engineering: XML"— Presentation transcript:

1 Component-based Software Engineering: XML
Matthijs van der Zon Fall 2003

2 Recapitulation Part One Part Two Part Three
Motivation – components and markets Part Two Foundation Part Three Component models and platforms 16/10/2003 XML

3 Overview “Wiring” standards Rise of XML
Difference with markup languages Structure of XML SOAP (simple object acces protocol) Web services 16/10/2003 XML

4 Object and component “wiring” standards
One standard All components connectable Never been achieved Phone jacks Electronical sockets 16/10/2003 XML

5 On the wire – the rise of XML
Introduced in 1998 By W3C (Worldwide Web Consortium) eXtensible Markup Language Succeeded where others failed: Intresting properties Standardization Proper timing 16/10/2003 XML

6 Properties of XML Define own markup Useful for representing data
Structured Semistructerd Not useful for bulk data New applications arise by day Browsers support displaying XML documents Syntactic lingua franca (common language) 16/10/2003 XML

7 Qualifier eXtensible Extensibility:
Simple syntax Namespaces Safely ignorance Leading “X” to all the acronyms in the XML family XML Documents XML Namespaces XML Schemas Etc. 16/10/2003 XML

8 Structure of HTML Example: <HTML> <HEAD>
<TITLE>Hello From HTML</TITLE> </HEAD> <BODY> <CENTER> <H1> Hello From HTML </H1> </CENTER> Welcome to the wild and woolly world of HTML. </BODY> </HTML> 16/10/2003 XML

9 Relationship between HTML and XML
Both based on SGML Standard Generalized Markup Language Both uses elements and attributes 16/10/2003 XML

10 Disadvantages of HTML and other markup languages
Provides not enough power Only web pages Consists of fixed number of tags HTML 4.0 about 100 to 120 Easy abounds by specifying how content of document is handled See RTF example 16/10/2003 XML

11 Structure of XML XML elements XML attributes Unstructured text
<tags> XML attributes Parameters of elements Unstructured text Properly quoted Example: <tag attr1=“val1” attr2=“val2”> 16/10/2003 XML

12 XML example <?xml version="1.0" encoding="UTF-8"?>
<DOCUMENT> <GREETING> Hello From XML </GREETING> <MESSAGE> Welcome to the wild and woolly world of XML </MESSAGE> </DOCUMENT> 16/10/2003 XML

13 Well-Formed XML Documents
Elements that can appear at top level Set of valid attributes Default value if attribute is omitted Allowed number of appearances Allowed to contain unstructured text (“CDATA”) 16/10/2003 XML

14 Valid XML Documents Check document is well formed
Document type definition (DTD) DTD specifies the correct syntax is not extensible XML validator Example: <!DOCTYPE DOCUMENT [ <!ELEMENT DOCUMENT (GREETING, MESSAGE)> <!ELEMENT GREETING (#PCDATA)> <!ELEMENT MESSAGE (#PCDATA)> ]> 16/10/2003 XML

15 XML Schemas More precise than DTD Example
specify the actual data types use schemas with multiple namespaces create simple and complex data types create list types and much more Example <DOCUMENT xmlns="x-schema:schema1.xml"> schema1.xml 16/10/2003 XML

16 XML Namespaces Grouping set of names Prevents tag collision Example
xmlns:alias”<urn>” (universal resource name) 16/10/2003 XML

17 XML Namespaces (example 1.1)
<library xmlns:book=" <book> <title> Earthquakes for Lunch. </title> </book> </library> 16/10/2003 XML

18 XML Namespaces (example 1.2)
<book:library xmlns:book=" <book:book> <book:title> Earthquakes for Lunch. </book:title> </book:book> </book:library> 16/10/2003 XML

19 SOAP (simple object access protocol)
Describe addressee of an invocation Encode data types into invocation messages Define what parts of a message must be understood or can be ignored 16/10/2003 XML

20 SOAP example <SOAP-ENV:Envelope> <SOAP-ENV:Body>
<xmlns:n= <n:getName> <n:customerID id=“ ”/> </n:getName> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 16/10/2003 XML

21 XML web services Offers computational services Examples:
WSDL (Web Services Description Language) UDDI (Universal Description, Discovery, and Integration WSFL (Web Service Flow Language) 16/10/2003 XML

22 Which way? Three major approaches
The OMG: CORBA The Sun way: Java, JavaBeans The Microsoft way: COM, .NET Web standards intergrates all families 16/10/2003 XML


Download ppt "Component-based Software Engineering: XML"

Similar presentations


Ads by Google