473,882 Members | 1,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is this a good application Design?

Hello,

Currently my application has three tiers-

1. Presentation Layer (Asp.Net / Win Forms/ Pocket PC UI.)
This predominantly contains User Controls, Custom Controls and Win/Web
Forms.
I have one base form and I inherit from that form.
All validation is done in this tier. There is zero Data Access code in this
tier. This tier exclusively gets DataViews/ Arays/Lists as input. Outputs
are string objects with SQL Statements or just paremeters with
dataconnection key.

2. Business Layer.
Currently this is just a Library residing in the same machine as
Presentation layer. Eventually I plan to use WebServices if application
needs physical seperation.
Most of Business Logic are implemented in this layer. There is absolutely no
UI code here.
These are all bunch of static methods which perform CRUD functionality.
All methods are atomic in nature. I dont rely on Static Variables. There is
just one DatabaseGateway class which does all the functionality.

3. Data Layer. (SQL Server)
I dont use stored procedures. predominantly use Views.
I have been reading up on Rockford Lhotka's business objects and I just feel
that his framework is unnecessarily complex. I just dont see the need to
hold these intermediate Business Objects.

Thanks for your responses.

--
Jay Balapa
Director Of Software Engineering
www.atginc.com

Nov 19 '05 #1
50 2507
Your SQL should be in the Business Layer. The presentation layer should not
make or provide decisions on how data is collected ( that what tables / view
or columns are used ) as that is a business rule.

"Jay Balapa" <jb*****@hotmai l.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hello,

Currently my application has three tiers-

1. Presentation Layer (Asp.Net / Win Forms/ Pocket PC UI.)
This predominantly contains User Controls, Custom Controls and Win/Web
Forms.
I have one base form and I inherit from that form.
All validation is done in this tier. There is zero Data Access code in
this tier. This tier exclusively gets DataViews/ Arays/Lists as input.
Outputs are string objects with SQL Statements or just paremeters with
dataconnection key.

2. Business Layer.
Currently this is just a Library residing in the same machine as
Presentation layer. Eventually I plan to use WebServices if application
needs physical seperation.
Most of Business Logic are implemented in this layer. There is absolutely
no UI code here.
These are all bunch of static methods which perform CRUD functionality.
All methods are atomic in nature. I dont rely on Static Variables. There
is just one DatabaseGateway class which does all the functionality.

3. Data Layer. (SQL Server)
I dont use stored procedures. predominantly use Views.
I have been reading up on Rockford Lhotka's business objects and I just
feel that his framework is unnecessarily complex. I just dont see the need
to hold these intermediate Business Objects.

Thanks for your responses.

--
Jay Balapa
Director Of Software Engineering
www.atginc.com


Nov 19 '05 #2
Josh,

Thanks for your response.

SQL most of the time is in the Business layer.

Sometimes I need to iterate Datarows in a Datagrid. In those cases I make
that exception.

--
Jay
"Josh" <s@a.com> wrote in message
news:OS******** ******@TK2MSFTN GP10.phx.gbl...
Your SQL should be in the Business Layer. The presentation layer should
not make or provide decisions on how data is collected ( that what tables
/ view or columns are used ) as that is a business rule.

"Jay Balapa" <jb*****@hotmai l.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hello,

Currently my application has three tiers-

1. Presentation Layer (Asp.Net / Win Forms/ Pocket PC UI.)
This predominantly contains User Controls, Custom Controls and Win/Web
Forms.
I have one base form and I inherit from that form.
All validation is done in this tier. There is zero Data Access code in
this tier. This tier exclusively gets DataViews/ Arays/Lists as input.
Outputs are string objects with SQL Statements or just paremeters with
dataconnection key.

2. Business Layer.
Currently this is just a Library residing in the same machine as
Presentation layer. Eventually I plan to use WebServices if application
needs physical seperation.
Most of Business Logic are implemented in this layer. There is absolutely
no UI code here.
These are all bunch of static methods which perform CRUD functionality.
All methods are atomic in nature. I dont rely on Static Variables. There
is just one DatabaseGateway class which does all the functionality.

3. Data Layer. (SQL Server)
I dont use stored procedures. predominantly use Views.
I have been reading up on Rockford Lhotka's business objects and I just
feel that his framework is unnecessarily complex. I just dont see the
need to hold these intermediate Business Objects.

Thanks for your responses.

--
Jay Balapa
Director Of Software Engineering
www.atginc.com



Nov 19 '05 #3
If you want to do away with the complexity of the business objects, then
consider moving this business logic to the database as stored procedures and
triggers.

"Jay Balapa" <jb*****@hotmai l.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hello,

Currently my application has three tiers-

