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
  #11 (permalink)  
Old November 6th, 2007, 12:45 PM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Jimi,

Its all a matter of preference and familiarity I think.. Hibernate, the original foundation of nhibernate on the java side, is widely adopted, and so my interest in using it, is in a way to follow what may be becoming the industry standard. I like TBH a lot, this is why I am hesitant to stray away from its DAL. However, the prospect of not writing and maitaining any sql code is enticing, so I would like to try it out to see how useful it really is. Although I am fully aware that there is no silver bullet! :)

Alex

- TheBeerHouse Mods Repository
http://www.sashka.com/TheBeerHouse/thebeerhouse.html
  #12 (permalink)  
Old November 6th, 2007, 01:02 PM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

alex,

as an aside, how would the nH stuff work (given the lack of sql) in genrating paged resultsets. i'm thinking in particular of the type of thing that i use a lot where you use ROW_NUMBER() OVER (ORDER BY {0}) as well as ordering by columns (as generated by the gridview.

it's the flexibility of being able to use these 'tricks' that makes the DAL (especially if templated) a pretty comfotable zone for me. i've pasted my amended version of the sqlclient articles List, just to give an idea of what i'm struggling to imagine being replaced with just the table definitions in nH:

        public override List<ArticlesEntity> GetArticles(string sortExpression, int startRowIndex, int maximumRows)
        {
            using (SqlConnection cn = new SqlConnection(this.ConnectionString))
            {
                string SQLString = "SELECT TOP(@End) * FROM ("
                    + string.Format("SELECT *, ROW_NUMBER() OVER (ORDER BY {0}) AS RowNum FROM tbh_Articles",
                    sortExpression != "" ? sortExpression : "ArticleID ASC")
                    + ") AS Alltbh_Articles WHERE RowNum BETWEEN @Start AND @End ORDER BY RowNum ASC";

                SqlCommand cmd = new SqlCommand(SQLString, cn);
                cmd.Parameters.Add("@Start", SqlDbType.Int).Value = startRowIndex + 1;
                cmd.Parameters.Add("@End", SqlDbType.Int).Value = startRowIndex + maximumRows;

                cn.Open();
                return this.GetArticlesCollectionFromReader(ExecuteReader (cmd));
            }
        }

anyway, good to think about this stuff.

jimi

http://www.originaltalent.com
  #13 (permalink)  
Old January 29th, 2008, 11:45 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

just wondering if anyone using the linq to sql has got an answer to the question above (re ROW_NUMBER() OVER (ORDER BY {0})) as i've been looking at the linq stuff and was wondering how to 'bend' around it in situations such as that.

hope i'm making sense here.

[edit] did find something here, will update on whether it works well:
http://blogs.msdn.com/wriju/archive/2007/10/04/linq-to-sql-paging-data.aspx

[edit 2] can confirm that the method contained in that link above does indeed generate the ROW_NUMBER() OVER (ORDER BY {0}) sql, which is great news.

jimi

http://www.originaltalent.com
  #14 (permalink)  
Old January 29th, 2008, 04:12 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

From some of the experimenting I've been doing, LINQ to Sql seems very cool -- but as someone pointed out earlier, it may be well worth waiting for the Entity Framework (LINQ to Entities) to arrive, which I predict will be totally revolutionary.

nHibernate is a neat concept, but has never achieved wide acceptance as any kind of "standard" in the .NET world. I can tell you right now, L2E is the standard of the future. Paging, caching, concurrency control, exception handling, and clean, fast, super-efficient queries all built in. And stored procedures will still be supported for you "tweakers". :D

If you are curious, the CTP is available now.

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

lee - yes, i've 'read up on the L2E stuff, but haven't experimented yet (that unfortunately is a bit of a luxury these days, giving way to pragamatic industry standards - grrr :D) but once the supported version is out, i'll be onto it.

from what i've seen and played with in L2SQL, that actually can cover most things in TBH and would be fairly easy to port over, however, i agree that it may well be worth waiting out for L2E and use the experience as a 'primer' for it's release. i also keep reminding myself of how many websites there are out there still working beautifully on asp classic - lol.

it's a fast road but actually, if you pause (or stop) and look back, you sometimes see only a blur behind in the distance of the stuff that's really 'happening' in the true sense of the word.

jimi

http://www.originaltalent.com
  #16 (permalink)  
Old January 29th, 2008, 10:19 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Quote:
quote:Originally posted by jimibt
 lee - yes, i've 'read up on the L2E stuff, but haven't experimented yet (that unfortunately is a bit of a luxury these days, giving way to pragamatic industry standards - grrr :D) but once the supported version is out, i'll be onto it.
Same here, unfortunately. There is only one old, slow PC they will let us install CTPs and Betas on, and using it is an exercise in frustration all its own.

Quote:
quote:Originally posted by jimibt
from what i've seen and played with in L2SQL, that actually can cover most things in TBH and would be fairly easy to port over, however, i agree that it may well be worth waiting out for L2E and use the experience as a 'primer' for it's release.
L2Sql actually does generate very efficient SQL, supports SPs, and does efficient paging and concurrency behind the scenes. Those are all big advantages. However, it's still not a replacement for a true BLL IMHO. L2E should allow a complete workover of TBH and will make implementing a lot of things that were left out of the original TBH a whole lot easier.

Quote:
quote:Originally posted by jimibt
i also keep reminding myself of how many websites there are out there still working beautifully on asp classic - lol.
Good point! But I'm sure glad I don't have to write stuff that will run on a 486 with dBase any more.

  #17 (permalink)  
Old January 30th, 2008, 04:33 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 Lee Dumond
Quote:
quote:Originally posted by jimibt
i also keep reminding myself of how many websites there are out there still working beautifully on asp classic - lol.
Good point! But I'm sure glad I don't have to write stuff that will run on a 486 with dBase any more.
yes, and as for working with the compiled version 'clipper summer '87' :D

ahh -memories...

jimi

http://www.originaltalent.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
General Question about the beerhouse example kss BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 November 26th, 2008 12:08 PM
BeerHouse ASP.NET 3.5? dub.survivor BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 51 October 6th, 2008 11:16 AM
SEO and the beerhouse vantoko BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 12 August 6th, 2007 05:59 PM
the BeerHouse Arabic Localization nesrine C# 0 February 21st, 2007 07:51 AM
BeerHouse from C# to VB.Net nesrine ASP.NET 2.0 Professional 0 February 20th, 2007 07:20 AM



All times are GMT -4. The time now is 07:33 PM.


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