 |
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0  | This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

January 11th, 2007, 12:20 PM
|
|
Authorized User
|
|
Join Date: Dec 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thoughts on BizObject
Hi,
First of all, I must say that I'm liking the book so far, it's pleasant to read and it has strong ideas and teach ASP .NET 2.0 well. (I'm a beginner with C# and ASP .NET)
But there's one thing that's bugging me. It is the BizObject. We find that it has a lot of weird methods that don't quite fit with the theme of a BizObject such as the Caching methods and the CurrentUser stuff. Why would an Article know about the CurrentUserIp?
Also, why are the CRUD and "DLL to BLL" methods defined in each BLL object? We found that the properties, getters, setters and the regular business stuff is already enough. Fortunately, C# has a #region keyword which I think is pretty cool so far.
To alleviate our worries, we tried to redesign a part of the BLL and nuke the BizObject.
The answer was found in a very common pattern, Controller. So we decided that all our BLL objects do not extend BizObject anymore. The BizObject was renamed to AppController. So we decided to have a controller for each type of BLL object. That controller have the CRUD and "DLL to BLL" methods and they also handle the Caching. So we are left with a "pure" BLL object and Controller to create that BLL object. So we have the overhead of coding a controller but there's so much code to do in the DAL anyway, 5 more minutes is not going to kill anyone.
We thought it was a bit weird that the Caching was done inside the BLL objects themselves, so by using a Controller like this it makes more sense in my humble opinion.
Are we going to hit an obstacle soon when our BLL classes become more complex? Right now, we're only retrieving data from the database. Maybe there's a reason it was done without controllers in the book... If that's the case, I'd like to know before we go too far.
Thank you very much
|
|

January 13th, 2007, 03:48 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You seem to know what you're doing, so choose a methodology that makes sense for you. The DAL/BLL layers used in this sample site don't really do justice to the n-tier concept. In fact, the pure n-tier model has little use in the real world due to the realities of the RDBMS in the back-end. It's impossible to have an efficient design that has clean separation between the tiers as demanded by a pure n-tier model.
Here's a case in point. In the real world we have to put at least some business logic in the database in the form of stored procedures. When you wrap a business-aware stored procedure with a lightweight DAL class, it appears to the caller of that class to be a business object. Then how could you wrap that DAL class with a BLL class, since it already smells like a BLL class to begin with? The differentiation between DAL and BLL is frequently fuzzy, so a lot of times the DAL and BLL are co-developed within the same cloud - it becomes one layer instead of two. But in other areas of that same system you might indeed have a clear distinction between DAL and BLL.
Architects have a difficult job. They want to follow a pure n-tier model with clean separation, but their desire to make it efficient and to eliminate needless redundancy forces them to break the abstraction in some places. I call this the Pragmatic approach. Others have called it a bastard approach, but I like my term better :-)
Since we're on the subject of n-tier "issues", it seems reasonable to discuss another architecture issue that's been on people's mind lately: the impedance mismatch between the database and the OOP DAL classes. Some people thought OOP was going to be the end of the raod, but object databases are terribly inefficient. So we're left with relational databases interacting with OOP classes. This is also ugly, so some people think the Object Relational Mapping (ORM) ideas will be our salvation. I concede that ORM has merit, but that is still evolving also. You can read some of my thoughts on ORM if you like:
http://www.ericengler.com/downloads/orm.doc
Eric
|
|

May 30th, 2007, 11:37 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
|
|
eric,
just read your doc and really liked it. thought i'd point yourself and the faithful twds a little dal/bll generator that is based on the workings of the beer house. you can download it from here:
http://www.flixon.com/downloads/flix..._generator.msi
i've been in touch with the author and am making a few minor cosmetic adjustments to the code and templates but as it is, it really does the job and i've managed to save a ton of time with new classes as a result.
take a look - it's a good conforming model to the existing beer house code.
jimi
http://www.jamestollan.com
|
|

May 31st, 2007, 08:23 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Interesting...thanks for the link.
Eric
|
|

June 1st, 2007, 04:19 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
|
|
eric,
i'll drop a link off later of the usage and new templates that i've created for the above app. i basically have 'bent' the deafult templates to conform uniformly to the beerhouse standards and have added #region areas throughout to categorise code sections as it can sometimes be a bit of a chore winding thro whole sections in the BLL/DAL just to identify and edit the static methods/properties etc...
i'll gt this up onto my site over the next day or so and add a link as and when.
jimi
http://www.jamestollan.com
|
|

June 4th, 2007, 10:19 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
|
|
just to let you all know, i have made updates to the codebase for the SiteGenerator and have submitted them to the author for his approval. As and when they are included in a new release, I'll drop a note here. I could of course drop an update onto my site but i'd rather wait until it's been 'officially' vetted 1st, tho' i'm sure that should i request it of the author, he'd be more than happy to have a test candidate release 'out'.
i'll keep you all posted.
btw - would be interested to hear any comments from anyone that has been using the Site Generator to date...
jimi
http://www.jamestollan.com
|
|

June 9th, 2007, 07:47 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
|
|
Hi all,
OK- after a few days 'fiddling' with the authors code, i've made some changes to the Flixon Site Generator code. The changes are mainly in the ergonomics as well as changes that i've made to the templates to stear them closer to the way that TheBeerHouse is provisioned. To this end, I was wondering if i could enlist the help of the regulars here to do a bit of useability testing. The use of the app is detailed basically on the front screen when launching SiteGenerator.exe.
You can download the RC1 from this link:
http://www.jamestollan.com/downloads...eGenerator.zip
Once downloaded, simply extract the archive into your c:\Program Files\ folder. it will create a folder named Flixon with a sub folder below that called 'Site Generator'. From there, simply run the Site Generator.exe file and follow the onscreen instructions. If you have the current live version of the application, just unzip over the top of it - all shortcuts will be respected.
Let me know how you get on etc.
BTW - in the final release (and current release) of the sitegenerator, the MSI install will take care of desktop shortcuts etc, for now, (unless you have the previous version installed) simply create the desktop shortcuts yourself. Also, make sure you have installed the SQLServer Management Studio as this will make life so much easier when attaching your database to the SQLServer node (to make it visible to any application querying the SQLServer database node). You can find this here:
http://www.microsoft.com/downloads/d...displaylang=en
thanks again
jimi
http://www.jamestollan.com
|
|
 |