1. Presentation Layer (Asp.Net / Win Forms/ Pocket PC UI.)
This predominantly contains User Controls, Custom Controls and Win/Web
Forms.
I have one base form and I inherit from that form.
All validation is done in this tier. There is zero Data Access code in this tier. This tier exclusively gets DataViews/ Arays/Lists as input. Outputs
are string objects with SQL Statements or just paremeters with
dataconnection key.

2. Business Layer.
Currently this is just a Library residing in the same machine as
Presentation layer. Eventually I plan to use WebServices if application
needs physical seperation.
Most of Business Logic are implemented in this layer. There is absolutely no UI code here.
These are all bunch of static methods which perform CRUD functionality.
All methods are atomic in nature. I dont rely on Static Variables. There is just one DatabaseGateway class which does all the functionality.

3. Data Layer. (SQL Server)
I dont use stored procedures. predominantly use Views.
I have been reading up on Rockford Lhotka's business objects and I just feel that his framework is unnecessarily complex. I just dont see the need to
hold these intermediate Business Objects.

Thanks for your responses.

--
Jay Balapa
Director Of Software Engineering
www.atginc.com


Nov 19 '05 #4
Keeping the layers truely seperate is difficult. I would suggest that even
if you have to itereate through a result set the SQL should be in the
Business Layer, pass your filter criteria to the business layer.


"Jay Balapa" <jb*****@hotmai l.com> wrote in message
news:eD******** *****@TK2MSFTNG P12.phx.gbl...
Josh,

Thanks for your response.

SQL most of the time is in the Business layer.

Sometimes I need to iterate Datarows in a Datagrid. In those cases I make
that exception.

--
Jay
"Josh" <s@a.com> wrote in message
news:OS******** ******@TK2MSFTN GP10.phx.gbl...
Your SQL should be in the Business Layer. The presentation layer should
not make or provide decisions on how data is collected ( that what tables
/ view or columns are used ) as that is a business rule.

"Jay Balapa" <jb*****@hotmai l.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hello,

Currently my application has three tiers-

1. Presentation Layer (Asp.Net / Win Forms/ Pocket PC UI.)
This predominantly contains User Controls, Custom Controls and Win/Web
Forms.
I have one base form and I inherit from that form.
All validation is done in this tier. There is zero Data Access code in
this tier. This tier exclusively gets DataViews/ Arays/Lists as input.
Outputs are string objects with SQL Statements or just paremeters with
dataconnection key.

2. Business Layer.
Currently this is just a Library residing in the same machine as
Presentation layer. Eventually I plan to use WebServices if application
needs physical seperation.
Most of Business Logic are implemented in this layer. There is
absolutely no UI code here.
These are all bunch of static methods which perform CRUD functionality.
All methods are atomic in nature. I dont rely on Static Variables.
There is just one DatabaseGateway class which does all the
functionality.

3. Data Layer. (SQL Server)
I dont use stored procedures. predominantly use Views.
I have been reading up on Rockford Lhotka's business objects and I just
feel that his framework is unnecessarily complex. I just dont see the
need to hold these intermediate Business Objects.

Thanks for your responses.

--
Jay Balapa
Director Of Software Engineering
www.atginc.com




Nov 19 '05 #5
I wasn't aware that putting SQL in the business layer was a best practice. I
use SQL Server 2000 with stored procedures and my data layer accesses those
stored procedures. In the business layer, I have logical business objects
with properties and methods. The purpose of having a seperate data layer is
so that if your data source changes (for example: moving from SQL Server to
MySQL) then you only have to modify the data layer. The presentation and
business layers would be unaffected.
"Josh" <s@a.com> wrote in message
news:OS******** ******@TK2MSFTN GP10.phx.gbl...
Your SQL should be in the Business Layer. The presentation layer should
not make or provide decisions on how data is collected ( that what tables
/ view or columns are used ) as that is a business rule.

"Jay Balapa" <jb*****@hotmai l.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hello,

Currently my application has three tiers-

1. Presentation Layer (Asp.Net / Win Forms/ Pocket PC UI.)
This predominantly contains User Controls, Custom Controls and Win/Web
Forms.
I have one base form and I inherit from that form.
All validation is done in this tier. There is zero Data Access code in
this tier. This tier exclusively gets DataViews/ Arays/Lists as input.
Outputs are string objects with SQL Statements or just paremeters with
dataconnection key.

2. Business Layer.
Currently this is just a Library residing in the same machine as
Presentation layer. Eventually I plan to use WebServices if application
needs physical seperation.
Most of Business Logic are implemented in this layer. There is absolutely
no UI code here.
These are all bunch of static methods which perform CRUD functionality.
All methods are atomic in nature. I dont rely on Static Variables. There
is just one DatabaseGateway class which does all the functionality.

