locked
Three Layer and a Minimalistic approach to SQL RRS feed

  • Question

  • User803211825 posted

    I've been working with ASP.NET, C# and SQL Server for several years.  I want to say my learning has been > 80% C#.  As to ASP.NET and SQL Server maybe 15% has been ASP.NET -- I use very few SQL commands.

    I'm looking into learning more SQL Server, as I'm feeling some apprehension that I may have a deficiency.

    Tonight, while looking at some work it functions, I found it interesting/fun-looking but it seemed to me that if I pursue this, I'll be moving business logic to the DAL.

    I know I'm not the first to think of this.  Is there a school of thought that says you minimalize how much happens in the DAL (and if so, it's not a bad thing if you do everything with just a few commands).  Is there some name of a person or theory that I could Google.

    I want to learn more SQL but I don't want to learn a bunch of stuff and then realize I won't be using it because it doesn't adhere to Three Layer.

    Thank you for your help with this.


    Monday, April 26, 2010 10:44 PM

Answers

  • User-952121411 posted

    If an expert was giving a lecture and s/he started  a paragraph with "Three Layer isn't appropriate for every applications.  Sometimes you should pick an alternate such as ..."
     

    ...an old school all code behind the web forms application. Smile Many with years of experience realize that the extra work involved in layering an application is not always needed or wanted.  If you are creating a 1 form straight up data entry form with dialog confirmation, a single INSERT, no business logic, and a 2 day deadline, maybe you opt for SQLDataSource controls with a FormView and just the needed code to get that form built and published.  Heck you might even make it a web site as opposed to a web application to streamline it even further in some instances.

    There just has to be some thought behind what level of effort is needed, how big is the project, how scalable it it going to be, resources, experience, time, money, you name it.  These factors can drastically change the overall architecture of an application.  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 27, 2010 4:17 PM

All replies

  • User187056398 posted

    but I don't want to learn a bunch of stuff and then realize I won't be using it because it doesn't adhere to Three Layer.
     

    The three layers paradigm isn't appropriate for every application. 

    Monday, April 26, 2010 11:18 PM
  • User803211825 posted

    I can't change my original question (which is pretty much "who thought of Minimalistic SQL first and wrote the book?  what did they call it?")

    But your comment raises another question and I can't resist...

    If an expert was giving a lecture and s/he started  a paragraph with "Three Layer isn't appropriate for every applications.  Sometimes you should pick an alternate such as ..."

    I hope I don't get in trouble for asking you to explain, and I realize answering this won't answer the original question (feeling a little hesistant here...)  I'm guessing a reply to this might take you ten seconds to type (and give me weeks worth of new investigations : - )


    -Danny







    Monday, April 26, 2010 11:47 PM
  • User187056398 posted

    Let me ask you a question.  If an application has no business logic, does it make sense to have a BLL (Business Logic Layer)?

    Tuesday, April 27, 2010 8:17 AM
  • User-952121411 posted

    If an expert was giving a lecture and s/he started  a paragraph with "Three Layer isn't appropriate for every applications.  Sometimes you should pick an alternate such as ..."
     

    ...an old school all code behind the web forms application. Smile Many with years of experience realize that the extra work involved in layering an application is not always needed or wanted.  If you are creating a 1 form straight up data entry form with dialog confirmation, a single INSERT, no business logic, and a 2 day deadline, maybe you opt for SQLDataSource controls with a FormView and just the needed code to get that form built and published.  Heck you might even make it a web site as opposed to a web application to streamline it even further in some instances.

    There just has to be some thought behind what level of effort is needed, how big is the project, how scalable it it going to be, resources, experience, time, money, you name it.  These factors can drastically change the overall architecture of an application.  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 27, 2010 4:17 PM
  • User803211825 posted

    Simple answer: no.  (maybe you have to do it to comply with company policy or if it stands to reason that business logic might be needed later as improvements are added to the application...)

    I think I know what you mean.  To strengthen my skills, I've written small web sites that were completely Three Layer, and that sometimes meant having BLL classes that simply took from the DAL and gave to the PAL without doing any changes.

    I remember reading posts from people on the forum that they were required to code using three layer without exception so I wanted to do it as a sort of calisthetics.


    Wednesday, April 28, 2010 9:44 PM