I am developing a website using ASP.Net and SQL server. Application design consistes of three logical layers 1) Presentation layer 2) Business Layer 3) Data Layer.
In the present design, the presentation layer has the .aspx pages. It takes user input, instantiates business object and calls the business method.
The business object in turn instantiates corresponding data object and calls the data object method.
The data object method executes stored procedures to access the database.
I feel drawback of this design is that for a single user request, minimum two objects have to be instantiated, the business object and the data object. Object creation is an expensive operation and impacts the application performance.
My query is, is it a good idea to declare all methods of data objects as public shared, so that they can be called from the business objects without having to instantiate the data class. This will mean that the data layer of my application contains classes with all methods as shared. Will this have any adverse impact?
Enter your message below
Sign in or Join us (it's free).