When life throws you hard balls, you can either step back and take a swing or bunt the hell out of it. I just recently went to an information session on T-SQL, Stored Procedures and now LINQ. These folks discussed stored procedures and why they are so important in the world today.
They stated ideas such as:
- Stored Procedures optimize queries.
- They stop SQL Injection attacks.
- Stored procedures are concrete and cannot be changed.
I wanted to briefly state a counter argument against stored procedures and for T-SQL and LINQ:
- Stored procedures do not optimize queries.
- A SP is not an optimized query, it does not save time. SP’s used to save time and have been faster in the past, but more and more RAD development has been done without SP’s. The development has caught up with SP’s and dynamic SQL has now caught up and in some cases surpassed SP’s. These days parameterized queries are now cached just like SP’swhich put them on an even playing field.
- Microsoft LINQ and ADO teams both admit that SP’s are not faster than dynamic SQL.
- Benchmarks have also been completed which explicitly show SP's are slower over small queries and tie dynamic queries over larger ones.
- Stored procedures do stop injection attacks, but you can also do it with parameterized queries.
- SP’s are good at this, but it can also be done with parameters. Putting a value into a parameter means that it will not be a part SQL query string at all.
- Stored procedures are very concrete and are hard to change as a developer with a DBA. This is the problem.
- As a developer when you push a product out the door, you want to be fast at this. Developers don’t want to learn two languages in order for their product to be pushed out the door and then go back to the database every time code needs to be changed. They want dynamic abilities. When SP’s are hard to change, it might be a bit harder and take longer when you have a DBA. The inability for SP’s to be changed or created fast is the issue with this kind of development.
- SP’s mangle the three tier architecture designed for apps.
- Instead of having a structure which separates logic from storage, you have storage and logic on the same tier. This will cause potential problems down the road.
- Business logic in a SP does not scale. Business logic should be in code and not in the storage center.
- When you have multiple database servers, it is more difficult to keep the triggers and SP’s synced.
- There is no Version Control for SP’s.
- In a place that can be disastrous if you screw up, it should have something. This is one big reason why people like to avoid SP’s like the plague. They run away and never move back into town.
- SP's are NOT cached and Are NOT Pre-Compiled
- SQL Server 2000 and SQL Server version 7.0 incorporate a number of changes to statement processing that extend many of the performance benefits of stored procedures to all SQL statements. SQL Server 2000 and SQL Server 7.0 do not save a partially compiled plan for stored procedures when they are created. A stored procedure is compiled at execution time, like any other Transact-SQL statement. SQL Server 2000 and SQL Server 7.0 retain execution plans for all SQL statements in the procedure cache, not just stored procedure execution plans.
If you see the new technologies coming out of Microsoft now, there will be no need for SP’s in the future. LINQ is taking care of most of this by allowing for a data layer cheaply and efficiently with very little effort by the developer. LINQ handles all these problems and if you truly like a confirmation on all the things I said, just search the internet for Stored Procedures v.s. Dynamic SQL.
The debate these days has two sides. Not “Republican or Democrat”, but “Progressive and Non-Progressive”. The Progressive folks are not using Stored Procedures these days.
If you liked this post, please be sure to subscribe to my RSS Feed.
Alright ladies and gents. Two weeks ago, I sent a memo to my boss. I told him all about Devconnections and how much impact it would have on the team of developers I work with(currently 4 total and the other three are Cold Fusion dev's) and our next up and coming projects include a HUGE project we just landed. If you know who I work for, then you would know what I was talking about. I am excited with this project. It excites me. There is allot of data capturing and this type of project is on the bleeding edge of development and ideas. Wow and I am excited for both my company and I now get to go to Devconnections. I currently reside in Melbourne, FL so it is an easy drive to Orlando which the company will pay for everything including but not limited to food, transportation, hotel etc... I also get to go to the Heroes Happen Launch of Microsoft 2008 Products on company time. The launch event is sold out for Orlando, FL which every attendee also gets a version of Windows Server 2008, Visual Studio 2008 and SQL Server 2008 for FREE. This is a heck of a bargain that I just cant say no. I am pretty sure these versions are complete full versions. Can someone Verify?
I think this will also be an amazing event which opens the Friday after Devconnections. What do I need help with? Well let me tell you after looking through the brochure, there are allot of courses and sessions to look over. I then went ahead and narrowed it down to 19 sessions I want to go to. I still have to decide on only 13 sessions with the hope they don't overlap. I need feedback so please help me on this.
- I don't want a course that I can learn through an ASP.NET tutorial on the web EASILY. I pick up things quick, so I want sessions that I can't pick up unless its shown to me.
- I have only been coding for 1.5 years now with a total of 8 years web design experience, so I still consider my self new to the C# world. I want to learn things, the average person wouldn't pick up in that year.
- I want things that will benefit my company and me. Sorry, I can't give you name of the company, but they have been in the news allot as of lately.
- I want to take Carl Franklins session. I have heard him plenty of times on .Net Rocks and know he is a master programmer and presenter!
Those are the requirements, now since I still consider my self a newby in the C# world, please help me pick. I will listen to all replies with earnest.
AMS304: INTRODUCTION TO THE NEW ASP.NET MODEL VIEW CONTROLLER (MVC) FRAMEWORK MICROSOFT
One of the benefits of using a MVC methodology is that it helps enforce a clean separation of concerns between the models, views and controllers within an application. In the near future, ASP.NET will include support for developing Web applications using an MVC-based architecture. The MVC pattern can also help enable red/green test-driven development (TDD)—where you implement automated unit tests, which define and verify the requirements of new code, first before you actually write the code itself. Join us for a dive into the new MVC Framework.
ADX210: BUILDING A LINQ-BASED BUSINESS LAYER FOR ASP.NET APPLICATIONS RICK STRAHL
With LINQ and LINQ to SQL, there are many new opportunities for creating a more flexible, business object layer using the enhanced database connectivity and language enhancements that LINQ offers. Rather than focus on the new features of the LINQ engine, this session puts LINQ into the perspective of a business-object framework and how you can leverage LINQ as part of this high-level application layer. I’ll start by examining how LINQ to SQL interacts with the database and see how this model fits for data access, both directly in the user interface layer and in a more formal, multitier-type business layer. I’ll then dive in and examine different ways you can use LINQ to SQL in combination with a traditional business layer and highlight the fact that DLINQ, on its own, does not necessarily replace a flexible data access layer in an ASP.NET application. The focus of the session is on ASP.NET business-application development, which is used for examples and special considerations for data retrieval.
AMS204: DISPLAYING DATA WITH THE NEW LISTVIEW AND DATAPAGER CONTROLS IN THE .NET FRAMEWORK 3.5 MICROSOFT
Get complete control over how your data is displayed using the new ListView and DataPager controls. Take a deep dive into using these controls to easily and efficiently display and update your data. Learn how you can control every detail of how data is presented to the users of your site.
ADX211: BUILDING N-TIER APPLICATIONS WITH LINQ DAN WAHLIN
Creating a modular and maintainable application architecture is always a key part of the application development life cycle. In this session, you’ll learn how to build N-Tier/N-Layer applications that leverage Language Integrated Query (LINQ) to minimize development time while still maintaining module design practices. Topics covered include using the Visual Studio 2008 LINQ to SQL designer, using data context objects, and performing different types of LINQ queries.
AGN311: DEVELOPING A PROVIDERBASED FEATURE FOR ASP.NET 2.0 MIGUEL CASTRO
You’ve used ASP.NET 2.0’s Membership system, right? You’ve even developed your own custom Membership Providers. But did you know that you can use that same Provider Model for any feature of your application you wish? I’ll show you how by creating a “credit card processing and returns“ sub-system that takes advantage of ASP.NET 2.0’s Provider Model, allowing you to create different credit card processors any time you want without changing your site code. Many ASP.NET developers don’t know you can even do this; come be a part of the few.
AGN310: URL REWRITING: WHAT, WHY, AND HOW MIGUEL CASTRO
You may have noticed sites out there with URLs like“.../2007/10/8.aspx“. Obviously this signifies a date, but can there really be a page for every day of the year on this site? The answer is definitely not. This is a technique known as URL rewriting, which allows for friendlier URLs that may not necessarily correspond to the site’s physical page structure. More importantly, this technique is crucial for search engine optimization, since typically search engines ignore query strings in the URL. In this session, I’ll show you the basics of URL rewriting, teach you how to centralize it using HTTP Modules, and even get you going on a reusable URL rewriting engine component.
AAR101: USING THE ASP.NET MVC FRAMEWORK DAVE SUSSMAN
The ASP.NET postback model was a radical step for Web applications when it was released and is now commonplace. However, applications are becoming more complex and provide some challenges to testing. The new ASP.NET Model View Controller (MVC) framework provides a clear separation between the aspects of ASP.NET pages, allowing for cleaner code, easier and faster testing, and powerful and flexible URL mapping. This session.com April 20-23, 2008 Orlando, Florida will examine the MVC framework, showing how it differs from the postback architecture, and how you can integrate it into existing applications.
APF310: ASP.NET PERFORMANCE AND SCALE TIPS AND TRICKS ROB HOWARD
This presentation takes a look at some tips and tricks for getting great performance out of your ASP.NET solution. It will start with some of the common physical design options, examine the choices to make when writing ASP.NET and .NET code, and finally look at some of the tools used for tracking and measuring changes in your ASP.NET application’s performance. You’ll leave this session with some actionable tips & tricks that you can take home and apply immediately.
ARP250: PROGRAMMING SQL SERVER REPORTING SERVICES PAUL LITWIN
In this session, you’ll learn how to programmatically manipulate SQL Server 2005 Reporting Services (SSRS) and integrate SSRS into your ASP.NET applications by employing URL Access, Report Viewer controls, and the Reporting Services Web Services. A major issue with SSRS is that you can normally only display reports using Internet Explorer, but in this session you’ll discover how to integrate SSRS into your applications using any modern browser, including Firefox, Netscape, and Safari. You’ll also learn how to extend reporting services by calling custom .NET assemblies from your SSRS reports. Finally, the session will touch on improvements to SRRS promised for the upcoming SQL Server 2008 release.
APG315: ASP.NET INTERNALS ROB HOWARD
This presentation is a deep-dive into the inner-workings of ASP.NET. In it you’ll learn exactly how ASP.NET communicates with the outside world, such as with IIS. The session will also peel open ASP.NET’s HttpRuntime for a deeper look at the internals of the request/response processing architecture. Then the session will wrap up with a discussion of the ASP.NET Page and how it is parsed and compiled. If you want to learn how to write better ASP.NET applications, knowing exactly how ASP.NET works is critical.
ACS311: BUILDING CUSTOM ASP.NET AJAX CONTROLS DAN WAHLIN
By creating custom ASP.NET AJAX controls you can encapsulate frequently used functionality and promote better code re-use in applications. In this session, you’ll learn how to create client-side ASP.NET AJAX controls that extend classes in the ASP.NET AJAX script library. You’ll also see how you can encapsulate client-side controls in ASP.NET AJAX server-side controls. Topics covered include defining client-side control constructors and fields, using the prototype design pattern to define control properties and methods, disposing of resources, and creating server-side controls that implement the IScriptControl interface.
A LAP AROUND VISUAL STUDIO TEAM SYSTEM 2008 MICROSOFT
In this demo-intensive session, you will be exposed to many of the new features in Visual Studio Team System 2008. This session cover everything from Team Foundation Server for project management, work item tracking, version control and build support, to integration with Microsoft Project and Excel, unit testing, code coverage and code metrics, database projects, to Web testing with AJAX support and the new user-pace load testing. You will leave with an understanding of how Visual Studio Team System 2008 can be your organization’s Application Lifecycle Management (ALM) solution, and enable you and your team to collaborate and communicate to ensure software quality and provide visibility into the development process.
IMPROVING TEAM DEVELOPMENT MICROSOFT
Do you build software alone? In today’s world, software development is done by increasingly larger teams made of people with different skill sets, including project planning, functional definition, development, and testing. As teams grow larger there is a greater need for tools to enable the communication and collaboration that is necessary to deliver high quality software effectively. In this session, you will learn how to function as a collaborative team using Visual Studio Team System 2008, including process templates, work item tracking, version control, and reporting. Whether you are on a team that values Agile process, one that prefers CMMI, or any other process, this session will apply to you.
VISUAL STUDIO 2008: LINQ DEEP DIVE AND BEST PRACTICES AMANDA SILVER
LINQ (Language Integrated Query) is a key platform innovation introduced with Visual Studio 2008 which brings SQL-style query expressions into VB and C# enabling you to describe what data to reason about instead of how to access the data. In this session, by taking a much closer look at the language features that enable LINQ-enabled frameworks, we’ll uncover tips, tricks, and best practices for writing queries that will help you write robust, high-performing, maintainable business applications more quickly. In addition to gaining a solid understanding of LINQ for data access, you’ll also leave this session with a clear understanding of how query and the individual language features can be leveraged in other parts of your application to write less code.
BUILDING SERVICE ORIENTED APPLICATIONS WITH WCF AND VISUAL STUDIO 2008 JOHN STALLO
Windows Communication Foundation (WCF) is one of the core platform technologies introduced in .NET 3.0 and Visual Studio 2008 includes tool support for building and consuming WCF services. In this demo-focused session, we’ll start from the basics of creating and consuming a WCF service and quickly move into the advanced techniques and support related to service hosting, service configuration, etc. This session assumes you are familiar with the basic concepts of WCF and will focus on the end-to-end experience within Visual Studio 2008 for building and consuming WCF services.
VVS310: FUN WITH PROGRAMMING CARL FRANKLIN
Looking for something fun and inspirational? Let Carl Franklin show you some of the fun you can have with Visual Studio .NET and a few cool ideas, from artificial intelligence to practical joke software.
VPF305: FUNDAMENTALS OF WINDOWS PRESENTATION FOUNDATION: BEYOND THE BLING KATHLEEN DOLLARD
Have you seen Windows Presentation Foundation (WPF) portrayed as a way to spin photos on cubes and wondered what this had to do with you? Windows Presentation Foundation does take us into a new realm full of graphic possibilities, but it also offers a radical new UI model that’s well worth exploring. This session focuses on how you can use WPF to make business user interfaces. You’ll focus on the underlying model and separation of UI into discrete pieces that can be expressed in different ways. You’ll build UIs with grids and stack panels for layout and explore databinding, templates, and triggers. You’ll see how to create an application that’s logically organized and you can customize both in look and feel on a global basis—either to customize for individual clients or to keep your application looking fresh through future UI fashion changes.
I hope that narrows it down for you so you can give me pointers on where to take this.