DAT305 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 Send feedback to Free but NOT SUPPORTED
Agenda Overview Setup Reuse built-in templates Write custom templates
Overview OlyMars 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 OlyMars 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
OlyMars Setup demo demo
Agenda Overview Setup Reuse built-in templates Write custom templates
Database What do we need next? Stored procedures… Table1 Table2 Table3 Table4 Written by hand
Stored procedures Database Insert Update Delete Select Generated Custom1 Custom2 Custom3 Written by hand Table1
Stored Procedures Generation demo demo
Stored procedures Database What do we need next? need next? ADO.NET classes able to call our stored procedures Insert Update Delete Select Generated Custom1 Custom2 Custom3 Written by hand Table1
ADO.NET Code Generation demo demo
DataClasses Database What do we need next? Windows and Web controls dedicated to our tables Generated Written by hand
Web controls Windows controls Database Table1 ComboBox ListBox CheckedListBox DataGrid ListBox DropDownList CheckBoxList DataGrid Repeater DataList Generated Written by hand
Web controls Windows controls Database ComboBox ListBox CheckedListBox DataGrid ListBox DropDownList CheckBoxList DataGrid Repeater DataList Generated Written by hand SP If it returns data
Web Forms Windows Forms Database Table1 Form Page Generated Written by hand SampleApplication
Whole Generation Using Batch Mode demo demo
Templates Supplied As Add-On Business Components TreeView Factory XML Web Services Object Space style.NET Compact Framework
How to import and use an add-on demo demo
Templates Supplied As Add-On Business Components TreeView Factory XML Web Services Object Space style.NET Compact Framework
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 TreeView Factory XML Web Services Object Space style.NET Compact Framework
TreeView Factory
Templates Supplied As Add-On Business Components TreeView Factory XML Web Services Object Space style.NET Compact Framework
SQLCE SQL Server OlyMars System.Data.SqlClient System.Data.SqlServerCe
Add-On:.NET Compact Framework demo demo
.NET Compact Framework SQLCE SQL Server OlyMars SPs SQL statements Single point of management Tables
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
IE ASP page IIS HTMLcontent
IE IIS HTMLcontent OlyMars Template Code You SQL File
OlyMars Repository Connection to the repository
OlyMars Repository Working DB Connection and analysis of your working database
OlyMars Repository In memory representation of working DB Working DB Once analyzed, a in-memory representation of the database is created
OlyMars Templates Repository In memory representation of working DB Working DB Templates are loaded in memory
OlyMars Templates Repository In memory representation of working DB Working DB This representation is supplied to the templates
OlyMars Templates Repository In memory representation of working DB Working DB Templates are then executed
OlyMars Templates Repository In memory representation of working DB Working DB SQLcode SQL code is directly executed on the working database
OlyMars Templates Repository In memory representation of working DB Disk File Working DB SQLcode Code is saved to a file
Writing Custom Templates demo demo
Extensions For OlyMars Write OlyMars extensions from Visual Studio.NET Run this batch file first: \ForExtensionsDevTimeOnly\Copy OlyMars DLL.bat Make a reference to SQLCodeGenDotNet.dll from your VS.NET projects
Extensions For OlyMars From your code, use the following namespaces Olymars.SqlDbScan Application Olymars.Executor Response Source
Writing Extensions For OlyMars demo demo
Add-Ins For OlyMars You can write your own add ins for OlyMars Make a reference to SQLCodeGenDotNet.dll from your project Create Class Library projects and add at least a public class implementing: Olymars.IOlymarsAddIn
Add-Ins For OlyMars
Writing Add-ins For OlyMars demo demo
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 Send feedback to Free but NOT SUPPORTED
Questions?
Community Resources Most Valuable Professional (MVP) Newsgroups Converse online with Microsoft Newsgroups, including Worldwide User Groups Meet and learn with your peers
evaluations evaluations
© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.