Wrox Programmer Forums
| 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 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
 
Old September 26th, 2007, 03:54 PM
Registered User
 
Join Date: Sep 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database schema

Hello,

I've been trying to improve on TBH for a while now, I have changed the DB to postgresql and the DB schema so that an article table is divided into three separate tables. Its been a slow process and I've learned a great deal from this book.

My question starts from the changing the database schema for article. Within ArticleDetails for the DAL which as a wrapper, but I found that implementing all the fields within the ArticleDetails makes my program run slower, so I created separate wrappers called ArticleList, ArticleEdit and ArticleDetails. There seems to be alot of way around this, but I'm looking for a best solution, so I can have one ArticleProvider, that uses three separate Article wrappers, that handles each of these wrappers within separate BLL/Article.cs (ArticleEdit.cs, ArticleList.cs etc)

The problem I'm having is that within the AddEditArticle.aspx, you use an ObjectDataSource which uses TypeName="TT.TBH.BLL.Articles.Article" but since separating the tables, and the logic, I can't not use the Article.cs, because getting the list and updating and inserting is within three separate business logic. Or I can use one business logic for the CRUD features, but will need three separate wrappers. Hmm, it seems to me that the logic is all joined together so that one table holds one feature, IE Article table, Fourm & post table, etc.

Is there another example of a more modular design? Could someone who has separated the DB tell me how they solved this problem? I'll keep trying and I do like the architecture itself, especially the use of DataAccess to be able to use different DBs.

Breaking it down:
DAL/ArticleProvider - ArticleDetails,
 
Old September 26th, 2007, 04:47 PM
Registered User
 
Join Date: Sep 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, I know I should invest more time and find a proper way to divide the BLL and DAL so it uses three tables for article, but I just ended up using a poor man's workaround. So I scraped the three wrappers for one wrapper that has it all the fields I need for the CRUD function. Then used a second boolean value to read the required fields if it calling a list, or if its updating or inserting. It works, for now... Hmm anyone have a better solution? Sorry, I'm a self taught programmer, so I don't know all the lingo...

ArticleDetails GetArticleFromReader(IDataReader reader, bool readBody, bool readList)

Also, I love postgreSql, its so cool and Npgsql works great for .net! Anyway, have any questions, I've invested alot of my time into creating the custom membership providers, well I researched and copied and pasted alot, but still can answer your questions.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting schema for database Quick209 ASP.NET 2.0 Basics 0 December 12th, 2006 07:51 PM
Save database schema to XML file brettk_1 General .NET 2 September 16th, 2006 04:27 AM
Database Schema Problem!, Urgent! doanhvu BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 June 28th, 2006 06:58 AM
Determining a database Schema rit01 Access 2 December 10th, 2005 03:54 PM
Database schema in configuration files hasanali00 BOOK: ASP.NET Website Programming Problem-Design-Solution 2 March 15th, 2005 06:55 PM





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