1 / 84

Basic WEB Architecture

Basic WEB Architecture. Data Driven WEB Architecture. Recent WEB Applications Architecture. Client Tier. Service Tier. The Web as a Platform for Running Applications. Service Oriented Application (SOA). Service Oriented Application (SOA). Service Oriented Application (SOA).

colin
Télécharger la présentation

Basic WEB Architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Basic WEB Architecture

  2. Data Driven WEB Architecture

  3. Recent WEB Applications Architecture

  4. Client Tier

  5. Service Tier

  6. The Web as a Platform for Running Applications

  7. Service Oriented Application (SOA)

  8. Service Oriented Application (SOA)

  9. Service Oriented Application (SOA)

  10. Service Oriented Application (SOA)

  11. Service Oriented Application (SOA)

  12. Front-End

  13. Front-End

  14. Service Oriented Application (SOA)

  15. Middle Layer – Data Link

  16. Service Oriented Application (SOA)

  17. Back-End- Server Site

  18. GROUP DISCUSSION WHATTO DO?

  19. What is XML? • eXtensible Markup Language, is a specification for creating custom markup languages • W3C Recommendation • Primary purpose is to help computers to share data • XML is meta-language. This means that you use it for creating languages. • XML is an extensive concept.

  20. XML Document • Every XML-document is text-based • => sharing data between different computers! • => sharing data in Internet! • => platform independence!

  21. Binary vs. Text • Problems with Binary format • Platform depence • Firewalls • Hard to debug • Inspecting the file can be hard • Since XML is text-based, it does not have the problems mentioned above. • What are the disadvantages in text format?

  22. XML Doc Advantages • Easy data sharing, text documents are readable between any device. • Documents can be modified with any text editor. • Possible to understand the contents of the xml-document just by looking at it with text editor. • Easy to manipulate via programming languages • Two levels of correctness: Well formed and Valid.

  23. .doc – file format Mac OS X Since .doc is closed binary-format, there are very few alternatives for word processors that fully support the doc – file format Windows MS Word 2000 0101011010101010001010 1010101110101010001011 1010101110101010110101 1110101010101010101010

  24. .docx – file format (Office Open XML) Mac OS X Hopefully in the future there will be loads of free programs that support this new open and easy access file format Windows MS Word 2007 <xml> <heading1>title</heading1> . . </xml> Now the format is open and it's much easier to access

  25. SGML vs. XML SGML: Standard Generalized Markup Language XML OOXML (.docx) MathML (.mml) XHTML (.xhtml) HTML (.html)

  26. XML – Meta Language • XML is meta language, which you can use to create your own markup languages. • There are several XML Markup Languages made for different purposes • All the languages have common xml-rules • Languages: XHTML, OOXML, Open Document, RSS, SVG, SOAP, SMIL, MathML... • List: • http://en.wikipedia.org/wiki/List_of_XML_markup_languages

  27. XHTML - Example <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Minimal XHTML 1.0 Document</title> </head> <body> <p>This is a minimal <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> document.</p> </body> </html>

  28. SVG - Example <?xml version="1.0"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red"/> </svg>

  29. MathML (Open Office) <?xml version="1.0"?> <!DOCTYPE math:math PUBLIC "-//OpenOffice.org//DTD Modified W3C MathML 1.01//EN" "math.dtd"> <math:math xmlns:math="http://www.w3.org/1998/Math/MathML"> <math:semantics> <math:mrow> <math:mi>x</math:mi> <math:mo math:stretchy="false">=</math:mo> <math:mfrac> <math:mrow> ... </math:mrow> <math:annotation math:encoding="StarMath 5.0">x = {-b +-sqrt{b^{2}-4{ac}} } over {2 {a}} </math:annotation> </math:semantics> </math:math>

  30. RSS 2.0 - Example <?xml version="1.0"?> <rss version="2.0"> <channel> <title>W3Schools Home Page</title> <link>http://www.w3schools.com</link> <description>Free web building tutorials</description> <item> <title>RSS Tutorial</title> <link>http://www.w3schools.com/rss</link> <description>New RSS tutorial on W3Schools</description> </item> <item> <title>XML Tutorial</title> <link>http://www.w3schools.com/xml</link> <description>New XML tutorial on W3Schools</description> </item> </channel> </rss>

  31. XML Editors • XML Spy • EditiX • Microsoft XML Notepad • Visual XML • XML Viewer • Xeena • XML Styler, Morphon, XML Writer…

  32. Rules that Apply to Every XML-Document WELL FORMED XML - DOCUMENT

  33. Correctness • There are two levels of correctness of an XML document: • Well-formed. A well-formed document conforms to all of XML's syntax rules. • Valid. A valid document additionally conforms to some semantic rules. • Let's first look at the XML's syntax rules (1).

  34. Simple Generic XML Example <?xml version="1.0" encoding="utf-8" standalone="yes"?> <presentation> <slide number="1"> <name>Introduction to XML</name> <contents>XML is ...</contents> </slide> </presentation>

  35. XML-Declaration • XML-declaration is optional in XML 1.0, mandatory in 1.1. • Recommendation: use it. • Version: 1.0 or 1.1 • Encoding: character encoding, default utf-8 • Standalone: • is the xml-document linked to external markup declaration • yes: no external markup declarations • no: can have external markup declaration (open issue..) • default: "no"

  36. Comparing Declarations <?xml version="1.0" encoding="utf-8" standalone="no"?> <presentation> <slide> <name>Introduction to XML</name> <contents>XML is ...</contents> </slide> </presentation> <?xml version="1.0"?> <presentation> <slide> <name>Introduction to XML</name> <contents>XML is ...</contents> </slide> </presentation> Same Declaration

  37. Element vs. Tag vs. Attribute • Element consists of start tag, optional content and an end tag: • <name>Introduction to XML</name> • Start tag • <name> • Content • Introduction to XML • End tag • </name> • Start tag may have attribute • <slide number="1">

  38. Rules about Elements • Only one root - element • Every element contains starting tag and an ending tag • Content is optional: Empty element • <x></x> <!-- same as --> • <x/> • Tag – names are case-sensitive: • <X></x> <!-- Error --> • Elements must be ended with the end tag in correct order: • <p><i>problem here</p></i> <!– Error 

  39. Rules about Attributes • XML elements can have attributes in the start tag. • Attributes must be quoted: • <person sex="female"> • <person sex='female'> • <gangster name='George "Shotgun" Ziegler'> • <gangster name="George &quot;Shotgun&quot; Ziegler">

  40. Naming Tags • Names can contain letters, numbers, and other characters • Names must not start with a number or punctuation character • Names must not start with the letters xml (or XML, or Xml, etc) • Names cannot contain spaces

  41. Well-Formed XML • XML document is well-formed if it follows the syntax rules. • XML document must be well-formed! • it's not an xml-document, if it does not follow the rules..

  42. Is this Well-Formed XML Document? <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Minimal XHTML 1.0 Document</title> </head> <body> <p>This is a minimal <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> document.</p> </body> </html>

  43. Is this Well-Formed XML Document? <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Minimal XHTML 1.0 Document</title> </head> <body> <jorma>This is a minimal <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> document.</jorma> </body> </html>

  44. Defining the Structure for XML documents VALID XML DOCUMENT

  45. Valid XML • XML document is valid if • 1) It is well formed AND • 2) It follows some semantic rules • XML document is usually linked to an external file, that has semantic rules for the document. • The file can be dtd (.dtd) or schema (.xsd) • Semantic rules? • Name of tags, order of elements

  46. DTD Linking Rules for XHTML elements (order, names, etc) <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Minimal XHTML 1.0 Document</title> </head> <body> <p>This is a minimal <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> document.</p> </body> </html>

  47. DTD Linking Defines the structure, tag names and order for all xhtml - documents W3C has created XML-language "XHTML" by defining it's rules in DTD.

  48. Is this valid XML Document? <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Minimal XHTML 1.0 Document</title> </head> <body> <jorma>This is a minimal <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> document.</jorma> </body> </html> • There is no DTD! What language is this? MathML? SVG? XHTML? • Assuming this is XHTML, what version of XHTML? Transitional? Strict? • Assuming this is XHTML strict, does "jorma" – tag belong to XHTML Language?

  49. Invalid XHTML-document <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Minimal XHTML 1.0 Document</title> </head> <body> <jorma>This is a minimal <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> document.</jorma> </body> </html>

  50. Validating with W3C Service

More Related