XML, Ajax, Web Services, Semantic Web

Slides:



Advertisements
Similar presentations
XML: Extensible Markup Language
Advertisements

Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
 To publish information for global distribution, one needs a universally understood language, a kind of publishing mother tongue that all computers may.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
Project 1 Introduction to HTML.
CIS101 Introduction to Computing Week 05. Agenda Your questions CIS101 Survey Introduction to the Internet & HTML Online HTML Resources Using the HTML.
Peoplesoft: Building and Consuming Web Services
Introduction to XML Extensible Markup Language Carol Wolf Computer Science Department.
W3C Activities HTML: is the lingua franca for publishing on the Web XHTML: an XML application with a clean migration path from HTML 4.01 CSS: Style sheets.
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
RSS RSS is a method that uses XML to distribute web content on one web site, to many other web sites. RSS allows fast browsing for news and updates.
Web Services Michael Smith Alex Feldman. What is a Web Service? A Web service is a message-oriented software system designed to support inter-operable.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
Web Design Basic Concepts.
Chapter 1 Internet & Web Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D. 1.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Computer Concepts 2014 Chapter 7 The Web and .
XML at Work John Arnett, MSc Standards Modeller Information and Statistics Division NHSScotland Tel: (x2073)
Content Management Systems Week 5 LBSC 690 Information Technology.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
DATA COMMUNICATION DONE BY: ALVIN SAMPATH CARLVIN SAMPATH.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Practical RDF Chapter 1. RDF: An Introduction
Example XML Applications/Languages. Objectives To Review uses of XML To investigate some Language applications of XML XHTML RSS WML Web Services.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
XML Overview. Chapter 8 © 2011 Pearson Education 2 Extensible Markup Language (XML) A text-based markup language (like HTML) A text-based markup language.
XML Week 6 INFM 603. Agenda Questions Events in JavaScript XML Speed dating.
XHTML Introductory1 Linking and Publishing Basic Web Pages Chapter 3.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
XML Basics Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University Extensible Meta Language Markup Language.
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
HTML, XHTML, and CSS Sixth Edition Chapter 1 Introduction to HTML, XHTML, and CSS.
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
XML eXtensible Markup Language. Topics  What is XML  An XML example  Why is XML important  XML introduction  XML applications  XML support CSEB.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
CA Professional Web Site Development Class 2: Anatomy of a Web Site and Web Page & Intro to HTML.
WEB APPLICATION DEVELOPMENT For More visit:
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
XML Presented by Kushan Athukorala. 2 Agenda XML Overview Entity References Elements vs. Atributes XML Validation DTD XML Schema Linking XML and CSS XSLT.
User Profiling using Semantic Web Group members: Ashwin Somaiah Asha Stephen Charlie Sudharshan Reddy.
1 Alternative view on Internet Computing Web 1.0 –Web 1.0 is first generation, Web Information based. Driven by Information provider. Web 2.0 Ajax enabled.
Kemal Baykal Rasim Ismayilov
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
Web Server.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
XML CSC1310 Fall HTML (TIM BERNERS-LEE) HyperText Markup Language  HTML (HyperText Markup Language): December  Markup  Markup is a symbol.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
©Silberschatz, Korth and Sudarshan10.1Database System Concepts W3C - The World Wide Web Consortium W3C - The World Wide Web Consortium.
HTML Concepts and Techniques Fifth Edition Chapter 1 Introduction to HTML.
Web Technologies Lecture 10 Web services. From W3C – A software system designed to support interoperable machine-to-machine interaction over a network.
Chapter 1 Introduction to HTML, XHTML, and CSS HTML5 & CSS 7 th Edition.
AJAX and REST. Slide 2 What is AJAX? It’s an acronym for Asynchronous JavaScript and XML Although requests need not be asynchronous It’s not really a.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
Web Design Principles 5 th Edition Chapter 3 Writing HTML for the Modern Web.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 9 Web Services: JAX-RPC,
1 Survey of Profiles from Other Domains XMSF Profile SG 13 January 2004 Curt Blais and NPS MV3250 (Introduction to XML, 1st Quarter 2005) Katherine L.
National College of Science & Information Technology.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
XML Related Technologies
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
WEB API.
Introduction to World Wide Web
WEB SERVICES From Chapter 19, Distributed Systems
Presentation transcript:

