DOC PREVIEW
Yale CPSC 155 - Web Services

This preview shows page 1-2-3-21-22-23-42-43-44 out of 44 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 44 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Web ServicesWeb ServicesBrian A. LaMacchiaMicrosoftFive QuestionsFive Questions!!What is a Web Service?What is a Web Service?!!Why are Web Services interesting?Why are Web Services interesting?!!Why should I care about them?Why should I care about them?!!What eWhat e--commerce business models do Webcommerce business models do WebServices enable?Services enable?!!What security and privacy issues need to beWhat security and privacy issues need to beaddressed for Web Services to beaddressed for Web Services to besuccessful?successful?!!What the heck is Microsoft’s .NET PlatformWhat the heck is Microsoft’s .NET Platformall about, and how does .NET relate to Weball about, and how does .NET relate to WebServices?Services?What is a Web Service?What is a Web Service?!!Software Design PrinciplesSoftware Design Principles!!AbstractionAbstraction!!ComponentizationComponentization!!In your own programsIn your own programs!!Reusable software componentsReusable software components!!Current web usageCurrent web usage!!UserUser--oriented browsingoriented browsing!!UserUser--oriented data publicationoriented data publicationSoftware Design PrinciplesSoftware Design Principles!!AbstractionAbstraction!!Procedural abstractionProcedural abstractionpublic static int Square(int x) {return x * x;}int y = Square(3); // y is 9!!We abstract & reuse useful functions all theWe abstract & reuse useful functions all thetime in programstime in programs!!Abstraction hides implementation detailsAbstraction hides implementation detailsAbstraction Hides DetailsAbstraction Hides Detailspublic static float GetQuote(String symbol) {// implementation goes here// details are hidden from caller}public static void Main(String[] args) {float msftPrice = GetQuote(“MSFT”);Console.WriteLine("MSFT: {0:F2}",msftPrice);}C:\>test.exeMSFT: 61.40!!Only need to worry about inputs to &Only need to worry about inputs to &outputs from a method or functionoutputs from a method or functionComponentizationComponentization!!We share code among programs byWe share code among programs bycreating software componentscreating software components!!Ex: Software libraries that you link againstEx: Software libraries that you link againstwhen you compile programs, or that youwhen you compile programs, or that youreference dynamicallyreference dynamically#!/usr/pkg/bin/perluse Finance::YahooQuote;@symbols = ('msft', 'intc', 'dell', 'hwp', 'cpth');@q = getquote(@symbols);foreach $a (@q) {print $$a[0]." ".$$a[2]." ".$$a[5]."\n";}Software ComponentsSoftware Components!!Reusable components are valuableReusable components are valuable!!Save timeSave time!!CodingCoding!!DebuggingDebugging!!Save testing effortSave testing effort!!Share knowledgeShare knowledge!!You can sell componentsYou can sell components!!Markets exist for software librariesMarkets exist for software libraries!!You can given them away to sellYou can given them away to sellsomething elsesomething else!!Ex: Device driversEx: Device driversComponents are “local”Components are “local”!!Local code executionLocal code execution!!Execute on your machineExecute on your machine!!Code (source or object) must “live” on yourCode (source or object) must “live” on yourlocal machinelocal machine!!Maybe do justMaybe do just--inin--time download/installtime download/install!!Not so great if the data is remoteNot so great if the data is remote!!Ex: Stock analysis componentEx: Stock analysis component!!Wants as much historical data as possibleWants as much historical data as possible!!Is everyone going to cache the last 100 yearsIs everyone going to cache the last 100 yearsof the NYSE on their hard disks?of the NYSE on their hard disks?!!Ex: complex searches against the NYT archivesEx: complex searches against the NYT archives!!Want code to run on the serverWant code to run on the serverSaved by the Web!Saved by the Web!Web Usage TodayWeb Usage Today!!Web usage today is browserWeb usage today is browser--orientedoriented!!Users browse for informationUsers browse for information!!Vast databases are accessed throughVast databases are accessed throughHTML gateways & userHTML gateways & user--friendly displaysfriendly displays!!Example: Yahoo’s stock tickerExample: Yahoo’s stock ticker!!Yahoo has tons of stock price historyYahoo has tons of stock price historysitting behind http://sitting behind http://quote.yahoo.comquote.yahoo.com//!!That info is easily available to anyoneThat info is easily available to anyonewho browses to the right pagewho browses to the right page!!But look at how the info is presented…But look at how the info is presented…Yahoo’s Stock TickerYahoo’s Stock Ticker““ScreenScreen--scraping”scraping”!!Data is formatted for easy use by people,Data is formatted for easy use by people,not programsnot programs!!Programs need to mimic users to…Programs need to mimic users to…!!Parse/make use of the dataParse/make use of the data!!Call serverCall server--side functions (plot a chart, computeside functions (plot a chart, computesomething, perform a search, etc.)something, perform a search, etc.)!!“Scrape the screen”“Scrape the screen”!!Download the HTML and then patternDownload the HTML and then pattern--matchmatchagainst itagainst it!!Inefficient and fragileInefficient and fragile!!Data type semantics are lostData type semantics are lost!!We need a better mechanism for makingWe need a better mechanism for makingWebWeb--published data and componentpublished data and componentsoftware functions available to programssoftware functions available to programsWhat is a Web Service?What is a Web Service?!!Software components (applicationSoftware components (applicationlogic) accessible via standard Weblogic) accessible via standard Webprotocolsprotocols!!“Programming the Web”“Programming the Web”!!Better: “remote procedure calls overBetter: “remote procedure calls overthe Web”the Web”!!Web sites with no user interfaceWeb sites with no user interface!!Available to any client that speaks theAvailable to any client that speaks thenecessary Web protocols (XML, SOAP)necessary Web protocols (XML, SOAP)!!Platform independent componentsPlatform independent components!!Enable highly distributed systemsEnable highly distributed systemsFinding & talking toFinding & talking toWeb ServicesWeb Services!!Clients need answers to three separateClients need answers to three separatequestions:questions:!!What services are available?What services are


View Full Document

Yale CPSC 155 - Web Services

Documents in this Course
Portals

Portals

16 pages

Lecture 4

Lecture 4

30 pages

Lecture 2

Lecture 2

20 pages

Lecture 2

Lecture 2

19 pages

Lecture 9

Lecture 9

25 pages

Lecture 7

Lecture 7

23 pages

Load more
Download Web Services
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Web Services and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Web Services 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?