Does anyone have any advice on which type to use for a business entity in the following situation..
If I want to populate a form with Employee details (windows or web) , I will get a business entity from the Employees class and use that business entity to fill all the textboxes etc.
Using VB6, I would use a recordset as the business entity like so..
My Employees class would have a method like this..
Public Function GetEmployee (EmployeeID) as ADODB.Recordse
GetEmployee = ...
End Su
And I would populate my controls like this..
Set rst = objEmployees.GetEmployee(23
txtFirstName = rst("FirstName").
But now in .NET..
there are so many choices that it seems like a waste to just start using datasets where there might be better things to choose from. The types that I have thought about using are : dataset, datarow, datareader, structure, arraylist, and my own custom object. It doesn't have to do anything fancy --- just transfer data from the business tier to the presentation tier
It seems like structures are the way to go (no garbage collection required and strongly typed), but I haven't seen this recommended so I'm a bit unsure about using them
Does anyone have any advice, recommendations, tips... whatever. Maybe just tell me what you use
Thanks,
Craig 2 1315
Craig
William Ryan has numerous articles on using ADO.NET. You might want to take
a looke at them at http://www.knowdotnet.com/dataaccess.html
HTH
Les Smith http://www.KnowDotNet.com
"Craig" <an*******@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com... Does anyone have any advice on which type to use for a business entity in
the following situation... If I want to populate a form with Employee details (windows or web) , I
will get a business entity from the Employees class and use that business
entity to fill all the textboxes etc. Using VB6, I would use a recordset as the business entity like so...
My Employees class would have a method like this... Public Function GetEmployee (EmployeeID) as ADODB.Recordset GetEmployee = .... End Sub
And I would populate my controls like this... Set rst = objEmployees.GetEmployee(23) txtFirstName = rst("FirstName").
But now in .NET... there are so many choices that it seems like a waste to just start using
datasets where there might be better things to choose from. The types that I
have thought about using are : dataset, datarow, datareader, structure,
arraylist, and my own custom object. It doesn't have to do anything
fancy --- just transfer data from the business tier to the presentation
tier. It seems like structures are the way to go (no garbage collection required
and strongly typed), but I haven't seen this recommended so I'm a bit unsure
about using them. Does anyone have any advice, recommendations, tips... whatever. Maybe just
tell me what you use. Thanks, Craig
Craig
Bill will still be able to offer advice if you will email him at wyran@nospam_knowdotnet.com.
Les
"Craig" <an*******@discussions.microsoft.com> wrote in message
news:1B**********************************@microsof t.com... Thanks, Les.
But I am really looking for information about using types (to use as
business entities) other than those types that ADO.Net offers. Especially
..Net structures, because they seem well suited for passing data between
tiers.
----- Les Smith wrote: -----
Craig William Ryan has numerous articles on using ADO.NET. You might want
to take a looke at them at
http://www.knowdotnet.com/dataaccess.html
HTH Les Smith http://www.KnowDotNet.com
"Craig" <an*******@discussions.microsoft.com> wrote in message news:77**********************************@microsof t.com... > Does anyone have any advice on which type to use for a business
entity in the following situation... >> If I want to populate a form with Employee details (windows or
web) , I will get a business entity from the Employees class and use that
business entity to fill all the textboxes etc. >> Using VB6, I would use a recordset as the business entity like
so... >> My Employees class would have a method like this... > Public Function GetEmployee (EmployeeID) as ADODB.Recordset > GetEmployee = .... > End Sub >> And I would populate my controls like this... > Set rst = objEmployees.GetEmployee(23) > txtFirstName = rst("FirstName"). >> But now in .NET... > there are so many choices that it seems like a waste to just start
using datasets where there might be better things to choose from. The types
that I have thought about using are : dataset, datarow, datareader,
structure, arraylist, and my own custom object. It doesn't have to do anything fancy --- just transfer data from the business tier to the
presentation tier. >> It seems like structures are the way to go (no garbage collection
required and strongly typed), but I haven't seen this recommended so I'm a bit
unsure about using them. >> Does anyone have any advice, recommendations, tips... whatever.
Maybe just tell me what you use. >> Thanks, > Craig This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jason |
last post by:
Let's say I have an html form with 20 or 30 fields in it. The form
submits the fields via POST to a php page which updates a table in a
database with the $_POST vars. Which makes more sense?
...
|
by: ReignMan |
last post by:
I'm running JDK 1.4.0_01, Xalan2.5.1 and Tomcat 4.1.27. XSL
transformations work, yet when running in debug mode (Eclipse IDE), I
get the following:
990S2html.xsl:3:80: Element type...
|
by: Craig |
last post by:
Does anyone have any advice on which type to use for a business entity in the following situation..
If I want to populate a form with Employee details (windows or web) , I will get a business...
|
by: SHC |
last post by:
Hi all,
I created an application from the Console Application (.NET) of VC++ .NET
2003, and I did "Build" the application of the attached .cpp file,
volcanoes.xml and geology.dtd on my VC++ .NET...
|
by: Victor Mehta |
last post by:
would it matter if I decided to make a primary key a string of numbers
vs actual numbers ? would it make any difference to DB2 in terms of
efficiency ? why would you choose numeric over a string...
|
by: G. Stewart |
last post by:
The word "Business" in the term implies some sort of commercial
aspects or connotations. But from what I can see, that is not
necesserially the case at all?
So what is the reasoning behind the...
|
by: RSH |
last post by:
I am really trying to grasp the concept of OOP as it applies to C#.
I am looking at trying to set up a simple Employee Class but I am having
trouble conceptualizing what this class should look...
|
by: Stefano |
last post by:
Hi all,
I'm designing classes for my application.
I'd like to create a business entity that could be expanded with other properties
when needed.
For example, this could be my entity:
...
|
by: grawsha2000 |
last post by:
Greetings,
I am developing this N-tier business app. The problem I'm facing is
when I try to pass business objects (employees, dept..etc) from
business tier to data tier,i.e., the add method in...
|
by: sangam56 |
last post by:
hi all.i have downloaded and studied the asp.net employee starter kit. I liked the way the business layer is created. it is too much time consuming to hand code all the business layer classes for so...
|
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...
|
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...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
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,...
|
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...
|
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,...
|
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...
|
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...
| |