I am redeveloping an old ecommerce website which is currently written in C# ASP.NET 2.0.
I have the opportunity to develop using whatever language and technique I like.
Because this is a reasonably high volume website and has suffered performance issues I want to develop in the most efficient manner possible.
I am contemplating developing in ASP.NET WebPages (Razor). I also plan to use SqlClient to access the database. As I will be the sole developer and, although I appreciate that future changes are inevitable, I feel that having the UI and data access in the same page/script will be manageable for a site such as this with a small number of pages.
To minimise database trips (using SQL Server 2012), as database performance is the usual bottleneck in the current system, I am looking at creating stored procedures that return everything required for the current page in one query as multiple recordsets.
For example the home page query might return the promotional banner image filenames and text, the new release products, the top selling products, etc. Then using SqlDataReader get the data from each recordset as needed and dispose of the connection and reader whenThe product page might return the last recordset has been read. I don't plan to use any data transfer objectsproduct details, related products, etc.
I chose SqlClient over Webmatrixcan't remember seeing this technique used often if at all.Data as I can specify command type of stored procedure and specify parameter Is returning all data types and lengths which I understand improves performance as query plans can be reused.
Will these methods provide maximum performance and arein a single database request more efficient than retrieving the same data in several database requests? Are there any issues with the above.flaws in doing this?