Re: Classes, collections and data

From: Ken Dopierala Jr. (kdopierala2_at_wi.rr.com)
Date: 09/28/04


Date: Tue, 28 Sep 2004 13:57:06 -0500

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" <paul@nospam.com> wrote in message
news:%23MlFnbYpEHA.3900@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
>
>


Relevant Pages

  • Re: project references when building N-tier apps
    ... Extract business objects such as User into a third assembly ... which you then reference from both> Business.dll and DataAccess.dll. ... to call the data access layer and provide the above mentioned user.Save ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: App Architecture: Typed Datasets, EntLib, Performance
    ... Deploying Business Entities ... and have typed datasets as the common ... Some say that they should not be filled by the data access ... layer, but rather should exist only in the business layer, which would ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: App Architecture: Typed Datasets, EntLib, Performance
    ... Deploying Business Entities ... and have typed datasets as the common library ... Some say that they should not be filled by the data access ... layer, but rather should exist only in the business layer, which would ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Why we need business logic layer?
    ... Entities - Business entities component that has a class called ... GetProducts method that returns a list of ProductInfo classes from the ... In this scenario you can have your Business layer use ANY data access layer ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: VB.NET and C#
    ... there should be no data logic in the business layer ... Not my app:(I am said upgrader/maintainer. ... The entire application resides in a single WebApplication. ...
    (microsoft.public.dotnet.framework.aspnet)

Quantcast