"gnewsgroup" <(E-Mail Removed)> wrote in message
news:b3f653a7-0459-4f9b-afd1-(E-Mail Removed)...
> First, just in case, BLL = Business Logic Layer and DAL = Data Access
> Layer.
>
> I guess this is really a question about architecture. I believe there
> are many architect here.
>
> Software architecture is sorta new to me. I searched a little and did
> find this:
>
> http://www.velocityreviews.com/forum...l-and-dal.html
>
> It helped me understand a little bit about their differences and the
> advantages of separating them. And now I do have one simple
> question:
>
> How do I know what needs to go to the BLL and what needs to go to the
> DAL?
>
> My guess is this: Any method that needs to do something like
> connection.Open() and use a Sql command (including stored procedure)
> should go into the DAL, right? Or is this a principle too naive in
> software architecture?
Not really, though stored procedures won't be in the DAL because they are
RDBMS objects...
Here's an easy (though perhaps over-simplistic) way to think of it.
Project A, Project B and Project C are all totally different, but they all
use SQL Server as their RDBMS. Therefore, they will all have different BLL
but can share the same DAL.
Project D, on the other hand, supports multiple RDBMS. Therefore, it might
have the same DAL as the Projects A, B & C, plus additional DALs which
support Oracle, MySQL, Postgre etc. Alternatively, it may have a single DAL
which supports multiple backend RDBMS through a factory pattern.
Essentially, the BLL and DAL should be completely independent to the extent
that you are able to change one of them without needing to change the
other...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net