This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Tuesday, April 18, 2023Software Incubator .NET Training Program1
What is .NET? - Technology .NET Framework - collection Visual Studio - IDE C# and VB – common languages 2 tier architecture 3 tier architecture N tier architecture
Tuesday, April 18, 2023 Software Incubator 2
Why .Net?
Why C……..brainstorming Why Java …..Brainstorming Now why .net ??? Fast application development No new concept Fastest emerging technology in IT Market Job Oriented Has a wide range of applications Object Oriented(close to real world)
Tuesday, April 18, 2023 Software Incubator 3
What is Microsoft .NET?
.NET is a Framework that provides a common platform for many languages.
44 languages in the beginning…..so can u guess what is the no now ???
The .NET Framework is an environment for building, deploying, and running Web applications and Web Services
Tuesday, April 18, 2023 Software Incubator 4
Advantages of .NET Direct Support for SecurityConsistent Programming ModelWindows Presentation Format Support with XAMLIntelli-senseDebuggingGreatly simplifies language interoperability. Supports strongly typed languagesCalling from and to any other .NET language becomes simpleIt uses industry-standard protocols such as TCP/IP, XML, SOAP and HTTPEasy Application Deployment and MaintenanceSimplified Development Efforts
Tuesday, April 18, 2023 Software Incubator 5
.NET Framework
Tuesday, April 18, 2023 Software Incubator 6
.NET Framework
.NET Framework consists of 3 main parts: Common Language Runtime MSIL Framework Classes/Libraries
Tuesday, April 18, 2023 Software Incubator 7
The .NET Framework
Base Class LibraryBase Class Library
Common Language SpecificationCommon Language Specification
Common Language RuntimeCommon Language Runtime
ADO.NET: Data and XMLADO.NET: Data and XML
VBVB C++C++ C#C#V
isual S
tud
io.N
ET
Visu
al Stu
dio
.NE
T
ASP.NET: Web ServicesASP.NET: Web Servicesand Web Formsand Web Forms
JScriptJScript ……
WindowsWindowsFormsForms
WindowsWindowsFormsForms
Tuesday, April 18, 2023 Software Incubator 8
Common Language Runtime (CLR) A common runtime for all .NET languages
Common type system Common metadata Intermediate Language (IL) to native code compilers Memory allocation and garbage collection Code execution and security
Over 44 languages supported today C#, VB, Jscript, Visual C++ from Microsoft Perl, Python, Smalltalk, Cobol, Haskell, Mercury, Eiffel, Oberon,
Oz, Pascal, APL, CAML, Scheme, etc.
Tuesday, April 18, 2023 Software Incubator 9
Common Language Runtime (CLR)CLR works like a virtual machine in executing all languages. All .NET languages must obey the rules and standards imposed by CLR. Examples: Object declaration, creation and use Data types,language libraries Error and exception handling Interactive Development Environment (IDE)
Tuesday, April 18, 2023 Software Incubator 10
Intermediate Language (IL) .NET languages are not compiled to machine code.
They are compiled to an Intermediate Language (IL).
CLR accepts the IL code and recompiles it to machine code. The recompilation is just-in-time (JIT) meaning it is done as soon as a function or subroutine is called.
The JIT code stays in memory for subsequent calls. In cases where there is not enough memory it is discarded thus making JIT process interpretive.
Tuesday, April 18, 2023 Software Incubator 11
Compilation in .NET
Tuesday, April 18, 2023 Software Incubator
Code in VB.NET Code in C#Code in another .NET Language
VB.NET compiler C# compilerAppropriate
Compiler
IL(IntermediateLanguage) code
CLR just-in-timeexecution
12
Common Language Runtime
Multiple Language Support CTS is a rich type system built into the CLR
Implements various types (int, double, etc) And operations on those types
CLS is a set of specifications that language and library designers need to follow This will ensure interoperability between languages
Tuesday, April 18, 2023 Software Incubator 13
Common Language Runtime (CLR) Enables cross-language interoperability
Common Language Specification describes interoperability requirements
Language/Hardware/OS Independent Compact framework for small devices
Industrial strength Garbage collector Designed for multi-processor servers
Tuesday, April 18, 2023 Software Incubator 14
CLR: Execution Model
VBVBSource Source codecode
CompilerCompiler
C++C++C#C#
CompilerCompilerCompilerCompiler
AssemblyAssemblyIL CodeIL Code
AssemblyAssemblyIL CodeIL Code
AssemblyAssemblyIL CodeIL Code
Operating System ServicesOperating System Services
Common Language RuntimeCommon Language Runtime
JIT CompilerJIT Compiler
Native CodeNative Code
ManagedManagedcodecode
UnmanagedUnmanagedComponentComponent
Tuesday, April 18, 2023 Software Incubator 15
.NET Framework Libraries
Single consistent set of object oriented class libraries to enable building distributed web applications (Unified Classes)
Built using classes arranged across logical hierarchical namespaces For example: System.Data.SQL
Work with all CLR languages No more “VBRun” or “MFC” divide
ASP.NET ASP.NET is a new programming framework designed to
make web apps easier to: Build, Deploy, Run
Radical advancement of today’s ASP Broader programming language support
Visual Basic.NET, Jscript.NET, C# Easier page programming model
Namespaces Richer XML features and integration XCopy/FTP deployment Better reliability and recovery Excellent Visual Studio designer support
Tuesday, April 18, 2023 Software Incubator 18
ASP.NET
ASP.NET is compiled, not interpreted Better performance Early binding, strong typing, JIT compiling to native code
Configuration settings in XML-based files Session state can now be shared across a web farm of ASP.NET
servers .NET State Server Process manages state
Application state is still single sever ASP.NET detects and recovers from problems
Access violations, memory leaks, deadlocks ASP.NET supports pre-emptive cycling of apps
Time and request based settings
Tuesday, April 18, 2023 Software Incubator 19
ASP.NETASP.NET,the platform services that allow to program Web Applications and Web Services in any .NET language
ASP.NET Uses .NET languages to generate HTML pages. HTML page is targeted to the capabilities of the requesting Browser
ASP.NET “Program” is compiled into a .NET class and cached the first time it is called. All subsequent calls use the cached version.
Tuesday, April 18, 2023 Software Incubator 20
Logical Evolution of ASP Supports multiple languages Improved performance Control-based, event-driven execution model More productive Cleanly encapsulated functionality
ASP.NET
Tuesday, April 18, 2023 Software Incubator 21
ASP.NET Web Services
A technical definition “A programmable application component accessible
via standard Web protocols”
Tuesday, April 18, 2023 Software Incubator 22
It is just an application… …that exposes its features and capabilities over
the network… …using XML… …to allow for the creation of powerful new
applications that are more than the sum of their parts…
Web Services
Tuesday, April 18, 2023 Software Incubator 23
ASP.NET Server Controls
Server controls are tags that are understood by the server.
There are three kinds of server controls: HTML Server Controls - Traditional HTML tags Web Server Controls - New ASP.NET tags Validation Server Controls - For input validation
Tuesday, April 18, 2023 Software Incubator 24
Allows clean cut code Code-behind Web Forms
Easier for tools to generate Code within is compiled then executed Improved handling of state information Support for ASP.NET server controls
Data validation Data bound grids
ASP.NET Web Forms
Tuesday, April 18, 2023 Software Incubator 25
ADO.NET (Data and XML)
New objects (e.g., DataSets) Separates connected / disconnected issues Language neutral data access Uses same types as CLR Great support for XML
Tuesday, April 18, 2023 Software Incubator 26
Visual Studio.NET
Tuesday, April 18, 2023 Software Incubator 27
Visual Studio.NET
Development tool that contains a rich set of productivity and debugging features
Tuesday, April 18, 2023 Software Incubator 28
Visual Studio.NET
Integrated Development Environment Visual Basic.NET
Many language enhancements Inheritance,Overloading, Free Threading
Visual C++ Integration with .NET Framework with managed extensions (classes)
C# New development language Based on C/C++ with Garbage Collection/Memory Management
JUMP (Java User Migration Path) to .NET (1/25/01)
Visual J++ has been removed from the Visual Studio suite currently but it was a part of the earlier versions.
Tuesday, April 18, 2023 Software Incubator 29
VS.NET Features
Single IDE for all Languages Server Explorer
Event Viewer, Message Queues, Services SQL Databases, Data Connection, Etc.
Integrated IE Browser HTML/XML Editors Macros/Macro Explorer Solution Explorer Tabbed Documents Dynamic Help Common Forms Editor
VB.NET, C++, and C#
Tuesday, April 18, 2023 Software Incubator 30
C#
Tuesday, April 18, 2023 Software Incubator 31
Intro to C#
Design Goals of C# Component Orientated Language Robust and Durable Software
Features Classes Namespaces No header files
VB.NET vs. C# Ability to embed C++ code in C# code Elegance of C/C++ language
Tuesday, April 18, 2023 Software Incubator 32
Design Goals C#
Component Oriented Properties, methods, events
Robust and Durable Garbage collection (No memory leaks and stray
pointers) Exception Handling Type-safety (No uninitialized variables)
Based on C++ Interoperability
Support for XML, SOAP
Tuesday, April 18, 2023 Software Incubator 33
IIS – Internet Information Services
Internet Information Service
IIS (Internet Information Services) is
Microsoft's Internet server
IIS comes as a free component with
Windows servers
IIS is also a part of Windows 2000 and XP
Professional
How to install
Tuesday, April 18, 2023 Software Incubator 34
How does ASP.NET work?
Requests an HTML file, the server returns the file
Requests an ASP.NET file, IIS passes the request to the ASP.NET engine on the server
The ASP.NET engine reads the file, line by line, and executes the scripts in the file
ASP.NET file is returned to the browser as plain HTML
Tuesday, April 18, 2023 Software Incubator 35
J2EE and .NET
Execution Engine J2EE
Java source code compiles into machine-independent byte code
Runtime Environment : JVM .NET
Any compliant language compiles into MSILRuntime environment : CLR
Both JVM and CLR ,support services, such as code verification, memory management via garbage collection, and code security
J2EE and .NET
Cross Platform Portability
J2EEPlatform Independent JDK should exist on target machine
.NETSupports Windows platformCLR should exist on target machine
Can support other platforms provided it has its own JIT complier
J2EE and .NET
Language Support
J2EE
Tied to Java
Supports other languages via interface technology .NET
Language independent
Supports any language if mapping exists from that
language to IL
J2EE and .NET
Tools Support J2EE
Can employ any number of tools
Pro :Developer has a great deal of choice
Con :Difficulty in choosing a right tool for a given job
.NET
Visual Studio.NET, single IDE for building an application