Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

A delegate is a reference type variable that holds the REST Service SOAP Service

reference to a method
CRUD operations Any operations
Delegates are especially used for implementing events • Operates on Entities • Not limited to Entities
and the call-back methods. All delegates are implicitly
• JSON/XML/HTML/Markdown/… • XML
derived from the System. Delegate class
• Low overhead • High overhead
C# provides four types of access modifiers: private,
• Request/Response • Request/Response, Fire & Forget,
public, protected, internal, and two combinations:
protected-internal and private-protected. • No discovery & routing Bi-Directional Calls

• Incomplete standard • Standard discovery & routing

What To Cache Where To Cache?


• UI Pages/UI components • Local memory
• Service output • State server
• Business Entities • File system
• Business State • Database
• Data query results
• Configuration data
How To Manage The Cache? How To Fill The Cache
Expiration strategy: • Proactive Loading
• Time-based • Static data
Default access modifier in C# is Public • Event-based • Known update frequency
• Flush strategy: • Known size
Ref type: Object that stores references to the actual data
• Manual • Reactive Loading
Eg. Classes, interface, delegates, object, string
• Automatic: • Volatile data
Value type: Objects that actually holds value • Least Recently Used • Unknown lifetime
e.g, enum, bool, int, numeric, struct • Least Frequently Used • Large data volume
• Priority • Fast caching medium
Boxing: converts value type to the type object
eg, int i = 123; object o = i;

Unboxing: Extracts the value type object from object


eg, o = 456; i = (int) o;

Dependency Injection: Ability to supply external dependency


in some component

 Object creation on the fly


 Constructor, property, method dependency
 3rd party DIs: Spring.Net, castle Windsor, Ninject

Filters in MVC:

 Authentication
 Authorization
 Action
 Result
 Exception

Request Response pipeline in MVC:

Authentical filter  authorisation filter  model binding


 Action filter  Action method  Action filters (on
action executed)  Result filters  Exception filters

Code Access Security: .NET has two kinds of security:

1. Role Based Security


2. Code Access Security

You might also like