Web ServicesFive QuestionsWhat is a Web Service?Software Design PrinciplesAbstraction Hides DetailsComponentizationSoftware ComponentsComponents are “local”Saved by the Web!Web Usage TodayYahoo’s Stock Ticker“Screen-scraping”Slide 13Finding & talking to Web ServicesThree StandardsWeb Services (In Practice)Why are Web Services interesting?For Developers…WSDL for a Quote ServiceAuto-gen Code from WSDLUse the Web Service in your own programsFor Businesses…New ApplicationsWeb Services Simple Customer ScenarioWhat e-commerce business models do Web Services enable?“How do I make money from Web Services?”Next Gen Web ApplicationsRevenue modelsWhat security and privacy issues need to be addressed for Web Services to be successful?Security & PrivacyIntegrity & secrecy of message trafficAuthenticationProtecting stored dataData PrivacyWhat the heck is Microsoft’s .NET Platform all about, and how does .NET relate to Web Services?Three Pillars of .NETMicrosoft .NET A platform for distributed Web ServicesA Platform For Web Services?Microsoft .NETChanging Application Architectural Model.NET Clients New Breed of Smart Clients.NET Foundation ServicesSummaryQuestions?Web ServicesWeb ServicesBrian A. LaMacchiaMicrosoftFive QuestionsFive QuestionsWhat 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 e-commerce business models do Web What e-commerce business models do Web Services enable?Services enable?What security and privacy issues need to be What security and privacy issues need to be addressed for Web Services to be addressed for Web Services to be successful?successful?What the heck is Microsoft’s .NET Platform What the heck is Microsoft’s .NET Platform all about, and how does .NET relate to Web all about, and how does .NET relate to Web Services?Services?What is a Web Service?What is a Web Service?Software Design PrinciplesSoftware Design PrinciplesAbstractionAbstractionComponentizationComponentizationIn your own programsIn your own programsReusable software componentsReusable software componentsCurrent web usageCurrent web usageUser-oriented browsingUser-oriented browsingUser-oriented data publicationUser-oriented data publicationSoftware Design Principles Software Design Principles AbstractionAbstractionProcedural abstractionProcedural abstraction public static int Square(int x) { return x * x; }int y = Square(3); // y is 9We abstract & reuse useful functions all the We abstract & reuse useful functions all the time in programstime in programsAbstraction 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.40Only need to worry about inputs to & Only need to worry about inputs to & outputs from a method or functionoutputs from a method or functionComponentizationComponentizationWe share code among programs by We share code among programs by creating software componentscreating software componentsEx: Software libraries that you link against Ex: Software libraries that you link against when you compile programs, or that you when you compile programs, or that you reference 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 Components Software Components Reusable components are valuableReusable components are valuableSave timeSave timeCodingCodingDebugging Debugging Save testing effortSave testing effortShare knowledgeShare knowledgeYou can sell componentsYou can sell componentsMarkets exist for software librariesMarkets exist for software librariesYou can given them away to sell You can given them away to sell something elsesomething elseEx: Device driversEx: Device driversComponents are “local”Components are “local”Local code executionLocal code executionExecute on your machineExecute on your machineCode (source or object) must “live” on your Code (source or object) must “live” on your local machinelocal machineMaybe do just-in-time download/installMaybe do just-in-time download/installNot so great if the data is remoteNot so great if the data is remoteEx: Stock analysis componentEx: Stock analysis componentWants as much historical data as possibleWants as much historical data as possibleIs everyone going to cache the last 100 years Is everyone going to cache the last 100 years of 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 archivesWant code to run on the serverWant code to run on the serverSaved by the Web!Saved by the Web!Web Usage TodayWeb Usage TodayWeb usage today is browser-orientedWeb usage today is browser-orientedUsers browse for informationUsers browse for informationVast databases are accessed through Vast databases are accessed through HTML gateways & user-friendly displaysHTML gateways & user-friendly displaysExample: Yahoo’s stock tickerExample: Yahoo’s stock tickerYahoo has tons of stock price history Yahoo has tons of stock price history sitting behind http://quote.yahoo.com/sitting behind http://quote.yahoo.com/That info is easily available to anyone That info is easily available to anyone who browses to the right pagewho browses to the right pageBut look at how the info is presented…But look at how the info is presented…Yahoo’s Stock TickerYahoo’s Stock Ticker““Screen-scraping”Screen-scraping”Data is formatted for easy use by people, Data is formatted for easy use by people, not programsnot programsPrograms need to mimic users to…Programs need to mimic users to…Parse/make use of the dataParse/make use of the dataCall server-side functions (plot a chart, compute Call server-side functions (plot a chart, compute something, perform a search, etc.)something, perform a search, etc.)““Scrape the screen”Scrape the screen”Download the HTML and then
View Full Document