3. Data Layer. (SQL Server)
I dont use stored procedures. predominantly use Views.
I have been reading up on Rockford Lhotka's business objects and I just
feel that his framework is unnecessarily complex. I just dont see the
need to hold these intermediate Business Objects.

Thanks for your responses.

--
Jay Balapa
Director Of Software Engineering
www.atginc.com



Nov 19 '05 #6
"Jay Balapa" <jb*****@hotmai l.com> wrote in
news:#z******** ******@tk2msftn gp13.phx.gbl:
Thanks for your responses.


http://www.codeproject.com/useritems...inessLogic.asp
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
Nov 19 '05 #7
"Jay Balapa" <jb*****@hotmai l.com> wrote in
news:#z******** ******@tk2msftn gp13.phx.gbl:
3. Data Layer. (SQL Server)
I dont use stored procedures. predominantly use Views.


Views are good - BUT with SQL Server result set based stored procedures are typcially better
because of SQL servers optimization techniques. Newer versions are adressing this, but as to how
much I dont know yet.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
Nov 19 '05 #8
"Kim Quigley" <ki********@hot mail.com> wrote in
news:#n******** ******@TK2MSFTN GP14.phx.gbl:
I wasn't aware that putting SQL in the business layer was a best
practice. I use SQL Server 2000 with stored procedures and my data
layer accesses those stored procedures. In the business layer, I have


There are opposing schools of thought here. You will find advice telling you both ways, and some
saying to mix it.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
Nov 19 '05 #9
"bradley" <so*****@micros oft.com> wrote in
news:#9******** ******@TK2MSFTN GP15.phx.gbl:
If you want to do away with the complexity of the business objects,
then consider moving this business logic to the database as stored
procedures and triggers.


There are of course many schools of thought, but personally I would never recommend that. If
you want my views as to why, you can read the link that I just posted.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programmin g is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
Nov 19 '05 #10

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

Similar topics

2
3479
by: ggg | last post by:
I'm looking for a complete project/application done with heavy use of of object-oriented programming & design. Preferably something well documented and/or commented so that I can pick it apart and learn how/why they designed it they way they did. Any suggestions?
3
3813
by: Erik De Keyser | last post by:
Hi group, I have a couple of projects with up to 8 forms. On most projects I write the code on each form with no modules. The last project I use 1 module and minimal code on each form , in fact just the code for each visual object, and all the subroutines are placed in a module. What is the best practice where I can place my VB code, at each form or in a separate module ? Pro's & con's ? Performance benefit ?
55
3510
by: Cindy | last post by:
Hello!! I'm new at access and there's is an article by Arvin Meyer for beginners that is references in Google Groups but I can't seem to find the original post with the article's URL. Does anyone know where I can find that article, or why the thread appears to be missing from the archives? Here's the link: ...
45
2428
by: Brett | last post by:
If I do this without declaring a corresponding field, is it considered bad design? What are the advantages or disadvantages to either method? Notice there is not set. public string URL { get { return "www.somewhere.com/test.aspx"; }
4
1497
by: Bob | last post by:
I know this is a tall order, but I'm looking for a book that talks about the implications of alternative approaches to languages than we typically see, such as allowing multiple inheritance... detailed, but not so heavy that the interesting, qualitative conclusions are left to the reader to dig out of a set of equations. Any recommendations? Bob
4
1711
by: GS | last post by:
Hi, I'd rather start from a good design and go from there so would be greatfull for any input. I have a simple ASP.NET application and would like to make solution elegant. I store settings in web.config file and I would like to have class in my application which will hold application level objects. Some methods of the class will be executed in different threads and some properties are shared among threads and static in nature. So what...
1
1875
by: GS | last post by:
Any points of what would be the good error handling design for application? User error handling in Application_OnError and throw() new errors on conditions through the code? I'd like utlimiately to consolidate all error_handling in one method which I'll be able to easily modify to write to event log or text file etc instead of error hanlding scattered through the code. Thanks, GS
2
1799
by: dotnet dude | last post by:
What boook do you guys recommend for somebody with the software development backgroud who wants to get started from scratch with the designing of good sofware application. I am interested in understanding how the logical and physical design of a software is prepared. Details about the design patterns and the application blocks; and how and when they should be used. I would really appreciate if you guys can recommend some good boook that...
7
1631
by: TAVOSOFT | last post by:
Hi friends, I am begginer , I wanna to learn VB2005 ,Which are good book for to learn VB2005 of level -begginer-intermediate. Thanks you friends.
0
9931
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
9777
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
11108
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...
1
10830
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
9557
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
7956
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
7113
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
5781
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
5978
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.