Bottom-Line Web Services

21
Bottom-line web services Demystifying, coding and even more coding

description

Web services for citizens

Transcript of Bottom-Line Web Services

Page 1: Bottom-Line Web Services

Bottom-line web services

Demystifying, coding and even more coding

Page 2: Bottom-Line Web Services

So much confusion

WhatWhyHow

Page 3: Bottom-Line Web Services

What!

• Some would say:Your new best friendsThe savior of your business (or projects)The new generation of web• Others would say:The doom of your web app and business

Page 4: Bottom-Line Web Services

What the heck!

• More confusion:

SOAP WSDL UDDIXML JSON

XML-RPC JSON-RPC

Page 5: Bottom-Line Web Services

So Really, What are they?!

• In a very straight answer they are:

a network interface to application functionality, based on standard Internet technologies.

Page 6: Bottom-Line Web Services

Take a look

• A Web service lets you access application functionality over the Internet or just any other network!

As a programmer Web services can be thought of as functions that you can call over the Internet!

Page 7: Bottom-Line Web Services

we all speak the same language

a Java program can access and use a Web service written in VB.NET and deployed on a Windows server just as easily as a Windows (say C#) program can use a Web service written in Java and running on a Linux Web server.

Page 8: Bottom-Line Web Services

Like what?

• spell checking, translation , …• stock quotes, currency exchange rates, …• Weather Reports• And the list goes on and on!

Page 9: Bottom-Line Web Services

How !

• Web service technology has evolved around a stack of five technologies

Page 10: Bottom-Line Web Services

Example

• Real examples goes across the stack in a top – down approach!

Page 11: Bottom-Line Web Services

All that for just a RPC

• UDDI, WSDL, and SOAP• Nothing really new they are all XML Based

Page 12: Bottom-Line Web Services

Exotic!!!!!!!!!!!!!

Page 13: Bottom-Line Web Services
Page 14: Bottom-Line Web Services

SOAP is Fat, XML-RPC is neat

• SOAP Specification is 11,000 words• XML-RPC Specification is 1500 words• XML-RPC has a stable specification, SOAP

might undergo some changes• SOAP is meant for enterprise level apps• SOAP with be the W3C standard pretty soon!

Page 15: Bottom-Line Web Services

Sample XML-RPC messageRequest (from your XML-RPC client): POST /xmlrpcInterface HTTP/1.0 User-Agent: Sitepoint XML-RPC Client 1.0 Host: xmlrpc.sitepoint.com Content-type: text/xml Content-length: 195 <?xml version="1.0"?> <methodCall>

<methodName>forums.getNumTodaysThreads</methodName> <params> <param><value><string>Study</string></value></param> </params> </methodCall>

Page 16: Bottom-Line Web Services

Sample XML-RPC messageResponse (from the XML-RPC server):HTTP/1.1 200 OK Connection: close Content-Length: 148 content-Type: text/xml Date: Wed, Jul 28 1999 15:59:04 GMT Server: Sitepoint XML-RPC Server 1.0 <?xml version="1.0"?> <methodResponse> <params> <param> <value><int>42</int></value> </param> </params> </methodResponse>

Page 17: Bottom-Line Web Services

XML vs. JSON

• James Clark (creator of XML) said:any damn fool could produce a better data

format than XML• Douglas Crockford Created JSON

Page 18: Bottom-Line Web Services

JSON

• JSON (JavaScript Object Notation) is a lightweight data interchange format.

• It is easy for humans to read and write. • It is easy for machines to parse and generate. • It is based on a subset of the JavaScript Programming Language,

Standard ECMA-262 3rd Edition - December 1999.• JSON is a text format that is completely language independent

but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others.

• These properties make JSON an ideal data-interchange language.

Page 19: Bottom-Line Web Services

Quick Sample

Page 20: Bottom-Line Web Services

Oh, Thank you!!

Page 21: Bottom-Line Web Services

References

• Web Services Demystified By Kevin Yank at Sitepoint.com• Wikipedia.com