Service-Oriented Programming in Middle-Level Courses

 
Course Module 2:
Service-Oriented Programming
(SOP)
 
SOP as a Programming Paradigm
in a
Middle-Level Undergraduate Course
 
Acknowledgments
 
This material is based upon work supported
by the National Science Foundation under
Awards No. DUE-1140567, DUE-1141112, and
DUE-1141200. Any opinions, findings, and
conclusions or recommendations expressed in
this material are those of the authors and do
not necessarily reflect the views of the
National Science Foundation.
 
Module Learning Outcomes
 
Students will be able to:
Describe the role and importance of service-oriented
programming in current application development
Explain the basic concepts of web services and
service-oriented architecture
Explain the standards underlying service-oriented
architecture and web services
Build and use web services using C# or Java
Explain how software reuse and quality are improved
by the use of web services’ composition
 
Common Programming Paradigms
 
Imperative paradigm
Based on von Neumann architecture where computation combines
logic (what is to be done) and control flow (how it is to be done)
Functional paradigm
All computations are done by defining and applying (calling)
mathematical functions
Logic paradigm
Computation is a systematic attempt to satisfy a goal based on
provided facts and inference rules
Object-oriented paradigm
Objects represent state and behavior, and computation is
accomplished by messages sent among objects
Objects created from classes and inheritance provide software reuse
 
 
SOP: Another Programming Paradigm
 
SOP is a new programming paradigm
Uses “services” as the unit of work to design
and develop integrated business applications
and mission critical software programs
Inherently designed to reuse existing services
Naturally supports software reuse, which in
turn helps to improve software quality
 
Object- and Service-Orientation
 
Steps in solving a complex problem
Abstraction
Decomposes problem into sub-problems
Solves each sub-problem and compose the overall solution
Object-orientation
Describes an abstraction using objects
Objects help to model problem and develop the solution
Service-orientation
Describes an abstraction using services
Services help to model problem and develop the solution
Developed service can be used to develop new services
 
Service-Oriented Programming (SOP)
 
SOP
A programming paradigm that uses “services” as the
building block to develop applications
Approach
Develop services
Make use of services by invoking (calling) others
Combine services to make additional services
Main ideas
Make use of web services
Should be easy to make use of web services
 
What is a Web Service?
 
A service (high-level description)
Similar to a method
A program calls a method and gets some results back
A web service (high-level description)
A service that can be invoked by a program over the
web (http)
A web service is different from a web application
A web application is for use by humans
Such as 
http://www.weather.com
A web service is for use by programs
Such as Twitter APIs 
https://dev.twitter.com/docs/api/1
 
Web Service: Definition
 
From W3C (World Wide Web Consortium)
It is a software system designed to support interoperable
machine-to-machine interaction over a network
Its interface is described in a machine-process
a
ble format
(specifically WSDL)
Other systems interact with the Web service as specified
by its description using SOAP messages, typically over
HTTP with an XML serialization along with other web-
related standards
WSDL: Web Service Description Language
SOAP: Simple Object Access Protocol
 
Web Services: Features and Standards
 
Global accessibility via the web
Leverages web’s powerful communication paradigm
Accessible via HTTP (across firewalls)
Standardization, XML-based
WSDL: used for service description (www.w3.org/TR/wsdl)
UDDI: for service publishing and discovery (uddi.xml.org/)
SOAP: for service invocation (www.w3.org/TR/SOAP/)
Others
WSDL: Web Service Description Language
UDDI: Universal Description, Discovery and Integration
SOAP: Simple Object Access Protocol
 
Examples of Web Services
 
A self-contained business task
A money withdrawal or funds deposit service for a bank
A full-fledged business process with multiple tasks
Automated purchasing of office supplies with approvals at
different levels
An application
A complete life insurance application
A service-enabled resource
Access to a remote database containing patient medical
records
 
11
self-contained:  does not need other resources
business task: simple logical step
 
What Web Services Bring to SOP
 
OOP typically constrained to homogeneity
Same data types, programming languages,
development platform, operating systems
Web services handle heterogeneity
Extensive use of XML as it has become ubiquitous
Deal with the accessibility by providing access to
functionalities available on the web (standard
networking and http)
SOP
Builds on web services to support software reuse
 
Accessing Functionality
 
Traditional software development
Download functionality in a code library and link new
code to use it
SOP software development
Access to functionalities already on the web
Use existing networking infrastructure
HTTP has become ubiquitous
OOP software development
Can also use functionality but needs some access
mechanisms to identify functionality
 
 
SOP: A New Problem Solving Paradigm
 
Traditional software development
Develop a new app from scratch
SOP
Develop a new app not from scratch but by using
existing services
Decompose problem into sub-problems
For each sub-problem, select existing or develop
appropriate services
Combine these services together to create new app
 
SOP At Present
 
Major companies support web services
Microsoft, IBM, HP, Oracle, BEA, SAP, and others
Deliver their functionalities as web services
Many web services available published online
Over 11,101 web services and 7,364 mashups (SOP apps)
http://www.programmableWeb.com
Other search engines for web services
http://www.webservicelist.com
http://www.biocatalogue.org
 (curated catalog for life sciences)
