You are on page 1of 19

Introduction to .

Net
Imran Rashid
CTO at ManiWeber Technologies

Introduction to .Net Imran Rashid


Outline

Introduction to .Net

Persistent Framework Layer

Object Relational Mapping (ORM)

Introduction to .Net Imran Rashid


Introduction to .Net
Introduction to .Net
Framework
A framework, or software framework, is a platform for
developing software applications
It provides a foundation on which software developers can
build programs for a specific platform
For example
o A framework may include predefined classes and functions
that can be used to process input
o Manages hardware devices
o Interact with system software
In simple programmers don't need to reinvent the wheel
each time they develop a new application

Introduction to .Net Imran Rashid


Introduction to .Net
A framework is similar to an application programming
interface (API), though technically a framework includes
an API
As the name suggests, a framework serves as a foundation
for programming, while an API provides access to the
elements supported by the framework
A framework may also include code libraries, a compiler,
and other programs used in the software development
process
Several different types of software frameworks exist
Popular examples include ActiveX and .NET for Windows
development etc

Introduction to .Net Imran Rashid


Introduction to .Net
.NET Framework
.NET was first introduced in the year 2002 as .NET 1.0 and
was intended to compete with Sun's Java
.NET is very easy but the basics of the C language is
required and if you know them then by step you can know
and do it well
.NET is designed for ease of creation of Windows programs
The vision of .NET is globally distributed systems, using
XML as the universal glue to allow functions running on
different computers across an organization or across the
world to come together in a single application

Introduction to .Net Imran Rashid


Persistent Framework Layer
Persistent Framework Layer
Persistence framework
A persistence framework is middleware that assists and
automates the storage of program data into databases,
especially relational databases
It acts as a layer of abstraction between the application
and the database, typically bridging any conceptual
differences between the two
Many persistence frameworks are also object-relational
mapping (ORM)
Such frameworks map the objects in the application
domain to data that needs to be persisted in a database
The mappings can be defined using either XML files or
metadata annotations
Introduction to .Net Imran Rashid
Persistent Framework Layer
Where do Persistence Frameworks fit in?

Bus Service Data


Logic Access Access DB
Layer Layer Layer

Map Business Entity objects


Map to Business to relational data
Objects
Provide CRUD operations

Provide object caching


Provide for remote
persistence Provide object versioning

Introduction to .Net Imran Rashid


Persistent Framework Layer
Persistence Frameworks in Context (small)

Server
Smaller Distributed
Architecture
Bus Data
Website Logic Access
DB
Layer Layer
Client

Bus Service Caching


Logic Access Service
Layer Layer

Introduction to .Net Imran Rashid


Persistent Framework Layer
Persistence Frameworks in Context (large)

Larger Distributed
Bus
Architecture
Website Logic
Layer
Web Services Server
Web
Servers Service Data
Bus
Access Access DB
Layer Layer
Website Logic
Layer

Caching Caching
Client
Bus Service Server
Logic
Machine Layer

Introduction to .Net Imran Rashid


Persistent Framework Layer
Desired Attributes
Support for run-time and design-time object relational
mapping
Built-in logging / tracing
Object caching
Object versioning
Support for multiple databases
Support for multiple persistence types (file, RDBMS)

Introduction to .Net Imran Rashid


Object Relational Mapping (ORM)
Object Relational Mapping (ORM)
Object-relational mapping (ORM, O/RM, and O/R
mapping tool) in computer science is a programming
technique for converting data between incompatible
type systems in object-oriented programming languages
This creates, in effect, a "virtual object database" that
can be used from within the programming language
There are both free and commercial packages available
that perform object-relational mapping
In object-oriented programming, data-management
tasks act on object-oriented (OO) objects that are almost
always non-scalar values

Introduction to .Net Imran Rashid


Object Relational Mapping (ORM)
Example
Consider an address book entry that represents a single
person along with zero or more phone numbers and zero
or more addresses
This could be modeled in an object-oriented
implementation by a "Person object" with attributes to
hold each data item that the entry comprises: the person's
name, a list of phone numbers, and a list of addresses
The list of phone numbers would itself contain
"PhoneNumber objects" and so on
The address-book entry is treated as a single object by the
programming language (it can be referenced by a single
variable containing a pointer to the object, for instance)
Introduction to .Net Imran Rashid
Object Relational Mapping (ORM)
Various methods can be associated with the object, such
as a method to return the preferred phone number, the
home address, and so on
However, many popular database products such as SQL
database management systems (DBMS) can only store and
manipulate scalar values such as integers and strings
organized within tables
The programmer must either convert the object values
into groups of simpler values for storage in the database
(and convert them back upon retrieval), or only use simple
scalar values within the program
Object-relational mapping implements the first approach

Introduction to .Net Imran Rashid


Object Relational Mapping (ORM)

Introduction to .Net Imran Rashid


Object Relational Mapping (ORM)

Introduction to .Net Imran Rashid


Any ?

You might also like