0% found this document useful (0 votes)
7 views51 pages

ADT-II - Unit 1

The document outlines the curriculum for the Application Development Tool-II course at Dr. J. J. Magdum College of Engineering, detailing the course structure, prerequisites, teaching scheme, evaluation scheme, and key units of study including .NET framework, C# fundamentals, GUI programming, file handling, ADO.NET, and collections. It emphasizes the evolution and benefits of the .NET framework, its architecture, and the role of the Common Language Runtime (CLR) in managing code execution. Additionally, it provides a list of recommended textbooks and reference materials for students.

Uploaded by

seema.bandgar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views51 pages

ADT-II - Unit 1

The document outlines the curriculum for the Application Development Tool-II course at Dr. J. J. Magdum College of Engineering, detailing the course structure, prerequisites, teaching scheme, evaluation scheme, and key units of study including .NET framework, C# fundamentals, GUI programming, file handling, ADO.NET, and collections. It emphasizes the evolution and benefits of the .NET framework, its architecture, and the role of the Common Language Runtime (CLR) in managing code execution. Additionally, it provides a list of recommended textbooks and reference materials for students.

Uploaded by

seema.bandgar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 51

Dr. J. J.

Magdum College of Engineering,Jaysingpur

Department of Information Technology

Class: T. Y. BTech Semester- VI

Subject: : Application Development Tool-II

Subject Instructor
Prof. S. A. Bandgar
Assistant Professor, Information Technology Department, JJMCOE, Jaysingpur
Structure overview
Class T.Y.Btech Semester- VI

Course Title Application Development Tool-II

1. Basic knowledge of Object Oriented


Prerequisite/s
Programming

Teaching Scheme: Lecture/Tutorial/Practical 2hr/week,-----,2hr/week

Credits 03

Evaluation Scheme: Theory/Term work/Practical ------/25 marks/50 marks


Course Title
Introduction to .net:
Unit 1 Evolution of .net, Benefits of .net, CLR, CTS, MSIL, JIT, BCL, metadata and assemblies in 4 Hr
detail, GAC and strong name assemblies, Security Manager.

C# fundamentals:
Data types - Value types, Reference types, boxing and unboxing, Arrays, Pass by value and
Unit 2 by reference and out parameters, params parameter. Namespaces, classes, objects, structs: 3 Hr
definition and creation.

Delegates and Events:


Creating and using delegates, multicasting with delegates, event sources, event handlers
GUI Programming: Introduction to GUI Application and their components, Windows
Unit 3 forms – buttons, check boxes, radio buttons, panels, group boxes, list boxes, picture boxes, 8 Hr
Menus, ToolStrips, StatusStrips and progress bars, events, Creating and using MDI
application.

File handling:
The abstract stream class, working with StreamWriters and StreamReaders, Working with
Unit 4 4 Hr
StringWriters and StringReaders, Working with BinaryWriters and BinaryReaders.

ADO.NET:
Unit 5 Exploring ADO.net Entity framework, Connected and disconnected architecture, data 4 Hr
access with ADO.net.

Collection and Generic:


Unit 6 Collection classes in .net, Understanding Generics, generic collection classes in .net. 3 Hr
 Text Book:
1. C# 4.0 The Complete Reference: Herbert Schildt, McGraw Hill.

 Reference Books:
1. Microsoft Visual C# 2010 Step by Step: John sharp, Microsoft Press
2. NET 4.5 Programming (6 – in -1) Black Book – Kogent – Dreamtech
Press
3. CLR via C# :Jeffrey Richter, Microsoft Press, 3rd edition
4. ASP.Net 4.5 Black Book ,Dreamtech ,Wiley International.
Unit 1 : Introduction to .net:

 Evolution of .net,
 Benefits of .net,
 CLR, CTS, MSIL, JIT, BCL,
 metadata and assemblies in detail,
 GAC and strong name assemblies,
 Security Manager.
OBJECTIVES:

 Understand the .NET framework


.NET
designed and developed by Microsoft and the first beta version released in 2000.

The first version of the .Net framework was released in the year 2002
Introduction to .NET:
 .NET framework is a development platform for creating applications by using
different programming languages, such as C#, Visual Basics and Visual C++.

 It is used to develop Form-based applications, Web-based applications, and Web


services

 There is a variety of programming languages available on the .Net platform, VB.Net


and C# being the most common ones.

 .NET Framework supports more than 60 programming languages of which 11


programming languages are designed and developed by Microsoft. The
remaining Non-Microsoft Languages are supported by .NET Framework but not
Goals and Applications

 Web Applications

 Windows Applications

 Mobile Applications

 Database Applications
Salient Features

 Less Coding and Increased Reuse of Code


 Reliability
 Security
 Language Interoperability
 Deployment
 11 Programming Languages which are designed and developed by
Microsoft are:
1. C#.NET
2. VB.NET
3. C++.NET
4. J#.NET
5. F#.NET
6. JSCRIPT.NET
7. WINDOWS POWERSHELL
8. IRON RUBY
9. IRON PYTHON
10. C OMEGA
11. ASML(Abstract State Machine Language)
IDE
Visual Studio is a very powerful Integrated Development Environment (IDE)
where we actually write our C# or .NET programs. It is popular because it supports
code editing, interface design, server management, debugging, and performance
analysis. We can download Visual Studio for free.
 This framework consists of a virtual execution system called the Common
Language Runtime(CLR) and a set of class libraries

 CLR is a Microsoft product of the Common Language Infrastructure (CLI)


which is an international standard and a basis for creating execution and
development environments in which languages and libraries work together.

 Microsoft introduced .NET Framework to not only bridge the gap but also to
ensure interoperability between applications created in different languages.

 .NET is an open-source, cross platform for building desktop, web, and mobile
applications that can run natively on any operating system.
Evolution of .NET:
 Around 1995, java was gaining popularity because of its platform independent
approach & Sun Microsystem’s open source policy.

 In 2002,Sun Microsystems released the enterprise edition of Java that is


J2EE(Java Enterprise Edition).

 J2EE decreases the market share of Microsoft.

 Microsoft started a project called Next Generation Windows Service(NGWS)


to regain market share.

 It took more than three years to develop the product, which is now known
as .NET
 First version of .NET released by Microsoft .NET Framework 1.0 on February
13,2002, along with Visual Studio.NET 2002 IDE
 Second version.NET Framework 1.1, Visual Studion.NET 2003 on 24, April 2003
 Next Version.NET Framework 2.0, along with Visual Studio 2005 on November
07,2005
 Next version.NET Framework 3.0, called WinFX released on November 06,2006.
 Next version.NET Framework 3.5 along with Visual Studio.NET 2008 on
19,November 2007
 Next version.NET Framework 4.0 on September 29,2008
 Final version .NET Framework 4.0 on April 12,2010
 Latest version.NET Framework 4.5 on February 29,2012
 Final version.NET Framework 4.5 on August 15,2012
 Next version.NET Framework 4.5.1 on October 17,2013
 The current version of .NET is .NET 5.0, which is the successor of .NET
Core 3.1 and .NET Framework 4.6. Prior to .NET 5.0, .NET had two
versions, .NET Framework, and .NET Core, but in this version, both have
merged and now there is only version.

 Now current version of .NET is 4.8.1 – released on 9 Aug,2022


Benefits of .NET Framework:

1. Consistent Programming Model:


 Provides consistent object oriented programming model across different
languages. You can use this model to create programs for performing different
tasks such as connecting to and retrieving data from database, reading and
writing in files.
2. Cross platform support:
 Any windows platform that support CLR can execute .NET application, that is, .
NET application enables interoperability between multiple Windows operating
systems.
3. Language interoperability:
 Enables code written in different languages to interact with each other. This
allows reusability of code & improves the efficiency of the development
process.
4. Automatic Management of Resource:

 You do not need to manually free the resources, such as files, memory, network
and database connection.

 .NET framework provides a feature called CLR that automatically tracks the
resource usage and in resource management.

5. Ease of deployment:

 .NET Framework installs applications or compoents that do not affect the


existing application.
Overview of.NET Framework 4.5:
 .net helps us I designing portable, scalable and robust applications.
.NET Architecture
Language WinForms, ADO.NET, ASP.NET,

Library Framework Class Libraries ( FCL )

Common
Language
Runtime Common Language Runtime ( Execution Engine )
Language
The types of applications that can be built in the .NET framework is
classified broadly into the following categories :

 WinForms This is used for developing Forms-based applications, which would run on an end
user machine

 ASP.NET This is used for developing web-based applications, which are made to run on any
browser such as Internet Explorer, Chrome or Firefox. (Active Server Page)
 ADO.NET This technology is used to develop applications to interact with Databases such as
Oracle or Microsoft SQL Server (ActiveX Data Object)
Library
A class library is a collection of methods and functions that can be used for the core
purpose.

e.g. -

class library with methods to handle all file-level operations. So there


is a method which can be used to read the text from a file. Similarly,
there is a method to write text to a file.
Library
FCL (Framework Class Library)

The BCL (Base Class Library) is the core of


the FCL and provides basic functionalities.
Common Language Runtime (CLR)

It is a program execution engine that loads and executes the program. It converts the
program into native code. It acts as an interface between the framework and operating
system.
• Suppose we have written a C# program and save it in a file.
• Language specific compiler compiles the source code into
the MSIL(Microsoft Intermediate Language) which is also know as
the CIL(Common Intermediate Language) or IL(Intermediate
Language) along with its metadata.
• Metadata includes the all the types, actual implementation of each function
of the program. MSIL is machine independent code.
• Now CLR comes into existence. CLR provides the services and runtime
environment to the MSIL code. Internally CLR includes the JIT(Just-In-
Time) compiler which converts the MSIL code to machine code which
further executed by CPU.
Architecture of CLR
Common Language Runtime (CLR)

Main components of CLR:


1. Common Language Specification (CLS)
2. Common Type System (CTS)
3. Garbage Collection (GC)
4. Just In – Time Compiler (JIT)
 Common Language Specification (CLS) : It is responsible for converting the
different .NET programming language syntactical rules and regulations into CLR
understandable format. Basically, it provides the Language Interoperability.

 Common Type System (CTS) :Every programming language has its own data
type system, so CTS is responsible for understanding all the data type of system.

 Garbage Collection (GC): It is used to provide the Automatic Memory


Management feature.

 Just In – Time Compiler (JIT) : It is responsible for converting the


CIL(Common Intermediate Language) into machine code or native code using
the Common Language Runtime environment.
 Components of .net framework 4.5 are
1. CLR(Common Language Runtime)
2. CTS(Common Type system)
3. Metadata & Assemblies
4. FCL(Framework Class Library)
5. BCL(Base Class Library)
6. Windows Forms
7. ASP.NET &…
8. ADO.NET
9. Windows Workflow Foundation(WF)
10. Windows Presentation Foundation(WPF)
11. Windows Communication Foundation(WCF)
12. Windows CardSpace(WCS)
1.Common Language Runtime(CLR):
 It is most important component of .NET Framework.

 It provides various services, such as memory management, exception handling,


security, thread execution, code execution, code safety, verification&
compilation, to develop an application easily.

 CLR also supports services that an application uses to access various resources,
such as collections, arrays etc

 CLR, is better known as runtime, as it provides a runtime environment to run


the code.
 The runtime manages the execution of the code; therefore, the code that works
on the CLR is called the

 It automatically releases the object when they are no longer in use

 The runtime imposes Code Access Security(CAS), that enforces security


policies by preventing unauthorized access to protected resources and
operations.

 The CLR/runtime also accelerates your productivity by allowing you to write


application in any languages, such as C#,VB, or Visual C++
Managed Code:
 Managed code is code that is executed directly by CLR.

 The application that are created using managed code automatically have CLR
services, such as type checking, security and automatic garbage collection.

 The CLR compiles the application to Intermediate Language(IL) or Microsoft


Intermediate Language(MSIL), but not the machine code.

 The process of executing a piece of managed code is as follows:

1. Selecting a language compiler

2. Compiling the code to IL

3. Compiling IL to native code


 When you compile the code into managed code, the compiler converts the
source code into IL, which is CPU independent.

 Before the execution of the code, IL must be converted into CPU specific code
by the Just-in-Time (JIT) compiler.

 when you compile source code into IL, the required metadata is generated.

 The metadata contains the definition of types, member signature, the members
