I work in a .NET environment, using MS SQL databases and MS development tools. It's a fantastic environment to work in, but that's another topic for later. There is a pattern I have observed in web projects that are well-designed. They look something like this:
- Solution 'MySolution'
>>> MyLibraryProject.Web
>>> MyLibraryProject.Objects
>>>>>> Business (folder)
>>>>>> Data (folder)
>>> MyWebProject
>>>>>> (all the stuff contained in a web project, aspx and code-behind files, designer files, sitemap files, style sheets, images, etc.)
The gist is that there is a Web library for user controls and such, an Objects library containing a Business folder for business objects, and a Data folder for data adapters that map roughly one-to-one to the business objects (e.g., Customer.cs as the business object, and CustomerAdapter.cs as the data adapter for Customer.cs). Then you have the web project that's going to actually use the libraries in some fashion.
The data adapter is generally simply a call to a stored procedure and the addition of whatever parameters are required.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment