Are your Data Access Layers compatible with Web Services?

Last updated by Brady Stroud [SSW] about 1 month ago.See history

Data Access Layers should support not only direct connections to SQL Server but also connections through web services.

Many applications are designed for use with a database connection only. As users decide to take the application some where else away from the database, the need for web services arises.

timepronetoptionsconnection 1711074081216
Figure: Good example - Options form showing choice of connection

There are 3 ways to implement this:

  1. Lots of if statements (really messy - most people try this first)
  2. Interfaces (implements statement in VB)
  3. Factory pattern (✅ best - most flexible and extensible approach)

All database applications should be web services ready as the future direction is to use web services only, because even locally a web service connection is not much slower than direct connection. The performance difference shouldn't be substantial enough to require a double code base.

Adam Cogan
We open source. Powered by GitHub