XML, Ajax, Web Services, Semantic Web Week 13 INFM 603

Agenda XML Ajax Web Services Semantic Web

XML XML  eXtensible Markup Language XML An XML document is a text-based document XML is a language for describing data or for creating markup languages Allows data to be structured, stored and transmitted in a hierarchical fashion XML tags (element type names) provide a reader an idea of what data means XML is human-readable Goals for XML Easily adapted to specific tasks (e.g., Rendering Web pages, Encoding metadata, Semantic Web) Easily created/processed/read Concise

XML Example (Providing information about a course) <?xml version="1.0" encoding="ISO-8859-1"?> <semester> <course courseNum=“bio101”> <name>Intro to Biology</name> <instructor>Prof Cell</instructor> </course> </semester>

XML XML is case sensitive XML declaration is the first statement <?xml version="1.0"?> An XML document is a “tree” Must contain one root element Other elements must be properly nested All start tags must have end tags Attribute values must have quotation marks <item id=“33905”> Certain characters are “reserved” For example: < is used to represent < You can generate different types of documents from an XML document (through a process call Transformation). You could generate HTML, CD, DVD, Video, etc.

Some XML Applications Text Encoding Initiative For adding annotation to historical manuscripts http://www.tei-c.org/ Encoded Archival Description To enhance automated processing of finding aids http://www.loc.gov/ead/ Metadata Encoding and Transmission Standard Bundles descriptive and administrative metadata http://www.loc.gov/standards/mets/

The XML Family Tree XML SGML . . . . . . SMIL VoiceXML RSS XHTML MathML RDF HTML TEI . . . . . . XML SGML

Languages Based on XML Some languages based on XML XHTML SMIL  Demo available at http://www.umiacs.umd.edu/~oard/teaching/603/spring12/slides/13/media.html SVG  XML application language that replaces many uses of bitmap graphics RSS Rich Site Summary or Really Simple Syndication Format for delivering changing web content MathML Used to describe mathematical notations WAP and WML For handheld devices

XSLT Used with XML documents to transform data into a particular context (e.g., HTML, word, pdf, etc.) or another XML document In order to define the transformation an XSLT stylesheet is defined The stylesheet is an XML document

XML Example View “The Song of the Wandering Aengus” http://www.umiacs.umd.edu/~oard/teaching/603/spring12/slides/13/xml.htm

XML Example <?xml version="1.0"?> <!DOCTYPE POEM SYSTEM "poem01.dtd"> <?xml-stylesheet type="text/xsl" href="poem01.xsl"?> <POEM> <TITLE>The Song of Wandering Aengus</TITLE> <AUTHOR> <FIRSTNAME>W.B.</FIRSTNAME> <LASTNAME>Yeats</LASTNAME> </AUTHOR> <STANZA> <LINE>I went on to the hazel wood,</LINE> <LINEIN>Because a fire was in my head,</LINEIN> <LINE>And cut and peeled a hazel wand,</LINE> </STANZA> </POEM>

Document Type Definition (DTD) <!ELEMENT poem ( (title, author, stanza)* )> <!ELEMENT title (#PCDATA) > <!ELEMENT author (firstname, lastname) > <!ELEMENT firstname (#PCDATA) > <!ELEMENT lastname (#PCDATA) > <!ELEMENT stanza (line+ | linein+) > <!ELEMENT line (#PCDATA) > <!ELEMENT linein (#PCDATA) > DTD defines a document type in 1. Its vocabulary, what kind of elements are allowed in the document type. 2. It defines a content model for each element. A content model is a pattern that tells what elements or data can go inside an element, in what order, in what number, and whether they are required or optional. Think of this as the “grammar” of the attribute. #PCDATA => parsed character data. The characters will be checked by an XML parser for entity reference, which will then be replaced with their entity values #PCDATA span of text a,b a followed by b a|b either a or b a* 0 or more a’s a+ 1 or more a’s

Specifying Appearance: XSL(T) <xsl:template match="POEM"> <HTML> <BODY BGCOLOR="#FFFFCC"> <xsl:apply-templates/> </BODY> </HTML> </xsl:template> <xsl:template match="TITLE"> <H1> <FONT COLOR="Green"> <xsl:value-of/> </FONT> </H1> </xsl:template> Extensible Stylesheet language XSL http://www.w3.org/Style/CSS-vs-XSL

CSS vs XSL From: http://www.w3.org/Style/CSS-vs-XSL We have two different style languages. Which one to use? CSS when you can XSL when you must

XML vs. HTML XML and HTML derive from a meta language called SGML (Standard Generalized Markup Language) XML  Uses a subset of syntax rules allowed in SGML XML tags are specific to applications and users know what they mean, while HTML tags have fixed meaning and browsers know what they are HTML tags are used for display purposes while XML tags are used to describe data and documents

Well-Formed XML Documents An XML document that follows the XML syntax rules is said to be well-formed XML Parser/XML Processor  allow us to detect whether a document is well-formed Two types of Parsers Non-validating XML Parser  checks whether document satisfies XML syntax rules (well-formed), but does not check for any specific structure of elements/attributes Validating XML Parser  checks whether document is well-formed and also verifies it satisfies the specific structure of elements/attributes

JSON JavaScript Object Notation Text-based standard for data interchange Light-weight alternative to XML Derived from JavaScript but it is language independent JSON Example: http://json.org/example.html

Synchronized Multimedia Integration Language (SMIL) SMIL  Enables simple authoring of interactive audiovisual presentations Utilized for rich media/multimedia presentations that integrate streaming audio and video with images, text or any other media type Window controls (in <head>) Controlling layout: <region>, <root-layout> Timeline controls (in <body>) Sequence control: <seq>, <excl>, <par> Timing control: <begin>, <end>, <dur> Content types (in <body>) <audio>, <video>, <img>, <ref> http://www.w3.org/AudioVideo/ Example: http://www.umiacs.umd.edu/~oard/teaching/603/spring12/slides/13/media.html

Ajax Traditional interaction with web server Nothing happens until we submit data We must wait until the server request is processed (cannot do anything with the page) A page must be completed loaded even if most of the content identical to previous page Compare with a desktop application Can we do better? Can the page be updated without requiring a page load? Ajax is the answer Example (AjaxExamples): directoryLookup.html, directory.php, processMemo.php in TypicalASynchronous folder

Ajax

Ajax

Ajax Ajax  Asynchronous JavaScript and XML Combination of technologies Adds a layer between the browser and the web server, handling server requests and processing the results Layer Name  Ajax Framework/Ajax Engine The requests are not synchronized with user actions (e.g., clicking on links, buttons, etc.). User can continue interacting with the browser while request is being processed

Ajax In the traditional client/server model we submit server requests by clicking on a link or via submit (this generates the HTTP request for us) Notice we get a new web page as a result XMLHTTPRequest JavaScript object that will issue the HTTP request No page load is generated as a result of the request Can only issue request to URLs within the same domain Cannot directly access a remote server There is nothing the server needs to do just because the request is associated with AJAX. The server is just receiving an HTTP request Ajax application just care about receiving an HTTP response

Ajax Examples HTML Ajax XML Ajax Jason Ajax http://test.deitel.com/examples/iw3htp4/ajax/fig15_05/SwitchContent.html XML Ajax http://test.deitel.com/examples/iw3htp4/ajax/fig15_08/PullImagesOntoPage.html Jason Ajax http://test.deitel.com/examples/iw3htp4/ajax/fig15_09_10/addressbook.html

Server-side Programming Interchange Language Client-side Programming Relational normalization Structured programming Software patterns Object-oriented design Functional decomposition Client Hardware (PC, Unix) (MySQL) (PHP) (HTML, XML) (JavaScript) (IE, Firefox) (PC) Business rules Interaction Design Interface Web Browser Server-side Programming Interchange Language Client-side Programming Database Server Hardware

Model-View-Controller

Web Services Web Service Web API (Application Programming Interface) that can be accessed over a network and executed at a remote system Allows client applications to build interfaces to the service From webopedia.com Web services allow different applications from different sources to communicate with each other without time-consuming custom coding, and because all communication is in XML, Web services are not tied to any one operating system or programming language Web services do not provide the user with a GUI. Web services instead share business logic, data and processes through a programmatic interface across a network Web Service (From Wikipedia) W3C defines a "Web service" as a software system designed to support interoperable machine-to-machine interaction over a network Example: http://code.google.com/apis/maps/documentation/webservices/#WebServices

Web Services Services can range from simple requests to complicated business processes Payment processing Content Syndication Currency conversion Language translation Any internet protocol can be used to build web services but HTTP and XML are often used By using web services, your application can publish its function to the world Web services can be created in any programming language Web services enable us to solve interoperability problems between systems by allowing data exchange between different applications and different platforms. With web services a company billing system can connect with a supplier server

Web Services Several protocols and techniques have been developed to create and utilize web services. Two main ones: REST  Representational State Transfer SOAP  Simple Object Access Protocol In General REST  light-weight interactions SOAP  secure, reliable interactions Each has its advantages From Wikipedia REST  primary purpose of the service is to manipulate XML representations of Web resources using a uniform set of "stateless" operations SOAP   the service may expose an arbitrary set of operations

Web Services (REST) REST (Representational State Transfer) Resources are represented by URLs Resource  document, person, location Each resource has a unique URL Each resource does not need to have an actual page/document. It can be generated dynamically A resource is considered a “noun” Operations are performed via HTTP methods (GET, POST, PUT, DELETE) Methods are considered “verbs” REST  designed to operate with resource-oriented services (locate/manipulate resource)

Web Services (REST) Example: Web service that allows individuals to manage file backups Each backup has an URL http://backupFake.doesnotexist.org/backups/1938 Server responses will use XML Using HTTP GET we can get the backup Using HTTP PUT we can update a backup Using HTTP POST we can upload a backup We can receive a URL that corresponds to the new backup Using HTTP DELETE we can delete a backup Notice that REST relies on a familiar approach (HTTP methods) to ask for services (we don’t need to create a new interface/approach)

Web Services(SOAP) SOAP (Simple Object Access Protocol) SOAP  Designed for action-oriented services (actions a web server can carry out) Designed as a way to package remote procedure calls into XML wrappers SOAP is an XML-based messaging protocol SOAP request XML document Has three components Envelop  defines document as SOAP request Body  provides information about the call and responses Optional header and fault elements SOAP response is an XML document

Web Services (Examples) Web Service example http://www.w3schools.com/webservices/ws_example.asp Using web service example http://www.w3schools.com/webservices/ws_use.asp Many popular organizations provide web services Amazon  http://aws.amazon.com/ Netflix  http://developer.netflix.com/docs Netflix Web API allows you to Search movies, TV series, etc. Retrieve catalog titles Manage and displaying queues for users Yahoo http://developer.yahoo.com/everything.html eBay  http://developer.ebay.com/products/shopping/

Web Services (Platform Elements) WSDL (Web Services Description Language) XML-based language for describing and locating web services W3C standard It is machine-readable UDDI (Universal Description, Discovery and Integration) Directory service where companies can search and register for web services described by WSDL Service Broker Wikipedia Image for Service Broker/Requester/Provider http://en.wikipedia.org/wiki/File:Webservices.png

REST vs. SOAP http://www.youtube.com/watch?v=v3OMEAU_4HI http://spf13.com/post/soap-vs-rest

Frapi (RESTful API Framework) FRAPI is a RESTful API Framework that allows developers to develop RESTful APIs that http://getfrapi.com/

Mashups Mashup Web page or application that uses and combines data and/or functionality from several sources. Sources are often based on web services. Relies on open APIs Allow us to create new views of data Mashup Genres Video and Photo Mashups Mapping Mashups Big player  Google Maps API Search and Shopping Mashups News Mashups Example: Diggdot.us (combines news from Digg.com, Del.icio.us and Slashdot.org)

Mashup Examples Google vs Yahoo http://www.langreiter.com/exec/yahoo-vs-google.html Popular MashUp Listing http://www.programmableweb.com/popular

Semantic Web From: http://www.cs.umd.edu/~golbeck/LBSC690/SemanticWeb.html Semantic web Adds structure to the meaningful content of web pages Most data in the web is for human consumption, rather than data that can be processed automatically by computers. Semantic Web will enable computers to be able to understand the data, instead of just displaying it Allows for complex queries. For example: How many stores are open when I am not at work or traveling in June? It is not a separate web, but an extension of our present web Semantic web – Term coined by Tim Berners-Lee http://www.w3.org/People/Berners-Lee/

Semantic Web Semantic web needs Access to structured collections of information Sets of inference rules to conduct automated reasoning Semantic Web Challenge Provide a language that expresses both data and rules for reasoning about data Allowing rules from knowledge-representation system to be exported to the web Technologies for developing the semantic web XML – Allows users to add arbitrary structure to their documents RDF – Allows users to add meaning to their documents

Semantic Web RDF  Resource Description Framework Allow us to express meaning In RDF a document makes assertions that particular entities (people, web pages, etc.) have properties (e.g., “father of”) with certain values (e.g. another person) Meaning is encoded in triples Triple  has subject, verb/predicate and object (all expressed using URIs) <#john> pref:loves <#cheescake>. Written in XML RDF Example  http://www.cs.umd.edu/~golbeck/INFM743/sample.owl RDF triples form web of information about related things

Semantic Web: Ontology Document that formally defines terms and inference rules as to how terms relate Used for reasoning about data Typical ontology for the web has taxonomy and inference rules Example of page marked up for ontology use: http://www.cs.rpi.edu/~hendler/ Notice the <USE-ONTOLOGY> tag Using ontology’s concepts, information about where Dr. Hendler obtained his PhD is provided Allows a computer to answer the question: “Where Dr. Hendler received his degree?”

Semantic Web Impact of semantic web will be seen when: Programs are created that combine information from different sources, process the information and exchange results with other programs Providing web-based services with semantics will Allow for service discovery Understanding of functions offered and how to take advantage of such functionality

Microformats Human- and Machine-Readable Human-Readable <div id="contact"> <h2>Contact Me</h2> <p> You can contact me via email to <a href="mailto:jane@example.com">jane@example.com</a>, or send stuff to me at the following address:</p> <p>255 Some Street,<br /> Some Place,<br /> Some Town</p> </div> <div id="contact" class="vcard"> <h2>Contact Me</h2> <h3 class="fn">Jane Doe</h3> <p> You can contact me via email to <a class="email" href="mailto:jane@example.com">jane@example.com</a>, or reach me at the following address:</p> <div class="adr"> <div class="street-address">255 Some Street</div> <div class="locality">Some Town</div> <div class="region">Some Place</div> </div> </div>

Web Scraping https://scraperwiki.com/ From Wikipedia Process of automatically collecting information from the web From www.webopedia.com Application that processes HTML of a web page to extract data Web scrapping applications simulate a person viewing a web site You may need to rely on web scrapping when no API is provided to access data ScraperWiki Platform that enables building of programs to extract and analyze data https://scraperwiki.com/

Semantic Web Videos Introduction http://www.youtube.com/watch?v=OGg8A2zfWKg Demo of Semantic Web Portal http://www.youtube.com/watch?v=X6WcpG5EEeI&feature=related Semantic Web of Data Tim Berners-Lee http://www.youtube.com/watch?v=HeUrEh-nqtU&feature=related Tim Berners-Lee: The next Web of open, linked data http://www.youtube.com/watch?v=OM6XIICm_qo&feature=related RDF Basics http://www.youtube.com/watch?v=ldl0m-5zLz4&feature=related http://videolectures.net/training06_sure_stsw/ Notice slides on the side move automatically

References http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol http://www.w3schools.com/webservices/ AJAX in 10 Minutes  ISBN-10: 0672328682 http://en.wikipedia.org/wiki/Mashup_%28web_application_hybrid%29 http://www.ibm.com/developerworks/xml/library/x-mashups.html Sams Teach Yourself Perl in 24 Hours Great Reference to learn Perl ISBN: 0-672-32793-7

References http://www.xml.com/ XML in 10 Minutes (ISBN: 0-672-32471-7) http://www.cs.umd.edu/~golbeck/INFM743/xml.ppt http://www.xml.com/ XML in 10 Minutes (ISBN: 0-672-32471-7) http://www.xmlhack.com/ http://www.w3.org/XML/ http://www.w3schools.com/xml/xml_whatis.asp http://blogspace.com/rss/readers http://www.w3.org/TR/REC-xml/ http://cyber.law.harvard.edu/rss/rss.html