473,624 Members | 2,612 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Advice on Data Layer

I want to create an n-tier app and I would like an advice of you that
know more than me about this.

I want my app to support multiple databases in the way that when a
client wants to use Oracle and not SQL server, I can easily port the
data layer without touching the rest of the code.

So, I have 2 ideas.

1: Take the way MS Pet Shop did (I read a LOT in many sites how this
architecture is flawed) in creating an IDAL where i declare DAL
interfaces to all my objects and implement them in the real DAL (SqlDAL,
OracleDAL, etc).

2: Create abstract classes that implement common code to all the DALs
(like some selects are really equal in any database) and override them
in the real implementation providing the code that is different.

Both of them include am Data Access Interface to provide common way to
access all the data from a single point, and a Factory to choose which
DAL I should use.

I would like to know from you what is best in your opinion, even other
idea that i didn't write. I don't know if my references are the best ones.

Other thing that I am in doubt is that way MS pet shop uses to
instantiate classes. Is there any performance issues using
Assembly.Create Instance(string )? I'm afraid that when using lots of
requests per second, this could affect the application.

Thanks in advance.
Nov 22 '05 #1
1 1479
I am using LLBLGen Pro (http://www.llblgen.com) myself: you can generate
your DAL for multiple databases. By using e.g. the facade pattern or
another layer on top of the two generated DALs you can create the wanted
effect.

Natan wrote:
I want to create an n-tier app and I would like an advice of you that
know more than me about this.

I want my app to support multiple databases in the way that when a
client wants to use Oracle and not SQL server, I can easily port the
data layer without touching the rest of the code.

So, I have 2 ideas.

1: Take the way MS Pet Shop did (I read a LOT in many sites how this
architecture is flawed) in creating an IDAL where i declare DAL
interfaces to all my objects and implement them in the real DAL (SqlDAL,
OracleDAL, etc).

2: Create abstract classes that implement common code to all the DALs
(like some selects are really equal in any database) and override them
in the real implementation providing the code that is different.

Both of them include am Data Access Interface to provide common way to
access all the data from a single point, and a Factory to choose which
DAL I should use.

I would like to know from you what is best in your opinion, even other
idea that i didn't write. I don't know if my references are the best ones.

Other thing that I am in doubt is that way MS pet shop uses to
instantiate classes. Is there any performance issues using
Assembly.Create Instance(string )? I'm afraid that when using lots of
requests per second, this could affect the application.

Thanks in advance.

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1561
by: M O J O | last post by:
Hi, I'm creating an CRM solution for my company. I want to split up the solution into several classlibraries, so I dont need to build the entire solution every time I run my project. First I thought about splitting my application up into these libraries: Solution (solution)
1
260
by: Natan | last post by:
I want to create an n-tier app and I would like an advice of you that know more than me about this. I want my app to support multiple databases in the way that when a client wants to use Oracle and not SQL server, I can easily port the data layer without touching the rest of the code. So, I have 2 ideas. 1: Take the way MS Pet Shop did (I read a LOT in many sites how this
4
1119
by: mallen | last post by:
Hi All, I have a web application with the usual 3 layers; presentation, business, and DB. We are just about to start work on a new project with a totally separate presentation layer, but will use SOME of the existing business functionailty and the same DB. Functionailty to be re-used will be a User object for example.
1
2574
by: Johann Blake | last post by:
I am looking for a good solution on how to implement data access in an application so that there is a clean separation between the data access layer, the business layer and the GUI layer. I am looking for a robust solution for a major application. Almost every developer seems to come up with a completely different solution. While many of them are not bad, I really want a very good one. My database is SQL Server 2000 and I am using Visual...
9
2652
by: Laban | last post by:
Hi, I find myself using static methods more than I probably should, so I am looking for some advice on a better approach. For example, I am writing an app that involves quite a bit of database operations on purchase orders and inventory. I have created a PurchaseOrder class and Inventory class to encapsulate operations like creating POs, finding items, etc. These two classes are used extensively from different parts of the app.
6
1398
by: V. Jenks | last post by:
I apologize if this is the wrong forum for this, I could not locate one that was exactly appropriate for this topic. Over the last couple of years I've been doing a lot of reading on design patterns and different types of architectures for building high-performance, scalalble n-tier apps. I've used business objects for a while, since moving to C# and asp.net from classic asp but I'm wondering how I can
3
1435
by: Shapper | last post by:
Hello, Until now I have been using Dreamweaver to create ASP.Net/VB web sites. I gave up of using it. Too many limitations. What is the best software to create ASP.NET/VB web sites? Maybe Web Matrix from ASP.NET. Or Visual Studio?
13
3100
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those sorts of clients. Mine are all small businesses whose sites will never reach those sorts of scales. I deal with businesses whose sites get maybe a few hundred visitors per day (some not even that much) and get no more than ten orders per day....
1
1108
by: MuZZy | last post by:
Hi, I'm going to develop a pretty simple document management application and i want to use WCF to connect back-end to smart client front-end. That application will allow to create a hierarchcal structure where any node can be linked with a document file, which are all stored in a SQL Server database. I'm trying to convince my boss towards smartclient instead of ASP.NET
13
1325
by: terry.holland | last post by:
I have a three tiered CRM application (ASP.Net UI, VB.Net Business Layer & VB.Net Data Access Layer) that consists of number of classes. The application will be deployed to a number of clients. Some of our clients have no existing CRM system and are happy that our application stores Client information. Other clients have already got a CRM system and want our application for the additional functionality that it offers. These clients would...
0
8246
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8631
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4184
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.