Wrox Programmer Forums
|
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 January 2nd, 2008, 12:28 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default Using LINQ for this book...

Hi all,

I have had this book sitting on my shelf for a while, but have just gotten around to reading it over my holiday vacation. So far, so good...

I have been getting into LINQ for the past few weeks, and have had the idea that I might try to recreate the project in the book using .NET 3.5 and LINQ. I'd like to know -- from those of you who've gone through the book already -- how difficult do you think this might be to pull off? Should I even try, or should I just work through the project as written?

I await your thoughts...

__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
 
Old January 5th, 2008, 01:54 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could add LINQ in a few small places just to play with it. One of the problems of a 3 tier model is that it's hard to decide on how to keep the DAL isolated from the BLL while leveraging technologies that want to span those 2 layers.

A case could be made to merge some of the functionality of the DAL and BLL into one layer. This boils down to a religious question and I personally don't like purist viewpoints that require empty shell BLL classes just to keep the abstraction model clean.

If you don't know what I'm talking about, please ignore me. It's getting late :-)

By the way, there are many flavors of LINQ and not just "LINQ to SQL". You also have LINQ to XML, and LINQ to objects, etc.

I can't wait for the Entity Framework, which is coming soon. That's similar to Object Relational Mapping (ORM) systems. The idea is that you get to work with objects without worrying about the SQL.

Eric

 
Old January 5th, 2008, 01:04 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Yes, you've made some good points here. It would probably be easy to do some light experimenting with LINQ on this project as it stands now.

Like you, I am anxiously awaiting the Entity Framework and LINQ to Entities. That should be huge -- really revolutionary. I could see at that point going back and retrofitting the entire project with L2E as a learning exercise, probably using most of the existing BLL. That's probably going to be Edition 3 of this book, don't you think?

Not sure if I agree with your other point about existing LINQ functionality interfering with the 3-tier architecture. LINQ is a pretty decent ORM just as it stands right now. With LINQ to SQL, it's pretty easy to build a clean DAL, and to put business rules into partial classes that reside separately from the DAL. But, as you point out, the entities that L2SQL creatses do closely mirror the DB schema, whereas L2E should make total abstraction from the underlying data store really easy.

 
Old January 9th, 2008, 02:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is my personal take on EF and I don't know know what Marco would say, but I can't see retrofitting EF into this particular site. I'd possibly re-use some of the code, but I'd probably give the new ASP.NET MVC pattern a try along with EF. The MVC model would require a much different architecture and it really wouldn't be very similar to what we have today.

MVC plays better with SOA, and less good with traditional 3-tier designs. It's funny that we're moving away from 3-tier already. The world is moving too fast, I think.

Anyone that is interested in Object Relational Mapping (ORM) might be happy to hear that Paul Wilson's cool ORMMapper is now open source. You can google for more on that.

Here's the writeup I did on ORM some time ago:
www.ericengler.com/downloads/orm.doc

I disagree that LINQ to SQL is ORM. LINQ is just a data access method. There's no mapping between objects and relational tables - at least this isn't built in. That's where EF comes into play. You're right that LINQ can fit into the DAL and you can do your own mapping - probably in the BLL.

You can keep the 3-tier model going with LINQ itself. But the EF might end up replacing the DAL and BLL with one black box - I talk about that in my ORM paper referenced above (it doesn't mention LINQ but the ORM ideas apply). Despite what the EF masters are saying, it still seems quite a lot like ORM to me.

I don't mean to downplay the significance of LINQ. But it's not especially exciting to me until the picture is augmented by supporting technologies. And the upside-down SQL takes some getting used to!

Eric





Similar Threads
Thread Thread Starter Forum Replies Last Post
LINQ-ifying TheBeerHouse available jminatel BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 6 February 5th, 2010 03:37 PM
LINQ to SQL in TheBeerHouse zhoux BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 October 1st, 2008 07:37 AM
C# to traverse through a ChechBoxList using LINQ Helios BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 September 26th, 2008 04:37 PM
LINQ question thangxii BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 6 July 6th, 2008 03:13 PM





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