473,796 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

N-Tier Question

Hello

I am getting a little lost in the N-Tier business. Let me explain what I
have so far.

I am using the Data Access Application Block to execute my SQL stored
procedures on the backend. I have several DLL classes that call the DAAB and
receive datasets on return. These datasets are then passed back to calling
BLL classes and then onto the Presentation layer which is ASP.NET.

Where I am confused is in which layer should I carry out actions such as
merging the changes of a GetChanges dataset into the orignal dataset before
passing it back to the presentation layer. I currently have actions like this
in the BLL but i'm not entirely sure its the best place or correct place for
it to be.

Any help or guidance towards best practices would be greatly received.

Thanks

R
Nov 21 '05 #1
1 943
Typically you would want to do such things as close to the source of the event that causes
GetChanges to deduced. Most likely this will be in the BL. Alot of these kinds of questions come
down to the specific project in question and personal perference. To me the purpose of the DAL is
too do nothing more than "talk" to the datastore. If you are Get[ting]Changes then you must have
done something that you think may have changed the data in the dataset, therefore you must have
stored the original dataset somewhere so that you could implement the merge. Whereever this occurs
is where you should probably be handling this process.

Something else that might help you decide is in thinking about nTier as not only a separation of
layers for specific functions (presentation/BL/dal) but also what that allows you to do and the
ramifications of where you put the type of code you described. If you were to swap your asp.net
front end for a winforms implementation and your presumably SQL Server backend for an Oracle
backend, how much of this type of code would you have to rewrite?

If it is alot then chances are your putting too much in either end and you should think about
refactoring to the middle tier. If the GetChanges you made require some BI to determine what goes
where and what constitutes a change then it should be in the BL. If it is merely some mundane
translation of some kind then it might well be a DAL function.

hth
Richard


Nov 21 '05 #2

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

Similar topics

0
1062
by: tstephan | last post by:
In the past we have used the classic nTier design with COM+, SQL Server and MFC. We are currently working on a new project with an opportunity to use .NET, ADO.NET, etc. One of the areas where I don't find a clear migration path is with security. In the classic method, the server side tiers were installed under COM+ and run as a known user. SQL Server then gave full access to this known user so ADO simply needed to make standard calls...
25
5064
by: Stuart Hilditch | last post by:
Hi all, I am hoping that someone with some experience developing nTier apps can give me some advice here. I am writing an nTier web app that began with a Data Access Layer (DAL), Business Logic Layer (BLL) and User Interface Layer (UIL). The problem I found with this was circular referencing...
5
1182
by: Ryan Ternier | last post by:
I know how this should be done in regards to nTier, but it seems a bit inneficient, and was wondering if there's a solution that I havn't thought of yet. (I'm switching this loop to For Each Row as DataRow in.... to kill the one int that's not needed.) For intCount1 = 0 To objData.DataSet.Tables("tblSecondaryNumbers").Rows.Count - 1 rowTemp = objData.DataSet.Tables("tblSecondaryNumbers").Rows(intCount1)
1
1029
by: Dnx | last post by:
hi i'm a very beginner of visual studio .net 2003 and aspx/vb.net i have to create a project with an architecture ntier i understand the concept but in practical, i don't know where to begin... please help me thank you
2
1022
by: WStoreyII | last post by:
I have been reading up on the N-Tier application Design Model. I understand the concept of and the purpose of breaking up the application in to seperate modules (or tiers) for reusabillity and ect. What i dont understand though is what exactly needs to be on a data access tier. For example I am working on a project right now that i was thinking of making
0
912
by: Jon Vaughan | last post by:
Hello, I have an NTIER Model written in VB.NET, at the moment is running as a client / server. Pushing a pulling data from the client to the server is fine and is done via webservice calls. But how do I go about a call from the server to the clients ? An example would be that the clients are using a disconnected dataset and need to be informed that the dataset has been altered and needs refreshing.
0
1049
by: Jon Vaughan | last post by:
Hello, I have an NTIER Model written in VB.NET, at the moment is running as a client / server. Pushing a pulling data from the client to the server is fine and is done via webservice calls. But how do I go about a call from the server to the clients ? An example would be that the clients are using a disconnected dataset and need to be informed that the dataset has been altered and needs refreshing.
0
1038
by: acnx | last post by:
I have an ntier application. I am trying to determine what is the best practice for handing errors in a datagrid. My datagrids are able to add, update and delete data. I am using a objectdatasource to access a proxy which calls a remote business object. The objectdatasource uses a custom class to pass the data to the business layer. The business layer method returns true or false. When false is returned I want to be able to handle this....
0
910
by: fra | last post by:
Ciao a tutti, è disponibile on line un esempio completo di progetto NTier da usare come base per lo sviluppo di una web application strutturata?? Intendo un esempio con gestione corretta dei vari livelli (DAL...) esempi per l'accesso ai dati ... e che magari sia già scritta con una versione recente del FMK (non proprio la 2.0 intendo) Grazie
0
9685
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
9531
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
10459
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
10018
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
9055
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...
0
5578
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
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
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
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.