Best 3-Layer architecture in web applications

Rate It (3)

Last post 03-07-2007 4:55 PM by miller50. 24 replies.

Sort Posts:

  • Re: Best 3-Layer architecture in web applications

    01-19-2007, 3:24 PM

    Hi, I wondered how did you splitted the properties from bll into its own class, for example how did you do this for Articles.

    By the way I could not run your tool because it could not connect the database for some reason, but I appreciate your work. I wonder if the tool was doing this seperation. 

  • Re: Best 3-Layer architecture in web applications

    01-30-2007, 5:17 PM
    • Loading...
    • jgd12345
    • Joined on 06-22-2006, 9:28 PM
    • Posts 249

    Hi, after further work i realized the need for business level properties.  I have now included them but put them into their own class to avoid naming conflicts.  I have also updated it to use the new ajax calendar instead of the obout date picker for datetime fields.  Another big change is it now looks for foreign key relationships and displays one to many relationships as a drop down list in the new and edit pages.  Appreciate further feedback. Click here to download version 0.2 of the ASP.NET Site Generator

    Thanks

    Lee

  • Re: Best 3-Layer architecture in web applications

    02-03-2007, 2:51 PM

    Hi, Lee. I am trying to run your Site generator tool, but it says "unable To connect database", I am sure I am giving the true connection string parameters, which I use in the web.config of the running web site. I think it may be a bug.

    By the way there seems to be lots of O/R mappers and code generators on the market which of some are free. I had a chance to look and use one of them called NetTiers. (www.nettiers.com) It looks it does a great work, but also generates too much code, which worries me. A lightweight tool would be sufficient for me like yours. I hope you will solve the database connection problem in the 3rd version:) Until the next generation can you attach the code generated by your tool for the BEERHOUSE database? I wondered how you splitted the properties from DAL and BLL and create a seperate layer.

     

     

  • Re: Best 3-Layer architecture in web applications

    02-05-2007, 4:36 AM
    • Loading...
    • jgd12345
    • Joined on 06-22-2006, 9:28 PM
    • Posts 249

    Strange i am able to connect to 3 different databases all on different machines fine.  I can't think of what else i could do, this is my first application and not sure where to look.  My only thought is that it's possibly a case sensitive issue.  As for the code generated, it's pretty much the same as the beerhouse now.  Here's what's generated (say for a comments table inside the articles provider):

    /App_Code/BLL/Articles/Comments.cs (CommentsItem + Comments classes) - The beerhouse combines these and would have called the class Comment (this caused me issues with fields called Comment)
    /App_Code/DAL/ArticlesProvider.cs (ArticlesProvider class)
    /App_Code/DAL/SqlClient/SqlArticlesProvider.cs (SqlArticlesProvider class)
    /App_Code/DAL/CommentsEntity (CommentsEntity class) - The beerhouse calls this class CommentDetails (renamed to be consistent with class renaming used above)

    Plus the other base classes and admin pages.  If you look in the templates folder you can see all the files that are generated.  Hope this helps.

  • Re: Best 3-Layer architecture in web applications

    02-14-2007, 1:07 AM
    • Loading...
    • miller50
    • Joined on 01-31-2007, 12:12 PM
    • Posts 19

    Hi Lee,

    Very exciting to see a code generator for TheBeerHouse. I've been comparing TheBeerHouse (TBH) to Commerce Starter Kit (CSK) and I tend to favor TBH because its well-thought-out breakdown of the layers.  CSK appears to have IDataReaders in the BLL, and business logic in the DAL.  I am still very new to .NET and I am trying to make sense of all the available tools such as nHibernate, CodeSmith, Wilson's ORMapper, SubSonic, etc..  Even though I see the benefits of O/R Mappers, there is still something nice about the TBH approach, and not using ORM. I can't put my finger on it, maybe someone else who is also a fan with some OR Mapping experience as well can explain it?

    I am also running into the "Cannot connect to database" issue.  Could you please post values that you use for the fields to provide to your app ? My setup is SQLEXPRESS on a local machine.

    Thank you,
    Alex 

  • Re: Best 3-Layer architecture in web applications

    02-16-2007, 3:25 PM
    • Loading...
    • miller50
    • Joined on 01-31-2007, 12:12 PM
    • Posts 19
    Also, is anyone interested in making CodeSmith templates for TheBeerHouse? Stick out tongue
  • Re: Best 3-Layer architecture in web applications

    03-02-2007, 9:18 AM

    Hi Lee,

    you see there is a big demand for generating Beerhouse architectureStick out tongue, will you able to solve the connection problem so that we may able to to run your tool? 

  • Re: Best 3-Layer architecture in web applications

    03-05-2007, 4:12 PM
    • Loading...
    • jgd12345
    • Joined on 06-22-2006, 9:28 PM
    • Posts 249

    Hi, i've had another look but it's hard to fix a problem i'm not getting.  If you like i could send you a copy of the code and then if you could email me the fix if you find the problem that would be great.  I sent the code to someone else to take a look aswell but have not heard anything back yet.  Please reply if you would like the code (it's nothing fancy just does the job).

  • Re: Best 3-Layer architecture in web applications

    03-07-2007, 3:18 AM
    • Loading...
    • jgd12345
    • Joined on 06-22-2006, 9:28 PM
    • Posts 249
    Hi alekhine_x9 fixed the problem.  There is now an integrated security option.  I have a few changes to make over the next few weeks.  I will be adding support for tables without primary keys and tables where the primary key is not the first field in the table.
  • Re: Best 3-Layer architecture in web applications

    03-07-2007, 4:55 PM
    • Loading...
    • miller50
    • Joined on 01-31-2007, 12:12 PM
    • Posts 19

    There is now a forum for TheBeerHouse on asp.net:

    http://forums.asp.net/1115/ShowForum.aspx

    Filed under:
Page 2 of 2 (25 items) < Previous 1 2
Microsoft Communities
Page view counter