SlideShare a Scribd company logo
1 of 72
Download to read offline
FEDT VB.NET
F R O N T E N D D E S I G N T O O L
U S I N G
V B . N E T
P R E S E N T A T I O N B Y :
A N K I T V E R M A
( I T D E P A R T M E N T )
A N K I T V E R M A A S S T . P R O F E S S O R
U N I T - 1
Which Book To Follow ?
 Book Bank
 Visual Basic 2010, Step By Step, Michael Halvorson
 Complete Syllabus
 C. Komalavalli, Sanjib K Sahu (Ane Books)
28-11-2014 ANKIT VERMA 2
Languages
 Procedural Language (C)
 Write Procedures
 Object Oriented Language (C++)
 Abstraction
 Polymorphism
 Encapsulation
 Inheritance
 Object Based Language (VB)
 Any three features of OOPS
 Pure Object Oriented Language (Java, .NET)
 OOPS + Classes
28-11-2014 3ANKIT VERMA
System Hierarchy
 Levels In System Hierarchy
28-11-2014 4ANKIT VERMA
What Is FEDT?
 Front End Design Tool
 Front End
 HTML
 CSS
 Java Script
 .NET
 C# .NET
 ASP .NET
 J# .NET
 VB .NET
28-11-2014 5
 Back End
 Database
 Oracle
 SQL
 MS Access
ANKIT VERMA
28-11-2014 ANKIT VERMA 6
.NET Introduction
Introduction To .NET
 It is Platform Neutral Framework.
 It is layer between OS and Programming Language.
 It support many programming languages like
VB.NET, C#.NET, ASP.NET etc.
 .NET provides a common set of class libraries, which
can be accessed from any .NET base programming
language.
28-11-2014 7ANKIT VERMA
What Is .NET?
 Is .NET a Programming Language? NO
 Is .NET an Operating System? NO
“.NET is a framework”
28-11-2014 8ANKIT VERMA
Why .NET?
 Why Not Use VB?
 VB is very easy
 Not flexible to develop serious applications
 Programmers hate it because it is very easy
 Why Not Java?
 It does not have multi language support
 Slight tough as compared to .NET
28-11-2014 9ANKIT VERMA
Benefits Of .NET Framework
 Consistent Programming Model
 Consistent OOP model across various languages
 Connecting to database
 Retrieving data from database
 Reading text from file
 Writing text in a file
 Cross-platform Support
 Support CLR to run .NET application
 Interoperability between multiple Window OS
28-11-2014 10ANKIT VERMA
Benefits Of .NET Framework
 Language Interoperability
 Piece of code written in one language can be used in other
language.
 Facilitate reuse of code.
 Improves efficiency.
 Automatic Management Of Resources
 Use resources like file, memory, database connection etc.
 Automatically free resources when not in use.
 Ease Of Deployment
 Installation of new components not affect existing
applications.
28-11-2014 11ANKIT VERMA
Versions Of .NET Framework
 .NET Framework 1.0
 Released by Microsoft in February 13, 2002.
 Visual Studio .NET 2002
 .NET Framework 1.1
 Released in April 03, 2003.
 Visual Studio .NET 2003
 Built in support for ASP .NET, ODBC & Oracle Database
 .NET Framework 2.0
 Released in January 22, 2006.
 Visual Studio .NET 2005 & Microsoft SQL Server 2005
 New themes, skins, web controls, data controls in ASP .NET
28-11-2014 12ANKIT VERMA
Versions Of .NET Framework
 .NET Framework 3.0
 Released in November 21, 2006.
 Four new technologies
 Windows Presentation Foundation (WPF)
 Windows Communication Foundation (WCF)
 Windows Workflow Foundation(WF)
 Windows CardSpace (WCS)
 .NET Framework 3.5
 Released in November 19, 2007.
 Features like Language Integrated Query (LINQ), ASP .NET
AJAX, extension methods
 Visual Studio 2008
28-11-2014 13ANKIT VERMA
Versions Of .NET Framework
 .NET Framework 4.0
 Visual Studio 2010
28-11-2014 14ANKIT VERMA
Supported Applications
 Console Application
 Command line application
 Windows Forms
 GUI interface to user
 Web Forms
 Web pages
 Web Services
 Software components that perform task in distributed manner
 Reporting Application
 Windows user interface & report
28-11-2014 15ANKIT VERMA
28-11-2014 ANKIT VERMA 16
Client - Server
Two Tier & Three Tier Client-Server Model
28-11-2014 17
 Two Tier Architecture
 Database (Data Tier)
 Client Application (Client Tier)
ANKIT VERMA
Two Tier & Three Tier Client-Server Model
28-11-2014 18
 Three Tier Architecture
 Database Layer
 Business Layer
 Client Layer
ANKIT VERMA
28-11-2014 ANKIT VERMA 19
.NET Architecture
.NET Architecture
28-11-2014 20ANKIT VERMA
Components Of .NET Architecture
 Three Components:
 Common Language Runtime (CLR)
 Similar to JVM of Java
 Virtual machine component of framework
 .NET program is monitored by CLR
 Common Type System (CTS)
 Manage datatypes supported by various .NET programming
