Tuesday, February 17, 2009

Interview Question asp.net 3.5 - Part 1

What do you mean by three-tier architecture?
The three-tier architecture was comes into existence to improve management of code and contents and to improve the performance of the web based applications. There are mainly three layers in three-tier architecture. the are define as follows
  1. Presentation
  2. Business Logic
  3. Database
1. First layer- Presentation contains mainly the interface code, and this is shown to user. This code could contain any technology that can be used on the client side like HTML, JavaScript or VBScript etc.

2. Second layer - is Business Logic which contains all the code of the server-side .This layer have code to interact with database and to query, manipulate, pass data to user interface and handle any input from the UI as well.

3. Third layer-Data represents the data store like MS Access, SQL Server, an XML file, an Excel file or even a text file containing data also some additional database are also added to that layers.

Do not use design patterns in any of the following situations.


When the software being designed would not change with time.
When the requirements of the source code of the application are unique.

If any of the above applies in the current software design, there is no need to apply design patterns in the current design and increase unnecessary complexity in the design.

When to use Design Patterns
Design Patterns are particularly useful in one of the following scenarios.

* When the software application would change in due course of time?

* When the application contains source code that involves object creation and event notification?

The following are some of the major advantages of using Design Patterns in software development.
  1. Flexibility
  2. Adaptability to change
  3. Reusability
What are Design Patterns?
A Design Pattern essentially consists of a problem in a software design and a solution to the same. In Design Patterns each pattern is described with its name, the motivation behind the pattern and its applicability.

According to MSDN, "A design pattern is a description of a set of interacting classes that provide a framework for a solution to a generalized problem in a specific context or environment. In other words, a pattern suggests a solution to a particular problem or issue in object-oriented software development.

Happy Interview...!