Dissecting a Sample Component

One of the most common services that components are called on to provide is data access. Databases make ideal work for components for several reasons, including the following:

  • Databases require extraneous details.

    This information (connection strings, field names, and so on) can complicate application logic. A well-written component encapsulates these details.

  • Databases are always in demand.

    A typical application might call a database several times for different pieces of information. Placing this code in a database component ensures that the connection and querying details are handled in a consistent manner rather than copied to every corner of your code.

  • Relational databases aren’t object-oriented.

    However, components ...

Get Microsoft® .NET Distributed Applications: Integrating XML Web Services and .NET Remoting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.