Skip to main content

Posts

Showing posts from September, 2014

ASP.NET Web Apps

ASP.NET web applications ASP.NET is used to create dynamic web sites. Web pages are said to be dynamic when the content displayed on the web page change based on the user profile, user input, time or any other factor. The web pages that does not changes are said to be static. In an ASP.NET web application, web pages served by the web server are generated by an application based on the user request. ASP.NET websites use client server technology like every other web sites. Where the browser is the client. When a user types a URL or clicks a link or a button in the web page, a request is sent to the web server. This request is then sent to application server that runs an appropriate program to create the web page requested by the user. This web page also may include data that is retrieved from a database server. Once the web page is created, this web page is sent to web server which sends it to the user's browser. The whole process is called a round trip. Listed below are 5 di...

Singleton Pattern

Singleton Pattern is used to control the instantiation of a class. A Singleton class can have only one instance and the class provides a global access point to that instance. The singleton class has the following responsibility: ensures that only one instance of the class is created. provides access to that instance of the object. ideally the singleton instance should be created only when it is needed. There are situation when we need a single unique instance of a class. To do this we can make the constructor of the class private so that only the class itself is capable of creating an instance of itself. We can hold the instance of the singleton class in a global variable and provide access to this instance through a global method. However, a global variable would exist for the duration of the program taking up resources. This could become a problem when the instance is resource-intensive. Therefore, you may want to create such an object only when it is needed. Si...

Design Patterns Intro.

What are Design Patterns? A Design Pattern is a recurring solution to a recurring problem in a specific context. Patterns are not a specific to Software engineering. They are applied in many disciplines including but not limited to Construction, Mechanical Engineering and psychology. The first book on patterns was written by Christopher Alexander in 1977 on building architecture. “A pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.” - Christopher Alexander Design Patterns is the first book on software design patterns written by Gang of Four (Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides) or GoF. This book describes 23 common design patterns (Gamma et al, 1995). All of these 23 design patterns are explained in your text book. Design patterns have 4 essential element...