.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

Which of the two design patterns should be used in a 3-tier Asp.Net application?

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net
 

I'm trying to decide which of the two factory patterns I should use in my Asp.Net applications:


1 : All DAL providers derive from same abstract base class DepartmentsProvider, which defines public interface of the class ( all the necessary CRUD methods for which derived classes  (providers ) provide a concrete implementation ).  BLL layer instantiates correct provider by calling DepartmentsProvider.Instance:

   

    public abstract class DepartmentsProvider
    {
       static private DepartmentsProvider _instance = null;
       /// <summary>
       /// Returns an instance of the provider type specified in the config file
       /// </summary>
       static public DepartmentsProvider Instance
       {
           get
           {
               if (_instance == null)
                   _instance = (DepartmentsProvider)Activator.CreateInstance(
                      Type.GetType(Settings.Departments.ProviderType));
               return _instance;
           }
       }

       public abstract List<Department> GetDepartments ();
       }
       /// Concrete provider
       public class SqlDepartmentsProvider : DepartmentsProvider
       {
           public override List<Department> GetDepartments()
           {
               using (SqlConnection cn = new


View Complete Post


More Related Resource Links

Solidify Your C# Application Architecture with Design Patterns

  
design pattern can solve many problems by providing a framework for building an application. Design patterns, which make the design process cleaner and more efficient, are especially well-suited for use in C# development because it is an object-oriented language. Existing design patterns make good templates for your objects, allowing you to build software faster. This article describes several popular design patterns you can use in your own applications, including the singleton, the decorator, the composite, and the state classes, which can improve the extensibility of your applications and the reuse of your objects.

Entity Framework: N-Tier Application Patterns

  

This article examines n-tier patterns for success and some of the key APIs and issues specific to the Entity Framework. It also provides a sneak peak at features coming in the Microsoft .NET Framework 4 that should make n-tier development significantly easier.

Daniel Simmons

MSDN Magazine August 2009


Design Patterns: Solidify Your C# Application Architecture with Design Patterns

  

A design pattern can solve many problems by providing a framework for building an application. Design patterns, which make the design process cleaner and more efficient, are especially well-suited for use in C# development because it is an object-oriented language. Existing design patterns make good templates for your objects, allowing you to build software faster. This article describes several popular design patterns you can use in your own applications, including the singleton, the decorator, the composite, and the state classes, which can improve the extensibility of your applications and the reuse of your objects.

Samir Bajaj

MSDN Magazine July 2001


Logic behind N -Tier Application Development

  
In the arena of application development, developers all over the world use various programming languages, technical processes, and technical tools. While using number of technical & non technical elements the processes or methods become complex, for simplification of the application development process, developers use various techniques such as dividing the application architecture into layers or parts. In the professional & technical language this separation or division process is called N-Tier Application Development process, where "N" stands for number and "tire" stands for layers or parts.

How to create 3 tier application using LINQ

  
As you know that in 3 tier architecture there are three layers

User interface layer. (Is our Form in Windows application and .aspx page in Web application)
Data Access layer. (Which provides interface between Business logic layer and Database)
Business Logic layer.(Which stores your application logic)

Application Architecture: An N-Tier Approach - Part 1

  
Introduction

Free Trial: SQL Backup Pro
Sponsored by Red Gate
Exceptional DBAs make the most of their office hours. That's why they love Red Gate SQL Backup Pro. Its faster, smaller, secure SQL Server backups mean more time spare to accomplish more tasks and professional training. Make time to be an Exceptional DBA. Download it now! »


Free Trial: SQL Toolbelt
Sponsored by Red Gate
The SQL Toolbelt is a set of twelve powerful and intuitive tools that will help you burn through SQL Server chores with astonishing speed and accuracy. Download it now! »


Download: SQL Backup Evaluation Center
Sponsored by Red Gate
Download the T-SQL scripts in the SQL Backup Evaluation Center to compare Red Gate SQL Backup Pro's compressed backups with the size of backups created using native SQL Server. Download it now! »



MARKETPLACE
Autodesk Inventor®
Go Beyond 3D To Digital Prototyping With Autodesk Inventor. Learn How.
Autodesk.com/Beyond-3d
Virtualization Solutions
Optimize, Simplify, & Save Today. Learn About Microsoft Solutions.
www.microsoft.com
Microsoft SQL Server® 2008 - Free Trial
Download the Free 180-day Trial of SQL Server® 2008 Enterprise Edition!
www.Microsoft.com/SQLServer
Hot Careers in Internet Marketing
Get prepared for your new career with online degrees from Full Sail University!
www.FullSail.edu
Microsoft Te

What Are Design Patterns and Do I Need Them?

  
Software professionals may be familiar with the term "Design Patterns," but many have no idea of where they come from and what they truly are. Consequently, some do not see the value and benefits design patterns bring to the software development process, especially in the areas of maintenance and code reuse.

Design Patterns for .NET

  
It is not the intent of the Design Pattern Series to focus on providing a theoretical knowledge dump of all there is to know about design patterns. There are many books that do that already. Instead, this series will focus on providing lots of practical examples. However, there will be some theory to help address important points concerning design patterns. I use the theory of design patterns mostly as a guide and instead make references to good design pattern books for more detail explanation.

GOF Creational Design Patterns with C#

  
The GOF design patterns help address the following challenges :

design ready to accommodate change & growth

design flexible systems which come ready to handle reconfiguration and run time tailoring

code in manner to facilitate reuse during the development and extension phases ... ie. both external and internal reuse, so that we are rewarded by efficiencies as the project progresses, coming from investments made earlier in the project.

implement change in a way that doesn't overly shorten the system's useful lifespan

Design Patterns - Using the State Pattern in C#

  
What is the State Pattern?

The State Pattern is a behavioral pattern that can be used to alter the behavior of an object at run time. As the state of an object changes, the functionality of the object can change drastically. This change of behavior is hidden from the Client and the Client interfaces with a wrapper object known as the Context. The State Pattern is a dynamic version of the Strategy Pattern.

Design Patterns

  
gives Total Idea About Design Patterns

Design Patterns: Problems and Solutions with Model-View-ViewModel

  

The Model-View-ViewModel (MVVM) design pattern describes a popular approach for building Windows Presentation Foundation or Microsoft Silverlight applications. Robert McCarter shows you how the ViewModel works, and discuss some benefits and issues involved in implementing a ViewModel in your code.

Robert McCarter

MSDN Magazine July 2010


Patterns in Practice: Incremental Delivery Through Continuous Design

  

The end goal of software projects is to deliver value to the customer. Software design is a major factor in how successfully a team can deliver that value. The best designs are a product of continuous design rather than the result of an effort that tries to get the entire design right up front. This approach lets you strive to apply lessons learned from the project to continuously improve the design, instead of becoming locked into an erroneous design developed too early in the project.

Jeremy Miller

MSDN Magazine August 2009


Foundations: Windows Workflow Design Patterns

  

Design patterns provide a common, repeatable approach to solving software development tasks, and many different patterns can describe how to accomplish a certain goal in code. When developers begin working with Windows Workflow Foundation (WF), they often ask about how to accomplish common tasks with the technology. This month's column discusses several design patterns used in WF.

Matthew Milner

MSDN Magazine August 2009


Entity Framework: Anti-Patterns To Avoid In N-Tier Applications

  

Danny Simmons explores some anti-patterns you should look out for when building n-tier applications with the Entity Framework.

Daniel Simmons

MSDN Magazine June 2009


Toolbox: Managing in the Cloud, UX Design Patterns, Anders Hejlsberg's The C# Programming Language,

  

Now that you're even managing projects in the cloud, you'll need some tools to help. This month we illustrate one, discuss UX design patterns, a book by Anders Hejlsberg, and more.

Scott Mitchell

MSDN Magazine June 2009


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend