The Microsoft Office Lists Producer produces a web service that emulates the SharePoint synchronizable lists feature. The web service emulates a SharePoint server so that the synchronizable list feature available in clients such as Microsoft Excel 2003/2007 and Microsoft Access 2007 can be used. Furthermore, the Microsoft Office Lists Producer produces a ASP.NET web site containing all generated lists, so that one can click on one of them to open them in one their Office client (Excel 2003/2007 or Access 2007).
From a designed CodeFluent Model, CodeFluent will create a meta-model thanks to its CodeFluent Meta Model Engine, and then Office Lists Producer will translate the platform independent meta-model into synchronizable lists.
At this step platform independent concept such as views will become a platform specific notion, which in this case will be an Office synchronizable list. Moreover, the generated components are a 100% functional, once generated and correctly configured, the web service containing the lists and its web site are 100% functional: they do not require a single extra line of code to compile.
The Office Lists web service is based on the Business Object Model (BOM) generated earlier, and allows end-users to consume their own information system (their custom database layer, and their BOM containing all defined business rules) from familiar interfaces such as Excel.
Wether you're aiming an Excel application or an Access application, the production configuration will be the same. However, deployment for Access application introduces a little difference: the generated files must be at the root of their Internet Information Services (IIS) which isn't required when consumed by Excel clients.
Here's an example generating a sample Office Lists web service and its web site consumable by an Excel application.
Example
This example demonstrates how to configure the Microsoft Office Lists producer with the following properties :
-
targetDirectory: ..\Generated\OfficeWebService
-
outputName: {0}.Office.Web.Services.dll
-
sourceDirectory: %CF_TEMPLATES_PATH%\OfficeWebService
-
webSiteSourceDirectory: %CF_TEMPLATES_PATH%\OfficeWebSite
-
webServicePhysicalRootPath: ..\Generated\OfficeWebService
-
webServiceVirtualRootName: {0}.OfficeWS
| Model | Copy Code |
|---|---|
<cf:project xmlns:cf="http://www.softfluent.com/codefluent/2005/1" defaultNamespace="CodeFluent"> <!-- Microsoft SQL Server Producer --> <cf:producer name="Microsoft SQL Server Producer" typeName="CodeFluent.Producers.SqlServer.SqlServerProducer, CodeFluent.Producers.SqlServer"> <cf:configuration connectionString="Server=localhost;Database=CodeFluent;Integrated Security=true" targetDirectory="..\Generated\Sql" produceViews="true" /> </cf:producer> <!-- Business Object Model Producer --> <cf:producer name="BOM Producer" typeName="CodeFluent.Producers.CodeDom.CodeDomProducer, CodeFluent.Producers.CodeDom"> <cf:configuration targetDirectory="..\Generated\Model" outputName="{0}.dll" /> </cf:producer> <!-- Microsoft Office Lists Producer --> <cf:producer name="Microsoft Office Lists Producer" typeName="CodeFluent.Producers.Office.ListProducer, CodeFluent.Producers.Office"> <cf:configuration targetDirectory="..\Generated\OfficeWebService" outputName="{0}.Office.Web.Services.dll" sourceDirectory="%CF_TEMPLATES_PATH%\OfficeWebService" webSiteSourceDirectory="%CF_TEMPLATES_PATH%\OfficeWebSite" webServicePhysicalRootPath="..\Generated\OfficeWebService" webServiceVirtualRootName="{0}.OfficeWS" /> </cf:producer> <!-- Entities --> <Employee> <Id /> <FirstName /> <LastName /> <BirthDate /> <Address typeName="Address" /> <cf:view name="Custom"> <FirstName /> <LastName /> <Address/> </cf:view> </Employee> <Address> <Id /> <Line1 /> <Line2 /> <Zip /> <City /> <Country /> <FullName computed="true" cfom:computedFormat="{Line1}, {Zip} {City}, {Country}" entityDisplay="true"/> </Address> </cf:project> |
|
MMicrosoft Office Lists Layer Output
The Microsoft Office Lists producer has generated a lists.aspx page with sections containing two views for the LoadAll and LoadByAddress methods of Employee entity, the Default view and the Custom View.
If you open the Custom link of the Employee/LoadAll method, you will load the corresponding Office list in a new Microsoft Excel workbook. To synchronize with data from the database, select the table and execute the Synchronize with SharePoint command from the table context menu.
If later you want to have a direct access to this Custom view of the Employee entity, you just have to save the workbook in the Microsoft Excel 2003 format.