languages
 Provide language interoperability
 Framework Class Libraries (FCL)
 Similar to class libraries of Java
 Consists of various base classes used to support different services of
framework
28-11-2014 21
CLR CTS FCL
ANKIT VERMA
28-11-2014 ANKIT VERMA 22
1. CLR
Common Language Runtime (CLR)
 It is an agent used to execution & verification of code
 Manage services like
 Thread Management
 Memory Management
 Type Safety
 Exception Handling
 Load MSIL (Microsoft Intermediate Language) code
 MSIL code is similar to byte code of java
 MSIL code consists of instructions for loading, storing,
initializing & calling methods on objects
 MSIL code also known as common Intermediate Language
28-11-2014 23ANKIT VERMA
Common Language Runtime (CLR)
 JIT (Just In Time) compiler of CLR compiles code
into native Machine code for executing application
 CLR can execute code written in any language.
 CLR provide code access security & garbage collection
 CLR allows code created in one language can be
communicated in other language
 CRL support common type system, meta data &
common execution environment.
 Managed Code: targets the runtime
 Unmanaged Code: not target the runtime
28-11-2014 24ANKIT VERMA
CLR Architecture
Exception Manager
Security Checker
Type Checker
Class Loader
Debug Engine
Thread Support
Code Manager
Garbage Collector
28-11-2014 25
 Components Of CLR
ANKIT VERMA
CLR Components
 Compiler & Class Loader
 Compiler compile source code into intermediate code.
 This code consists of MSIL & Meta Data
 These are contained in Portable Executable (PE) file
 Class Loader loads this data in runtime
 Code Manager
 Manage the code during execution
 Allocate memory to objects
 Exception Manager
 Handle exception in both managed & unmanaged code
28-11-2014 26ANKIT VERMA
CLR Components
 Security Checker
 Restricts access to system resources like
 Hard Disk
 MSIL Code
 Thread Support
 Support multithreading
 Debug Engine
 Find & remove the bugs from programs
 Type Checker
 Datatype checking of variable
28-11-2014 27ANKIT VERMA
CLR Components
 Garbage Collector
 Automatic garbage collection of object when object is no longer
in use
 Periodically check heap memory where objects get memory
28-11-2014 28ANKIT VERMA
28-11-2014 ANKIT VERMA 29
2. CTS
Common Type System (CTS)
 Type refers to datatypes supported by programming
languages
 Provide common type system for all languages
 CTS support object oriented concepts
 So all types are objects
 Share common data type
 Language Integration
 Code of one language can be inherited by code in other language
 Better Performance
 Type Safety
28-11-2014 30ANKIT VERMA
Common Type System (CTS)
 Two main types supported by framework
 Value Type
 Primitive or Built In Datatype
 Passed In Methods By Value Method
 Memory Allocated From Stack
 Reference Type
 Store Memory Address Of Variable Using Pointer
 Passed In Methods By Reference Method
 Stored In Heap
28-11-2014 31ANKIT VERMA
Common Type System (CTS)
 Common Language Specification (CLS)
 CLS is subset of CTS
 As per standard, code written in a CLS must be compliant with
code written in another language.
 Describe guidelines for defining .NET language
 It compile code into Intermediate Language, so this code
executed by CLR.
28-11-2014 32ANKIT VERMA
28-11-2014 ANKIT VERMA 33
3. FCL
Framework Class Libraries (FCL)
 Collection Of Reusable, Manageable Classes &
Interfaces
 Provide Support For System Services
 Act As Interface Between Application & Operating
System
 Hierarchical Structure
 Namespace
 Organization of class libraries according to their functionality
called namespace
 All classes of library are object oriented & can be
included in code of any .NET supported language
28-11-2014 34ANKIT VERMA
Class Libraries
 Integration Of 3rd Party Components
 Perform Different Tasks
 Database Connectivity
 String Handling
 I/O Functionality
 File Handling
 Library Split Into Two Parts:
 Basic Class Library (BCL)
 Framework Class Library (FCL)
 FCL is superset of BCL
28-11-2014 35ANKIT VERMA
Class Libraries
Windows Form:
Consists of classes related to design, components, passing messages to user etc.
Web Form (ASP .NET):
Consists of classes related to caching, security, authentication, configuration..
XML:
Consists of classes related to XSLT, XPath, XQuery, Serialization.
Database (ADO .NET):
Consists of classes related to connection, command, retrieving data into reader &
adapter, SQL types, executing procedures
28-11-2014 36ANKIT VERMA
28-11-2014 ANKIT VERMA 37
Execution Process
Execution Process
Source Code
(VB .NET,
C#.NET)
Language
Compilers
IL
(EXE /
DLL)
28-11-2014 38
 Compiling .NET Application
 Compiler compiles code into intermediate language as per CLR
specification.
 Metadata is also gathered during compilation.
 All data contained in Assembly File, which can be .EXE or
.DLL
ANKIT VERMA
Execution Process
28-11-2014 39ANKIT VERMA
 Executing The Application
Class
Libraries
Class
Loader
JIT
Compiler
Managed
Code
Output
CLR
(Execution)
(Run Time
Manager)
IL or MSIL
Code
28-11-2014 ANKIT VERMA 40
Memory Management
Memory Management
 Resource Allocation
 Automatic memory management is one of the services that
CLR provides during execution.
 The Garbage Collector manages the allocation release of memory
for an application.
 The Microsoft .NET CLR requires that all resources be
allocated from the managed heap.
 Objects are automatically freed when they are no longer needed
by the application.
28-11-2014 41ANKIT VERMA
Memory Management
28-11-2014 42ANKIT VERMA
 Newly created objects are part of a Generation 0,
 The objects that survive a garbage collection are tagged as
Generation 1 and
 The Generation 1 objects that survive another collection are
Generation 2 objects.
Garbage Collection Process
 Every application has a set of roots. Roots identify storage
locations, which refer to objects on the managed heap or to
objects that are set to null.
 The list of active roots is maintained by JIT compiler
and CLR and is made accessible to the garbage
collector’s algorithm.
 When the garbage collector starts running, it makes the
assumption that all objects in the heap are garbage.
28-11-2014 43ANKIT VERMA
Garbage Collection Process
28-11-2014 44ANKIT VERMA
 Figure shows a heap with several
allocated objects where the
application’s roots refer directly
to the object A, C, D and F.
 All of these objects become part
of the graph. When adding object
D, the collector notices that this
object refers to object H and
object H is also added to the
graph.
 The collector continues to walk
through all reachable objects
recursively.

Garbage Collection Process
28-11-2014 45ANKIT VERMA
 Once this part of the graph is complete, the garbage collector
checks the next root and walks the object again.
 As the garbage collector walks from the object to object, iFit
attempts to add an object to the graph that it previously
added, then the garbage collector can stop walking down the
path.
 Once all the roots have been checked, the garbage collector’s
graph contains the set of all objects that are somehow
reachable from the application’s roots.
Garbage Collection Process
28-11-2014 46ANKIT VERMA
 The garbage collector now walks
through the heap linearly, looking
for contiguous block of garbage
objects.
 The garbage collector shifts the non
garbage object down in memory,
removing all the gaps in the heap.
 So, the garbage collection must
modify the application’s root, so that
the pointers point to the object’s
new location.
 In addition, if any object contains a
pointer to another object, the
garbage collector is responsible for
correcting these pointers as well.
Garbage Collection Process
28-11-2014 47ANKIT VERMA
 After all the collection has been identified, all the non
garbage has been compacted and all the non garbage pointers
have been fixed up, the next object is positioned just after the
last non garbage object.
 At this point, the new operator is tried again and the resource
requested by an application is successfully created.
28-11-2014 ANKIT VERMA 48
Assemblies
Assemblies
28-11-2014 49ANKIT VERMA
 Assembly is a standard for components developed with .NET
 They are building blocks of .NET framework application.
 It is smallest unit of deployment.
 It consists of one or more files (dll, exe, html etc.)
 It is self describing unit & all programs constructed in .NET
are constructed in assemblies only.
 It consists of MSIL, metadata & resources (such as bitmap
that the application require for execution)
 Namespace are also stored in assemblies only. They are
playing important role in deployment & versioning.
 Assemblies can be .DLL or .EXE but they differ in their
content.
Assemblies
 Assembly Manifest
 Assembly consists of assembly
metadata called Assembly Manifest.
 Assembly has one entry point
 CRL does not actually work
with managed modules, it
works with assemblies.
 Assembly is logical grouping of
one or more managed module.
 Assembly is the smallest unit
of reuse, security & versioning.
28-11-2014 50ANKIT VERMA
Assemblies
 When you are using JIT compiler to compile your
code from managed code to active code, the JIT
compiler will look for IL code, that is stored in
portable executable file along with associated
manifest.
 Every time you build a web form or windows form in
.NET, you are building an assembly.
 Every one of these above applications will contain at
least one assembly.
28-11-2014 51ANKIT VERMA
Structure Of Assembly
28-11-2014 52ANKIT VERMA
Assembly Manifest
 The assembly manifest is where
the details of assembly are
stored.
 The assembly is stored within
the DLL or EXE itself.
 Assemblies can either be single
or multi files assemblies and
therefore assemblies manifest
can either be stored as
assembly or as a separate file.
28-11-2014 53ANKIT VERMA
Diagram
28-11-2014 54ANKIT VERMA
Type Metadata
 This metadata contains information on the types that
are exposed by the assembly such as security
permission information, class and interface
information and other assembly information.
 When an application is started in .NET, the
application will look for an assembly in the
installation folder.
 Assemblies that are stored in a local installation folder are
referred to as Private Assemblies.
 If application cannot find assembly in installation folder the
assembly will talk to Global Assembly Cache (GAC) for
an assembly.
28-11-2014 55ANKIT VERMA
Types Of Assemblies
 Static Assemblies
 Dynamic Assemblies
 Private Assemblies
 Public Assemblies or Shared Assemblies
28-11-2014 56ANKIT VERMA
28-11-2014 ANKIT VERMA 57
Exception Handling
Exception Handling
 “An exception is error condition or any abnormal
condition or unexpected behavior in program and
disturbs the normal flow of instruction”
 .NET uses Structured Exception Handling.
 Exception Example:
 Arithmetic Exception
 OverFlow Exception
 NullReference Exception
28-11-2014 58ANKIT VERMA
Exception Handling Steps
 When exception is raised, exception object is thrown
to runtime system.
 Object contain
 Cause of exception
 Type of exception
 State of program when exception occurred
 It will handled by runtime & thus leads to abrupt
termination of program.
28-11-2014 59ANKIT VERMA
Need Of Exception Handling
 Handle Runtime Error like
 Unavailability of data
 Trying to access non-existent data
 Trying to update read-only data
 Conversion between data type might fail
28-11-2014 60ANKIT VERMA
Exception Handling Blocks
 Try…………….. Catch…………….. Finally
 Try
 Try Block contain anticipating code which may raise exception.
 Try keyword tell compiler that we want to handle area of
events.
 Catch
 Catch Block is handler to catch the exception.
 Catch block tells application what to do if an error occurs.
 Finally
 Finally Block is optional.
 Finally keyword will occur regardless if the Try-Catch worked
successfully or not.
28-11-2014 61ANKIT VERMA
Program Syntax
 Syntax:
 Try
 <statement>
 Catch Ex as Exception
 <statement>
 End Try
28-11-2014 62ANKIT VERMA
Program
28-11-2014 63ANKIT VERMA
 Program  Output
Program
28-11-2014 64ANKIT VERMA
 Program  Output
28-11-2014 ANKIT VERMA 65
Code Access Security
Code Access Security (CAS)
 .NET framework has a built in security system called
as CAS.
 CAS enables administrator to control actions
performed by code.
 It is security mechanism through which we can place
the security constraints & controls on source code at
runtime.
 In .NET, security is achieved by CAS Model.
 In CAS Model, CLR checks permission of the code to
access a restricted resource, before granting access.
28-11-2014 66ANKIT VERMA
Security Policy
 Identifying the code that is granted permission to
run.
 Identifying the tasks that a code is allowed to
perform.
 Identifying the tasks that the users are permitted to
perform.
 Identifying the resources that the code can access.
28-11-2014 67ANKIT VERMA
CAS Supported Security Model
 CAS supports the security model by
 Evidence
 Evidence is type of information used to determine the type of rights
that code is granted.
 This information is useful for CLR.
 Security Policies
 When Assembly is loaded, CLR check security policy by running
Evidences.
 Security Policy can be defined in four levels:
 Enterprise
 User
 Machine
 Application
28-11-2014 68ANKIT VERMA
CAS Supported Security Model
 Permission
 Permissions are rights for accessing the particular operations
permitted by Security Policy.
 Present in class System.Security.Permissions namespace.
 Permission Sets
 Named collections of Permissions are known as Permission Sets.
28-11-2014 69ANKIT VERMA
CAS Functions
 Define Permission & Permission Sets that represents
the right to access various system resources.
 Enable code to request the permission set requires in
order to run, permission that would be useful to have
& specifies which permission the code must have.
 Grant permission to each assembly that is loaded,
based on permission requested by code & on the
operations permitted by security policy.
 Enable code to demand that its callers have specific
permissions or process digital signature, thus allow
specific callers to call the particular code.
28-11-2014 70ANKIT VERMA
CAS Benefits
 Restricts what your code can do.
 Restrict which code can call your code.
 Identify code.
28-11-2014 71ANKIT VERMA
THANKYOU
P R E S E N T A T I O N B Y :
A N K I T V E R M A
( I T D E P A R T M E N T )
DOUBTS
A N K I T V E R M A A S S T . P R O F E S S O R

More Related Content

What's hot

Introduction to Mobile Application Development
Introduction to Mobile Application DevelopmentIntroduction to Mobile Application Development
Introduction to Mobile Application Development
shikishiji
 
Solaris Kernel Debugging V1.0
Solaris Kernel Debugging V1.0Solaris Kernel Debugging V1.0
Solaris Kernel Debugging V1.0
Jarod Wang
 

What's hot (20)

Qemu Introduction
Qemu IntroductionQemu Introduction
Qemu Introduction
 
Project ACRN hypervisor introduction
Project ACRN hypervisor introduction Project ACRN hypervisor introduction
Project ACRN hypervisor introduction
 
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introductionACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
 
An Introduction to WebAssembly
An Introduction to WebAssemblyAn Introduction to WebAssembly
An Introduction to WebAssembly
 
Jetpack Compose - A Lightning Tour
Jetpack Compose - A Lightning TourJetpack Compose - A Lightning Tour
Jetpack Compose - A Lightning Tour
 
Secure Multi Tenant Cloud with OpenContrail
Secure Multi Tenant Cloud with OpenContrailSecure Multi Tenant Cloud with OpenContrail
Secure Multi Tenant Cloud with OpenContrail
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded training
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo
 
Windows Phone PPT
Windows Phone PPTWindows Phone PPT
Windows Phone PPT
 
Yocto Project introduction
Yocto Project introductionYocto Project introduction
Yocto Project introduction
 
Introduction to Mobile Application Development
Introduction to Mobile Application DevelopmentIntroduction to Mobile Application Development
Introduction to Mobile Application Development
 
Solaris Kernel Debugging V1.0
Solaris Kernel Debugging V1.0Solaris Kernel Debugging V1.0
Solaris Kernel Debugging V1.0
 
WSL2 and Docker Desktop
WSL2 and Docker DesktopWSL2 and Docker Desktop
WSL2 and Docker Desktop
 
Virtual Box Presentation
Virtual Box Presentation Virtual Box Presentation
Virtual Box Presentation
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
 
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen HypervisorSafety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
 
Docker Introduction.pdf
Docker Introduction.pdfDocker Introduction.pdf
Docker Introduction.pdf
 
Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
 

Similar to BCA IPU VB.NET UNIT-I

Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
Ali Taki
 
Net framework
Net frameworkNet framework
Net framework
jhsri
 
.Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1).Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1)
Rishi Kothari
 

