PowerPoint Slides

Download Report

Transcript PowerPoint Slides

On Integrating Service-Oriented
Paradigm Into Introductory IS
Courses
Billy B. L. Lim
Chu Jong
School of Information Technology
Illinois State University
Normal, IL 61790-5150, USA
Evolution of Approaches

Delivery mode

Programming


Mainframe-based
PCs



Java Applet, JavaScript
Analysis and Design



Text-based
Graphical user interfaces (GUIs)
Web


Procedural
Structured
OO
Object-Oriented
Next wave

SOA (service-oriented architecture) / WS (Web services)?
Service, Service Paradigm,
and SOA

Service



“Services are self-describing, platform-agnostic
computational elements that support rapid low-cost
composition of distributed applications.” (Papazoglou,
2003)
“[A service] is an application function packaged as a
reusable component for use in a business process. It
either provides information or facilitates a change to
business data from one valid and consistent state to
another.” (Bennett, 2002)
Service-oriented paradigm / SOA

utilizes services as fundamental building blocks for
developing applications
Web services: The 4 W’s

What


“A Web service is a software system designed to support
interoperable machine-to-machine interaction over a
network. It has an interface described in a machineprocessable format (specifically WSDL). Other systems
interact with the Web service in a manner prescribed by its
description using SOAP-messages, typically conveyed
using HTTP with an XML serialization in conjunction with
other Web-related standards.” [W3C]
Web services Components



WSDL (Web Service Description Language)
SOAP (Simple Object Access Protocol)
UDDI (Universal Description, Discovery, and Integration)
Web services: The 4 W’s (cont’d)

Why

4 papers at ISECON 2006






“Creating Web Services for Legacy COBOL”
“Web Services: Introduction and Travel Project Tutorials
Using Visual Studio and ASP.NET”
“Service-Oriented Architecture: Concepts and
Implementation”
“Integrating a Service-Oriented Paradigm into Introductory IS
Courses”
This seems to be one of the most promising advances in
software design & development in recent years
Interoperable, Easy to use, Reusable, Ubiquitous,
Firewall-friendly, Platform/language independent, etc.
Web services: The 4 W’s (cont’d)

Who

Major solution providers


Consumers/Producers



State Farm, Caterpillar, Amazon, Google, Nordstrom,
General Motors, Nasdaq, etc.
List of public Web Services http://www.xmethods.net/
Who should pay attention to this?


Microsoft, IBM, Sun, Oracle, HP, BEA, etc.
All of us!
When

2006 to 2008 (fully dynamic search and use) [IDC]




Casual / ad-hoc use of services
New business models possible
Commoditization of software
Pervasive use in nontraditional devices
Service Paradigm in
Introductory IS Courses: Why?

Why not!

Prepares students for upper division
courses



=> prepares students for the IT industry
Allows for “concrete” showcase of
concepts
Makes the courses fun!
Integration Scenarios








Method Invocation
Sequential, Iterative, and Decision
Structures
Sorting and/or Searching
Miscellaneous Data structures
Use of Different OS
File vs. DBMS
System Concepts
EDI / System Integration
Sequential, Iterative, and
Decision Structures

An example

Traditional approach


Same old stuff
Web services approach

A plausible scenario here is to discuss a
problem where one wishes to find out the
coldest temperature in an area by zip codes
at a particular moment in time. Further, the
coldest area needs to be plotted on a map.
Sequential, Iterative, and
Decision Structures (cont’d)

Web services available (for the task)

http://www.xmethods.net/sd/2001/TemperatureS
ervice.wsdl


Returns current temperature for a given U.S. zipcode
http://teachatechie.com/GJTTWebServices/ZipC
ode.asmx

GetNearbyZipCodes


Returns a DataSet containing maximum of 250 zip codes
and radius mileage within a given radius of a zip code
http://staging.mappoint.net/standard30/mappoint.wsdl

