490 likes | 631 Views
Internet Technologies The World Wide Web. A way to access and share informationTechnical papers, marketing materials, recipes, ...A huge network of computers: the InternetGraphical, not just textualInformation is linked to other informationApplication development platformShop from homeProvid
E N D
1. Introduction to the Weband .NET
2. Internet Technologies The World Wide Web A way to access and share information
Technical papers, marketing materials, recipes, ...
A huge network of computers: the Internet
Graphical, not just textual
Information is linked to other information
Application development platform
Shop from home
Provide self-help applications for customers and partners
... The Web can be viewed from many different perspectives.The Web can be viewed from many different perspectives.
3. Internet TechnologiesWWW Architecture This is the basic architecture of the web. A browser running on a client machine makes a request to a server using the HTTP protocol over TCP/IP. The server responds with an HTML page, which is rendered in the browser.This is the basic architecture of the web. A browser running on a client machine makes a request to a server using the HTTP protocol over TCP/IP. The server responds with an HTML page, which is rendered in the browser.
4. Internet TechnologiesWWW Architecture Client/Server, Request/Response architecture
You request a Web page
e.g. http://www.msn.com/default.asp
HTTP request
The Web server responds with data in the form of a Web page
HTTP response
Web page is expressed as HTML
Pages are identified as a Uniform Resource Locator (URL)
Protocol: http
Web server: www.msn.com
Web page: default.asp
Can also provide parameters: ?name=Leon
5. Internet TechnologiesHypertext Markup Language (HTML) The markup language used to represent Web pages for viewing by people
Designed to display data, not store/transfer data
Rendered and viewed in a Web browser
Can contain links to images, documents, and other pages
Not extensible
Derived from Standard Generalized Markup Language (SGML)
HTML 3.2, 4.01, XHTML 1.0 Objects such as images, audio, video, and documents are not actually enclosed in the HTML Web page, but are referenced by the page. When you tell your browser to display a Web page, it may have to make multiple requests to the server (or possibly different servers) to get all the referenced objects.
Example:
Get default.asp may result in additional requests for the following files:
Get image1.gif
Get image2.jpeg
Get video1.mpeg
…Objects such as images, audio, video, and documents are not actually enclosed in the HTML Web page, but are referenced by the page. When you tell your browser to display a Web page, it may have to make multiple requests to the server (or possibly different servers) to get all the referenced objects.
Example:
Get default.asp may result in additional requests for the following files:
Get image1.gif
Get image2.jpeg
Get video1.mpeg
…
6. Internet TechnologiesHTML Forms Enables you to create interactive user interface elements
Buttons
Text boxes
Drop down lists
Check boxes
User fills out the form and submits it
Form data is sent to the Web server via HTTP when the form is submitted
7. Internet TechnologiesHTTP HTTP is a stateless protocol
Each HTTP request is independent of previous and subsequent requests
HTTP 1.1 introduced keep-alive for efficiency
Statelessness has a big impact on how scalable applications are designed
8. Internet TechnologiesCookies A mechanism to store a small amount of information (up to 4KB) on the client
A cookie is associated with a specific web site
Cookie is sent in HTTP header
Cookie is sent with each HTTP request
Can last for only one session (until browser is closed) or can persist across sessions
Can expire some time in the future
9. Internet TechnologiesMultipurpose Internet Mail Extensions (MIME) Defines types of data/documents
text/plain
text/html
image/gif
image/jpeg
audio/x-pn-realaudio
audio/x-ms-wma
video/x-ms-asf
application/octet-stream
10. Internet TechnologiesBrowsers Client-side application
Requests HTML from Web server and renders it
Popular browsers:
Netscape
Internet Explorer
Opera
others
Also known as a User Agent
11. Internet TechnologiesClients & Servers Clients
Generally supports a single user
Optimized for responsiveness to user
User interface, graphics
Servers
Supports multiple users
Optimized for throughput
More: CPUs (SMP), memory, disks (SANs), I/O
Provide services (e.g. Web, file, print, database, e-mail, fax, transaction, telnet, directory)
12. Internet TechnologiesProxy Servers & Firewalls Proxy Server
A server that sits between a client (running a browser) and the Internet
Improves performance by caching commonly used Web pages
Can filter requests to prevent users from accessing certain Web sites
Firewall
A server that sits between a network and the Internet to prevent unauthorized access to the network from the Internet
13. Internet TechnologiesNetworks Network = an interconnected collection of independent computers
Why have networks?
Resource sharing
Reliability
Cost savings
Communication
Web technologies add:
New business models: e-commerce, advertising
Entertainment
Applications without a client-side install
Not too long ago it was quite reasonable to ask “Why do we need networks?” Now the question seems silly!
Not too long ago it was quite reasonable to ask “Why do we need networks?” Now the question seems silly!
14. Internet TechnologiesNetworks Network technology is largely determined by scale:
Local Area Network (LAN): Span up to a few kilometers. Bus vs. ring topologies
Wide Area Networks (WAN): Can span a country or continent. WANs use routers as intermediate nodes to connect transmission lines
15. Internet TechnologiesNetworks Network technology
Broadcasting
Packets of data are sent from one machine and received by all computers on the network
Multicast: packets are received by a subset of the machines on a network
Point-to-point
Packets have to be routed from one machine to another; there many be many paths
In general, geographically localized networks use broadcasting, while disperse networks use point-to-point
16. Internet TechnologiesNetworks This figure depicts the different layers used in networking protocols.This figure depicts the different layers used in networking protocols.
17. Internet TechnologiesNetwork Protocol Stack Physically, a request goes down the protocol stack on the client, across the network to the server, then up the server’s protocol stack (solid arrows). Logically, however, the corresponding layers on each machine “talk” to each other (dashed arrows).Physically, a request goes down the protocol stack on the client, across the network to the server, then up the server’s protocol stack (solid arrows). Logically, however, the corresponding layers on each machine “talk” to each other (dashed arrows).
18. Internet TechnologiesNetworks - Domain Name System (DNS) Provides user-friendly domain names, e.g. www.msn.com
Hierarchical name space with limited root names
DNS servers map domain names to IP addresses
19. Internet TechnologiesExtensible Markup Language (XML) Represents hierarchical data
A meta-language: a language for defining other languages
Extensible
Useful for data exchange and transformation
Simplified version of SGML
20. Programming Languages Machine code
Assembly language
High-level languages
Fortran, LISP, Cobol
C, Pascal, Basic, Smalltalk
C++, Eiffel
Java, C#
Scripting languages
Shell scripts, Perl, TCL, Python, JavaScript, VBScript
21. Programming Paradigms Unstructured programming
Structured programming
Object-oriented programming
Component-based programming
Event-based programming
22. Programming ParadigmsUnstructured Programming See “Go To Statement Considered Harmful” at http://www.acm.org/classics/oct95/ In reality, the “go to” statement is not inherently “evil”, but should be used in a structured manner. C# supports “go to”s, but only in a limited way.In reality, the “go to” statement is not inherently “evil”, but should be used in a structured manner. C# supports “go to”s, but only in a limited way.
23. Programming ParadigmsStructured Programming Sequence
Conditional
if then else
switch
Looping
for i from 1 to n
do while
do until
Functions
Exceptions
Structured programming addresses the problems involved in writing a single procedure. It doesn’t help too much when large-scale systems are involved.Structured programming addresses the problems involved in writing a single procedure. It doesn’t help too much when large-scale systems are involved.
24. Programming ParadigmsObject-Oriented Programming Objects have data and behavior
Data: members, fields, variables, slots, properties
Behavior: methods, functions, procedures
Using objects is easy
First instantiate the type of object desired
Then call its methods and get/set its properties
Designing new types of objects can be hard
Design goals often conflict: simplicity, functionality, reuse, performance Object-oriented programming actually builds upon structured programming. Structured programming techniques are used within individual methods.Object-oriented programming actually builds upon structured programming. Structured programming techniques are used within individual methods.
25. Programming ParadigmsObject-Oriented Programming Key object-oriented concepts
Identity
Encapsulation
Data + behavior
Information hiding (abstraction)
Classes vs. instances
Polymorphism
Interfaces
Delegation, aggregation
Inheritance
Patterns
26. Programming ParadigmsComponent-Based Programming Components
Independent modules of reuse and deployment
Coarser-grained than objects (objects are language-level constructs)
Includes multiple classes
Often language-independent
In the general case, the component writer and the component user don’t know each other, don’t work for the same company, and don’t use the same language Components build upon object-oriented concepts.Components build upon object-oriented concepts.
27. Programming ParadigmsComponent-Based Programming Component Object Model (COM)
Initial Microsoft standard for components
Specifies a protocol for instantiating and using components in-process, across processes or across machine boundaries
Basis for ActiveX, OLE, and many other technologies
Can be created in Visual Basic, C++, .NET, …
Java Beans
Java standard for components
Not language-independent
28. Programming ParadigmsEvent-Based Programming When something of interest occurs, an event is raised and application-specific code is executed
Events provide a way for you to hook in your own code into the operation of another system
Event = callback
User interfaces are all about events
onClick, onMouseOver, onMouseMove…
Events can also be based upon time or interactions with the network, operating system, other applications, etc.
29. Programming the WebClient-Side Code What is client-side code?
Software that is downloaded from Web server to browser and then executes on the client
Why client-side code?
Better scalability: less work done on server
Better performance/user experience
Create UI constructs not inherent in HTML
Drop-down and pull-out menus
Tabbed dialogs
Cool effects, e.g. animation
Data validation
30. Programming the WebClient-Side Technologies DHTML/JavaScript
COM
ActiveX controls
COM components
Remote Data Services (RDS)
Java
Plug-ins
Helpers
Remote Scripting
31. Programming the WebDynamic HTML (DHTML) Script that is embedded within an HTML page
Usually written in JavaScript (ECMAScript, JScript) for portability
Internet Explorer also supports VBScript and other scripting languages
Each HTML element becomes an object that has associated events (e.g. onClick)
Script provides code to respond to browser events
32. Programming the WebActiveX Based on COM
Native only to Internet Explorer
Supported in Netscape with a plug-in
Good when you know your users (e.g. intranet) or can specify which browser to use
Small, efficient code
33. Programming the WebJava Applets Based on Java bytecode
Held great promise as a portable, pain-free way to download client-side code:
“Write once, run anywhere”
Fairly safe: code runs in a “sandbox”
Compatibility and performance issues have prevented common usage
34. Programming the WebServer-Side Technologies Common Gateway Interface (CGI)
Internet Server API (ISAPI)
Netscape Server API (NSAPI)
Active Server Pages (ASP)
Java Server Pages (JSP)
Personal Home Page (PHP)
Cold Fusion (CFM)
ASP.NET
35. Programming the Web Active Server Pages (ASP) Technology to easily create server-side applications
ASP pages are written in a scripting language, usually VBScript or JScript
An ASP page contains a sequence of static HTML interspersed with server-side code
ASP script commonly accesses and updates data in a database
36. Programming the WebASP An ASP page receives input from a HTTP request, and then dynamically generates a new HTML page that is returned to the client. ASP can also return XML or other types of data.An ASP page receives input from a HTTP request, and then dynamically generates a new HTML page that is returned to the client. ASP can also return XML or other types of data.
37. Introduction to .NETWhat is .NET? A vision of how information technology will evolve
A platform that supports the vision
A business model of software as a service
.NET is a broad initiative that can be viewed from several perspectives..NET is a broad initiative that can be viewed from several perspectives.
38. Introduction to .NETWhat is .NET? A vision
Web sites will be joined by Web services
New smart devices will join the PC
User interfaces will become more adaptable and customizable
Enabled by Web standards .NET will enable the next generation of applications. .NET will enable the next generation of applications.
39. A platform
The .NET Framework
Visual Studio.NET
.NET Enterprise Servers
Database, Messaging, Integration, Commerce, Proxy, Security, Mobility, Orchestration, Content Management
.NET Building Block Services
Passport
.NET My Services (“Hailstorm”)
Goal: make it incredibly easy to build powerful Web applications and Web services Introduction to .NETWhat is .NET? Microsoft is providing a suite of products and services to facilitate building this next generation. This course focuses on the .NET Framework and Visual Studio.NET.Microsoft is providing a suite of products and services to facilitate building this next generation. This course focuses on the .NET Framework and Visual Studio.NET.
40. Introduction to .NETThe .NET Platform Each blue box represents a separate computer (or cluster of computers).Each blue box represents a separate computer (or cluster of computers).
41. Web ServicesEvolution of the Web The first generation of Web applications was largely about delivering non-interactive content, i.e. publishing non-interactive HTML pages. For example, many applications simply operated in client/server mode and rendered HTML pages to send across the internet to browsers.
The second generation of Web applications was about creating applications usable over the Web. E-commerce is an example; you can go to http://www.barnesandnoble.com/ select books, order them and pay for them. This second generation also includes a more scalable back-end (e.g. WinDNA architecture) and a richer UI (e.g. DHTML and ActiveX).
However, useful though they may be, the second generation largely resulted in application islands on the Web. Yes, there are hyperlinks between sites, but for the most part, the actual applications at different sites do not interact.
The third generation of Web application is about using Web protocols and XML throughout to allow better integration between services on the Web. Protocols such as XML and SOAP allow you to create Web Services, enabling people and companies to easily create integrated applications.
The first generation of Web applications was largely about delivering non-interactive content, i.e. publishing non-interactive HTML pages. For example, many applications simply operated in client/server mode and rendered HTML pages to send across the internet to browsers.
The second generation of Web applications was about creating applications usable over the Web. E-commerce is an example; you can go to http://www.barnesandnoble.com/ select books, order them and pay for them. This second generation also includes a more scalable back-end (e.g. WinDNA architecture) and a richer UI (e.g. DHTML and ActiveX).
However, useful though they may be, the second generation largely resulted in application islands on the Web. Yes, there are hyperlinks between sites, but for the most part, the actual applications at different sites do not interact.
The third generation of Web application is about using Web protocols and XML throughout to allow better integration between services on the Web. Protocols such as XML and SOAP allow you to create Web Services, enabling people and companies to easily create integrated applications.
42. A set of technologies for developing and using components to create:
Web Forms
Web Services
Windows Applications
Supports the software lifecycle
Development
Debugging
Deployment
Maintenance The .NET FrameworkWhat Is the .NET Framework? The .NET Framework provides a set of technologies that makes creating, deploying, using and maintaining applications (including Web applications and Web Services) much easier and more robust.The .NET Framework provides a set of technologies that makes creating, deploying, using and maintaining applications (including Web applications and Web Services) much easier and more robust.
43. The .NET FrameworkThe .NET Framework and Visual Studio.NET The .NET framework exposes numerous classes to the developer. These classes allow the development of rich client applications and Web-based applications alike. The classes are shown here, divided into four areas.
ASP.NET provides the core Web infrastructure, such as Web Forms for UI-based development and Web Services for programmatic interface development.
User interface development on the Windows platform can be done using Windows Forms.
ADO.NET and XML provide the functionality for data access.
The core base classes provide infrastructure services such as security and transaction management.
You can create code in any of a large number of languages. This code will integrate in a deep, seamless manner via a standard called the Common Language Specification.
Visual Studio.NET provides tools that increases your productivity when creating applications.The .NET framework exposes numerous classes to the developer. These classes allow the development of rich client applications and Web-based applications alike. The classes are shown here, divided into four areas.
ASP.NET provides the core Web infrastructure, such as Web Forms for UI-based development and Web Services for programmatic interface development.
User interface development on the Windows platform can be done using Windows Forms.
ADO.NET and XML provide the functionality for data access.
The core base classes provide infrastructure services such as security and transaction management.
You can create code in any of a large number of languages. This code will integrate in a deep, seamless manner via a standard called the Common Language Specification.
Visual Studio.NET provides tools that increases your productivity when creating applications.
44. The .NET Framework.NET Framework Classes This is but a brief illustration of the breadth of classes provided by the .NET Framework. We will explore many of these classes during this course.
All of these classes are available to ALL languages.This is but a brief illustration of the breadth of classes provided by the .NET Framework. We will explore many of these classes during this course.
All of these classes are available to ALL languages.
45. Common Language RuntimeCompilation As a developer you can write code in the language of your choice. Your code is compiled into an Assembly, which is represented as a DLL or EXE.
As a developer you can write code in the language of your choice. Your code is compiled into an Assembly, which is represented as a DLL or EXE.
46. Windows Forms Framework for building rich clients
Built upon .NET Framework, languages
Rapid Application Development (RAD)
Visual inheritance
Anchoring and docking
Rich set of controls
Extensible controls Data-aware
Easily hooked into Web Services
ActiveX support
Licensing support
Printing support
Advanced graphics
Windows Forms is a framework for building rich Windows client applications, and can be written in any language that supports .NET.
Windows Forms provide the developer with many features, such as:
The simplicity that Visual Basic 6 programmers are used to.
Easy deployment. Windows Forms (as .NET applications) automatically takes advantage of the versioning and deployment features of the .NET Framework.
Windows Forms offers an architecture for controls and control containers based on concrete implementation of the control and container classes. This significantly reduces control-container interoperability issues.
Security. Windows Forms takes full advantage of the security features of .NET. This means that Windows Forms can be used to implement everything from an untrusted control running in the browser to a fully trusted application installed on a user's hard drive.
Web Services Support. Windows Forms offer full support for quickly and easily connecting to Web Services.
Rich Graphics.
Controls. Windows Forms offer a rich set of controls that encompass all of the controls offered by Windows and new features such as new "flat look" styles for Buttons, Radio Buttons and Checkboxes.
Data Awareness. Windows Forms offer full support for the ADO.NET data model.
ActiveX Controls. Windows Forms offer full support for ActiveX controls. You can easily host ActiveX controls in a Windows Forms application. You can also host a Windows Form control as an ActiveX control.
Licensing. Windows Forms take advantage of the .NET Framework enhanced licensing model.
Printing. Windows Forms offer a printing framework that enables applications to provide comprehensive reports.
Accessibility. Windows Form controls implement the interfaces defined by Microsoft Active Accessibility (MSAA), making it straightforward to build applications that support accessibility aids such as screen readers.
Windows Forms is a framework for building rich Windows client applications, and can be written in any language that supports .NET.
Windows Forms provide the developer with many features, such as:
The simplicity that Visual Basic 6 programmers are used to.
Easy deployment. Windows Forms (as .NET applications) automatically takes advantage of the versioning and deployment features of the .NET Framework.
Windows Forms offers an architecture for controls and control containers based on concrete implementation of the control and container classes. This significantly reduces control-container interoperability issues.
Security. Windows Forms takes full advantage of the security features of .NET. This means that Windows Forms can be used to implement everything from an untrusted control running in the browser to a fully trusted application installed on a user's hard drive.
Web Services Support. Windows Forms offer full support for quickly and easily connecting to Web Services.
Rich Graphics.
Controls. Windows Forms offer a rich set of controls that encompass all of the controls offered by Windows and new features such as new "flat look" styles for Buttons, Radio Buttons and Checkboxes.
Data Awareness. Windows Forms offer full support for the ADO.NET data model.
ActiveX Controls. Windows Forms offer full support for ActiveX controls. You can easily host ActiveX controls in a Windows Forms application. You can also host a Windows Form control as an ActiveX control.
Licensing. Windows Forms take advantage of the .NET Framework enhanced licensing model.
Printing. Windows Forms offer a printing framework that enables applications to provide comprehensive reports.
Accessibility. Windows Form controls implement the interfaces defined by Microsoft Active Accessibility (MSAA), making it straightforward to build applications that support accessibility aids such as screen readers.
47. Web Forms Built with ASP.NET
Logical evolution of ASP
Similar development model: edit the page and go
Requires less code
New programming model
Event-driven/server-side controls
Rich controls (e.g. data grid, validation)
Data binding
Controls generate browser-specific code
Simplified handling of page state The first incarnation of ASP proved very successful. As part of the .NET Framework, Microsoft supports ASP.NET. ASP.NET is a logical evolution of ASP that addresses many of the issues previously associated with ASP.
ASP.NET is now compiled and not interpreted. This of course can go some way towards improving efficiency and also means that code can now support strongly typed variables other than VARIANTS. This makes ASP.NET much more flexible and easier to code.
A great deal of work has also been done to make sure that ASP.NET development has become cleaner and more productive.The first incarnation of ASP proved very successful. As part of the .NET Framework, Microsoft supports ASP.NET. ASP.NET is a logical evolution of ASP that addresses many of the issues previously associated with ASP.
ASP.NET is now compiled and not interpreted. This of course can go some way towards improving efficiency and also means that code can now support strongly typed variables other than VARIANTS. This makes ASP.NET much more flexible and easier to code.
A great deal of work has also been done to make sure that ASP.NET development has become cleaner and more productive.
48. Languages C# New language created for .NET
Safe, productive evolution of C++
Key concepts:
Component-oriented
Everything is an object
Robust and durable code
Preserving your investment
Submitted to ECMA for standardization
Uses .NET Framework classes C# is a new language designed to take advantage of most of the features of the .NET Framework.
C# was designed from the ground up to support component concepts like events, methods and properties.
In C#, everything is an object, which allows the creation of very clean designs.
C# was designed to make it easy to create robust and maintainable software.
C# should allow you to preserve your existing investment by integrating easily with your existing code.C# is a new language designed to take advantage of most of the features of the .NET Framework.
C# was designed from the ground up to support component concepts like events, methods and properties.
In C#, everything is an object, which allows the creation of very clean designs.
C# was designed to make it easy to create robust and maintainable software.
C# should allow you to preserve your existing investment by integrating easily with your existing code.
49. Languages Visual Basic.NET Modernizes and simplifies Visual Basic
Inheritance
Threading
Exception handling
Support for late binding
Uses .NET Framework classes
VB.NET is a modernized version of Visual Basic. It is integrated with the .NET Framework, but still provides language constructs, features and syntax that is familiar to Visual Basic developers.VB.NET is a modernized version of Visual Basic. It is integrated with the .NET Framework, but still provides language constructs, features and syntax that is familiar to Visual Basic developers.
50. Conclusion Internet Technologies
Programming Languages and Paradigms
Programming the Web
.NET Overview