I'm just starting to wrap my mind around application programming from the OO perspective. I've been asked to attempt to design and implement a small web application based on OO prinicipal. All previous development was completed by a third party group of programmers who chose to not include a business object layer into the development process.
I recently purchased a couple of books to help get me started: Beginning C# Objects by Barker and C# adapted version of the GoF Design Patterns book. I have to admit with little to no background in OO design I attempted to read the Design Patterns book and realized it was a tad over my head. I decided to get my feet wet with Barker's book and have learned enough over the past few weeks to get a decent handle on how to determine and model my domain class objects, attributes, and behaviors.
Currently, the presentation layer(aspx pages), within our existing application, talks directly to the DAL(made of DataAccess component and DataSet classes) via the C# code behind pages for each. Over the past year I've been maintaining this structure. Now on entirely new project I'm being asked to design and implement an additional layer in addition to the presentation and DAL layers, and I'm having trouble understanding how to connect them. Oh yea, did I mention I'm working on my own as my non-profit employer can only afford one programmer at this time. Fun! Fun!
I have a many questions regarding the problem I've been given but here are just a few:
1. On a high level is creating data access component classes made up of DataAdapter objects, Command objects, and sql statements which are mapped to datasets and talk directly to my SQL Server 2000 database the proper way to constuct a DAL? If not where can I find instruction/examples on the proper way to construct the DAL?
2. What is the role of data access objects in OO design? Are these purely DAL components? Or if I have a domain class which potentially has a collection of records as an attribute is it alright to create this collection as a DataTable or an array of DataRows?
3. I'm probably completely off on #2, where can I find instruction/examples on the physical implementaion of OO model? I'm not understanding how I'm going to physically get data out of the DAL into my objects and then get that data out of my objects and presented to the GUI.
4. Currently, DataSet objects are instantiated in the aspx code behind pages and datatables, within the dataSet, are bound to controls like datagrids and datalists which works very nicely. How is this done when working with objects and collections of objects?
Sorry about the longwinded post, but I need someone to check my understanding before I go any further.
Any information is appreciated.
OJ
DB/.Net/CR Developer
I recently purchased a couple of books to help get me started: Beginning C# Objects by Barker and C# adapted version of the GoF Design Patterns book. I have to admit with little to no background in OO design I attempted to read the Design Patterns book and realized it was a tad over my head. I decided to get my feet wet with Barker's book and have learned enough over the past few weeks to get a decent handle on how to determine and model my domain class objects, attributes, and behaviors.
Currently, the presentation layer(aspx pages), within our existing application, talks directly to the DAL(made of DataAccess component and DataSet classes) via the C# code behind pages for each. Over the past year I've been maintaining this structure. Now on entirely new project I'm being asked to design and implement an additional layer in addition to the presentation and DAL layers, and I'm having trouble understanding how to connect them. Oh yea, did I mention I'm working on my own as my non-profit employer can only afford one programmer at this time. Fun! Fun!
I have a many questions regarding the problem I've been given but here are just a few:
1. On a high level is creating data access component classes made up of DataAdapter objects, Command objects, and sql statements which are mapped to datasets and talk directly to my SQL Server 2000 database the proper way to constuct a DAL? If not where can I find instruction/examples on the proper way to construct the DAL?
2. What is the role of data access objects in OO design? Are these purely DAL components? Or if I have a domain class which potentially has a collection of records as an attribute is it alright to create this collection as a DataTable or an array of DataRows?
3. I'm probably completely off on #2, where can I find instruction/examples on the physical implementaion of OO model? I'm not understanding how I'm going to physically get data out of the DAL into my objects and then get that data out of my objects and presented to the GUI.
4. Currently, DataSet objects are instantiated in the aspx code behind pages and datatables, within the dataSet, are bound to controls like datagrids and datalists which works very nicely. How is this done when working with objects and collections of objects?
Sorry about the longwinded post, but I need someone to check my understanding before I go any further.
Any information is appreciated.
OJ
DB/.Net/CR Developer