SubSonic Forums
All Your Database Are Belong To Us

Naming Conventions and Layer Mixture

Latest post 10-20-2008 3:54 PM by spookytooth. 4 replies.
  • 10-14-2008 5:42 AM

    Naming Conventions and Layer Mixture

     Hi,

    I have been skimming Subsonic to see if it would be a viable substitute for our current entity generator/foundation. After a short generation process (which went well) I ran into methods containing System.Web.UI arguments or methods like LoadFromPost().

    Why oh why mix in what is so obviously UI bound into a business layer?

    Next thing I came across is naming conventions. All seem fine until I took a look at the Query class.
    I fail to see the point in going upper case with _ seperation here, my quess of course is that the designer meant it would look more like actual SQL as the convention is to upper case SQL keywords, however I find that a poor argument.

    Brgds,

    Thomas Scheelhardt

  • 10-14-2008 9:00 AM In reply to

    • Adam
    • Top 75 Contributor
    • Joined on 05-15-2008
    • Posts 29

    Re: Naming Conventions and Layer Mixture

    You should have a listen to the Scott Hanselman interview with Rob Connery. It explains a lot of Rob's design philosophy as far as SubSonic is concerned, at least it did for me:

    http://hanselminutes.com/default.aspx?showID=150

    A

  • 10-14-2008 2:21 PM In reply to

    Re: Naming Conventions and Layer Mixture

     Hi Thomass - in terms of "mixing" - what do you mean? Referencing System.Web is something I've been asked about before and while I understand what it might suggest I don't understand people's aversion to it. But I will listen (despite what some might say :).

    Also - SubSonic isn't your business layer...

    The uppercase thing was indeed to look like SQL and we redid it in the new SqlQuery class as people really like their casing to be a certain way, evidently. Big discussion on that one :).

     

     

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!

  • 10-15-2008 7:11 AM In reply to

    Re: Naming Conventions and Layer Mixture

     Hi,

    Yes you are right, DAL would be more accurate, but what I meant is that I would have preffered that methods that use or manipulate UI elements had been put in utility classes, or decorators or maybe even generate a Web class for each entity to facilitate interaction with web forms and their elements (if you wanted to avoid reflection for instance).

    I think it would provide a better seperation of concerns.

  • 10-20-2008 3:54 PM In reply to

    Re: Naming Conventions and Layer Mixture

     Separation of concerns is an architectural issue - SubSonic is a utility tool. I understand what you're after here - but we're not about architectural purity and I don't mind breaking rules in the name of efficiency :).

    Find a bug? Create a Work Item for a fast response.. Want to help? Create a patch for us!

Page 1 of 1 (5 items) | RSS