Unit 1
Unit 1
• .NET is a framework
?
Win64 Win32 WinCE
(XP,2K,98)
ASP Architecture
PC/Mac/Unix
Clie + Browser (IE, FireFox)
nt
Request:
http://www.msn.com/default.aspx
HTTP
Netwo TCP/IP
rk
Response:
<html>…</html>
Serv IIS
er (Internet Information Server)
Server-Side Code
What is server-side code?
Software that runs on the server, not
the client HTTP request
Receives input from (form data, HTTP response
URL parameters HTTP HTML, XML
HTML form data header data)
Can access server-side databases,
e-mail servers, files, mainframes, etc.
Dynamically builds a custom HTML
response ASP page
for a client (static HTML,
server-side
logic)
The code-behind file (WebTime.aspx.cs)
The Page_Init
method handles the
page’s Init event,
which indicates that
the page is ready to
be initialized.
1. ABSTRACTION
2. ENCAPSULATION
3. INHERITANCE
prof. Rohan kishor parab
4. POLYMORPHISM
ABSTRACTION
– 5. Brakes
– 6. Gear
● Unnecessary things means not that compulsory
to know for a Car rider
– 1. Internal Details of a Car
– 2. Car Engine
– 3. Diesel Engine
– 4. Exhaust System
prof. Rohan kishor parab
– 5. Silencer
ENCAPSULATION
● Encapsulation hides the information
● Encapsulation is implemented by using access
specifiers.
● An access specifier defines the scope and visibility of a
class member.
● C# supports the following access specifiers:
prof. Rohan kishor parab
– Public
– Private
– Protected
– Internal
– Protected internal
prof. Rohan kishor parab
● While encapsulation hides the internal
implementation of the functionalities of class
without affecting the overall functioning of the
system
● The following are the benefits of encapsulation:
prof. Rohan kishor parab
managed code.
● Unmanaged Code:
– The code, which is developed outside .NET,
Framework is known as unmanaged code.
CTS (Common Type System)
System.object
● Supports two main categories:
– Value types
– Reference types
● Value types:
– Directly contain the data
– Actual data is always stored on stack
– E.g. Structure
prof. Rohan kishor parab
● Reference types:
– Store a reference to the memory address on the
stack but actual data stored on heap
– E.g. Class
prof. Rohan kishor parab
Take the following method:
result.MyValue = pValue + 5;
return result;
}
prof. Rohan kishor parab
FCL (Framework Class Library)
● It is container of objects
● They may contain unions, classes, structures,
interfaces, enumerators and delegates.
● The main goal of using namespace in .net is for
creating a hierarchical organization of program
prof. Rohan kishor parab
compile execute
Hello.vb Hello.exe CLR
●
– There are three types of JIT compilers
1. Standard JIT
2. Pre JIT
3. Econo JIT
JIT (Just-In-Time) Compiler
● Manifest:
– It contains the assembly information
● Type Metadata:
– Provides information about all the types defined in the
assembly( assembly’s version, security, identity etc )
MSIL code:
prof. Rohan kishor parab
●
– The compiler convert the source code into Microsoft
Intermediate Language (MSIL)
– Is a CPU-independent set of instructions that can be
efficiently converted to the native code.
Types of Assembly
1. Private Assembly:
– Private assembly is used by a single application.
– Private assembly will be stored in the specific
application's directory or sub-directory.
– Strong name is not required for private assembly.
2. Shared Assembly:
prof. Rohan kishor parab
3. finally
4. throw
● try: A try block identifies a block of code for which
particular exceptions will be activated. It's
followed by one or more catch blocks.
aspnet_isapi.
● The request is the piped using HttpPipeline to the worker
process
● Web application are hosted on IIS using virtual directory
● Static files handled separately.
T
ASP.NET Worker Process
● When the user hits the enter key after typing the
URL, the browser sends an HTTP GET request to
the target site
● It is received at port 80(default port) by web
server(IIS)
prof. Rohan kishor parab