Chapter 12. Databases and web services

 

This chapter covers

  • Using ADO.NET to work with databases
  • Interacting with SOAP and REST web services
  • Creating a REST web service

So far in the book we’ve concentrated on creating fairly self-contained applications; most data storage has been in the form of text or XML files. For a lot of tasks this can be sufficient, but often the data your application will be manipulating lives somewhere else: maybe in a relational database or behind a web service. One application I (Christian) worked on was part of a flight-planning system; weather maps and forecasts that the application needed were managed by another system accessible through a separate web service, while user preferences and details were stored in a local SQL Server database.

In this chapter we look at some of the techniques we can use to get access to this data. To start with, we cover the base API that the .NET framework provides for talking to different relational databases, followed by the higher-level classes that can be layered on top for slicing and dicing data in your application. Then we see how we can interact with different types of web services from IronPython.

12.1. Relational databases and ADO.NET

12.2. Web services

12.3. Summary