Hello,
I would like to know what's the best way to implement a business logic
layer between my user interface and my database.
I would say I'd make a dll-project for the business logic layer and make
classes that represent objects/tables. For example, if I have a table
named 'tblPersons' I would make a class named 'clsPersons' and a class
'clsPerson' that represents one person/record. In class 'clsPersons' I
can make some business logic like 'get all persons living in a certain
city'.
What's the best way to display business logic in a Visual Basic.NET or
ASP.NET user interface? Should I use datasets (so my business logic
layer returns a dataset instead of a class object) or should I use the
class objects? If so, whats the best way to display these class objects?
For example, say I've developed a windows form to display a persons
data. From my business logic dll I've received an object of the type
clsPerson. I can't use databindings on a class object, can I?
Hope some can tell me more about this!
Greetings,
Chris
*** Sent via Developersdex http://www.developersdex.com *** 2 4050
Chris Zopers wrote:
Hello,
I would like to know what's the best way to implement a business logic
layer between my user interface and my database.
I would say I'd make a dll-project for the business logic layer and make
classes that represent objects/tables. For example, if I have a table
named 'tblPersons' I would make a class named 'clsPersons' and a class
'clsPerson' that represents one person/record. In class 'clsPersons' I
can make some business logic like 'get all persons living in a certain
city'.
What's the best way to display business logic in a Visual Basic.NET or
ASP.NET user interface? Should I use datasets (so my business logic
layer returns a dataset instead of a class object) or should I use the
class objects? If so, whats the best way to display these class objects?
I never used datasets and recordsets, not saying there is nothing wrong
with them. I favor the business and data persist objects. Even more so,
I favor the object that contains the business rules and data persist
code in one object, a very powerful solution.
>
For example, say I've developed a windows form to display a persons
data. From my business logic dll I've received an object of the type
clsPerson. I can't use databindings on a class object, can I?
Yes, you can do databindings on a class object. if you know how to do it.
>
Hope some can tell me more about this!
You get the CSLA book and read it, you download the CSLA Framework and
understand the basic class objects that are being used, you download the
project and see how it all works.
Then if you like, you can say I don't need the CSLA Framework, because I
have the basics, what the objects and how they work that are needed in a
solution, and I can do it myself from scratch. http://www.lhotka.net/Article.aspx?i...b-e0059cc82ee7
You may find some other examples of OOPs programming where the business
and data persist logic is separated, but it's still based on the basic
objects that are being talked about the the CSLA examples.
See
http://sholliday.space s.live.com/Blog/cns!A68482B9628 A842A!140.entry
or
http://sholliday.space s.live.com/Blog/cns!A68482B9628 A842A!139.entry
Stop with the Hungarian Notation. (nix on the clsSomeObject prefixed with a
cls)
public class Person
end class
public class PersonCollectio n
end class
//Should I use datasets (so my business logic
layer returns a dataset instead of a class object) or should I use the
class objects?
//
At the bottom of the 2nd URL above I list this URL:
And a reference to read from start to finish, aka, very informative for a
bird's eye view:
* http://msdn.microsoft.com/library/de...tml/BOAGag.asp
If you pick "Custom Business Objects", then you should look at CSLA
framework, because Rocky makes it easier for you to take custom business
objects and make them bindable.
(IEditableObjec t and others I believe is the interface, its not trivial to
implement).
"Chris Zopers" <te***********@ 12move.nlwrote in message
news:uc******** *****@TK2MSFTNG P06.phx.gbl...
Hello,
I would like to know what's the best way to implement a business logic
layer between my user interface and my database.
I would say I'd make a dll-project for the business logic layer and make
classes that represent objects/tables. For example, if I have a table
named 'tblPersons' I would make a class named 'clsPersons' and a class
'clsPerson' that represents one person/record. In class 'clsPersons' I
can make some business logic like 'get all persons living in a certain
city'.
What's the best way to display business logic in a Visual Basic.NET or
ASP.NET user interface? Should I use datasets (so my business logic
layer returns a dataset instead of a class object) or should I use the
class objects? If so, whats the best way to display these class objects?
For example, say I've developed a windows form to display a persons
data. From my business logic dll I've received an object of the type
clsPerson. I can't use databindings on a class object, can I?
Hope some can tell me more about this!
Greetings,
Chris
*** Sent via Developersdex http://www.developersdex.com ***
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michael Rodriguez |
last post by:
I have a windows form that makes a call to my BLL to get some data. The
windows form has a progress bar component that I would like updated as the
data retrieval takes place. However, strictly speaking, the BLL is not
supposed to know anything about the presentation layer. Also, since the
presentation layer has a reference to the BLL, it...
|
by: Steve |
last post by:
I have created a tableadaptor in VWD called
"MemberUsernameTableAdaptor" with a "GetUsername()" method.
The method requires the @username parameter and will then try matching
it up in the username field of a table. As the usernames are all
unique, if the username exists a 1 row dataset will be returned, if not
the dataset will be empty.
...
|
by: Andre |
last post by:
Hi, I need some advise on creating a general Business Logic Layer for
my applications.
The approach I use today is to create a class with the same name as
the table, create a property for each field in the table, write
constructors, to create a new row, and a constructor to open an
existing row, write update, delete functions, write a...
|
by: abc my vclass |
last post by:
How to design and build reports which data source from business logic layer
?
Is there any documents or tutorials explain the steps to design and build
reports if my projects' data source from business logic layer, not directly
connecting database.
|
by: ss |
last post by:
Hi,
Can anybody give me a SAMPLE VALIDATION CODE (MOST COMMON ONES) IN BUSINESS
LOGIC LAYER & DATA ACCESS LAYER
I REPEATE SAMPLE VALIDATON CODE IN BLL & DAL
BYE
SS
| |
by: MS newsgroup |
last post by:
I don't have clear reasons why we need business logic layer and data logic
layer instead of having only data logic layer.
Are there any good reasons for that?
|
by: Frank |
last post by:
I have read and followed Scott Mitchells' tutorial, Creating a 'Business
Logic Layer', @
http://www.asp.net/learn/dataaccess/tutorial02cs.aspx?tabid=63, and it
occurred to me that he did not include the InsertProduct("New Product", 1,
1, "12 tins per carton", 14.95m, 10, 0, 10, false) function in the BLL.
Prior to implementing the BLL, in...
|
by: Ranginald |
last post by:
Hi,
I am confused about the business layer vs. the dal layer and I could
use some help.....
I. If the DAL layer has all the methods to work with the db with a
typed data sey (e.g. ShowProducts(), InsertProducts() ), then why does
the business layer need to wrap these methods with set/get?
|
by: SAL |
last post by:
Hello,
I have a Dataset that I have table adapters in I designed using the designer
(DataLayer). I have a business logic layer that immulates the DataLayer
which may/may not have additional logic in. My business classes are, of
course, decorated with the:
<System.ComponentModel.DataObject() attribute.
So, I drop a GridView on a webform...
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |