One Service - Multiple Stores.Net makes it easy to share connections using ADO.Net and then persist the data in a DataSet on the server for delivery to the client. Imagine if you could load all the 'static' data fields on your page from one service in one call. If you look at the abstraction pattern outlined above, the answer is not obvious - but Ext JS makes it easy.

The pattern for using one service for deliver to several stores is only slightly different.

Register a function on the 'load' event for the first store. This function will load the data into the other stores.

Deliver data to the first store as above. Make sure to invoke the load() method.

Create your new record and reader definitions.

Retain a variable that points to the original data. The example here is for XML.

Use a Memory Proxy to load the existing data into a new store(s).

Registration for events is relatively simple. In the example below, I create a new combo object and pass the XMLData into the constructor of the object. This xmlData contains all the data for all the combos on my form.

Using this second technique, you only have to make one web service to load your combo boxes. On the server side, that means you only have to connect one time to the database for your static data. It also cuts down considerably on the code you have to write and maintain.

About Me

I am an independent technology consultant in the financial services industry.

I specialize in SQL optimization and data integration (SQL Server, ETL) supporting the front, middle and back-office operations in the Investment Management industry. I've been known to write web front-ends, but it's been a few years.

In my spare time I spend my time obsessing over iOS and Android software.