Jacksonville Developers User Group

Learn new things...write better code.
Welcome to Jacksonville Developers User Group Sign in | Join | Help
in
Home Blogs Forums

BLL

Last post 04-15-2008, 8:05 AM by tbates. 4 replies.
Sort Posts: Previous Next
  •  04-04-2008, 2:18 PM 2250

    • TM2 is not online. Last active: 09-05-2008, 6:24 AM TM2
    • Top 10 Contributor
    • Joined on 08-15-2007
    • Brunswick, Ga
    • Posts 33
    • Points 0

    BLL

    Looking for feedback on using BLL's in terms of security, perfomance, and ease of use.

    Should they always be used in web apps? Why? Why not?

    Can someone point me to some good information "BLL for dummies"?

    I'm working through Scott Mitchell's - Creating a Business Logic Layer, but I feel like I'm missing some important concept.  As I understand, this layer is for enforcing Business "Rules".  Is that all it does?  Is it easier to work with in the long run as opposed to just working with the DAL?

    Thanks in advance!

     

  •  04-07-2008, 9:55 AM 2253 in reply to 2250

    • TM2 is not online. Last active: 09-05-2008, 6:24 AM TM2
    • Top 10 Contributor
    • Joined on 08-15-2007
    • Brunswick, Ga
    • Posts 33
    • Points 0

    Re: BLL

    OK, then!  After much reading, it appears that I was looking for the BLL to do "more" than it was designed to.  Please disregard the above questions.
  •  04-07-2008, 10:13 AM 2254 in reply to 2250

    Re: BLL

    Personally, I believe a business logic layer is a good thing, almost to the point of a "always-must-have".  I suppose there can be some arguement made that depending upon size and scope, every project may not need one.  But having been on enough projects that have grown beyond their original scope and intent, I believe it can't hurt.  Especially if a project manager describes it with phrases like "its just a. . ." or "its only a . . ." or "its a really simple thing".  But I digress.

    I can't see a compelling reason not to use them for web apps.  Besides, today's web app can turn into tomorrow's smart client app.  Having clear lines between the presentation, business and data layers makes those types of transistions easier.

    A business logic layer also helps with testing.  You can test your business processes seperate from your UI or database.

    My problem with the tutorial you referenced is that to me, it seems more like a DAL than a BLL.  Maybe its because it works with typed datasets and datatables.  Maybe its because it takes in alot of individual parameters.  I don't know.  Its a easy way to whip up one via Visual Studio and interact with the rest of the built-in tools.


    The Universe has no center and I am it.



    The superior man is modest in his speech, but exceeds in his actions.

  •  04-15-2008, 7:47 AM 2260 in reply to 2254

    Re: BLL

    Wow, those are a lot of parameters.

    There are only 10 types of people in the world: Those who understand binary, and those who don't
  •  04-15-2008, 8:05 AM 2261 in reply to 2260

    Re: BLL

    Often times you can see some examples of a BLL being split into two pieces.  One piece geared towards the target environment (Windows, Web, Mobile) and one that has no dependencies any user interface controls or objects.

    The DomainObject.Business.EnvironmentSpecific.dll will be what your user interface calls directly.  The DomainObject.Business.dll will be called by DomainObject.Business.EnvironmentSpecific.dll passing such things as your data container objects or structures instead of objects like ListView or DropdownList. 

    The Business.dll will be where the actual Data Access Layer calls would be housed. 

    This is much like Jonathan has already described.  The idea being that if I wanted to take my web application and make a windows version of it, I could save myself a lot of duplication by reusing the DomainObject.Business.dll (and idealy reuse the DAL) by creating a new DomainObject.Business.Windows.dll.

    Setting all of this separation up requires a larger effort up front than just putting all of this in one class/one DLL/one page/etc.  As with most projects, it is always a balance of time to market and your vision.  Your ability and willingness to prepare your company/your team/yourself for the future.



    There are only 10 types of people in the world: Those who understand binary, and those who don't
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems