DAT305 Boost Your Data-Driven Application Development Using SQL Server Centric.NET Code Generator...
-
Upload
willa-glenn -
Category
Documents
-
view
214 -
download
0
Transcript of DAT305 Boost Your Data-Driven Application Development Using SQL Server Centric.NET Code Generator...
DAT305Boost Your Data-Driven Application Development Using SQL Server Centric .NET Code Generator
Pascal BelaudMicrosoft 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 Sitehttp://www.microsoft.com/france/msdn/olymars
Send feedback [email protected]
Free but NOT SUPPORTED
Agenda
Overview
Setup
Reuse built-in templates
Write custom templates
OverviewOlyMars 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 toolComes 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
demodemo
Agenda
Overview
Setup
Reuse built-in templates
Write custom templates
DatabaseDatabase
What do we need next?What do we need next?
Stored procedures…Stored procedures…
Table1Table1
Table2Table2
Table3Table3
Table4Table4
Written by handWritten by hand
Stored proceduresStored procedures
DatabaseDatabase
InsertInsert
UpdateUpdate
DeleteDelete
SelectSelect
GeneratedGenerated
Custom1Custom1
Custom2Custom2
Custom3Custom3
Written by handWritten by hand
Table1Table1
Stored Procedures Generation
demodemo
Stored proceduresStored procedures
DatabaseDatabase
What do weWhat do we need next?need next?
ADO .NET classesADO .NET classesable to call our able to call our stored proceduresstored procedures
InsertInsert
UpdateUpdate
DeleteDelete
SelectSelect
GeneratedGenerated
Custom1Custom1
Custom2Custom2
Custom3Custom3
Written by handWritten by hand
Table1Table1
ADO .NET Code Generation
demodemo
DataDataClassesClasses
DatabaseDatabase
What do we need next?What do we need next?
Windows and WebWindows and Webcontrols dedicatedcontrols dedicatedto our tablesto our tables
GeneratedGenerated
Written by handWritten by hand
Web controlsWeb controls
Windows controlsWindows controls
DatabaseDatabase
Table1Table1
ComboBoxComboBoxListBoxListBox
CheckedListBoxCheckedListBox
DataGridDataGrid
ListBoxListBox
DropDownListDropDownList
CheckBoxListCheckBoxListDataGridDataGrid
RepeaterRepeater
DataListDataList
GeneratedGenerated
Written by handWritten by hand
Web controlsWeb controls
Windows controlsWindows controls
DatabaseDatabase
ComboBoxComboBoxListBoxListBox
CheckedListBoxCheckedListBox
DataGridDataGrid
ListBoxListBox
DropDownListDropDownList
CheckBoxListCheckBoxListDataGridDataGrid
RepeaterRepeater
DataListDataList
GeneratedGenerated
Written by handWritten by hand
SPSP
If it returnsIf it returnsdatadata
Web FormsWeb Forms
Windows FormsWindows Forms
DatabaseDatabase
Table1Table1
FormForm
PagePage
GeneratedGenerated
Written by handWritten by hand
SampleSampleApplicationApplication
Whole Generation Using Batch Mode
demodemo
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
demodemo
Templates Supplied As Add-On
Business Components
TreeView Factory
XML Web Services
Object Space style
.NET Compact Framework
Business Components
Business ComponentsBrowsing a collection of products:
Updating an existing product
Business ComponentsAdding 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
.NET Compact Framework
SQLCESQLCE
SQL ServerSQL Server
OlyMarsOlyMars
System.DataSystem.Data.SqlClient.SqlClient
System.DataSystem.Data.SqlServerCe.SqlServerCe
Add-On:.NET Compact Framework
demodemo
.NET Compact Framework
SQLCESQLCE
SQL ServerSQL Server
OlyMarsOlyMars
SPsSPs
SQL statementsSQL statements
Single point ofSingle point ofmanagementmanagement
Tables
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
IEIE ASP pageASP page
IISIIS
HTMLHTMLcontentcontent
IEIE ASP pageASP page
IISIIS
HTMLHTMLcontentcontent
OlyMarsOlyMars
TemplateTemplate
CodeCode
YouYou
SQLSQL
FileFile
OlyMarsOlyMars
RepositoryRepository
ConnectionConnectionto the repositoryto the repository
OlyMarsOlyMars
RepositoryRepository
Working DBWorking DB
Connection andConnection andanalysis of youranalysis of your
working databaseworking database
OlyMarsOlyMars
RepositoryRepository In memoryIn memoryrepresentation ofrepresentation of
working DBworking DB
Working DBWorking DB
Once analyzed, a in-memoryOnce analyzed, a in-memoryrepresentation of the databaserepresentation of the database
is createdis created
OlyMarsOlyMars TemplatesTemplates
RepositoryRepository In memoryIn memoryrepresentation ofrepresentation of
working DBworking DB
Working DBWorking DB
Templates are loadedTemplates are loadedin memoryin memory
OlyMarsOlyMars TemplatesTemplates
RepositoryRepository In memoryIn memoryrepresentation ofrepresentation of
working DBworking DB
Working DBWorking DB
This representation isThis representation issupplied to the templatessupplied to the templates
OlyMarsOlyMars TemplatesTemplates
RepositoryRepository In memoryIn memoryrepresentation ofrepresentation of
working DBworking DB
Working DBWorking DB
Templates areTemplates arethen executedthen executed
OlyMarsOlyMars TemplatesTemplates
RepositoryRepository In memoryIn memoryrepresentation ofrepresentation of
working DBworking DB
Working DBWorking DB
SQLSQLcodecode SQL code is directlySQL code is directly
executed on the workingexecuted on the workingdatabasedatabase
OlyMarsOlyMars TemplatesTemplates
RepositoryRepository In memoryIn memoryrepresentation ofrepresentation of
working DBworking DB
DiskDisk
FileFile
Working DBWorking DB
SQLSQLcodecode
Code is savedCode is savedto a fileto a file
Writing Custom Templates
demodemo
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.SqlDbScanApplication
Olymars.ExecutorResponse
Source
Writing Extensions For OlyMars
demodemo
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
demodemo
Next StepsNext 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 Sitehttp://www.microsoft.com/france/msdn/olymars
Send feedback [email protected]
Free but NOT SUPPORTED
Questions?
Community Resources
Community Resourceshttp://www.microsoft.com/communities/default.mspx
Most Valuable Professional (MVP)http://www.mvp.support.microsoft.com/
NewsgroupsConverse online with Microsoft Newsgroups, including Worldwidehttp://www.microsoft.com/communities/newsgroups/default.mspx
User GroupsMeet and learn with your peershttp://www.microsoft.com/communities/usergroups/default.mspx
evaluationsevaluations
© 2003 Microsoft Corporation. All rights reserved.© 2003 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.