Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><em>Please note that I do not, by any stretch, consider myself an expert on this matter. But I hope these musings are of some use. These are based on my own experience.</em></p> <p>You could do this by having two implementations of your data access layer (DAL).</p> <p>Define a single generic interface between your business layer and your DAL.</p> <p>Create one implementation of the DAL which talks to the database.</p> <p>Create one implementation of the DAL which talks to the web service.</p> <p>Both of these will implement your generic interface such that the business layer (BL) need not know which DAL is currently being used. Obviously there is some special logic required to handle connections between the application and one of the DALs. This may reside in a special layer in between the DAL and the BL, or in a cross-cutting layer (e.g. the communications layer).</p> <p>It might be more practical for you to gear your interface more towards one implementation or the other. If this is the case, you'll probably have to adapt the lesser-implementation to the interface. To do this while keeping the actual implementation of the lesser layer loosely coupled, you would use the adapter pattern.</p> <p>Further considerations: maybe you would like your DAL implementations to be re-usable. Essentially they become APIs in their own right. In this case you'd design them to a relatively non-specific public interface. Now the DAL dictates its interface to the consumer (your application), instead of vice-versa.</p> <p>Aside from that it's straight-forward layering and abstraction. Here is a downloadable Microsoft publication on application architecture (which I've just started reading): <a href="http://msdn.microsoft.com/en-us/library/ff650706.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ff650706.aspx</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload