473,394 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Design Issue

Hi there,

I'm wondering how the "best-practise" of seperating code into a DAL, BLL
and user interface go along with the point and click website creation
through data-binding in VS2003.

If I databind the gridcontrol on my page against a dataview where does
the business logic go? Should the logic operate on the dataview
retrieved from the database? Where does the object model with my beloved
CCustomer, COrder and CAccount-classes go?

If anybody could shed some light how real world applications are
designed these days...

Kind regards,

Matthias
Nov 19 '05 #1
5 1315
Matthais,

There are n ways to skin a cat -- and the same goes with best practices. You
could bind a business object to a grid, or just separate the object from its
view and bind the view (as in MVC pattern). VS.NET will do whatever you tell
it to, and if you designed your app well, you can still apply the best
practices with the tool..

here's some good reading on the topic:

http://msdn.microsoft.com/library/de...MSpatterns.asp

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Matthias S." <postamt@_remove_emvoid_remove_.de> wrote in message
news:OS**************@TK2MSFTNGP15.phx.gbl...
Hi there,

I'm wondering how the "best-practise" of seperating code into a DAL, BLL
and user interface go along with the point and click website creation
through data-binding in VS2003.

If I databind the gridcontrol on my page against a dataview where does
the business logic go? Should the logic operate on the dataview
retrieved from the database? Where does the object model with my beloved
CCustomer, COrder and CAccount-classes go?

If anybody could shed some light how real world applications are
designed these days...

Kind regards,

Matthias

Nov 19 '05 #2
Hi Manohar,

thanks for the link! That'll keep me busy for the rest of the night ;)

Again, thanks!

Matthias

Manohar Kamath wrote:
Matthais,

There are n ways to skin a cat -- and the same goes with best practices. You
could bind a business object to a grid, or just separate the object from its
view and bind the view (as in MVC pattern). VS.NET will do whatever you tell
it to, and if you designed your app well, you can still apply the best
practices with the tool..

here's some good reading on the topic:

http://msdn.microsoft.com/library/de...MSpatterns.asp

Nov 19 '05 #3
Good questions, Matthias.

Bacially, you have to think of each layer as representing ONLY what that
layer represents. The data layer should have methods that return data
objects only, such as DataReaders, DataTables, and DataSets. That is the
only functionality it should serve. Any Business logic or UI logic should
not be in there. The business layer should process the data and make it
"pallatable" to the UI. the business layer should contain no UI-related
code, such as formatting, UI controls, etc. It should create nice packages
of data, and perform all the work with it. The presentation layer should
only contain UI logic. It should process no data whatsoever. It should
present it to the user, take input from the user, and hand the input and
data back to the business layer for processing.

Thus, the presentation layer requests business data from the business layer,
which in turn, talks to the data layer, processes the data, and hands it to
the presentation layer. When user input is received by the presentation
layer, it should hand the user input to the business layer, which then
processes the user input and data, and, if necessary, hands it all back to
the data layer.

Does that help?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Matthias S." <postamt@_remove_emvoid_remove_.de> wrote in message
news:OS**************@TK2MSFTNGP15.phx.gbl...
Hi there,

I'm wondering how the "best-practise" of seperating code into a DAL, BLL
and user interface go along with the point and click website creation
through data-binding in VS2003.

If I databind the gridcontrol on my page against a dataview where does the
business logic go? Should the logic operate on the dataview retrieved from
the database? Where does the object model with my beloved CCustomer,
COrder and CAccount-classes go?

If anybody could shed some light how real world applications are designed
these days...

Kind regards,

Matthias

Nov 19 '05 #4
Hi Kevin,

thanks for your reply. What you are writing describes the way I kept
thinking about 3 tier solutions until I recently received my copy of
Visual Studio 2003. Then I started wondering, why putting a DataGrid
directly onto a page and it's not only recommended, but is advertised at
every possible corner.

If I stick to a solid architecture based on this model, I'd never
possibly encounter a situation where I would need to put a GridControl
onto my page wich is directly bound to a table in my db.

I'm not in for a rant here about the VS. It's no doubt a great tool.
Just wondering if I missed something out...

Matthias

Kevin Spencer wrote:
Good questions, Matthias.

Bacially, you have to think of each layer as representing ONLY what that
layer represents. The data layer should have methods that return data
objects only, such as DataReaders, DataTables, and DataSets. That is the
only functionality it should serve. Any Business logic or UI logic should
not be in there. The business layer should process the data and make it
"pallatable" to the UI. the business layer should contain no UI-related
code, such as formatting, UI controls, etc. It should create nice packages
of data, and perform all the work with it. The presentation layer should
only contain UI logic. It should process no data whatsoever. It should
present it to the user, take input from the user, and hand the input and
data back to the business layer for processing.

Thus, the presentation layer requests business data from the business layer,
which in turn, talks to the data layer, processes the data, and hands it to
the presentation layer. When user input is received by the presentation
layer, it should hand the user input to the business layer, which then
processes the user input and data, and, if necessary, hands it all back to
the data layer.

Does that help?

Nov 19 '05 #5
Hi Matthias,

Sample code is not meant to be copied and used as is. It exists solely for
the purpose of illustrating a certain functionality, method, property,
whatever. Samples in the .Net SDK should not be taken as recommendatins
regarding good architecture and design. Remember that part of the purpose of
the SDK is to help ASP developers to migrate. Microsoft has plenty of
articles that deal specifically with architecture and design issues. And
you'll see that those articles are along the same lines as what I wrote.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Matthias S." <postamt@_remove_emvoid_remove_.de> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi Kevin,

thanks for your reply. What you are writing describes the way I kept
thinking about 3 tier solutions until I recently received my copy of
Visual Studio 2003. Then I started wondering, why putting a DataGrid
directly onto a page and it's not only recommended, but is advertised at
every possible corner.

If I stick to a solid architecture based on this model, I'd never possibly
encounter a situation where I would need to put a GridControl onto my page
wich is directly bound to a table in my db.

I'm not in for a rant here about the VS. It's no doubt a great tool. Just
wondering if I missed something out...

Matthias

Kevin Spencer wrote:
Good questions, Matthias.

Bacially, you have to think of each layer as representing ONLY what that
layer represents. The data layer should have methods that return data
objects only, such as DataReaders, DataTables, and DataSets. That is the
only functionality it should serve. Any Business logic or UI logic should
not be in there. The business layer should process the data and make it
"pallatable" to the UI. the business layer should contain no UI-related
code, such as formatting, UI controls, etc. It should create nice
packages of data, and perform all the work with it. The presentation
layer should only contain UI logic. It should process no data whatsoever.
It should present it to the user, take input from the user, and hand the
input and data back to the business layer for processing.

Thus, the presentation layer requests business data from the business
layer, which in turn, talks to the data layer, processes the data, and
hands it to the presentation layer. When user input is received by the
presentation layer, it should hand the user input to the business layer,
which then processes the user input and data, and, if necessary, hands it
all back to the data layer.

Does that help?

Nov 19 '05 #6

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

Similar topics

36
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but...
2
by: Kymert persson | last post by:
Hi. I was wondering if there are any more C++ books along the lines of "Large scale C++ software design" by Lakos, J. I.e. concerning larger design issues in close relation to C++. I have made a...
10
by: eMKa | last post by:
Hi Code guru's I have created a user control which has access, and thus makes use of a shared singleton class like: Dim MyAppSettings As DLAppSettings = DLAppSettings.GetAppSettings This...
2
by: John Holmes | last post by:
This, I fear, is related to the fact that Visual Studio.NET reformats the HTML when going into design mode and then back out. I have an object tag that is using an object provided by a 3rd party...
1
by: keliie | last post by:
I have a relatively simple (I assume) issue which I am at a complete loss to address. My issues is: I want to populate fields in my tables with summary data from the same table. Let me explain: ...
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
0
by: Paul Hadfield | last post by:
I'm looking for thoughts on the "correct" design for this problem (DotNet 2.0 - in winforms, but that's not so important). I've got two combo boxes (combo1 and combo2), both are populating via...
8
by: obrianpatrick | last post by:
Hi, I am relatively new to object oriented programming and design. I am developing an application in VS 2005. I am having the following design problem: I have two interfaces X and Y. Y is...
5
by: pgrazaitis | last post by:
I cant seem to get my head wrapped around this issue, I have myself so twisted now there maybe no issue! Ok so I designed a class X that has a few members, and for arguments sake one of the...
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
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...

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.