Thursday, June 12, 2014

Creational Patterns

The creational patterns aim to separate a system from how its objects are created, composed, and represented. Creational patterns encapsulate the knowledge about which classes a system uses, but they hide the details of how the instances of these classes are created and put together.
The Prototype pattern ensures that when copies of complex objects are made, they are true copies.
The Factory Method pattern is a means of creating objects without knowing the exact subclass being used.
The Singleton pattern ensures that only one of a class can be built and that all users are directed to it.

1. Prototype pattern
Given a key, the program creates an object of the required type, not by instantiation,
but by copying a clean instance of the class.



Good Links

http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/

Authentication in WIndows Apps


http://msdn.microsoft.com/en-us/library/system.security.principal.windowsidentity%28VS.80%29.aspx

http://social.msdn.microsoft.com/Forums/en/winserver2008appcompatabilityandcertification/thread/e04543c6-1b30-441e-8ea1-1982d986ce8e

SQL SERVER Error 3154 - The backup set holds a backup of a database other than the existing database

Using a script with replace to create the backup seems to help:
RESTORE DATABASE PACS
FROM DISK = 'abc.bat'

WITH REPLACE