Presentation is loading. Please wait.

Presentation is loading. Please wait.

.NET Framework .NET Training Program Ashutosh Pandey

Similar presentations

Presentation on theme: ".NET Framework .NET Training Program Ashutosh Pandey"— Presentation transcript:

1 .NET Framework .NET Training Program Ashutosh Pandey
Student Incharge - Software Incubator Computer Science and Engineering Ajay Kumar Garg Engineering College, Ghaziabad Phone: Software Incubator .NET Training Program Saturday, April 15, 2017 Ajag Kumar Garg Engineering College, Ghaziabad

2 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 Saturday, April 15, 2017 Software Incubator

3 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) Saturday, April 15, 2017 Software Incubator

4 What is Microsoft .NET? .NET is a Framework that provides a common platform for many languages. 44 languages in the beginning… can u guess what is the no now ??? The .NET Framework is an environment for building, deploying, and running Web applications and Web Services This chart summarizes the status of Microsoft SNA Server 4.0. By the way, SNA Server 4.0 is available now as a standalone product and as part of the newest version of Microsoft BackOffice Server - version 4.0. Saturday, April 15, 2017 Software Incubator

5 Advantages of .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 .NET language becomes simple It uses industry-standard protocols such as TCP/IP, XML, SOAP and HTTP Easy Application Deployment and Maintenance Simplified Development Efforts Saturday, April 15, 2017 Software Incubator

6 .NET Framework Saturday, April 15, 2017 Software Incubator

7 .NET Framework .NET Framework consists of 3 main parts:
Common Language Runtime MSIL Framework Classes/Libraries Saturday, April 15, 2017 Software Incubator

8 Common Language Specification Common Language Runtime
The .NET Framework VB C++ C# JScript Visual Studio.NET Common Language Specification ASP.NET: Web Services and Web Forms Windows Forms Windows Forms ADO.NET: Data and XML The .NET framework exposes numerous classes to the developer. These classes allow the development of rich client applications and Web based applications alike. In the above slide these classes have been divided into 4 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. Finally, the core base classes provide infrastructure services such as security, transaction management etc. Base Class Library Common Language Runtime Saturday, April 15, 2017 Software Incubator

9 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. Saturday, April 15, 2017 Software Incubator

10 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) Saturday, April 15, 2017 Software Incubator

11 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. Saturday, April 15, 2017 Software Incubator

12 Compilation in .NET Code in VB.NET Code in C# Code in another
.NET Language VB.NET compiler C# compiler Appropriate Compiler IL(Intermediate Language) code CLR just-in-time execution Saturday, April 15, 2017 Software Incubator

13 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 Saturday, April 15, 2017 Software Incubator

14 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 Saturday, April 15, 2017 Software Incubator

15 Operating System Services
CLR: Execution Model Source code VB C# C++ Unmanaged Component Compiler Compiler Compiler Managed code Assembly IL Code Assembly IL Code Assembly IL Code Common Language Runtime JIT Compiler We already know that an assembly does NOT contain native binary code, but instead MSIL code. Obviously before the MSIL code can be executed it must be converted into native binary instructions. Converted? Does this mean interpreted? NO! The MSIL code is compiled and not thrown away. This means that next time the code is requested it is already in the form of machine instructions and thus this mechanism in the log run is far more efficient than an interpreter for example. The compilation is carried out by a JIT (Just In Time) compiler. Does the compiler compile all of the code in one go? The answer to this question is NO. If this approach was taken there would be a long delay during the applications initialisation, and realistically not all the code within the module will be required in one go. Instead, when the code is loaded a ‘stub’ is connected to each method. When a method is called via the stub the compiler generates the binary native code. This mechanism goes a long way to describing why the compiler is called a ‘JIT’ compiler. Compiled code is only saved in the same process (run) of an application. And even then it's not guaranteed. we do what's called "code-pitching" which means we through away cold (or little used) JITed code if memory pressure requires it. We do persisted JITed code in the install time scenario. The benefit for to this system is obviously portability. A couple of things to think about - Let’s imagine you’ve built a managed component for the Intel Pentium III platform. It works fine. Later in the year Intel release a super new chip. When Microsoft release a new version of the JIT, it’s possible that this brand spanking new version of the JIT will have learned a few new tricks e.g. to make use of the new improved instruction set of the new Intel chip or new CPU registers! And finally, Microsoft plan to offer a tool called PREJIT. This tool will compile your assemblies into native code and save the resultant binary executable code to disk. When the assemblies are next loaded the binary code is already available thus improving startup time and execution speeds. Native Code Operating System Services Saturday, April 15, 2017 Software Incubator

