…on LinkedIn

ASP Ajax vs j-Query for UI development

How to develop an application from scratch using Design Patterns and Best Practices

Interview on MVVM

What would be best way of combining several different data sources for your program?

What’s the best way to persist ‘logged in user’ information?

When to use dependency injection

en

What would be best way of combining several different data sources for your program?

[ James Henderson | C# Developers / Architects ]

I would isolate the Data Repository Layer (DRL) from the Data Access Layer (DAL). DRL would be responsible to integrate/aggregate data (from various sources) according to the business needs, scenarios and/or models.

From these isolated repository objects, I would call some specialized DRL objects which – with the use of Unit of Works and atomic, code-based transactions – would [1] orchestrate the appropriate DAL’s data objects calls; [2] assuring DRL data sync, correctness and integrity.

This way, Hibernate and/or Entity Framework (EF) would still reside in the DAL, Separation of Concerns (SoC) would be addressed, and other concerns (such as security, encryption etc.) would be modeled (added, plugged?) as required. And, of course, I would never let business and/or UI objects access DAL directly, but only through DRL.

So, summing: for the proposed scenario, DRL would be the new DAL – which should be encapsulated by the model, and transparent to business and UI objects.

Capparelli [ mar 2014 ]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: