473,691 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Abstraction Layer SQL/Foxpro

Hello,

I am creating a data layer that will handle SQL(SQLClient) and Visual
Foxpro (OleDb). The way I am thinking about creating it is create a
base class that handles setting of connectionstrin g and accessors for
IDbAdapter, IDbCommand, IDbConnection etc..

then in the derived classes I handle casting the connection/commands to
the proper type and return results.

I was browsing through microsofts examples on their data layer, which
is one class that uses an enum to determine the proper casting type and
returns values.

Is there any benefit to doing it the way microsoft has on their
patterns and practices site?

I would imagine that my method would be more extensible since
functionality is seperated into different derived classes.

thanks!

Feb 15 '06 #1
2 1886
Hi,

Take a look at the abstract factory pattern :
http://en.wikipedia.org/wiki/Abstract_factory
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"DKode" <dk****@gmail.c om> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...
Hello,

I am creating a data layer that will handle SQL(SQLClient) and Visual
Foxpro (OleDb). The way I am thinking about creating it is create a
base class that handles setting of connectionstrin g and accessors for
IDbAdapter, IDbCommand, IDbConnection etc..

then in the derived classes I handle casting the connection/commands to
the proper type and return results.

I was browsing through microsofts examples on their data layer, which
is one class that uses an enum to determine the proper casting type and
returns values.

Is there any benefit to doing it the way microsoft has on their
patterns and practices site?

I would imagine that my method would be more extensible since
functionality is seperated into different derived classes.

thanks!

Feb 15 '06 #2
I just got done reading a book on design patterns, and reviewed the
factory pattern briefly.

I must admit, I am still having a hard time determining when to use
certain patterns and where. That article helps.

Thank you!

Sean

Feb 16 '06 #3

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

Similar topics

1
3129
by: 11abacus | last post by:
Hi, Just wondering if any of you has thought about or is working on a payment gateway abstraction layer (PEAR-style)? I'm interested on developing that or at least start a discussion about it. The package would provide a framework for all types of online (and offline?) payment transactions.
0
2913
by: me | last post by:
I've posted this in the microsoft news group but just noticed the comp newsgroups. What's the difference anyways? This one is a tricky one so I'm interested in seeing what all you gurus have to say. I'm trying to put a resume into a database. There are only three reports (see below). I suspect that the best structure for a resume database is as follows:
6
5768
by: Hamed | last post by:
Hello I have employed as a developer in a software company that its team uses FoxPro / VB 6.0 / VC++ 6.0 as the developing tools and newly is going to migrate to VS.NET. There is a project modified that is to upgrade a big, more than 100,000 lines DOS based program developed by FoxPro 2.x to .NET platform. The design is as previous and the implementation will be reprogrammed. As a duty in my job I should find an answer about the
5
2150
by: David Winter | last post by:
I am looking for a "WYSIWYG" style, browser-based editor for (X)HTML content. It should (at least) run under Windows, preferably in Mozilla/Firefox, but IE would be OK, too. Now I know there are dozens of these beasts. I am looking for one with an "abstraction layer". What I mean by this is that the formatting applied to the code and its presentation onscreen should be completely separate and customizable. An example:
30
2227
by: Luke Wu | last post by:
Hello, >From spending some time in clc, I've come to realize that C's model of the CPU can be totally different from the atual CPU. Is it safe to say that almost nothing can be gleaned about physical CPU behaviour from C level behaviour. For example:
2
1823
by: Eric Cathell | last post by:
I am using dOOdads as my persistence layer. I have a business object Person that sits in a Project called DOMAIN I have 2 dOOdads in a project called BLL. one is _Person and is declared MustInherit the other is Person and is my concrete class. My main goal of BLL.Person is to protect custom methods and properties against regeneration.
3
5092
by: S. Lorétan | last post by:
Hi guys, I'm coding an application connected to a database. I have some clients that use this program with 2 or 3 computers, and I use MsSQL Express for them. But if the client needs more computers to be connected to the database, I have to use a standard MsSQL. No problem with that, but I want to be able to switch from a database provider to another in an easy way. I know that this way to do is called "Data(base) abstraction layer",...
17
46529
Motoma
by: Motoma | last post by:
This article is cross posted from my personal blog. You can find the original article, in all its splendor, at http://motomastyle.com/creating-a-mysql-data-abstraction-layer-in-php/. Introduction: The goal of this tutorial is to design a Data Abstraction Layer (DAL) in PHP, that will allow us to ignore the intricacies of MySQL and focus our attention on our Application Layer and Business Logic. Hopefully, by the end of this guide, you will...
2
2247
bilibytes
by: bilibytes | last post by:
Hi there, I am wondering what are the advantages of having a database abstraction layer like the one explained Here (in Devshed) Don't you get more efficient queries writing them down in SQL? As far as i can understand, i just see an advantage whenever the underlying database were to change (and even then, SQL isn't the same on each RDBMS?) I actually wrap my queries into methods like this: public function getUserBm()
0
8600
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
8535
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
9079
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
8952
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...
0
7626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6457
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5817
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2234
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1954
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.