Web transformation
From an information repository to a service repository
 
 
W
eb Services: Commercial
Frameworks
 
M
icrosoft (
Windows Communication Foundation)
http://msdn.microsoft.com/en-
us/library/dd456779.aspx
IBM (“simply good design”)
http://www-01.ibm.com/software/solutions/soa/
O
racle (“agile and reusable connectivity”)
http://www.oracle.com/us/products/middleware/soa
/overview/index.html
Hewlett Packard
http://h71028.www7.hp.com/enterprise/w1/en/tech
nologies/soa-overview.html
 
SOP: An Example Application
 
Develop a web-based query application to
allow users view 
gas
 
stations
, local weather
and driving information at a given location
Input
address
Output
List of 
gas
 
stations
Local weather
Driving directions
 
 
 
SOP: Designing the Application
 
Traditional design
approach
Develop a gas station
service
Input: address
Output: gas stations nearby
Develop a weather service
Input: address
Output: local weather
Develop a route service
Input: two addresses
Output: Driving directions
 
Not trivial to develop any
of these services
SOP approach
First see if existing web
services can handle one or
more of the above
Use those functionalities
via existing web services
Build the rest
 
Gas Station APIs
 
WSDL link:
http://vhost3.cs.rit.edu/AltGasService/Service.svc
?singleWsdl
I
nput
city (such as “Rochester”, “Buffalo”, and “Syracuse”)
O
utput: the list of gas stations
name, address, phone, access day time, payment
methods
 
Weather Service APIs
 
Weather underground weather API
http://www.wunderground.com/weather/api/d/d
ocs
Input
geocode
Output
Current weather conditions (weather, humidity,
temperature, wind speed, etc.)
Demo
http://vhost3.cs.rit.edu/Application/
 
Routing Service APIs
 
Google Directions API
https://developers.google.com/maps/documentat
ion/directions/
Input
origin, destination
Output:
driving directions
duration, instructions, distances,…
Demo
http://vhost3.cs.rit.edu/Application/
 
SOP Basis: Service-Oriented
Architecture (SOA)
Slide Note
Embed
Share

Service-Oriented Programming (SOP) is a new programming paradigm focusing on using services to design and develop integrated business applications. This module covers the importance of SOP in current application development, fundamental concepts of web services, standards underlying service-oriented architecture, building web services using C# or Java, and how software reuse and quality are enhanced through web services composition.

  • Service-Oriented Programming
  • SOP
  • Web Services
  • Software Reuse
  • Programming Paradigms