Similar to BCA IPU VB.NET UNIT-I (20)

Microsoft.Net
Microsoft.NetMicrosoft.Net
Microsoft.Net
 
Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
 
.Net slid
.Net slid.Net slid
.Net slid
 
.Net Session Overview
.Net Session Overview.Net Session Overview
.Net Session Overview
 
Visual studio
Visual studioVisual studio
Visual studio
 
.Net overview
.Net overview.Net overview
.Net overview
 
.Net Overview
.Net Overview.Net Overview
.Net Overview
 
Dot Net PPt.pptx
Dot Net PPt.pptxDot Net PPt.pptx
Dot Net PPt.pptx
 
.Net
.Net.Net
.Net
 
Introductionto .netframework by Priyanka Pinglikar
Introductionto .netframework by Priyanka PinglikarIntroductionto .netframework by Priyanka Pinglikar
Introductionto .netframework by Priyanka Pinglikar
 
Net framework
 Net framework Net framework
Net framework
 
Net framework
Net frameworkNet framework
Net framework
 
.Net overview
.Net overview.Net overview
.Net overview
 
c#.pptx
c#.pptxc#.pptx
c#.pptx
 
Net framework
Net frameworkNet framework
Net framework
 
.Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1).Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1)
 
Net Framework Overview
Net Framework OverviewNet Framework Overview
Net Framework Overview
 
