开发者

Mixing Modern Data Access in Legacy App

What do you think of using modern data access technologies in legacy apps? Not replacing the data access layer with a new layer, but having a mix of data access methods in the same layer.

Say the current Data Access Layer in my legacy app uses DataSet, SQLDataAdapter, SQLCommand and Stored Proc t开发者_如何学Co access data from the database.

Are there any real reasons not to include Linq to SQL (dbml) or Entity Framework classes (edmx) classes in the DAL? Is there any harm in having a mix of Data Access Methods in the DAL, or in the same class?


Generally there is no harm but unless you plan to do slow upgrade by replacing parts of legacy application when doing new development I would not do it. It will make the whole application like one big mess of many technologies, it will have worse maintenance and it can also mess its design / architecture.

The exception can be implementing new component of the application which is isolated from the rest. In such case you can probably design it from scratch and use newer technology but for support / maintenance team it can still be nuisance.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