Finding Addresses, Finding Nearby Places, Routing,
Map Rendering, etc.
WS-based Solution
WS-based Solution
WS-based Solution (C#)
// Get the two input values
string homeZip = textBox1.Text;
string radius = textBox2.Text;
ZipCode zipService = new ZipCode();
1st Web service
// get all the nearBy zips
DataSet ds =
zipService.GetNearbyZipCodes(homeZip,Convert.ToDecimal(radius));
string[] zipArr = processZip(ds);
// get the coldest one and display
string coldestZip = findColdestZip(zipArr);
textBox3.Text = coldestZip;
// plot the map with the coldest zip
getMap(coldestZip);
WS-based Solution (C#)
// Process the zipcodes (in XML format) and return them as an array of strings
string[] processZip (DataSet ds) {
string xmlText = ds.GetXml();
XmlDocument doc = new XmlDocument( );
doc.LoadXml( xmlText);
XmlNodeList zip = doc.GetElementsByTagName( "ZIP_CODE" );
XmlNodeList distance = doc.GetElementsByTagName( "RADIUS_MILES" );
string[] zipArr = new string[zip.Count];
for ( int i = 0; i < zip.Count; ++i )
{
Console.WriteLine( "{0}, {1}", zip[i].InnerText, distance[i].InnerText);
zipArr[i] = zip[i].InnerText;
}
return zipArr;
}
WS-based Solution (C#)
// Iterate over all the zipcodes and find the temperature each time through.
// Record the coldest one along the way.
string findColdestZip(string [] zipArr) {
TemperatureService tempService = new TemperatureService();
// Get the first zipcode
2nd Web service
string currentZip = zipArr[0];
float coldestTemp = tempService.getTemp(currentZip);
int coldestZip = 0;
// Go thru all the other zipcodes and find the coldest temperature
for (int i = 1; i < zipArr.Length; i++) {
currentZip = zipArr[i];
float temp = tempService.getTemp(currentZip);
if (temp < coldestTemp) {
coldestTemp = temp;
coldestZip = i;
}
}
return zipArr[coldestZip];
}
WS-based Solution (C#)
void getMap(string coldestZip) {
string myUserId = “12345";
string mySecurePassword = “secret";
RenderServiceSoap renderService = new RenderServiceSoap();
renderService.Credentials = new System.Net.NetworkCredential(myUserId, mySecurePassword);
FindServiceSoap findService = new FindServiceSoap();
findService.Credentials = new System.Net.NetworkCredential(myUserId, mySecurePassword);
FindSpecification findSpec = new FindSpecification();
findSpec.DataSourceName = "MapPoint.NA";
findSpec.InputPlace = coldestZip;
FindResults foundResults = findService.Find(findSpec);
more Web services
ViewByHeightWidth[] myview = new ViewByHeightWidth[1];
myview[0] = foundResults.Results[0].FoundLocation.BestMapView.ByHeightWidth;
MapSpecification mapSpec = new MapSpecification();
mapSpec.DataSourceName = "MapPoint.NA";
mapSpec.Views = myview;
mapSpec.Options = new MapOptions();
mapSpec.Options.Format = new ImageFormat();
mapSpec.Options.Format.Height = this.pictureBox1.Size.Height;
mapSpec.Options.Format.Width = this.pictureBox1.Size.Width;
MapImage[] mapImages = renderService.GetMap(mapSpec);
this.pictureBox1.Image =
Bitmap.FromStream(new System.IO.MemoryStream(mapImages[0].MimeData.Bits));
}
What to Put in / Take Out?

This will always be institution-dependent
(and controversial!)

For me:



Put In: JUnit Testing, SOA/Web services
Take Out: Some GUI, some Ethics (let me explain )
Perhaps in the near future, it would be
easier to manage this

In terms of approaches and topics (e.g., how
OOP replaces structured programming)
Concluding Remarks

Summary



service integration makes sense and doable!
But a lot of work lie ahead (i.e., course
materials, textbook, etc.)
Future Work


Google Maps
More in-depth integration at my own School



Advanced Web Development (SOA + Mobile
Computing recently approved)
NSF grant application
Stay tuned!