.Net Framework
.Net Framework.Net Framework
.Net Framework
 
.Net overview
.Net overview.Net overview
.Net overview
 
Cetpa infotech is the best advanced .net training institute in Delhi NCR
Cetpa infotech is the best advanced .net training institute in Delhi NCRCetpa infotech is the best advanced .net training institute in Delhi NCR
Cetpa infotech is the best advanced .net training institute in Delhi NCR
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use Cases
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 

BCA IPU VB.NET UNIT-I

  • 1. FEDT VB.NET F R O N T E N D D E S I G N T O O L U S I N G V B . N E T P R E S E N T A T I O N B Y : A N K I T V E R M A ( I T D E P A R T M E N T ) A N K I T V E R M A A S S T . P R O F E S S O R U N I T - 1
  • 2. Which Book To Follow ?  Book Bank  Visual Basic 2010, Step By Step, Michael Halvorson  Complete Syllabus  C. Komalavalli, Sanjib K Sahu (Ane Books) 28-11-2014 ANKIT VERMA 2
  • 3. Languages  Procedural Language (C)  Write Procedures  Object Oriented Language (C++)  Abstraction  Polymorphism  Encapsulation  Inheritance  Object Based Language (VB)  Any three features of OOPS  Pure Object Oriented Language (Java, .NET)  OOPS + Classes 28-11-2014 3ANKIT VERMA
  • 4. System Hierarchy  Levels In System Hierarchy 28-11-2014 4ANKIT VERMA
  • 5. What Is FEDT?  Front End Design Tool  Front End  HTML  CSS  Java Script  .NET  C# .NET  ASP .NET  J# .NET  VB .NET 28-11-2014 5  Back End  Database  Oracle  SQL  MS Access ANKIT VERMA
  • 6. 28-11-2014 ANKIT VERMA 6 .NET Introduction
  • 7. Introduction To .NET  It is Platform Neutral Framework.  It is layer between OS and Programming Language.  It support many programming languages like VB.NET, C#.NET, ASP.NET etc.  .NET provides a common set of class libraries, which can be accessed from any .NET base programming language. 28-11-2014 7ANKIT VERMA
  • 8. What Is .NET?  Is .NET a Programming Language? NO  Is .NET an Operating System? NO “.NET is a framework” 28-11-2014 8ANKIT VERMA
  • 9. Why .NET?  Why Not Use VB?  VB is very easy  Not flexible to develop serious applications  Programmers hate it because it is very easy  Why Not Java?  It does not have multi language support  Slight tough as compared to .NET 28-11-2014 9ANKIT VERMA
  • 10. Benefits Of .NET Framework  Consistent Programming Model  Consistent OOP model across various languages  Connecting to database  Retrieving data from database  Reading text from file  Writing text in a file  Cross-platform Support  Support CLR to run .NET application  Interoperability between multiple Window OS 28-11-2014 10ANKIT VERMA
  • 11. Benefits Of .NET Framework  Language Interoperability  Piece of code written in one language can be used in other language.  Facilitate reuse of code.  Improves efficiency.  Automatic Management Of Resources  Use resources like file, memory, database connection etc.  Automatically free resources when not in use.  Ease Of Deployment  Installation of new components not affect existing applications. 28-11-2014 11ANKIT VERMA
  • 12. Versions Of .NET Framework  .NET Framework 1.0  Released by Microsoft in February 13, 2002.  Visual Studio .NET 2002  .NET Framework 1.1  Released in April 03, 2003.  Visual Studio .NET 2003  Built in support for ASP .NET, ODBC & Oracle Database  .NET Framework 2.0  Released in January 22, 2006.  Visual Studio .NET 2005 & Microsoft SQL Server 2005  New themes, skins, web controls, data controls in ASP .NET 28-11-2014 12ANKIT VERMA
  • 13. Versions Of .NET Framework  .NET Framework 3.0  Released in November 21, 2006.  Four new technologies  Windows Presentation Foundation (WPF)  Windows Communication Foundation (WCF)  Windows Workflow Foundation(WF)  Windows CardSpace (WCS)  .NET Framework 3.5  Released in November 19, 2007.  Features like Language Integrated Query (LINQ), ASP .NET AJAX, extension methods  Visual Studio 2008 28-11-2014 13ANKIT VERMA
  • 14. Versions Of .NET Framework  .NET Framework 4.0  Visual Studio 2010 28-11-2014 14ANKIT VERMA
  • 15. Supported Applications  Console Application  Command line application  Windows Forms  GUI interface to user  Web Forms  Web pages  Web Services  Software components that perform task in distributed manner  Reporting Application  Windows user interface & report 28-11-2014 15ANKIT VERMA
  • 16. 28-11-2014 ANKIT VERMA 16 Client - Server
  • 17. Two Tier & Three Tier Client-Server Model 28-11-2014 17  Two Tier Architecture  Database (Data Tier)  Client Application (Client Tier) ANKIT VERMA
  • 18. Two Tier & Three Tier Client-Server Model 28-11-2014 18  Three Tier Architecture  Database Layer  Business Layer  Client Layer ANKIT VERMA
  • 19. 28-11-2014 ANKIT VERMA 19 .NET Architecture
  • 21. Components Of .NET Architecture  Three Components:  Common Language Runtime (CLR)  Similar to JVM of Java  Virtual machine component of framework  .NET program is monitored by CLR  Common Type System (CTS)  Manage datatypes supported by various .NET programming languages  Provide language interoperability  Framework Class Libraries (FCL)  Similar to class libraries of Java  Consists of various base classes used to support different services of framework 28-11-2014 21 CLR CTS FCL ANKIT VERMA
  • 23. Common Language Runtime (CLR)  It is an agent used to execution & verification of code  Manage services like  Thread Management  Memory Management  Type Safety  Exception Handling  Load MSIL (Microsoft Intermediate Language) code  MSIL code is similar to byte code of java  MSIL code consists of instructions for loading, storing, initializing & calling methods on objects  MSIL code also known as common Intermediate Language 28-11-2014 23ANKIT VERMA
  • 24. Common Language Runtime (CLR)  JIT (Just In Time) compiler of CLR compiles code into native Machine code for executing application  CLR can execute code written in any language.  CLR provide code access security & garbage collection  CLR allows code created in one language can be communicated in other language  CRL support common type system, meta data & common execution environment.  Managed Code: targets the runtime  Unmanaged Code: not target the runtime 28-11-2014 24ANKIT VERMA
  • 25. CLR Architecture Exception Manager Security Checker Type Checker Class Loader Debug Engine Thread Support Code Manager Garbage Collector 28-11-2014 25  Components Of CLR ANKIT VERMA
  • 26. CLR Components  Compiler & Class Loader  Compiler compile source code into intermediate code.  This code consists of MSIL & Meta Data  These are contained in Portable Executable (PE) file  Class Loader loads this data in runtime  Code Manager  Manage the code during execution  Allocate memory to objects  Exception Manager  Handle exception in both managed & unmanaged code 28-11-2014 26ANKIT VERMA
  • 27. CLR Components  Security Checker  Restricts access to system resources like  Hard Disk  MSIL Code  Thread Support  Support multithreading  Debug Engine  Find & remove the bugs from programs  Type Checker  Datatype checking of variable 28-11-2014 27ANKIT VERMA
  • 28. CLR Components  Garbage Collector  Automatic garbage collection of object when object is no longer in use  Periodically check heap memory where objects get memory 28-11-2014 28ANKIT VERMA
  • 30. Common Type System (CTS)  Type refers to datatypes supported by programming languages  Provide common type system for all languages  CTS support object oriented concepts  So all types are objects  Share common data type  Language Integration  Code of one language can be inherited by code in other language  Better Performance  Type Safety 28-11-2014 30ANKIT VERMA
  • 31. Common Type System (CTS)  Two main types supported by framework  Value Type  Primitive or Built In Datatype  Passed In Methods By Value Method  Memory Allocated From Stack  Reference Type  Store Memory Address Of Variable Using Pointer  Passed In Methods By Reference Method  Stored In Heap 28-11-2014 31ANKIT VERMA
  • 32. Common Type System (CTS)  Common Language Specification (CLS)  CLS is subset of CTS  As per standard, code written in a CLS must be compliant with code written in another language.  Describe guidelines for defining .NET language  It compile code into Intermediate Language, so this code executed by CLR. 28-11-2014 32ANKIT VERMA
  • 34. Framework Class Libraries (FCL)  Collection Of Reusable, Manageable Classes & Interfaces  Provide Support For System Services  Act As Interface Between Application & Operating System  Hierarchical Structure  Namespace  Organization of class libraries according to their functionality called namespace  All classes of library are object oriented & can be included in code of any .NET supported language 28-11-2014 34ANKIT VERMA
  • 35. Class Libraries  Integration Of 3rd Party Components  Perform Different Tasks  Database Connectivity  String Handling  I/O Functionality  File Handling  Library Split Into Two Parts:  Basic Class Library (BCL)  Framework Class Library (FCL)  FCL is superset of BCL 28-11-2014 35ANKIT VERMA
  • 36. Class Libraries Windows Form: Consists of classes related to design, components, passing messages to user etc. Web Form (ASP .NET): Consists of classes related to caching, security, authentication, configuration.. XML: Consists of classes related to XSLT, XPath, XQuery, Serialization. Database (ADO .NET): Consists of classes related to connection, command, retrieving data into reader & adapter, SQL types, executing procedures 28-11-2014 36ANKIT VERMA
  • 37. 28-11-2014 ANKIT VERMA 37 Execution Process
  • 38. Execution Process Source Code (VB .NET, C#.NET) Language Compilers IL (EXE / DLL) 28-11-2014 38  Compiling .NET Application  Compiler compiles code into intermediate language as per CLR specification.  Metadata is also gathered during compilation.  All data contained in Assembly File, which can be .EXE or .DLL ANKIT VERMA
  • 39. Execution Process 28-11-2014 39ANKIT VERMA  Executing The Application Class Libraries Class Loader JIT Compiler Managed Code Output CLR (Execution) (Run Time Manager) IL or MSIL Code
  • 40. 28-11-2014 ANKIT VERMA 40 Memory Management
  • 41. Memory Management  Resource Allocation  Automatic memory management is one of the services that CLR provides during execution.  The Garbage Collector manages the allocation release of memory for an application.  The Microsoft .NET CLR requires that all resources be allocated from the managed heap.  Objects are automatically freed when they are no longer needed by the application. 28-11-2014 41ANKIT VERMA
  • 42. Memory Management 28-11-2014 42ANKIT VERMA  Newly created objects are part of a Generation 0,  The objects that survive a garbage collection are tagged as Generation 1 and  The Generation 1 objects that survive another collection are Generation 2 objects.
  • 43. Garbage Collection Process  Every application has a set of roots. Roots identify storage locations, which refer to objects on the managed heap or to objects that are set to null.  The list of active roots is maintained by JIT compiler and CLR and is made accessible to the garbage collector’s algorithm.  When the garbage collector starts running, it makes the assumption that all objects in the heap are garbage. 28-11-2014 43ANKIT VERMA
  • 44. Garbage Collection Process 28-11-2014 44ANKIT VERMA  Figure shows a heap with several allocated objects where the application’s roots refer directly to the object A, C, D and F.  All of these objects become part of the graph. When adding object D, the collector notices that this object refers to object H and object H is also added to the graph.  The collector continues to walk through all reachable objects recursively. 
  • 45. Garbage Collection Process 28-11-2014 45ANKIT VERMA  Once this part of the graph is complete, the garbage collector checks the next root and walks the object again.  As the garbage collector walks from the object to object, iFit attempts to add an object to the graph that it previously added, then the garbage collector can stop walking down the path.  Once all the roots have been checked, the garbage collector’s graph contains the set of all objects that are somehow reachable from the application’s roots.
  • 46. Garbage Collection Process 28-11-2014 46ANKIT VERMA  The garbage collector now walks through the heap linearly, looking for contiguous block of garbage objects.  The garbage collector shifts the non garbage object down in memory, removing all the gaps in the heap.  So, the garbage collection must modify the application’s root, so that the pointers point to the object’s new location.  In addition, if any object contains a pointer to another object, the garbage collector is responsible for correcting these pointers as well.
  • 47. Garbage Collection Process 28-11-2014 47ANKIT VERMA  After all the collection has been identified, all the non garbage has been compacted and all the non garbage pointers have been fixed up, the next object is positioned just after the last non garbage object.  At this point, the new operator is tried again and the resource requested by an application is successfully created.
  • 48. 28-11-2014 ANKIT VERMA 48 Assemblies
  • 49. Assemblies 28-11-2014 49ANKIT VERMA  Assembly is a standard for components developed with .NET  They are building blocks of .NET framework application.  It is smallest unit of deployment.  It consists of one or more files (dll, exe, html etc.)  It is self describing unit & all programs constructed in .NET are constructed in assemblies only.  It consists of MSIL, metadata & resources (such as bitmap that the application require for execution)  Namespace are also stored in assemblies only. They are playing important role in deployment & versioning.  Assemblies can be .DLL or .EXE but they differ in their content.
  • 50. Assemblies  Assembly Manifest  Assembly consists of assembly metadata called Assembly Manifest.  Assembly has one entry point  CRL does not actually work with managed modules, it works with assemblies.  Assembly is logical grouping of one or more managed module.  Assembly is the smallest unit of reuse, security & versioning. 28-11-2014 50ANKIT VERMA
  • 51. Assemblies  When you are using JIT compiler to compile your code from managed code to active code, the JIT compiler will look for IL code, that is stored in portable executable file along with associated manifest.  Every time you build a web form or windows form in .NET, you are building an assembly.  Every one of these above applications will contain at least one assembly. 28-11-2014 51ANKIT VERMA
  • 53. Assembly Manifest  The assembly manifest is where the details of assembly are stored.  The assembly is stored within the DLL or EXE itself.  Assemblies can either be single or multi files assemblies and therefore assemblies manifest can either be stored as assembly or as a separate file. 28-11-2014 53ANKIT VERMA
  • 55. Type Metadata  This metadata contains information on the types that are exposed by the assembly such as security permission information, class and interface information and other assembly information.  When an application is started in .NET, the application will look for an assembly in the installation folder.  Assemblies that are stored in a local installation folder are referred to as Private Assemblies.  If application cannot find assembly in installation folder the assembly will talk to Global Assembly Cache (GAC) for an assembly. 28-11-2014 55ANKIT VERMA
  • 56. Types Of Assemblies  Static Assemblies  Dynamic Assemblies  Private Assemblies  Public Assemblies or Shared Assemblies 28-11-2014 56ANKIT VERMA
  • 57. 28-11-2014 ANKIT VERMA 57 Exception Handling
  • 58. Exception Handling  “An exception is error condition or any abnormal condition or unexpected behavior in program and disturbs the normal flow of instruction”  .NET uses Structured Exception Handling.  Exception Example:  Arithmetic Exception  OverFlow Exception  NullReference Exception 28-11-2014 58ANKIT VERMA
  • 59. Exception Handling Steps  When exception is raised, exception object is thrown to runtime system.  Object contain  Cause of exception  Type of exception  State of program when exception occurred  It will handled by runtime & thus leads to abrupt termination of program. 28-11-2014 59ANKIT VERMA
  • 60. Need Of Exception Handling  Handle Runtime Error like  Unavailability of data  Trying to access non-existent data  Trying to update read-only data  Conversion between data type might fail 28-11-2014 60ANKIT VERMA
  • 61. Exception Handling Blocks  Try…………….. Catch…………….. Finally  Try  Try Block contain anticipating code which may raise exception.  Try keyword tell compiler that we want to handle area of events.  Catch  Catch Block is handler to catch the exception.  Catch block tells application what to do if an error occurs.  Finally  Finally Block is optional.  Finally keyword will occur regardless if the Try-Catch worked successfully or not. 28-11-2014 61ANKIT VERMA
  • 62. Program Syntax  Syntax:  Try  <statement>  Catch Ex as Exception  <statement>  End Try 28-11-2014 62ANKIT VERMA
  • 65. 28-11-2014 ANKIT VERMA 65 Code Access Security
  • 66. Code Access Security (CAS)  .NET framework has a built in security system called as CAS.  CAS enables administrator to control actions performed by code.  It is security mechanism through which we can place the security constraints & controls on source code at runtime.  In .NET, security is achieved by CAS Model.  In CAS Model, CLR checks permission of the code to access a restricted resource, before granting access. 28-11-2014 66ANKIT VERMA
  • 67. Security Policy  Identifying the code that is granted permission to run.  Identifying the tasks that a code is allowed to perform.  Identifying the tasks that the users are permitted to perform.  Identifying the resources that the code can access. 28-11-2014 67ANKIT VERMA
  • 68. CAS Supported Security Model  CAS supports the security model by  Evidence  Evidence is type of information used to determine the type of rights that code is granted.  This information is useful for CLR.  Security Policies  When Assembly is loaded, CLR check security policy by running Evidences.  Security Policy can be defined in four levels:  Enterprise  User  Machine  Application 28-11-2014 68ANKIT VERMA
  • 69. CAS Supported Security Model  Permission  Permissions are rights for accessing the particular operations permitted by Security Policy.  Present in class System.Security.Permissions namespace.  Permission Sets  Named collections of Permissions are known as Permission Sets. 28-11-2014 69ANKIT VERMA
  • 70. CAS Functions  Define Permission & Permission Sets that represents the right to access various system resources.  Enable code to request the permission set requires in order to run, permission that would be useful to have & specifies which permission the code must have.  Grant permission to each assembly that is loaded, based on permission requested by code & on the operations permitted by security policy.  Enable code to demand that its callers have specific permissions or process digital signature, thus allow specific callers to call the particular code. 28-11-2014 70ANKIT VERMA
  • 71. CAS Benefits  Restricts what your code can do.  Restrict which code can call your code.  Identify code. 28-11-2014 71ANKIT VERMA
  • 72. THANKYOU P R E S E N T A T I O N B Y : A N K I T V E R M A ( I T D E P A R T M E N T ) DOUBTS A N K I T V E R M A A S S T . P R O F E S S O R