473,320 Members | 2,124 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,320 software developers and data experts.

Classes, collections and data

Hello,

I'm upgrading a small single user app to VB.NET and have a few questions
about loading classes & collections classes with the data from a one to many
dataset structure.
I'm serializing the data to disk as a dataset and was wondering if it was an
accepted practice to load/add/edit/delete the data in the dataset from
methods within the collections/classes or should I just use them as a
container, managing all dataset transactions externally.

Simplified structure:
Parent Class (Each related Child collection is accessible from within Parent
Class)
Parent collection class
Child Class
Child Collections class
Hope thats clearer than mud.

Thanks.
Paul
Nov 21 '05 #1
3 1176
Hi Paul,

Being that it is a small app, putting the data access and business logic
directly into the class probably won't cause you huge headaches down the
road. Normally I create a Business Layer that handles logic, calculations,
and validation. For example, to validate that the class is correctly
filled. Then I'll dump that to my Data Access Layer, which will handle
sending it to SQL or disk or whatever. Both the Business Layer and Data
Access Layer generate Error objects which can be consumed by my Error
Reporting Layer that works closely with my UI to dish error results back to
the user. If for no other reason, you could implement this (which shouldn't
take too long for a small project) just to get some experience in piecing
together an enterprise level solution. But like I said, putting everything
into your classes and collections probably won't cause you regrets. For
example, switching your data access from disk to SQL in the future in a
small app isn't nearly as much of a hassle as it would be if this was a
gigantic project with a dozen developers on it. You are writing all the
code so jumping back into it won't be so bad. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Paul" <pa**@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello,

I'm upgrading a small single user app to VB.NET and have a few questions
about loading classes & collections classes with the data from a one to many dataset structure.
I'm serializing the data to disk as a dataset and was wondering if it was an accepted practice to load/add/edit/delete the data in the dataset from
methods within the collections/classes or should I just use them as a
container, managing all dataset transactions externally.

Simplified structure:
Parent Class (Each related Child collection is accessible from within Parent Class)
Parent collection class
Child Class
Child Collections class
Hope thats clearer than mud.

Thanks.
Paul

Nov 21 '05 #2
Hi Ken,

Firstly, thank you very much for that short rundown on this subject.
I've hard a difficult time finding material/resources to learn from.
If for no other reason, you could implement this (which shouldn't
take too long for a small project) just to get some experience in piecing
together an enterprise level solution.


I would like to take a look at this strategy but haven't been able to locate
books
that go into these topics. Can you recommend a single book that could
get me up to speed. I've read VB.NET Pro (Wrox) and glanced through quite
a few others at the book store but none seem to go into these areas which
is kind of frustrating.

Regards,
Paul
Nov 21 '05 #3
Hi Paul,

I learned everything going through Microsoft's Patterns & Practices online.
I think you can buy a printed version too. Here is the link to the
Enterprise Architecture:

http://msdn.microsoft.com/architectu...s/html/Esp.asp

Here is a link to the home architecture page, has links to LOTS of good
stuff!

http://msdn.microsoft.com/architecture/

Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Paul" <pa**@nospam.com> wrote in message
news:eo**************@TK2MSFTNGP11.phx.gbl...
Hi Ken,

Firstly, thank you very much for that short rundown on this subject.
I've hard a difficult time finding material/resources to learn from.
If for no other reason, you could implement this (which shouldn't
take too long for a small project) just to get some experience in piecing together an enterprise level solution.
I would like to take a look at this strategy but haven't been able to

locate books
that go into these topics. Can you recommend a single book that could
get me up to speed. I've read VB.NET Pro (Wrox) and glanced through quite
a few others at the book store but none seem to go into these areas which
is kind of frustrating.

Regards,
Paul

Nov 21 '05 #4

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

Similar topics

49
by: Christopher J. Bottaro | last post by:
I find myself doing the following very often: class Struct: pass .... blah = Struct() blah.some_field = x blah.other_field = y ....
0
by: Ewart MacLucas | last post by:
generated some WMI managed classes using the downloadable extensions for vs2003 from mircrosoft downloads; wrote some test code to enumerate the physicall processors and it works a treat, but a...
1
by: Raju Joseph | last post by:
Hi All, We are in the process of developing an N-Tier app using VB.NET. We are extensively using classes (entity objects) in our design. Further, most of the times, we do have to specify nested...
9
by: me | last post by:
Hi All, I am new to Classes and learniing the ropes with VB.NET express Here's my question - say I have a want to manage a list of books. Each book has an Author, Title and ISBN Now, I am...
5
by: M Harris | last post by:
We are developing an application (using .Net in MS Studio 2003 using the Access jet engine as a backend) that is doing quite a bit of number crunching. The first part of the application was...
26
by: nyathancha | last post by:
Hi, How Do I create an instance of a derived class from an instance of a base class, essentially wrapping up an existing base class with some additional functionality. The reason I need this is...
4
by: Aidy | last post by:
In .net 1.1 we'd have a whole bunch of collections for each of our classes. So we'd have "ProductCollection", "UserCollection" etc etc, each a strongly-typed collection for that user. I know in...
5
by: jc | last post by:
RE: Two Classes with the same Data Structure.. saving code? Inheriting a structure? I have two classes. One in Inherits System.Collections.CollectionBase, the other does not, but they both have...
45
by: =?Utf-8?B?QmV0aA==?= | last post by:
Hello. I'm trying to find another way to share an instance of an object with other classes. I started by passing the instance to the other class's constructor, like this: Friend Class...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.