Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 11th, 2007, 12:20 PM
Authorized User
 
Join Date: Dec 2006
Location: Montreal, Quebec, Canada.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

  #2 (permalink)  
Old January 13th, 2007, 03:48 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

  #3 (permalink)  
Old May 30th, 2007, 11:37 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

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
  #4 (permalink)  
Old May 31st, 2007, 08:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Interesting...thanks for the link.

Eric

  #5 (permalink)  
Old June 1st, 2007, 04:19 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

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
  #6 (permalink)  
Old June 1st, 2007, 05:01 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

ok - i found a little bit of time and have zipped up the new templates as well as including a very basic user guide for the generator.

have tested pretty well here and all works great.

let me know how you/anyone get's on with it. here's the link to the templates and user doc:

http://www.jamestollan.com/downloads/templates.zip

and here's the generator link itself:

http://www.flixon.com/downloads/flix..._generator.msi

SQL Server Management Studio Express:

http://www.microsoft.com/downloads/d...displaylang=en

NOTE - there must be no other files except TPL files in the templates folder otherwise the application will attempt to parse them as a template. only valid tpl files can be present in templates folder and sub folders, any other files should be moved away

jimi

http://www.jamestollan.com
  #7 (permalink)  
Old June 4th, 2007, 10:19 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

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
  #8 (permalink)  
Old June 9th, 2007, 07:47 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BizObject class - Intellisense? ViagraFalls BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 September 19th, 2007 02:24 PM
Why is Cache Property used in BizObject ? Scott663 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 March 8th, 2007 10:47 PM
Thoughts on Dreamweaver Extensions mar0364 Dreamweaver (all versions) 1 September 23rd, 2005 03:02 AM
Can you give me an example of BizObject content ? dwfresh BOOK: ASP.NET Website Programming Problem-Design-Solution 0 December 19th, 2003 04:10 AM
Purpose of BizObject in Core? SBurton BOOK: ASP.NET Website Programming Problem-Design-Solution 1 August 6th, 2003 07:36 PM



All times are GMT -4. The time now is 07:48 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.