ACCOUNT
|
|
Favorited Successfully!
Favorite Failed!
Already Added!
Cannot favorite your own presentation!
|
|
Please help keep this site FUN, CLEAR, and REAL..
Flag this presentation :
Feature This! -
Innappropiate
Please Login to flag this presentation!
Your inappropriate request is sent successfully!
Failed to send your inappropiate request!
Please login to send a feature request!
Your feature quest has been sent successfuly!
Error while send your feature request!
Slide 1:B118 Web Programming Session #13 Forms, XML & Web Services
May 3, 2004
Slide 2:Tonight’s Agenda Administrative
Order form validation homework
bEssentials
Final exam
Introduction to ASP.NET Web Server Controls
XML
Web Services
Slide 3:Administrative – Order Form Validation Grading criteria
Solution discussion
Slide 4:Administrative – bEssentials Peer evaluations: based on contribution effort towards the team, showing up for meetings, meeting commitments for deliverables, etc.
5 percentage points out of the 30 percentage points for the project, proportional to the overall group score
Allocate points from the pot to your team members:
Slide 5:Administrative – bEssentials Deliverables on the Final Exam day:
Peer evaluation scores
All files uploaded to Cypress
On a single sheet of paper:
Names of your team members
URL of your company’s home page
URL of any web pages that your team is especially proud of and would like to bring to my attention
Anything else about your web site that you’d like to point out for grade evaluation
Be prepared to do a 5 minute demo of your web site in front of the class before we begin the final exam
Slide 6:Administrative – Final Exam Bring Blue Book
Review next class session
Slide 7:Introduction to ASP.NET Web Server Controls Basic controls (text box, radio button, check box) are similar to HTML controls
Radio Button List & Check Box List ASP.NET controls do the grouping for you
Retrieve list contents from a data source or list collection
Dropdown List ASP.NET control uses same implementation model
AutoPostBack attribute for immediate or deferred form processing
Additional information:
Chapter 4 of the text
http://www.asp.net/Tutorials/quickstart.aspx, ASP.NET Web Forms topic
Slide 8:ASP.NET Validation Controls Does form validation in response to a button click event
Required field (asp:RequiredFieldValidator)
Range checking of input data (asp:RangeValidator)
Verify the input data against a format such as email address, Social Security Number or minimum character length (asp:RegularExpressionValidator)
Compare two data from two form controls (asp.CompareValidator)
Slide 9:Example: form-demo.aspx Web Matrix Technique highlights
Page properties: Events (lightening bolt): Load (double-click) to create Page_Load subroutine template
Create ListItems for a list control by clicking on (…) icon in collections
Programming techniques
RadioButtonList1.SelectedIndex=-1 to deselect all items in the list
See what happens when you:
Set AutoPostBack = "False"
Set CausesValidation = "True"
Slide 10:XML - Introduction Core technology for one of the hottest areas in IT today
An essential, "must know" topic if you want to stay current in web programming
An excellent format for packaging and communicating data between humans, machines or both
Firewalls may block binary data, XML is text only so it doesn’t have any problems getting through
Slide 11:XML – Overview XML = eXtensible Markup Language
But it’s really not a language
It’s a standard format for writing your own language in a way that other people (and applications) can easily learn
Resembles HTML, similar to XHTML in terms of grammar rules (nesting, end tags, attribute values in quotes, comments, etc.)
Tag names are case sensitive!
Slide 12:XML’s Hidden Role in .NET XML’s most useful place isn’t in a web application you might create, rather it’s in the infrastructure supporting your web application
Places where .NET makes use of XML:
ADO.NET Data Access
Configuration files like web.config
Web Services
Anywhere that .NET needs to store miscellaneous data such as the list of files to display in the AdRotator control
Slide 13:XML Basic Compare these two product catalog data files Consider code in the applications that read these data files. If you later decide to store an additional piece of information for each item (such as stock shelf number), how would you have to modify the applications? For the text file format, applications need to be modified, even if they don’t need to use the new information. For the XML file format, as long as the application looks for specific tags and doesn’t need to use the new information, it won’t need modification.
Slide 14:XML XML isn’t a replacement for a real database
XML doesn’t have all of the mechanisms that a database package has (to enforce table relations or manage concurrency issues, for example)
In addition to the XML document itself, there are two other components:
Document Type Definition (DTD) or XML Schema (XSD)
eXtensible Style Sheets (XSL) – optional for displaying the XML document
Slide 15:DTD Example
Slide 16:XML Schema Example
Slide 17:XML Facilities in .NET Handle XML as a special type of text file
XmlTextWriter, XmlTextReader
Text stream I/O (you need to construct tags by specifying element names)
Good for storing simple blocks of data
You need to keep track of the structure and the order of the element tags (
Slide 18:XML Facilities in .NET: XmlTextWriter Dim fs As New FileStream ("c:\myFile.xml", FileMode.Create)
Dim w As New XmlTextWriter(fs, Nothing)
w.WriteStartDocument()
w.WriteStartElement("SuperProProductList")0
‘ Write the first product
w.WriteStartElement("Product")
w.WriteAttributeString("ID", "", "1")
w.WriteAttributeString("Name", "", "Chair")
w.WriteStartElement("Price")
w.WriteString("49.33")
w.WriteEndElement()
w.WriteEndElement()
‘ Close the root element
w.WriteEndElement()
w.WriteEndDocument()
w.Close()
Slide 19:XML Facilities: XmlTextWriter (cont’d) Produces this XML file:
Slide 20:XML Facilities in .NET Handle XML as a collection of in-memory objects
XmlDocument, XmlNode
Makes the entire XML document structure available as an in-memory object
You set values to node properties, order of the element tags is maintained for you
Tag pairs (
Slide 21:XML Facilities in .NET Handle XML as a special interface to relational data
XmlDataDocument
Lets you read an XML document and then bind it to ADO.NET data controls such as DataGrid
Slide 22:XML Facilities in .NET Process an XML document through XSL (to create an HTML document, for example)
XmlTransform to generate the output stream
Xml takes XmlTransform output to generate an HTML page
Slide 23:XML Demo Programs All of these programs use the rental.mdb from B188
Slide 24:Web Services - Introduction Why? The architecture for Internet applications is very similar to the client/server architecture of about five years ago: monolithic, a full-featured application containing a variety of services behind a single proprietary user interface
Slide 25:The Era of Monolithic Applications Single web application offering a comprehensive set of services such as a financial services site (with access to individual savings, credit card, insurance information and services)
Slide 26:Limitations of Monolithic Applications Take a lot of time and resources to create
Often tied to specific platforms or technologies, can’t be easily extended or enhanced
Difficult to get multiple applications to work together beyond just a hyperlink
Units of application logic can’t easily be reused between applications (this is the next level above just sharing source code or object classes)
You have to go through the complete, monolithic application even if all you want is a simple piece of information (such as your savings balance or the current loan rate for a specific program)
Slide 27:Components and the COM Revolution On the standalone desktop application level, Microsoft addressed these problems through their COM (component object model) technology which produced ActiveX controls
A lot of the individual functional services inside of Word and Excel are available as ActiveX controls, for example
Web Services offers the same re-usable and more easily accessible functionality over a networked environment
Slide 28:Web Services and the Programmable Web Web Services are individual units of programming logic that exist on a web server
Built on open standards, not a platform-specific binary standard
Think of it as being able to call classes/subroutines/functions over a network
Slide 29:eWeek – September 23, 2002 page 26H
Slide 30: Web Services Standards
Slide 31:WSDL XML-based
Contains only the information for communication between a Web Service and client, nothing on the inner workings of the service
Designed for reading by applications
To see the WSDL for an ASP.NET Web Service, add ?WSDL to the query string:
http://localhost/WebService/myWebService.asmx?WSDL
Slide 32:SOAP One of the three supported standards for the transmission of Web Service information (the other two being HTTP GET & HTTP PUT)
HTTP GET/PUT sends information as simple name/value pairs, SOAP uses a well-formatted XML document
Slide 33:DISCO Web Services are available at a specific URL address. How do you let the world know about this address? What if you need to change the address?
DISCO is a machine-readable "HTML page with links to Web Services"
As long as your application knows how to find the site’s .disco file, it can then find all of the Web Services available at that site
Slide 34:UDDI Proposed by Microsoft, very new and not yet widely adopted
Conceptually equivalent to a Yahoo! for web services
Sits at the level above DISCO files. It’s a means for businesses to advertise all the Web Services they have
The UDDI registry itself is a Web Service
Details at http://uddi.microsoft.com
Slide 35:Communicating with a Web Service
Slide 36:Creating a Web Service Code a .asmx file
Slide 37:XML & Web Services Demo Programs All of these programs use the rental.mdb from B188
Commercial web services
WeatherByZipClient.aspx
Calls a web service that returns current weather conditions for a given ZIP code
GoogleAPIClient.aspx
Calls a web service operated by Google
Enter
For
Transportation
Research
And
Education
Ctre
Cetre
Gis
Its-cvo
Its
intelligent
Systems
Geographic
information
Traffic
Planning
Tools
Safety
Physics
Games,
Flash
Online
Games
Denver,
Investment,
Management,
Firm,
Grant,
Davis,
Colorado
Global
Warming
Camere
Supraveghere,
De
Sisteme
Supraveghere
Video
An
San
Mateo
County
Recycle
Works
Recycleworks
Reuse
Recycling
Green
Product
Products
Construction
Demolition
E-waste
Electronics
Food
Paper
Bike
See More Tags
ACCOUNT
Copyright © 2006-2009 SlideServe. All rights reserved | 1349 Online Visitors
Powered By DigitalOfficePro

