49
Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard [email protected] CodeSmith Tools, LLC

Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard [email protected] CodeSmith Tools, LLC Rob Howard [email protected] CodeSmith Tools,

Embed Size (px)

Citation preview

Page 1: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Tips & TricksTips and Tricks for CodeSmith 3.0Tips & TricksTips and Tricks for CodeSmith 3.0

Rob [email protected]

CodeSmith Tools, LLC

Rob [email protected]

CodeSmith Tools, LLC

Page 2: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

For More Information…For More Information…• Learn more• www.codesmithtools.com• Download free 30 day trial

• Contact Us• [email protected]• +1 972 407 0688

• CodeSmith & Telligent• Partnered together with a common goal:• “Build world-class software tools”

• Learn more• www.codesmithtools.com• Download free 30 day trial

• Contact Us• [email protected]• +1 972 407 0688

• CodeSmith & Telligent• Partnered together with a common goal:• “Build world-class software tools”

Page 3: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

AgendaAgenda• What is CodeSmith?

• Using CodeSmith 3.0

• Working with Data & XML

• Advanced Tips & Tricks

• Licensing & Pricing

• What is CodeSmith?

• Using CodeSmith 3.0

• Working with Data & XML

• Advanced Tips & Tricks

• Licensing & Pricing

Page 4: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

What is Code GenerationWhat is Code Generation• Software creation• Can be fun and challenging• …but also repetitive and monotonous• Repetition & monotony leads to bugs

• Code generation is not a new concept• With most tools you don’t control the output• Often viewed as a “Black Box” solution• Ex, data layer created (but it is not your code)

• CodeSmith 3.0• Not a “Black Box” solution• Template driven code generation (it is your code)• Use existing templates or write new ones

• Software creation• Can be fun and challenging• …but also repetitive and monotonous• Repetition & monotony leads to bugs

• Code generation is not a new concept• With most tools you don’t control the output• Often viewed as a “Black Box” solution• Ex, data layer created (but it is not your code)

• CodeSmith 3.0• Not a “Black Box” solution• Template driven code generation (it is your code)• Use existing templates or write new ones

Page 5: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

The value of CodeSmithThe value of CodeSmith• The cost of creating software• Design, Development, Test, Release• Easily runs between $50 - $300/hour

• CodeSmith• CodeSmith 3.0 Professional: $299• Equivalent to 3-6 hours of development

• Real value you can measure• Dramatically reduces project time & cost• Quickly pays for itself

• The cost of creating software• Design, Development, Test, Release• Easily runs between $50 - $300/hour

• CodeSmith• CodeSmith 3.0 Professional: $299• Equivalent to 3-6 hours of development

• Real value you can measure• Dramatically reduces project time & cost• Quickly pays for itself

Page 6: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Your code. Your way. Faster!Your code. Your way. Faster!• CodeSmith• Version 2.6, released January 2004• Version 3.0, released May 2005• Version 3.1, released August 2005

• CodeSmith 3.0 includes• CodeSmith Professional Studio (IDE)• Visual Studio .NET integration• Command line code generation engine• Base set of common templates

• CodeSmith• Version 2.6, released January 2004• Version 3.0, released May 2005• Version 3.1, released August 2005

• CodeSmith 3.0 includes• CodeSmith Professional Studio (IDE)• Visual Studio .NET integration• Command line code generation engine• Base set of common templates

Page 7: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

New in Version 3.0New in Version 3.0• Active Generation Templates• Statement Completion, AKA Intellisense™• Deep XML support• New merge strategies & preserve region• Easier template debugging• Template caching for faster execution• Event driven template architecture• Ability to auto-execute SQL scripts

…and much, much more

• Active Generation Templates• Statement Completion, AKA Intellisense™• Deep XML support• New merge strategies & preserve region• Easier template debugging• Template caching for faster execution• Event driven template architecture• Ability to auto-execute SQL scripts

…and much, much more

Page 8: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Customers include…Customers include…

…and many others…and many others

Page 9: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Using CodeSmith 3.0Using CodeSmith 3.0

Page 10: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

CodeSmith Professional StudioCodeSmith Professional Studio

• Integrated Development Environment• Editing and Executing templates• Template Explorer• Professional Edition only

• Features• Database schema browser• Template syntax highlighting• Template, Output, and Compilation views• Property editing

• Integrated Development Environment• Editing and Executing templates• Template Explorer• Professional Edition only

• Features• Database schema browser• Template syntax highlighting• Template, Output, and Compilation views• Property editing

Page 11: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

CodeSmith TemplatesCodeSmith Templates• Similar to ASP.NET page• CodeSmith Templates will be familiar• Event and <% %> code

