Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 July 28th, 2011, 03:25 AM
Friend of Wrox
Points: 1,469, Level: 15
Points: 1,469, Level: 15 Points: 1,469, Level: 15 Points: 1,469, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile Confusing about what to use when

Hello Imar,

I have gone through your 2 books (Instant results & Beginning Asp.Net 3.5 ….). No doubt both are very nice and illustrative.

You have shown many methods dealing with database and play with data controls. But I am confused about what to use when?
For example you have used stored procedures with SqlDataSource and ObjectDataSource both, then

1.) Which method is most appropriate and fast in accessing database and secure too.

2.) Also in Asp.Net 2.0 you have emphasized on Business Logic with ObjectDataSource but with the invent of Asp.Net 3.5 should we still use Business Logic? Because in Beginning Asp.Net 3.5 …. you have used only SqlDataSource and no BL but still developed well running website.

3.) Can’t we use LINQ & DataContext as substitute for BL & stored procedures?

4.) Do we actually need Stored Procedures for better site?

5.) Even if we use stored procedures than is it easy to deploy the modified sproc in database at remote server?

I am really very confused about choosing right choice. Kindly sort out the problem.

Old July 28th, 2011, 10:15 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

The answer is: it all depends ;-)

The SqlDataSource is great for simple, small sites. They are easy to develop and understand, and quick to implement. But as soon as your site starts to grow, they are no longer the best option as you'll have SQL statements sprinkled all over the place. That's where I typically start using BOs with stored procedures under the hood.

Linq to SQL (or better yet, the Entity Framework) are a very compelling alternative, one I use more and more (especially with Code First in EF) and to a large extent they minimize the need for sprocs.

I would still use sprocs for intensive database processing or query logic.

Hope this helps,

Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Similar Threads
Thread Thread Starter Forum Replies Last Post
Confusing instructions NCCadm BOOK: Beginning SharePoint Designer 2010 0 February 18th, 2011 09:23 AM
Confusing XPath chapter!!! skystar3 BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2 2 December 8th, 2010 08:29 PM
Solution section are confusing sometimes kneten73 BOOK: ASP.NET 3.5 Website Programming Problem Design Solution 4 December 10th, 2009 07:22 AM
Simple yet confusing jack123 SQL Server 2000 1 July 21st, 2007 01:24 PM
Confusing problem in C++ RCB C++ Programming 3 February 26th, 2005 07:35 PM

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