Upload
delphia-nelson
View
223
Download
4
Embed Size (px)
Citation preview
1
NIIT, South Ex
2
NIIT, South Ex
Introduction to .NET Web Services The .NET Framework Common Language
Runtime Windows Forms Web Forms ADO.NET Languages
3
NIIT, South Ex
A vision of how information technology will evolve
A platform that supports the vision A business model of software as a
service
4
NIIT, South Ex
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
5
NIIT, South Ex
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
} The focus of this course
6
NIIT, South Ex
A business model Software as a service Subscription-based services Application hosting, e.g. bCentral
7
NIIT, South Ex
Web Form
.NET Framework
Windows
Web Service
.NET FoundationWeb Services
Your InternalWeb Service
Third-PartyWeb Services
.NET EnterpriseServers
Clients Applications
Protocols: HTTP,HTML, XML, SOAP, UDDI
Tools:Visual Studio.NET,
Notepad
8
NIIT, South Ex
A programmable application component accessible via standard Web protocols
The center of the .NET architecture Exposes functionality over the Web Built on existing and emerging
standards HTTP, XML, SOAP, UDDI, WSDL, …
9
NIIT, South Ex
Generation 1Static HTML
HTML
Generation 2Web Applications
HTML
HTML, XML
HTML, XML
Generation 3Web Services
10
NIIT, South Ex
NIIT, South Ex
11
VS .NET VS .NET ProjectProject
Assembly: geom.dll
VB, C#, …VB, C#, … BuildBuild
SQL ServerSQL Server
SQL Data Definition: SQL Data Definition: create create assembly … assembly … create function … create function … create create procedure … procedure … create trigger … create trigger … create create type …type …SQL Queries: SQL Queries:
SELECT name FROM Supplier SELECT name FROM Supplier WHERE Location.Distance ( @point ) < 3WHERE Location.Distance ( @point ) < 3
CLR hosted by SQL (in-proc)
Define Location.Distance()
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 12
NIIT, South Ex
Common Language Specification
Common Language Runtime
VB C++ C#
ASP.NET: Web Servicesand Web Forms
JScript …
WindowsForms
.NET Framework Base Classes
ADO.NET: Data and XML
Visu
al Stu
dio
.NE
T
13
NIIT, South Ex
NIIT, South Ex
System.Data
DesignOLEDB
SQLTypesSQL
System
GlobalizationDiagnostics
ConfigurationCollections
ResourcesReflection
NetIO
ThreadingText
ServiceProcessSecurity Runtime
InteropServicesRemotingSerialization
System.Xml
XPathXSLT Serialization
System.Web
Configuration SessionStateCaching Security
ServicesDescriptionDiscoveryProtocols
UIHtmlControls
WebControlsSystem.Drawing
ImagingDrawing2D
TextPrinting
System.Windows.FormsForm Button
MessageBox ListControl
14
Development servicesDeep cross-language interoperabilityIncreased productivity
Deployment servicesSimple, reliable deploymentFewer versioning problems – NO MORE ‘DLL HELL’
Run-time servicesPerformance Scalability Availability
Reliability Security Safety
15
NIIT, South Ex
Source CodeSource Code
C++, C#, VB or any .NET language
csc.exe or vbc.exe
Compiler
AssemblyAssembly
DLL or EXE
16
NIIT, South Ex
NIIT, South Ex
17
AssemblyAssemblySource Source CodeCode
Language Language CompilerCompiler
CompilationCompilation
At installation or the first At installation or the first time each method is time each method is
calledcalledExecutionExecution
JIT CompilerJIT CompilerNativeNative
CodeCode
Code (IL)Code (IL)
MetadataMetadata
Assembly Logical unit of deployment Contains Manifest, Metadata, MSIL and
resources Manifest
Metadata about the components in an assembly (version, types, dependencies, etc.)
Type Metadata Completely describes all types defined in
an assembly: properties, methods, arguments, return values, attributes, base classes, …
18
NIIT, South Ex
Microsoft Intermediate Language (MSIL, IL) All languages compile to IL (managed
code) IL is always compiled to native code before
being executed Resources
E.g. .bmp, .jpg
19
NIIT, South Ex
CLR
VBSource code
Compiler
C++C#
Assembly AssemblyAssembly
Operating System Services
MSIL
Common Language Runtime JIT Compiler
Compiler Compiler
Nativecode
ManagedCode
ManagedCode
ManagedCode
UnmanagedCode
CLR Services
Ngen
20
NIIT, South Ex
Code managementConversion of MSIL to
native code Loading and execution
of managed code Creation and
management of metadata
Verification of type safety
Insertion and execution of security checks
Memory management and isolation
Handling exceptions across languages
Interoperation between .NET Framework objects and COM objects and Win32 DLLs
Automation of object layout for late binding
Developer services (profiling, debugging, etc.)
21
NIIT, South Ex
Common Type System (CTS) A superset of the data types used by most
modern programming languages Common Language Specification (CLS)
A subset of CTS that allows code written in different languages to interoperate
What languages? Microsoft: C++, Visual Basic, C#, JScript Third-Party: Cobol, Eiffel, Smalltalk, Scheme,
Oberon, Haskell, Java, Python, Perl, …
22
NIIT, South Ex
An application consists of one or more assemblies
How does one assembly bind to another? Based upon metadata and policy
Local (preferred) Assembly Global Cache
Multiple versions of an assembly may exist on the same machine Easier software deployment, updates and
removal Multiple versions of an assembly can even be
used by the same application23
NIIT, South Ex
Evidence-based security (authentication)
Based on user identity and code identity
Configurable policies Imperative and declarative interfaces
24
NIIT, South Ex
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
25
NIIT, South Ex
Built with ASP.NETLogical evolution of ASPSimilar development model: edit the page and
goRequires less codeNew programming model
Event-driven/server-side controlsRich controls (e.g. data grid, validation)Data bindingControls generate browser-specific codeSimplified handling of page state
26
NIIT, South Ex
Allows separation of UI and business logic
Uses .NET languages Not just scripting
Easy to use components XCOPY/FTP deployment Simple configuration (XML-based)
27
NIIT, South Ex
Caching (pages, fragments, custom) Scalable session state management Tracing support ASP.NET is extensible
No ISAPI / ASP dichotomy Automatic process rollover Forms-based authentication
28
NIIT, South Ex
Similar to ADO, but better factored Language-neutral data access Supports two styles of data access
Disconnected Forward-only, read-only access
Supports data binding DataSet: a collection of tables Can view and process data relationally
(tables) or hierarchically (XML)29
NIIT, South Ex
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
30
NIIT, South Ex
Modernizes and simplifies Visual Basic Inheritance Threading Exception handling
Support for late binding Uses .NET Framework classes
31
NIIT, South Ex
.NET Framework 1.1This is the first major .NET Framework upgrade. It is available on its own as a redistributable package or in a software development kit, and was published on 3 April 2003. It is also part of the second release of Microsoft Visual Studio .NET (released as Visual Studio .NET 2003). This is the first version of the .NET Framework to be included as part of the Windows operating system, shipping with Windows Server 2003. Mainstream support for .NET Framework 1.1 ended on 14 October 2008, and extended support ends on 8 October 2013. Since .NET 1.1 is a component of Windows Server 2003, extended support for .NET 1.1 on Server 2003 will run out with that of the OS – currently 14 July 2015. .NET 1.1 is the last available version for Windows NT 4.0.If .NET Framework 1.0 is removed, installing only .NET Framework 1.1 also provides the system support for version 1.0, except in rare instances where an application will not run because it checks the version number of a library.
.NET Framework 1.1This is the first major .NET Framework upgrade. It is available on its own as a redistributable package or in a software development kit, and was published on 3 April 2003. It is also part of the second release of Microsoft Visual Studio .NET (released as Visual Studio .NET 2003). This is the first version of the .NET Framework to be included as part of the Windows operating system, shipping with Windows Server 2003. Mainstream support for .NET Framework 1.1 ended on 14 October 2008, and extended support ends on 8 October 2013. Since .NET 1.1 is a component of Windows Server 2003, extended support for .NET 1.1 on Server 2003 will run out with that of the OS – currently 14 July 2015. .NET 1.1 is the last available version for Windows NT 4.0.If .NET Framework 1.0 is removed, installing only .NET Framework 1.1 also provides the system support for version 1.0, except in rare instances where an application will not run because it checks the version number of a library.
32
NIIT, South Ex
.NET Framework 2.0Released with Visual Studio 2005, Microsoft SQL Server 2005, and BizTalk 2006.•The 2.0 Redistributable Package can be downloaded for free from Microsoft, and was• published on 22 January 2006.•The 2.0 Software Development Kit (SDK) can be downloaded for free from Microsoft.•It is included as part of Visual Studio 2005 and Microsoft SQL Server 2005.•Version 2.0 without any Service Pack is the last version with support for Windows 98 •and Windows Me•. Version 2.0 with Service Pack 2 is the last version with official support for •Windows 2000• although there have been• some unofficial workarounds published online to use a subset of the functionality •from Version 3.5• in Windows 2000.[19] Version 2.0• with Service Pack 2 requires Windows 2000 with SP4 plus KB835732 or• KB891861 update,• Windows XP with SP2 or later and •Windows Installer 3.1 (KB893803-v2)•It shipped with Windows Server 2003 R2 (not installed by default).
.NET Framework 2.0Released with Visual Studio 2005, Microsoft SQL Server 2005, and BizTalk 2006.•The 2.0 Redistributable Package can be downloaded for free from Microsoft, and was• published on 22 January 2006.•The 2.0 Software Development Kit (SDK) can be downloaded for free from Microsoft.•It is included as part of Visual Studio 2005 and Microsoft SQL Server 2005.•Version 2.0 without any Service Pack is the last version with support for Windows 98 •and Windows Me•. Version 2.0 with Service Pack 2 is the last version with official support for •Windows 2000• although there have been• some unofficial workarounds published online to use a subset of the functionality •from Version 3.5• in Windows 2000.[19] Version 2.0• with Service Pack 2 requires Windows 2000 with SP4 plus KB835732 or• KB891861 update,• Windows XP with SP2 or later and •Windows Installer 3.1 (KB893803-v2)•It shipped with Windows Server 2003 R2 (not installed by default).
33
NIIT, South Ex
Changes in 2.0 in comparison with 1.1•Generics•Language support for generics built directly into the .NET CLR.•Full 64-bit support for both the x64 and the IA64 hardware platforms.•Numerous API changes.•SQL Server integration – .NET 2.0, VS 2005, and SQL Server 200•5 are all tied together. This means that instead of using T-SQL, one• can build stored procedures and triggers in any of the .NET-compatible• languages.•A new hosting API for native applications wishing to host an instance• of the .NET runtime. The new API gives a fine grain control on• the behavior of the runtime with regards to multithreading,• memory allocation, assembly loading and more •. It was initially developed to efficiently host the runtime in •Microsoft SQL Server, which implements its own scheduler and memory• manager.
Changes in 2.0 in comparison with 1.1•Generics•Language support for generics built directly into the .NET CLR.•Full 64-bit support for both the x64 and the IA64 hardware platforms.•Numerous API changes.•SQL Server integration – .NET 2.0, VS 2005, and SQL Server 200•5 are all tied together. This means that instead of using T-SQL, one• can build stored procedures and triggers in any of the .NET-compatible• languages.•A new hosting API for native applications wishing to host an instance• of the .NET runtime. The new API gives a fine grain control on• the behavior of the runtime with regards to multithreading,• memory allocation, assembly loading and more •. It was initially developed to efficiently host the runtime in •Microsoft SQL Server, which implements its own scheduler and memory• manager.
34
NIIT, South Ex
Comparison contd………•Many additional and improved ASP.NET web controls.•New data controls with declarative data binding.•New personalization features for ASP.NET,• such as support for themes, skins, master pages and webparts.•.NET Micro Framework – a version of the .NET Framework •related to the Smart Personal Objects Technology initiative.•Membership provider•Partial classes•Nullable types•Anonymous methods•Iterators•Data tables
Comparison contd………•Many additional and improved ASP.NET web controls.•New data controls with declarative data binding.•New personalization features for ASP.NET,• such as support for themes, skins, master pages and webparts.•.NET Micro Framework – a version of the .NET Framework •related to the Smart Personal Objects Technology initiative.•Membership provider•Partial classes•Nullable types•Anonymous methods•Iterators•Data tables
35
NIIT, South Ex
Internet Technologies Programming Languages and
Paradigms Programming the Web .NET Overview
36
NIIT, South Ex