You are on page 1of 40

.NET Framework

.NET Training Program
Ashutosh Pandey
Student Incharge - Software Incubator
Computer Science and Engineering
Ajay Kumar Garg Engineering College, Ghaziabad
Email: meatashu@gmail.com, Phone: 9990687407

1

Software Incubator .NET Training Program

Tuesday, May 12, 2015

Overview






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, May 12, 2015

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, May 12, 2015

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, May 12, 2015

Software Incubator

4

May 12.NET language becomes simple It uses industry-standard protocols such as TCP/IP. SOAP and HTTP Easy Application Deployment and Maintenance Simplified Development Efforts Tuesday. 2015 Software Incubator 5 .Advantages of . XML.NET  Direct Support for Security Consistent Programming Model Windows Presentation Format Support with XAML Intelli-sense Debugging Greatly simplifies language interoperability. Supports strongly typed languages Calling from and to any other .

2015 Software Incubator 6 .. May 12.NET Framework Tuesday.

NET Framework  .NET Framework consists of 3 main parts:    Common Language Runtime MSIL Framework Classes/Libraries Tuesday.. May 12. 2015 Software Incubator 7 .

May 12. 2015 Software Incubator 8 .NET: Data and XML Base Class Library Visual Studio.NET Framework VB C++ C# JScript … Common Language Specification ADO.NET: Web Services and Web Forms Common Language Runtime Tuesday.The .NET Windows Windows Forms Forms ASP.

2015 Software Incubator 9 . VB. Smalltalk. etc. Jscript. Cobol.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#. Pascal.Common Language Runtime (CLR)  A common runtime for all . Oz. Mercury. Oberon. May 12. Haskell. CAML. Eiffel. Scheme. Tuesday. Python. Visual C++ from Microsoft Perl. APL.

language libraries Error and exception handling Interactive Development Environment (IDE) Tuesday. May 12.NET languages must obey the rules and standards imposed by CLR.Common Language Runtime (CLR) CLR works like a virtual machine in executing all languages. Examples:     Object declaration. creation and use Data types. All . 2015 Software Incubator 10 .

May 12. Tuesday.  The JIT code stays in memory for subsequent calls. 2015 Software Incubator 11 .NET languages are not compiled to machine code.  CLR accepts the IL code and recompiles it to machine code.Intermediate Language (IL)  . In cases where there is not enough memory it is discarded thus making JIT process interpretive. They are compiled to an Intermediate Language (IL). The recompilation is just-in-time (JIT) meaning it is done as soon as a function or subroutine is called.

NET compiler C# compiler Appropriate Compiler IL(Intermediate Language) code CLR just-in-time execution Tuesday.NET Code in C# Code in another .Compilation in .NET Language VB. 2015 Software Incubator 12 . May 12.NET Code in VB.

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. May 12. 2015 Software Incubator 13 .Common Language Runtime    Multiple Language Support CTS is a rich type system built into the CLR  Implements various types (int. double.

2015 Software Incubator 14 .Common Language Runtime (CLR)  Enables cross-language interoperability   Language/Hardware/OS Independent   Common Language Specification describes interoperability requirements Compact framework for small devices Industrial strength Garbage collector  Designed for multi-processor servers Tuesday. May 12.

CLR: Execution Model Source code Managed code VB C# C++ Compiler Compiler Compiler Assembly IL Code Assembly IL Code Assembly IL Code Unmanaged Component Common Language Runtime JIT Compiler Native Code Operating System Services Tuesday. May 12. 2015 Software Incubator 15 .

Data.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. 2015 Software Incubator 16 .SQL Work with all CLR languages  No more “VBRun” or “MFC” divide Tuesday.. May 12.

Text. etc System Classes Collections.NET Framework Libraries Unified Classes Web Classes (ASP. Imaging. 2015 Software Incubator 17 .. SQL. Path.NET) Windows Forms ADO. May 12.Types etc Design. Configuration etc Data (ADO. IO. Security. Caching. Globalization. Session. Diagnostics. Threading Serialization. Serialization etc Drawing. Security. Cmpnt Model etc XML Classes Drawing Classes XSLT. Reflection.NET) Controls. Messaging etc Tuesday.

2015 Software Incubator 18 . May 12. Run Radical advancement of today’s ASP  Broader programming language support   Easier page programming model      Visual Basic. Deploy. Jscript.ASP. C# Namespaces Richer XML features and integration XCopy/FTP deployment Better reliability and recovery Excellent Visual Studio designer support Tuesday.NET.NET is a new programming framework designed to make web apps easier to:   Build.NET  ASP.NET.

NET detects and recovers from problems  Access violations.NET supports pre-emptive cycling of apps  Time and request based settings Tuesday. May 12. 2015 Software Incubator 19 .NET State Server Process manages state Application state is still single sever ASP. strong typing. memory leaks.NET       ASP. deadlocks ASP.NET servers  . not interpreted  Better performance  Early binding.ASP. JIT compiling to native code Configuration settings in XML-based files Session state can now be shared across a web farm of ASP.NET is compiled.

NET ASP.NET “Program” is compiled into a .ASP.NET languages to generate HTML pages. May 12.the platform services that allow to program Web Applications and Web Services in any .NET language ASP.NET. All subsequent calls use the cached version.NET class and cached the first time it is called. HTML page is targeted to the capabilities of the requesting Browser ASP.NET Uses . 2015 Software Incubator 20 . Tuesday.

May 12. 2015 Software Incubator 21 .ASP.NET  Logical Evolution of ASP      Supports multiple languages Improved performance Control-based. event-driven execution model More productive Cleanly encapsulated functionality Tuesday.

NET Web Services  A technical definition  “A programmable application component accessible via standard Web protocols” Tuesday. May 12. 2015 Software Incubator 22 .ASP.

May 12. 2015 Software Incubator 23 .Web Services  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… Tuesday.

There are three kinds of server controls:    HTML Server Controls .NET tags Validation Server Controls .For input validation Tuesday.Traditional HTML tags Web Server Controls .ASP. 2015 Software Incubator 24 .New ASP. May 12.NET Server Controls   Server controls are tags that are understood by the server.

ASP. May 12. 2015 Software Incubator 25 .NET server controls   Data validation Data bound grids Tuesday.NET Web Forms  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.

. 2015 Software Incubator 26 .g. May 12. DataSets) Separates connected / disconnected issues Language neutral data access Uses same types as CLR Great support for XML Tuesday.ADO.NET (Data and XML)      New objects (e.

2015 Software Incubator 27 . May 12.Visual Studio.NET Tuesday.

NET  Development tool that contains a rich set of productivity and debugging features Tuesday. May 12. 2015 Software Incubator 28 .Visual Studio.

Free Threading New development language Based on C/C++ with Garbage Collection/Memory Management JUMP (Java User Migration Path) to .NET  Integrated Development Environment  Visual Basic.Overloading.NET    Visual C++   Integration with . May 12.NET (1/25/01) Visual J++ has been removed from the Visual Studio suite currently but it was a part of the earlier versions. 2015 Software Incubator 29 .Visual Studio.NET Framework with managed extensions (classes) C#    Many language enhancements Inheritance. Tuesday.

Services SQL Databases. Integrated IE Browser HTML/XML Editors Macros/Macro Explorer Solution Explorer Tabbed Documents Dynamic Help Common Forms Editor  VB. Message Queues.NET Features   Single IDE for all Languages Server Explorer          Event Viewer. and C# Tuesday. C++.NET.VS. 2015 Software Incubator 30 . Etc. Data Connection. May 12.

C# Tuesday. May 12. 2015 Software Incubator 31 .

C#   Ability to embed C++ code in C# code Elegance of C/C++ language Tuesday.Intro to C#  Design Goals of C#    Features     Component Orientated Language Robust and Durable Software Classes Namespaces No header files VB. May 12.NET vs. 2015 Software Incubator 32 .

Design Goals C#  Component Oriented   Robust and Durable      Properties. 2015 Software Incubator 33 . SOAP Tuesday. May 12. events Garbage collection (No memory leaks and stray pointers) Exception Handling Type-safety (No uninitialized variables) Based on C++ Interoperability  Support for XML. methods.

2015 Software Incubator 34 .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. May 12.

IIS passes the request to the ASP.NET work?  Requests an HTML file. 2015 Software Incubator 35 . May 12.NET engine on the server  The ASP. the server returns the file  Requests an ASP.NET file.How does ASP. and executes the scripts in the file  ASP.NET engine reads the file.NET file is returned to the browser as plain HTML Tuesday. line by line.

NET Any compliant language compiles into MSIL Runtime environment : CLR Both JVM and CLR . and code security .J2EE and . such as code verification.NET Execution Engine  J2EE Java source code compiles into machine-independent byte code Runtime Environment : JVM  . memory management via garbage collection.support services.

J2EE and .NET Cross Platform Portability   J2EE Platform Independent JDK should exist on target machine .NET Supports Windows platform CLR should exist on target machine Can support other platforms provided it has its own JIT complier .

J2EE and .NET Language independent Supports any language if mapping exists from that language to IL .NET Language Support   J2EE Tied to Java Supports other languages via interface technology .

J2EE and . single IDE for building an application .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.NET Visual Studio.

May 12.akgec.akgec.org/si Course material available at www.Questions/Queries ?? Visit us @ www. 2015 Software Incubator 40 .org/si/downloads Tuesday.