ComponentOne WebData for ASP.NET:Using WebDataObjects for ASP.NET Components > Enterprise Edition Components

Enterprise Edition Components

There are two Web components for Enterprise edition: C1WebDataSet and C1WebSchemaDef. Using C1WebDataSet on a Web page enables the Web functionality enhancement such as automatic caching. C1WebSchemaDef hosts a Schema object that is the basis of a direct client configuration in ASP.NET 2.0 projects.

In direct client configuration, you connect C1WebDataSet to a C1SchemaDef component representing a data schema residing on the same Web page with your data set.

In a data library configuration, which is the standard way to use C1DataObjects, you build your data library regardless of whether it will be used in WinForms or in WebForms. The data library contains data description and business logic code. Both are used in WinForms and WebForms, usually without any change. The ability to specify business logic independently and then use it in WebForms and in WinForms, using the same data library assembly, is a powerful feature of C1WebDataObjects.

Since a data library is the same for WinForms and WebForms, you can use the standard C1SchemaDef component in your data library. However, C1DataObjects includes special property settings in the data schema, accessible in the Schema Designer, for tuning caching behavior. These settings are only active when the data library is used with C1WebDataObjects. You can see the CacheProperties object with tuning properties on the Properties tab of a DataSet Editor in the Schema Designer. These are the settings on data set level. There is also a Boolean property on table view level, MemoryResident that allows you to make individual read-only table views pre-fetched and resident in memory. Finally, there is a SessionCacheProperties object accessible as a property of C1SchemaDef, that you can use to set default argument values for session cache method calls.

In direct client configuration, you also use C1SchemaDef with the same cache settings in the schema and in the C1SchemaDef component. Use this configuration only if you don't need to reuse the schema and logic and decide to put it on a Web page together with C1WebDataSet. Consider creating a data library if there is a chance your business logic will be reused on more than one page or with different clients, such as WinForms.

To make caching work properly, you need to include some code, certain method calls, usually very simple, in your Web page.  These methods are static members of two classes, GlobalCache and SessionCache. These two classes have no instantiated objects, they are just collections of static methods (functions) that you use to control the cache.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.