Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Business logic layer .net (inherit from datatable or not)

  • 17-12-2008 10:46pm
    #1
    Closed Accounts Posts: 752 ✭✭✭


    Quick query.

    I am dealing with an application that relies heavily on search.

    What do you people think of the approach of a inheriting from datable and tablerow instead of building a list? Allowing me to pass it as a data source.


Comments

  • Closed Accounts Posts: 752 ✭✭✭JimmyCrackCorn!


    Ok so no one cares or has an opinion of inheriting from datatable and datarow when building business objects?


  • Registered Users, Registered Users 2 Posts: 610 ✭✭✭nialo


    Id almost always use a list over a dataset. design my own paging and search functions to minimum page load.


  • Registered Users, Registered Users 2 Posts: 163 ✭✭stephenlane80


    Well it depends on the application,

    If you have one datasource (database) then the easiest and fastest method of communication is the dataset, and a dataset is very easily handles in the business tier,

    The probelms start when you have say a legacy datasource, a database, and and something like a web service to deal with.

    If you want to construcnt some business logic with these data sources, then you will need to create business objects by hand so you that are left with a homogenous set of collections (lists, vectors etc.) you can deal with in the business tier.

    Even if just to future proof you application, it is good practive to use simple native collections rather than dealing with relational objects in your application,

    hope this makes since to you !!

    Steve


  • Closed Accounts Posts: 752 ✭✭✭JimmyCrackCorn!


    Perfect sense

    Thanks the opinions appreciate and im probably going to stick to good old native lists after all.


  • Registered Users, Registered Users 2 Posts: 2,931 ✭✭✭Ginger


    Keep database objects in the data layer

    Use Generic Lists of objects List<T> and databind them to your controls for example

    Normally in the data layer I have a private method that fills the object based on a DataRow and returns the object. So what happens is that my data layer sends common objects to the business layer and business layer sends them back..

    Simply enough if I change the DAL it doesnt matter to the business layer as it just deals with the objects..


  • Advertisement
Advertisement