Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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
  #51 (permalink)  
Old November 15th, 2007, 01:20 PM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for that. i have decided to jump in at the deep end so to speak and have started to use the architecture against one of my forms. this involves 17 related tables, including some lookups and children of children etc. here's hoping!

  #52 (permalink)  
Old November 15th, 2007, 01:43 PM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

Quote:
quote:Originally posted by forumuser
 thanks for that. i have decided to jump in at the deep end so to speak and have started to use the architecture against one of my forms. this involves 17 related tables, including some lookups and children of children etc. here's hoping!
bleedin heck - that's quite a form. drop me a link to it when you're done as i'd be interested to see how you organise all of that.

heading off now as out playing (just a pub jam, not 'playing playing') later tonite - catch you again.


jimi

http://www.originaltalent.com
  #53 (permalink)  
Old November 16th, 2007, 04:55 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Copenhagen, , Denmark.
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default

Would it be possible to have a few "UI-templates", which the programmer could pick from when using the site generator?

My biggest issue still is (and always will be) the freaking UI. It absolutely removes any joy from the prograsmming process for me, as it takes incredible amounts of time to get things just right. Perhaps I just suck at the markup stuff, but it's by far the stuff that takes longest to do for me.

We seem to be having a number of relatively identical setups though. There's the Gridview / detailview setup (adding forums, for instance), and so on. Wouldn't it be possible to create a basic layout for different scenarioes (for instance, the subforums I'm adding by using a repeater per forumcategory, and hooking up the gridview to it. The same concept can be used for private messages) so all we'd need to do when the magic is done is properly configure the columns etc, without having to dig into the markup itself?

I'm trying to reuse as much as possible from other pages, in order to try and keep the consistency across the site, and still that somehow takes loads of time :(

Peter

http://entropia-online.blogspot.com/
  #54 (permalink)  
Old November 16th, 2007, 05:41 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

Quote:
quote:Originally posted by ViagraFalls
 Would it be possible to have a few "UI-templates", which the programmer could pick from when using the site generator?

My biggest issue still is (and always will be) the freaking UI. It absolutely removes any joy from the prograsmming process for me, as it takes incredible amounts of time to get things just right.
peter,

i find i work exactly the same way (copying previous pages and adjusting). the idea of UI templates is obviously something that i've tinkered with but have never really settled on a generic way to allow for selection of 'type' of template used for a given entity. it's not something i plan to look at right now but it prolly would be fairly easy to use the same logic that i'm using in the Site Generator.Data.dll (an amended version from Lee's original) to create a form with all the child details based on child collections found (foreign keys and secondary keys). i don't know if you've downloaded the updated Site Generator.Data.dll dll and templates, if not, it may be worth doing so to see the additional benefit from getting all parent child collections and objects inside the BLL.

http://www.originaltalent.com/downlo...atesAndDLL.zip

at some point in the future i will tackle this area, adding any 'generic' ms ajax where appropriate too. until then 'copy paste' :)

jimi

http://www.originaltalent.com
  #55 (permalink)  
Old November 16th, 2007, 05:56 AM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hope you had a good jam. a couple of questions if poss...

if i have a table containing say 20 columns and say 500,000 rows and i have an object which wraps that table via a stored proc and i want to consume say, only 2 of those fields, do i still need to create 500,000 *complete* objects in order to get at those 2 fields or can i just populate the 2 fields i want.


i often have search forms containing up to 10 optional fields onto a table, with results coming back from that table and related tables. could tbh architecture handle that?

  #56 (permalink)  
Old November 16th, 2007, 06:09 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

forumuser - the 'secret' is to ONLY create objects for the data that you want to display. so for example in the posts entity and bll, depending on the 'page size' of the UI view, you will only typically ever query and return 10 rows (if this is what you defined at your max view rows on the posts). using the:

                string SQLString = "SELECT TOP(@End) * FROM ("
                    + string.Format("SELECT *, ROW_NUMBER() OVER (ORDER BY {0}) AS RowNum FROM tbh_Posts",
                    sortExpression != "" ? sortExpression : "PostID ASC")
                    + ") AS Alltbh_Posts WHERE RowNum BETWEEN @Start AND @End ORDER BY RowNum ASC";

syntax (in SQLServer) ensures that you only ever query the rows that you require to display. likewise, in the BLL a key is setup on the cache for this particular set of data. in a search routine, it'd work in exactly the same way, so if you returned 2000 rows in the search, you'd only ever populate 10 objects (or whatever your max view row size was) and repopulate when the pager was clicked.

i hope i haven't assumed too much knowledge in this area. again, this is the 'golden' area of asp.net (efficient paging) and if used correctly, a database with millions of rows can be queried and return instantly. but, it's important to understand the paging stuff for this to work correctly. from reading your question above i 'think' you possibly haven't appreciated the power of the ROW_NUMBER combination for efficiently processing huge data volumes (apoligies if you have of course :)).

hope this clears things a bit. if not, step thro' the code of the little example (with tbh_posts) that i put up for you yesterday and hopefully you'll experience a 'eureka' moment...

jimi

http://www.originaltalent.com
  #57 (permalink)  
Old November 16th, 2007, 06:24 AM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i have noticed the use of row_number but unfortunately i can't use it since the application has to run on sql server 2000 as well as 2005 :( - i'll need to tweak things to use a more trad approach to paging.

  #58 (permalink)  
Old November 16th, 2007, 06:33 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

forumuser - oh b*llocks... i have seen a few resources on the net for simulating row_number in sql2000 but have never looked into it as all my apps are on 2005.

oh well, if it was that easy, we'd all be doing it !! :)


jimi

http://www.originaltalent.com
  #59 (permalink)  
Old November 16th, 2007, 06:51 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

forumuser - i found this little article on efficiently paging in sqlserver 2000 (and 2005 if you didn't want to use row_number):

http://www.4guysfromrolla.com/webtech/042606-1.shtml

i haven't tried it myself, so can't vouch for it's ease of use nor can i make any comparisons with the use of row_number. hopefully, it'll be a start tho.

jimi

http://www.originaltalent.com
  #60 (permalink)  
Old November 16th, 2007, 07:32 AM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

cheers. i'm having a look at that just now. the code is a bit iffy. in the last, and best performing, example, he declares @startRow int but doesn't go on to use it and it just seems to return ever 1 row but i'll persevere. just as well it's xmas soon!


there's a DESC ordering missing and the startRow is not needed.
 


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
THB old Template... it´s time for a new look kherrerab BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 October 5th, 2007 05:42 PM



All times are GMT -4. The time now is 09:52 PM.


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