in the code and other details the code uses at the time of execution

 While executing the application, a JIT compiler translates the IL into native
code.
 After compiling, the code is passed through verification process that examines
the IL and metadata to check whether the code is safe, that is, it should be able
to access only those memory locations, which it is authorized

Another Method:

 The runtime supports another method of compilation called install-time code


generation.

 It converts IL into native code .


Unmanaged Code:
 Unmanaged code directly compiles to the machine code and runs on the
machine.
 Unmanaged code does not have services, such as security or memory
management, which are provided by the runtime.

Memory Management:
 CLR provides automatic memory management.
 The CLR uses the garbage collector to manage and release of memory for an
application
Common Type System:
 The CTS specifies certain guidelines for declaring , using and managing types
at runtime.
 The functions performed by CTS are as follows:
- Helps in cross language communication, type safety, & high performance
execution of code by framework.
- Support object oriented model for different programming languages.
-
Common Type System(CTS)
 The CTS specifies certain guidelines for declaring, using and managing
types at runtime.

 It is an integral part of the runtime for supporting cross-language


communication.

 The functions performed by the CTS are as follows:

1. Establish a framework that helps in cross-language communication, type


safety and high performance execution of code

2. Support object oriented model for implementation of different


programming languages.
3. Specifies guidelines for different languages to follow; thereby ensuring
proper interaction between objects of different languages.

4. Support primitive data types such as Boolean, Byte,Char & Int32


The CTS can be classified into two data types:

1. Value types

2. Reference type

 In managed code, values – memory allocated either on the stack or on heap by


CLR.

 Variables declared as value types have their own copy of the data; therefore
any operation on one variable does not affect another variable.

 On other hand, variables declared as reference types always point to the same
object; means any operation on one variable affect the another variable.
 Base class of type is System.Object
 Assemblies are packaged into units containing programs & libraries.

 An assembly contains a self describing file that can be either Dynamic


Link Library(DLL) or Executable(EXE)

 It also contains a collection of types, such as classes, interfaces&


structures.

 a single assembly can contain multiple code files or a single code file can
have more than one assembly.

 An assembly contains code that the CLR executes.


 Assemblies can be of two types:

1. Static
2. Dynamic

3. Static:
- this assembly include interfaces, classes & resources.
- These assemblies are stored in the Portable Executale(PE) files on a disk.
2. Dynamic :
- These assemblies run directly from the memory without being saved to a disk
before execution.
- However, after execution, dynamic assemblies can be saved on a disk.
Global Assembly Cache(GAC)
 Global assembly cache (GAC) is the central place for registering assemblies,
so that different applications on the computer can use it.

 CLR is installed on cache in a computer.

 But note that, the assemblies must be made sharable by registering them in the
GAC, only when needed; otherwise, they must be kept private.
 You can deploy an assembly in the GAC by using

- an installer that is designed to work with the GAC

- The GAC tool known as Gacutil.exe

- The Windows Explorer to drag assemblies into the cache


Strong Name Assemblies
 Strong name contains the assembly’s identity, that is the information about
the assembly name, version number, culture, public key, and digital
signature.

 Using private key , generates the strong name.

 By providing strong name to assembly , you can ensure that the assembly is
globally unique.
Framework Class Library
 The FCL is huge library used by managed code.
 The FCL is made up of hierarchy of namespaces and namespaces are logically
defined by their functionality.
 For example,
System. Data namespace contains the functionalities available for
accessing database.
 This namespace further broken into System.Data.SqlClient &
System.Data.OleDb namespaces.
 The System.Data.SqlClient namespace exposes the functionality specific to
SQL Server; whereas System.Data.OleDb namespace exposes functionality
about Object Linking &Embedding Database.
 There are more than 20,000 classes in FCL
 In FCL points to remember:

1. classes, interfaces, structures & enumerated values are collectively


referred as types.

2. The different types in the framework are arranged in a hierarchy of


namespaces.

3. The System namespace is a parent of all the types available in


the .NET FCL.
.Net Framework Design Principle

1. Interoperability
2. Portability
3. Security
4. Memory management
5. Simplified deployment
Thank You!

You might also like