Showing posts with label ADVANCED TOPICS. Show all posts
Showing posts with label ADVANCED TOPICS. Show all posts

Design Patterns

There are three basic classification of patterns Creational, Structural, Behavioral patterns.


Creational Patterns
==============

Abstract Factory:- Creates an instance of several families of classes
Builder :- Separates object construction from its representation
Factory Method:- Creates an instance of several derived classes
Prototype:- A fully initialized instance to be copied or cloned
Singleton:- A class in which only a single instance can exist

Structural Patterns
==============

Adapter:-Match interfaces of different classes.
Bridge:-Separates an object’s interface from its implementation.
Composite:-A tree structure of simple and composite objects.
Decorator :-Add responsibilities to objects dynamically.
Façade:-A single class that represents an entire subsystem.
Flyweight:-A fine-grained instance used for efficient sharing.
Proxy:-An object representing another object.

Behavioral Patterns
===============

Mediator:-Defines simplified communication between classes.
Memento:-Capture and restore an object's internal state.
Interpreter:-A way to include language elements in a program.
Iterator:-Sequentially access the elements of a collection.
Chain of Resp:-A way of passing a request between a chain of objects.
Command:-Encapsulate a command request as an object.
State:-Alter an object's behavior when its state changes.
Strategy:-Encapsulates an algorithm inside a class.
Observer:-A way of notifying change to a number of classes.
Template Method:-Defer the exact steps of an algorithm to a subclass.
Visitor:-Defines a new operation to a class without change.




Read Users' Comments (0)

Delegate Example

http://www.codeproject.com/KB/cs/DelegatesOMy.aspx


Read Users' Comments (0)

Google Wave

Watch the developer preview :



Google Wave is an online tool for real-time communication and collaboration. A wave can be both a conversation
and a document where people can discuss and work together using richly formatted text, photos, videos, maps, and more.


What is a wave?


A wave is equal parts conversation and document.People can communicate and work together with richly formatted text, photos, videos, maps, and more.

A wave is shared. Any participant can reply anywhere in the message, edit the content and add participants at any point in the process. Then playback lets anyone rewind the wave to see who said what and when.

A wave is live. With live transmission as you type, participants on a wave can have faster conversations, see edits and interact with extensions in real-time.

Read Users' Comments (0)

Introducing .NET Generics

What Are Generics?


When we look at the term "generic", unrelated to the programming world, it simply means something that is not tied to any sort of brand name. For example, if we purchase some generic dish soap, soap that has no brand name on it, we know that we are buying dish soap and expect it to help us clean our dishes, but we really don't know what exact brand (if any) will be inside the bottle itself. We can treat it as dish soap even though we don't really have any idea of its exact contents.

Think of Generics in this manner. We can refer to a class, where we don't force it to be related to any specific Type, but we can still perform work with it in a Type-Safe manner. A perfect example of where we would need Generics is in dealing with collections of items (integers, strings, Orders etc.). We can create a generic collection than can handle any Type in a generic and Type-Safe manner. For example, we can have a single array class that we can use to store a list of Users or even a list of Products, and when we actually use it, we will be able to access the items in the collection directly as a list of Users or Products, and not as objects (with boxing/unboxing, casting).

"Generic" Collections as we see them today


Read Users' Comments (0)