DAT 305 Boost Your DataDriven Application Development Using
DAT 305 Boost Your Data-Driven Application Development Using SQL Server Centric. NET Code Generator Pascal Belaud Microsoft France
Questions & evaluation Form Please keep all your questions for the end of this session or after this session Thanks to fill out the evaluation form (you have only one hour after the session to do so) and WIN A POCKET PC It helps us improve our session content and delivery
Agenda Overview Setup Reuse built-in templates Write custom templates
Resources Web Site http: //www. microsoft. com/france/msdn/olymars Send feedback to olyfeed@microsoft. com Free but NOT SUPPORTED
Agenda Overview Setup Reuse built-in templates Write custom templates
Overview Oly. Mars stands for Olympique de Marseille SQL Server Centric. NET Code Generator is the marketing name Project started in Mars 2001 Help you switch more quickly and more easily to SQL Server 2000 and. NET
Overview Oly. Mars was developed on. NET (C#) Two ways of considering this tool Comes with 200+ built-in templates Supplies a framework for intensive code generation Relies on a SQL Server 2000 database Was built using itself! 56% of the tool code was generated (168, 288 total lines – 94, 313 generated lines)
Agenda Overview Setup Reuse built-in templates Write custom templates
demo Oly. Mars Setup
Agenda Overview Setup Reuse built-in templates Write custom templates
Table 1 What do we need next? Table 2 Stored procedures… Database Table 3 Table 4 Written by hand
Stored procedures Insert Update Table 1 Delete Select Database Custom 1 Custom 2 Custom 3 Generated Written by hand
demo Stored Procedures Generation
Stored procedures Insert Update Table 1 Delete Select Database Custom 1 What do we need next? ADO. NET classes able to call our stored procedures Custom 2 Custom 3 Generated Written by hand
demo ADO. NET Code Generation
Generated Written by hand Data Classes What do we need next? Database Windows and Web controls dedicated to our tables
Generated Windows controls Written by hand Combo. Box List. Box Checked. List. Box Table 1 Data. Grid Web controls List. Box Database Drop. Down. List Check. Box. List Repeater Data. List Data. Grid
Generated Windows controls Written by hand Combo. Box If it returns data SP List. Box Checked. List. Box Data. Grid Web controls List. Box Database Drop. Down. List Check. Box. List Repeater Data. List Data. Grid
Generated Written by hand Windows Form Table 1 Sample Application Database Web Forms Page
demo Whole Generation Using Batch Mode
Templates Supplied As Add-On Business Components Tree. View Factory XML Web Services Object Space style. NET Compact Framework
demo How to import and use an add-on
Templates Supplied As Add-On Business Components Tree. View Factory XML Web Services Object Space style. NET Compact Framework
Business Components
Business Components Browsing a collection of products: Updating an existing product
Business Components Adding a new product: Deleting an existing product
Templates Supplied As Add-On Business Components Tree. View Factory XML Web Services Object Space style. NET Compact Framework
Tree. View Factory
Templates Supplied As Add-On Business Components Tree. View Factory XML Web Services Object Space style. NET Compact Framework
. NET Compact Framework System. Data. Sql. Client SQL Server Oly. Mars System. Data. Sql. Server. Ce SQLCE
demo Add-On: . NET Compact Framework
. NET Compact Framework Oly. Mars Single point of management SPs SQL Server es l b a T SQLCE SQL statements
Agenda Overview Setup Reuse built-in templates Write custom templates
Write Custom Templates Allow you to extend the tool You can reuse part or none of the built-in templates and write your own Can reflect more accurately your internal development guidelines
HTML content IIS IE ASP page
HTML Code content Oly. Mars IIS You IE Template ASP page SQL File
Repository Connection to the repository Oly. Mars
Repository Oly. Mars Connection and analysis of your working database Working DB
Repository Oly. Mars In memory representation of working DB Once analyzed, a in-memory representation of the database is created Working DB
Repository In memory representation of working DB Templates are loaded in memory Templates Oly. Mars Working DB
Repository This representation is supplied to the templates In memory representation of working DB Templates Oly. Mars Working DB
Repository In memory representation of working DB Templates Oly. Mars Templates are then executed Working DB
Repository In memory representation of working DB Templates Oly. Mars SQL code Working DB SQL code is directly executed on the working database
Repository In memory representation of working DB Templates Oly. Mars SQL code Code is saved to a file Working DB File Disk
demo Writing Custom Templates
Extensions For Oly. Mars Write Oly. Mars extensions from Visual Studio. NET Run this batch file first: For. Extensions. Dev. Time. OnlyCopy Oly. Mars DLL. bat Make a reference to SQLCode. Gen. Dot. Net. dll from your VS. NET projects
Extensions For Oly. Mars From your code, use the following namespaces Olymars. Sql. Db. Scan Application Olymars. Executor Response Source
demo Writing Extensions For Oly. Mars
Add-Ins For Oly. Mars You can write your own add ins for Oly. Mars Make a reference to SQLCode. Gen. Dot. Net. dll from your project Create Class Library projects and add at least a public class implementing: Olymars. IOlymars. Add. In
Add-Ins For Oly. Mars
demo Writing Add-ins For Oly. Mars
Next Steps Give this tool a try Look at the code that is generated by default Write your own templates Extend the tool with your own extensions and add-ins
Resources Web Site http: //www. microsoft. com/france/msdn/olymars Send feedback to olyfeed@microsoft. com Free but NOT SUPPORTED
Questions?
Community Resources http: //www. microsoft. com/communities/default. mspx Most Valuable Professional (MVP) http: //www. mvp. support. microsoft. com/ Newsgroups Converse online with Microsoft Newsgroups, including Worldwide http: //www. microsoft. com/communities/newsgroups/default. mspx User Groups Meet and learn with your peers http: //www. microsoft. com/communities/usergroups/default. mspx
evaluations
© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.
- Slides: 57