PowerPoint Presentation
Upcoming SlideShare
Loading in...5
×
 

PowerPoint Presentation

on

  • 574 views

 

Statistics

Views

Total Views
574
Slideshare-icon Views on SlideShare
574
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    PowerPoint Presentation PowerPoint Presentation Presentation Transcript

    • Code Generation using Templates An Introduction
    • TMR Management, Inc. Overview
    • About TMR MGI
      • Local Company
        • A Women Business Enterprise (WBE) and Minority Business Enterprise
        • Founded in 2001 with continued growth
        • Headquartered in Harrisburg, PA
        • Approved in ITQ
        • Consistent track record of success in delivering mission critical projects in emerging technologies
        • Specialized in implementing CMM process and execution at Level 3
        • Specialized in implementing ITIL and BS799 process
        • Experienced in engaging quality consulting resource
    • Services We Provide
      • Enterprise Migration Services
      • Application Architecture & Engineering Services
      • Business Intelligence Reporting
      • IV&V and Team Mentoring Services
      • Professional Staffing Services
        • SAP HR
        • Mainframe support
    • Today’s Agenda
      • How to Increase Efficiency and Minimize Errors by code generation on .NET Projects
        • What is code generation
        • Benefit on the project
        • Demo of CODESMITH
          • To create web services (ASMX)
          • To create web services (WCF – both REST AND NON-REST style)
        • Template
          • How to create/edit
        • Different tools and Open source tools
        • CODESMITH – NON CODE generation use
        • Questions / Answers
    • Why we need?
      • Code Generation – CG
      • Are we Lazy?
      • Are we SMART?
      • Or…?
      • Why we need code generation?
      • Are we using it without knowing it?
        • Let us talk about some examples we know
    • Why….?
      • The two main constants in software engineering are:
      • Programmers’ time is valuable.
      • Programmers don’t like repetitive, boring tasks
      • Code generation takes over the task of writing repetitive infrastructure code, leaving more time for engineers to concentrate on the interesting programming challenges that they do enjoy.
      • Code generation doesn’t just eliminate grunt work; it provides benefits to the software engineering lifecycle
    • What is CG any way?
      • Code generation is any way you create code other than writing it line by line in an editor.
      • Code generation is about writing programs that write programs
      • when one can work smarter rather than harder
      • < template > + < metadata > = < generated code >
      • Focusing on the big picture, one can build better solutions.
    • Benefits
        • Productivity
        • Quality
        • Consistency
        • Abstraction
        • A single point of knowledge
        • More design time
        • Design decisions that stand out
        • Architectural consistency
        • High morale
        • Agile development
        • Efficiency
        • Minimize Errors
        • Standardization
        • Code Documentation
      APPLICATION CODE GENERATION REVOLUTIONIZES the way one writes program/code
    • Objective
      • Build a higher quality application faster
      • Ready for changes during development and throughout the application life cycle.
      • Provides this level of software agility at the same time it allows you to create massive amounts of code.
    • Top 10 Code Generation Rules
      • Give the proper respect to hand-coding
      • Handwrite the code first
      • Control the source code
      • Make a considered decision about the implementation language
      • Integrate the generator into the development process
      • Include warnings
      • Make it friendly
      • Include documentation
      • Keep in mind that generation is a cultural issue
      • Maintain the generator
    • Principles for CG
      • 5 Principles - non-negotiable for code generation:
      • Principle #1 :
        • You have control of the templates that generate your code and can change or replace them as required.
      • Principle #2 :
        • You collect metadata as a separate, distinct step with usable output that can independently evolve.
      • Principle #3 : You, or someone unfamiliar with project, can regenerate
        • your code precisely as a one-click process—now or at any point in the future.
      • Principle #4 : You embrace handcrafted code by isolating and protecting it.
        • Code generation is a supporting player to human programming and doesn’t overwrite files unless they were generated and haven’t been edited.
      • Principle #5 :
        • The code-generated application is a high-quality application. It allows more effective testing, has equal or better performance, and is more easily maintained than a similar fully handcrafted application.
    • Steps in CG
      • 5 steps are as follows:
      • Design architecture.
      • Collect metadata.
      • Build and run templates.
      • Handcraft code.
      • Tie it together with integration and testing.
    • Code Category
      • Several types of handcrafted code:
      • Startup
      • Exception reporting
      • Components
      • Utility methods
      • Base class functionality
      • Debug support
      • Code with insufficient, inconsistent, or interspersed patterns
      • Class-specific code
    • Other Examples
      • T4 (Text Template Transformation Toolkit) - the code generation engine used as part of Domain Specific Languages and Software Factories projects. With the T4 toolkit now built directly into Visual Studio 2008, you can easily add code generation to your arsenal
      • http://www.codegeneration.net
      • Microsoft Entity Framework - .NET 3.5 SP1
      • www.mygenerationsoftware.com       
      • Software Factories – SCSF, WSSF etc.
      • Microsoft Blueprints
      • Class Library project and a class that implements the IDTWizard interface in VS2008
    • What is CodeSmith Anyway….!
      • CodeSmith is a software development tool to help you get your job done faster. Technically speaking it is a template driven source code generator that automates the creation of common application source code for any language (C#, Java, VB, PHP, ASP.NET, SQL, etc.).
      • CodeSmith's syntax is almost identical to ASP.NET. So if you are familiar with ASP.NET then you should be able to quickly learn the template syntax. You can use the C#, VB.NET or JScript.NET languages in your templates and your templates can output any ASCII-based language.
    • What is CodeSmith Anyway….!
      • Note from Microsoft Contact:
        • “ I have several clients that have used CodeSmith in the past with great success.  We even have some internal projects here at Microsoft that have utilized it for non-shipping code. Feel free to mention that even Microsoft has used it & you received a note from a contact too on this topic on being used in industry.“