• Template contains• Directives• Template logic (VB & C# code)• Output Text (your code, comments, etc.)• Template events, methods, and properties

• A CodeSmith template is• Document with .cst extension• Edit with CodeSmith Studio or text editor

• Similar to ASP.NET page• CodeSmith Templates will be familiar• Event and <% %> code

• Template contains• Directives• Template logic (VB & C# code)• Output Text (your code, comments, etc.)• Template events, methods, and properties

• A CodeSmith template is• Document with .cst extension• Edit with CodeSmith Studio or text editor

Page 12: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Statement CompletionStatement Completion• CodeSmith 2.6• Lacked Intellisense support• Required intimate knowledge of APIs

• CodeSmith 3.0• Full statement completion support• VB.NET and C#

• Intellisense• Makes you more productive• Reduces development time

• CodeSmith 2.6• Lacked Intellisense support• Required intimate knowledge of APIs

• CodeSmith 3.0• Full statement completion support• VB.NET and C#

• Intellisense• Makes you more productive• Reduces development time

Page 13: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

My First TemplateMy First Template

Page 14: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Visual Studio IntegrationVisual Studio Integration• Integrated with Visual Studio .NET• Automatically integrated during installation• “Visual Studio add-in”

• Using CodeSmith within Visual Studio .NET• Tools -> Add-in Manager• Tools -> CodeSmith Explorer

• Executing Templates in Visual Studio .NET• View templates in Template Explorer• Right-click to execute templates

• Integrated with Visual Studio .NET• Automatically integrated during installation• “Visual Studio add-in”

• Using CodeSmith within Visual Studio .NET• Tools -> Add-in Manager• Tools -> CodeSmith Explorer

• Executing Templates in Visual Studio .NET• View templates in Template Explorer• Right-click to execute templates

Page 15: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

CodeSmithExplorer

CodeSmithAdd-in

Page 16: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Visual Studio IntegrationVisual Studio Integration

Page 17: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Active & Passive GenerationActive & Passive Generation• Passive Generation• Use CodeSmith as “key stroke” saver• Render template and then use results• CodeSmith may or may not be used again

• Active Generation (Recommended)• Use template as source code• Whenever build project run template• Ex, write single template to generate 100s

of classes (or other files)

• Passive Generation• Use CodeSmith as “key stroke” saver• Render template and then use results• CodeSmith may or may not be used again

• Active Generation (Recommended)• Use template as source code• Whenever build project run template• Ex, write single template to generate 100s

of classes (or other files)

Page 18: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Active Generation TemplatesActive Generation Templates• Enabled through Visual Studio Custom Tool

• “Active Generation Templates”• Executed each time the input file changes• Perfect for Active Generation• Example: SampleProjects\CSharpCodeGeneratorSample

• Execute Active Generation Templates• Right-click hashtable.xml in VS .NET• Select ‘Run Custom Tool’• Renders multiple property sets for template• Any time xml file is touched templates are regenerated• Click on show all files to see hidden code files

• Enabled through Visual Studio Custom Tool• “Active Generation Templates”• Executed each time the input file changes• Perfect for Active Generation• Example: SampleProjects\CSharpCodeGeneratorSample

• Execute Active Generation Templates• Right-click hashtable.xml in VS .NET• Select ‘Run Custom Tool’• Renders multiple property sets for template• Any time xml file is touched templates are regenerated• Click on show all files to see hidden code files

Page 19: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Bound toCustom Tool

GeneratedSource File

GeneratedSource

Page 20: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Active Generation TemplateActive Generation Template

Page 21: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Working with Data & XMLWorking with Data & XML

Page 22: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Creating Data Access LayerCreating Data Access Layer• Stored Procedures (SPROC)• Preferred data access technique• Provides abstraction API for data access

• Create/Read/Update/Delete (CRUD)• Tedious to write (Equals more bugs)• Imagine manually creating for every table

• StoredProcedures.cst Template• Generates CRUD layer for any table• Created in seconds! …for all tables

• Stored Procedures (SPROC)• Preferred data access technique• Provides abstraction API for data access

• Create/Read/Update/Delete (CRUD)• Tedious to write (Equals more bugs)• Imagine manually creating for every table

• StoredProcedures.cst Template• Generates CRUD layer for any table• Created in seconds! …for all tables

Page 23: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Creating Data Access LayerCreating Data Access Layer

Page 24: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Auto SQL Script ExecutionAuto SQL Script Execution• Automatically update database• Generated SQL is automatically executed• Maintain entities in CodeSmith

• Updating template to update schema• Ex, Telligent used CodeSmith for VSIP• 100% template driven database layer

• Automatically update database• Generated SQL is automatically executed• Maintain entities in CodeSmith

• Updating template to update schema• Ex, Telligent used CodeSmith for VSIP• 100% template driven database layer

Page 25: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Script ExecutionScript Execution

Page 26: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Building Data Access APIsBuilding Data Access APIs• Data Access Layer• APIs for working with data APIs, e.g. sprocs• Typically monotonous repetitive code• Time consuming to code by hand

• Encourages Stored Procedures• Template generates typed wrapper• VB.NET and C#

• Enforces best practices• Open connection late, close early• Try/Catch blocks

• Data Access Layer• APIs for working with data APIs, e.g. sprocs• Typically monotonous repetitive code• Time consuming to code by hand

• Encourages Stored Procedures• Template generates typed wrapper• VB.NET and C#

• Enforces best practices• Open connection late, close early• Try/Catch blocks

Page 27: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Building Data Access APIsBuilding Data Access APIs

Page 28: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Building Data Access APIsBuilding Data Access APIs• AllCommandWrappers.cst Template• Point to a database• CodeSmith outputs all occurrences

• OutputDirectory• Default location for generated files• Configurable, e.g. “my project directory”

• Generate entire data layer• Can exclude stored procedures

• AllCommandWrappers.cst Template• Point to a database• CodeSmith outputs all occurrences

• OutputDirectory• Default location for generated files• Configurable, e.g. “my project directory”

• Generate entire data layer• Can exclude stored procedures

Page 29: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Building Data Access APIsBuilding Data Access APIs

Page 30: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Database DocumentationDatabase Documentation• DbDocumenter Templates (master.cst)• Set basic information and run batch file• Ex, database connection and title

• Great demo of CodeSmith capabilities• Simple repetitive problem• Would take weeks to create manually• Demonstrates CodeSmith “best practices”

• Additional ideas…• Modify templates to generate ASP.NET• Generate .CHM help files• Add execute capabilities, etc.

• DbDocumenter Templates (master.cst)• Set basic information and run batch file• Ex, database connection and title

• Great demo of CodeSmith capabilities• Simple repetitive problem• Would take weeks to create manually• Demonstrates CodeSmith “best practices”

• Additional ideas…• Modify templates to generate ASP.NET• Generate .CHM help files• Add execute capabilities, etc.

Page 31: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Database DocumentationDatabase Documentation

Page 32: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Working with XMLWorking with XML• New XmlProperty• Work with XML in a strongly typed manner• Using XML as metadata very easy

• With an XSD• Strongly typed accessory to XML file• Read-only access

• Without an XSD file• XmlDocument type returned

• New XmlProperty• Work with XML in a strongly typed manner• Using XML as metadata very easy

• With an XSD• Strongly typed accessory to XML file• Read-only access

• Without an XSD file• XmlDocument type returned

Page 33: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

XmlProperty DirectiveXmlProperty Directive

Page 34: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Advanced Tips & TricksAdvanced Tips & Tricks

Page 35: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Debugging TemplatesDebugging Templates• Set Debugger.Break() in code• Break-point in Template execution• .NET JIT Debugger window opens

• From .NET JIT Debugger window• Select Debug Tool• EX, Visual Studio .NET 2003

• Step through template source• Reports error in template directly• Most tools allow debugging of the result

• Set Debugger.Break() in code• Break-point in Template execution• .NET JIT Debugger window opens

• From .NET JIT Debugger window• Select Debug Tool• EX, Visual Studio .NET 2003

• Step through template source• Reports error in template directly• Most tools allow debugging of the result

Page 36: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Debugging Templates, contDebugging Templates, cont• Compilation is similar to ASP.NET• Occasionally template is not enough• Need the ability to examine source

• LinePragmas• Defined in <%@ CodeTemplate %>• Set to true or false

• Default to true• Reports line number in template• False, reports line number in generated code

• Compilation is similar to ASP.NET• Occasionally template is not enough• Need the ability to examine source

• LinePragmas• Defined in <%@ CodeTemplate %>• Set to true or false

• Default to true• Reports line number in template• False, reports line number in generated code

Page 37: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Debugging TemplatesDebugging Templates

Page 38: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Template Events & OverridesTemplate Events & Overrides• Initialization events• Called once when template is instantiated

• OnInit• Called once when template is instantiated• All other events are raised on each use

• ParseDefaultValue()• Allows for handling of type conversions• Called for every default value of a property

• GetFileName()• Override the default output file name

• Initialization events• Called once when template is instantiated

• OnInit• Called once when template is instantiated• All other events are raised on each use

• ParseDefaultValue()• Allows for handling of type conversions• Called for every default value of a property

• GetFileName()• Override the default output file name

Page 39: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Template Events & OverridesTemplate Events & Overrides• ‘Render’ events

• Similar in concept to ASP.NET events• Called each time template instance is rendered

• OnPreRender• Called before template rendering begins• Set up default state

• Render• If overridden takes over rendering process• Example, if you want a ‘master’ template

• OnPostRender• Called after template is executed• Contains string result of rendered template

• ‘Render’ events• Similar in concept to ASP.NET events• Called each time template instance is rendered

• OnPreRender• Called before template rendering begins• Set up default state

• Render• If overridden takes over rendering process• Example, if you want a ‘master’ template

• OnPostRender• Called after template is executed• Contains string result of rendered template

Page 40: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Template Events & OverridesTemplate Events & Overrides

Page 41: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Automated Build ProcessAutomated Build Process• Easily fit with your build environment• Constantly validate ability to build code• Example: NAnt, MSBuild

• CodeSmith Command line tool• Build project from command line• CodeSmith used for Active Generation• Easily integrated into environment

• Easily fit with your build environment• Constantly validate ability to build code• Example: NAnt, MSBuild

• CodeSmith Command line tool• Build project from command line• CodeSmith used for Active Generation• Easily integrated into environment

Page 42: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Command Line ToolCommand Line Tool• Console Application (cs.exe)• XML file identifying templates to run• Mirror Visual Studio Custom Tool behavior• Execute single template, or…• Execute batches of templates• Set properties via the Command Line

• Example usage:• SampleProjects\ConsoleSamples

• Use /batch:<file>

• Console Application (cs.exe)• XML file identifying templates to run• Mirror Visual Studio Custom Tool behavior• Execute single template, or…• Execute batches of templates• Set properties via the Command Line

• Example usage:• SampleProjects\ConsoleSamples

• Use /batch:<file>

cs.exe /batch:BatchModeSample.xml

Page 43: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Batch Generation File FormatBatch Generation File Format• <defaultTemplate/>• Default template used to generate output• Can be overridden in <propertySet/>

• <variables/>• Metadata used in property definitions

• <defaultProperties/>• Define global properties

• <propertySet/>• Serialized representation of template properties

• <defaultTemplate/>• Default template used to generate output• Can be overridden in <propertySet/>

• <variables/>• Metadata used in property definitions

• <defaultProperties/>• Define global properties

• <propertySet/>• Serialized representation of template properties

Page 44: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Batch GenerationBatch Generation

Page 45: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Merge StrategiesMerge Strategies• Enable Active Generation• Can’t always generate exactly what you

need• Custom logic along with Active Generation

• Example• SampleProjects\ConsoleSamples• PreserveRegionsMergeSample.cst

• Enable Active Generation• Can’t always generate exactly what you

need• Custom logic along with Active Generation

• Example• SampleProjects\ConsoleSamples• PreserveRegionsMergeSample.cst

Page 46: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Merge StrategiesMerge Strategies

Page 47: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

LicensingLicensing• CodeSmith 2.6• Standard Edition was free• Professional Edition: $79

• CodeSmith 3.0• Upgrade from 2.6 to 3.0 Professional: $49• Standard Edition: $49• Professional Edition: $299

• Support Options• Community Support codesmithtools.com• Premier / Incident support: $99

• CodeSmith 2.6• Standard Edition was free• Professional Edition: $79

• CodeSmith 3.0• Upgrade from 2.6 to 3.0 Professional: $49• Standard Edition: $49• Professional Edition: $299

• Support Options• Community Support codesmithtools.com• Premier / Incident support: $99

Page 48: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

ConclusionConclusion• CodeSmith 3.0• Most powerful code generation tool available• Reduces time spent writing trivial code

• Be more productive• Template driven means it’s still your code• Saves you time and money

• Coming soon: CodeSmith 3.1• Minor bug fix, etc. release• Includes updated product documentation

• CodeSmith 3.0• Most powerful code generation tool available• Reduces time spent writing trivial code

• Be more productive• Template driven means it’s still your code• Saves you time and money

• Coming soon: CodeSmith 3.1• Minor bug fix, etc. release• Includes updated product documentation

Page 49: Tips & Tricks Tips and Tricks for CodeSmith 3.0 Rob Howard rhoward@telligent.com CodeSmith Tools, LLC Rob Howard rhoward@telligent.com CodeSmith Tools,

Learn more• www.codesmithtools.com• Download free 30 day trial

Learn more• www.codesmithtools.com• Download free 30 day trial

Contact Us• [email protected]• +1 972 407 0688

Contact Us• [email protected]• +1 972 407 0688