I work for a company that develops a very large scale data based application. The application was first created around ten years ago and as such, is in desperate need of an upgrade. I have been given the task of investigating and implementing the data layer upgrade.
At present, it uses a system with business objects that are all based on/extend DataRow
objects, that is - each object more or less relates to one row in a database. The application is NOT currently object oriented, but this causes many problems and we want to move in the OO direction.
So we are looking to start using the .NET `Entity Framework' and create an .edmx file. The idea is simply to drag all of the SQL database tables onto the .edmx designer and let it create its related data objects.
Now in my mind (as an OO developer), I was planning to manually create new business objects and populate them from the .edmx generated data objects returned from queries in the new data layer. This would allow the simple separation of the various layers using an interface.
The problem is that the boss says that there is not enough time to rewrite the hundred or so business object classes and he suggests using the .edmx generated data objects throughout the whole application.
Every thought in my mind says 'no... don't create that coupling between the data layer and the whole system', but the boss says that he has seen articles online promoting this.
So my questions for you guys are these: (please provide valid reasons for your answers to 1 and 2)
Is this a viable solution (even short term)?
Is there a better/alternative solution to creating separate business objects from the generated data objects?
Is there a better/easier way to create separate business objects from the generated data objects rather than manually copying and pasting?
I understand that these questions are somewhat subjective, but I've provided as much specific information as possible and I could really do with some advice on the subject.