Uploaded on Oct 10, 2024 | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Course Module 2: Service-Oriented Programming (SOP) SOP as a Programming Paradigm in a Middle-Level Undergraduate Course SOP Course Module 2 Slide 1

  2. Acknowledgments This material is based upon work supported by the National Science Foundation under Awards No. DUE-1140567, DUE-1141112, and DUE-1141200. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation. SOP Course Module 2 Slide 2

  3. Module Learning Outcomes Students will be able to: Describe the role and importance of service-oriented programming in current application development Explain the basic concepts of web services and service-oriented architecture Explain the standards underlying service-oriented architecture and web services Build and use web services using C# or Java Explain how software reuse and quality are improved by the use of web services composition SOP Course Module 2 Slide 3

  4. Common Programming Paradigms Imperative paradigm Based on von Neumann architecture where computation combines logic (what is to be done) and control flow (how it is to be done) Functional paradigm All computations are done by defining and applying (calling) mathematical functions Logic paradigm Computation is a systematic attempt to satisfy a goal based on provided facts and inference rules Object-oriented paradigm Objects represent state and behavior, and computation is accomplished by messages sent among objects Objects created from classes and inheritance provide software reuse SOP Course Module 2 Slide 4

  5. SOP: Another Programming Paradigm SOP is a new programming paradigm Uses services as the unit of work to design and develop integrated business applications and mission critical software programs Inherently designed to reuse existing services Naturally supports software reuse, which in turn helps to improve software quality SOP Course Module 2 Slide 5

  6. Object- and Service-Orientation Steps in solving a complex problem Abstraction Decomposes problem into sub-problems Solves each sub-problem and compose the overall solution Object-orientation Describes an abstraction using objects Objects help to model problem and develop the solution Service-orientation Describes an abstraction using services Services help to model problem and develop the solution Developed service can be used to develop new services SOP Course Module 2 Slide 6

  7. Service-Oriented Programming (SOP) SOP A programming paradigm that uses services as the building block to develop applications Approach Develop services Make use of services by invoking (calling) others Combine services to make additional services Main ideas Make use of web services Should be easy to make use of web services SOP Course Module 2 Slide 7

  8. What is a Web Service? A service (high-level description) Similar to a method A program calls a method and gets some results back A web service (high-level description) A service that can be invoked by a program over the web (http) A web service is different from a web application A web application is for use by humans Such as http://www.weather.com A web service is for use by programs Such as Twitter APIs https://dev.twitter.com/docs/api/1 SOP Course Module 2 Slide 8

  9. Web Service: Definition From W3C (World Wide Web Consortium) It is a software system designed to support interoperable machine-to-machine interaction over a network Its interface is described in a machine-processable format (specifically WSDL) Other systems interact with the Web service as specified by its description using SOAP messages, typically over HTTP with an XML serialization along with other web- related standards WSDL: Web Service Description Language SOAP: Simple Object Access Protocol SOP Course Module 2 Slide 9

  10. Web Services: Features and Standards Global accessibility via the web Leverages web s powerful communication paradigm Accessible via HTTP (across firewalls) Standardization, XML-based WSDL: used for service description (www.w3.org/TR/wsdl) UDDI: for service publishing and discovery (uddi.xml.org/) SOAP: for service invocation (www.w3.org/TR/SOAP/) Others WSDL: Web Service Description Language UDDI: Universal Description, Discovery and Integration SOAP: Simple Object Access Protocol SOP Course Module 2 Slide 10

  11. Examples of Web Services A self-contained business task A money withdrawal or funds deposit service for a bank A full-fledged business process with multiple tasks Automated purchasing of office supplies with approvals at different levels An application A complete life insurance application A service-enabled resource Access to a remote database containing patient medical records self-contained: does not need other resources business task: simple logical step SOP Course Module 2 11 Slide 11

  12. What Web Services Bring to SOP OOP typically constrained to homogeneity Same data types, programming languages, development platform, operating systems Web services handle heterogeneity Extensive use of XML as it has become ubiquitous Deal with the accessibility by providing access to functionalities available on the web (standard networking and http) SOP Builds on web services to support software reuse SOP Course Module 2 Slide 12

  13. Accessing Functionality Traditional software development Download functionality in a code library and link new code to use it SOP software development Access to functionalities already on the web Use existing networking infrastructure HTTP has become ubiquitous OOP software development Can also use functionality but needs some access mechanisms to identify functionality SOP Course Module 2 Slide 13

  14. SOP: A New Problem Solving Paradigm Traditional software development Develop a new app from scratch SOP Develop a new app not from scratch but by using existing services Decompose problem into sub-problems For each sub-problem, select existing or develop appropriate services Combine these services together to create new app SOP Course Module 2 Slide 14

  15. SOP At Present Major companies support web services Microsoft, IBM, HP, Oracle, BEA, SAP, and others Deliver their functionalities as web services Many web services available published online Over 11,101 web services and 7,364 mashups (SOP apps) http://www.programmableWeb.com Other search engines for web services http://www.webservicelist.com http://www.biocatalogue.org (curated catalog for life sciences) Web transformation From an information repository to a service repository SOP Course Module 2 Slide 15

  16. Web Services: Commercial Frameworks Microsoft (Windows Communication Foundation) http://msdn.microsoft.com/en- us/library/dd456779.aspx IBM ( simply good design ) http://www-01.ibm.com/software/solutions/soa/ Oracle ( agile and reusable connectivity ) http://www.oracle.com/us/products/middleware/soa /overview/index.html Hewlett Packard http://h71028.www7.hp.com/enterprise/w1/en/tech nologies/soa-overview.html SOP Course Module 2 Slide 16

  17. SOP: An Example Application Develop a web-based query application to allow users view gas stations, local weather and driving information at a given location Input address Output List of gas stations Local weather Driving directions SOP Course Module 2 Slide 17

  18. SOP: Designing the Application Traditional design approach Develop a gas station service Input: address Output: gas stations nearby Develop a weather service Input: address Output: local weather Develop a route service Input: two addresses Output: Driving directions Not trivial to develop any of these services SOP approach First see if existing web services can handle one or more of the above Use those functionalities via existing web services Build the rest SOP Course Module 2 Slide 18

  19. Gas Station APIs WSDL link: http://vhost3.cs.rit.edu/AltGasService/Service.svc ?singleWsdl Input city (such as Rochester , Buffalo , and Syracuse ) Output: the list of gas stations name, address, phone, access day time, payment methods SOP Course Module 2 Slide 19

  20. Weather Service APIs Weather underground weather API http://www.wunderground.com/weather/api/d/d ocs Input geocode Output Current weather conditions (weather, humidity, temperature, wind speed, etc.) Demo http://vhost3.cs.rit.edu/Application/ SOP Course Module 2 Slide 20

  21. Routing Service APIs Google Directions API https://developers.google.com/maps/documentat ion/directions/ Input origin, destination Output: driving directions duration, instructions, distances, Demo http://vhost3.cs.rit.edu/Application/ SOP Course Module 2 Slide 21

  22. SOP Basis: Service-Oriented Architecture (SOA) Service Registry UDDI Registry Publish UDDI Publication Find 0.0000 Web Browser UDDI Inquiry 0.0000 Service Provider Service Consumer defines message has Web Service exchange 0.0000 SOAP Service Description Web Service WSDL SOP Course Module 2 Slide 22

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#