3. Object relational Mapping (ORM)
Is a mechanism that makes it possible
to address and manipulate objects
without having to consider how these
objects relate to their data sources.
Manages the mapping details between
a set of objects and underlying
Relation Database, XWL,……, or any
data store.
8. Caching
Storing an in-memory copy of expensive information .
Better Performance because information retrieval time is cut down
dramatically.
Better Scalability because more simultaneous page requests can
be served with fewer database operations
May cause low memory
◦ slows down the entire system.
◦ To prevent this, ASP.NET remove objects when memory gets scarce.
◦ (Self-sufficiency)
Can cache
◦ completely rendered HTML for a page,
◦ a portion of that HTML,
◦ arbitrary objects.
12. Fragment Caching
Create a user control for the portion of
the page you want to cache.
Add the OutputCache directive to the
user control.
Cannot interact with the user-control in
code.
A block of HTML is simply inserted
into the page, user control object is
not available.
15. Data Caching
Add items that are expensive to create to a
special built-in collection object (called
Cache). This object works much like the
Application object.
Globally available to all requests from all
clients in the application.
Difference between Application and Cache
Objects:
◦ Items in the cache are removed automatically
Always check if a cached object exists
before attempting to use it.
Stored in process, and won’t persist if the
application domain is restarted.
16. Lab #7
Finish previous labs
Add caching to Bookie website as you
see appropriate.
17. REFERENCES
[1] Beginning ASP.NET 4 In C# 2010, Matthew
Macdonald, Apress
[2] Web Application Architecture Principles,
Protocols And Practices, Leon Shklar And Richard
Rosen, Wiley
[3] Professional AS P.NE T 4 In C# And VB, Bill
Evjen, Scott Hanselman And Devin Rader, Wiley
[4] Pro ASP.NET In C# 2010, Fourth
Edition,matthew Macdonald, Adam Freeman, And
Mario Szpuszta, Apress