473,655 Members | 3,112 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Merits of using a DAL

In an environment such as VS which allows great integration of the Database
design components visually in the IDE, and given that a target app is will
be deployed on a single machine (ie. not n-tier or client server), I'm
debating the concept of using a DAL.

Other than logical design, I cannot see a benefit of using it.

Can anyone offer any opinions?

Thanks
Nov 17 '05 #1
2 1293
If your program will be required to migrate to some other database such as
if you start out with access and think that you may move to SQL later or if
the code is for some project that may require future expansion, re-write for
Avalon, addition of a web-interface then use the DAL idea.

If not then don't bother to complicate your life any more than you need to.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Paul Aspinall" <pa**@aspy.co.u k> wrote in message
news:I2******** **********@fe3. news.blueyonder .co.uk...
In an environment such as VS which allows great integration of the
Database design components visually in the IDE, and given that a target
app is will be deployed on a single machine (ie. not n-tier or client
server), I'm debating the concept of using a DAL.

Other than logical design, I cannot see a benefit of using it.

Can anyone offer any opinions?

Thanks

Nov 17 '05 #2
Paul Aspinall wrote:
In an environment such as VS which allows great integration of the
Database design components visually in the IDE, and given that a
target app is will be deployed on a single machine (ie. not n-tier or
client server), I'm debating the concept of using a DAL.

Other than logical design, I cannot see a benefit of using it.

Can anyone offer any opinions?


Well, this is a typical coder's approach -- go with the tools and be
done with it. But unfortunately, once you wear a tester's hat, or an
architect's hat, things aren't that easy anymore.

First, you cannot unit test your application in a meaningful way,
because you're unit is the entire application. There's no way to "mock"
or "stub" the DAL without a proper DAL. This also means that there's no
easy way to swap out implementations (e.g. Oracle vs. SQL Server), if
that ever becomes a requirement -- there's no abstraction layer
protecting the rest of your application from data access implementation
details.

Second, unless you're data access code is utterly trivial, I'm sure
that you'll find repeating similar data access code all over the place.
It doesn't matter whether it's handwritten or generated by tools. It
violates one of the most fundamental design principles: Don't repeat
yourself. And it quickly becomes a maintenance nightmare.

If you're asking as a hobbyist though, things are different -- do
whatever you're most comfortable with ;-)

Cheers,
--
http://www.joergjooss.de
mailto:ne****** **@joergjooss.d e
Nov 18 '05 #3

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

Similar topics

3
2420
by: Joe | last post by:
Hi all, We have a website which has some html(static), asp(pages with forms) and some .aspx (pages with forms) pages. Can someone tell me the advantages of having the entire website in .aspx vs having static pages as html, and pages with forms in either asp/asp.net. One idea behind converting static html pages to .aspx was to take advantage of master pages once .net v2 final is released this year. What I am seeking are the...
852
28320
by: Mark Tarver | last post by:
How do you compare Python to Lisp? What specific advantages do you think that one has over the other? Note I'm not a Python person and I have no axes to grind here. This is just a question for my general education. Mark
14
2167
by: Paddy3118 | last post by:
This month there was/is a 1000+ long thread called: "merits of Lisp vs Python" In comp.lang.lisp. If you followed even parts of the thread, AND previously used only one of the languages AND (and this is the crucial bit), were persuaded to have a more positive view of the other language; (deep breath, this is a long, as well as grammatically incorrect sentence), THEN WHY NOT POST ON WHAT ARGUMENTS PERSUADED YOU.
0
8380
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
8816
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
8598
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7310
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
6162
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
5627
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();...
0
4150
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...
1
2721
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
2
1598
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.