16 .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 Saturday, April 15, 2017 Software Incubator

17 .NET Framework Libraries
Saturday, April 15, 2017 Software Incubator

18 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 Saturday, April 15, 2017 Software Incubator

19 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 Saturday, April 15, 2017 Software Incubator

20 ASP.NET ASP.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. Saturday, April 15, 2017 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 The first incarnation of ASP proved very successful. As part of the .NET Framework, Microsoft support ASP.NET. ASP.NET is a logical evolution of ASP, but addresses many of the issues associated with ASP. ASP.NET is now compiled and not interpreted. A great deal of work has also been done to make sure that ASP.NET development becomes cleaner and more productive. Saturday, April 15, 2017 Software Incubator

22 ASP.NET Web Services A technical definition
“A programmable application component accessible via standard Web protocols” Technically a Web Service is “A programmable application component accessible via standard Web protocols”. In other words, it’s a component that can be called remotely, over the internet, from a client application. Take our previous example of a Web application that required ‘stock information’. This Web application possibly would not have that information readily at hand. However, what if another Web application (possibly on another machine, on the other side of the planet) did? Further more what if this remote machine exposed a component with a method such as ‘GetStockPrice (string strCompanyName)’. Surely this would make life much easier, making separate Web sites act like ‘one big application’. Web service consumers can send and receive messages using XML, and therefore the audience of clients is unlimited. Saturday, April 15, 2017 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… Saturday, April 15, 2017 Software Incubator

24 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 Saturday, April 15, 2017 Software Incubator

25 ASP.NET Web Forms Allows clean cut code Easier for tools to generate
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 The Web Form is basically an ASP.NET file (.ASPX) that makes use of the new features of ASP.NET. ASP.NET in conjunction with Web Forms eliminate a number of the traditional problems associated with ASP. ASP.NET provides the developer with the option of separating the code from the UI elements using ‘code-behind’ forms. Using such a mechanism will also make Form tools much easier to develop. ASP.NET also conquers one of the annoying side effects of using ASP – state. Imagine that a user has filled in an ASP generated form and then hits the submit button. At this stage IIS (server side) will regenerate the form and as a side effect all the information that the user entered into the form will be erased. In many situations this is unacceptable, and many an ASP developer has struggled to find work arounds (most of which may not be considered elegant). Fortunately, ASP.NET allows controls to maintain state. ASP.NET supports a number of new rich server controls. These controls can be used to improve data connectivity (data bound controls) and data validation. Saturday, April 15, 2017 Software Incubator

26 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 Saturday, April 15, 2017 Software Incubator

27 Visual Studio.NET Saturday, April 15, 2017 Software Incubator

28 Visual Studio.NET Development tool that contains a rich set of productivity and debugging features Saturday, April 15, 2017 Software Incubator

29 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. Saturday, April 15, 2017 Software Incubator

30 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# Saturday, April 15, 2017 Software Incubator

31 C# Saturday, April 15, 2017 Software Incubator

32 Intro to C# Design Goals of C# Features VB.NET vs. 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 <none> Saturday, April 15, 2017 Software Incubator

33 Design Goals C# Component Oriented Robust and Durable Based on C++
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 Saturday, April 15, 2017 Software Incubator

34 IIS – Internet Information Services
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 Saturday, April 15, 2017 Software Incubator

35 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 Saturday, April 15, 2017 Software Incubator

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

37 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

38 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

39 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

40 Questions/Queries ?? Visit Course material available at Saturday, April 15, 2017 Software Incubator

Download ppt ".NET Framework .NET Training Program Ashutosh Pandey"

Similar presentations

Ads by Google