in

CodeSmith Community

Your Code. Your Way. Faster!

External

June 2007 - Posts

  • IBatisNetGen -- CodeSmith template for IBatis.NET

    IBatisNetGen generates IBatisNet SQL mapping file and a group of CSharp classes from a database table.

    Output for each database table
    • Entity, the C# class that represents a database record.
    • DaoIntf, the C# DAO interface contains a group of data manipulation methods, such as:
      • GetCount, gets the count of all records.
      • FindAll, loads all database records.
      • Find, loads a database record using primary key value(s).
      • FindByXXX, loads a group of records by the value of a column.
      • Delete, deletes a database record.
      • DeleteByXXX, deletes a group of records of by the value of a column.
      • Update, updates a database record.
    • DaoImpl, the C# DAO implementation class that implements the interface referred by DaoIntf.
    • SqlMap, the IBatis.NET SQL mapping file that contains SQL statements used in the DaoImpl above.

    Download IBatisNetGen



    大口仔 2007-06-28 03:48 发表评论

  • Compiling CodeSmith templates to assemblies

    Introduction There's an option in CodeSmith studio to compile your template to an assembly.  This has some advantages over the 'normal' way of working like referencing the template in a project, no compilation time when running'¦ You can find...
  • System.Collections.ObjectModel.KeyedCollection CodeSmith Template

    I've been converting a .NET 1.1 project over to .NET 2.0 and there are a lot of strongly-typed collections in the project that were generated by CodeSmith .  Most of these collections were based on the ArrayList template that came bundled with...
  • Making your .NET development job easier

    What tools assist with your .NET development? TechRepublic posted a great article recently about .NET development tools that are available to make your jobs eas ...
  • Turning DataObjects into BusinessObjects

    Objects that are tightly coupled to the table that they reflect can be referred to as DataObjects. BusinessObjects, however are objects that represent a logic unit contain the attributes and methods of the business object. Using CSLA.NET, CodeSmith Tools for code generation, and partial

    Posted in Code Smart Not Hard (View
 Technorati URL search 1 link from 1 site)

  • EntitySpaces to Support CodeSmith

    CodeSmith and EntitySpaces 2008

    EntitySpaces 2008 will greatly expand the reach of the EntitySpaces Architecture for the Microsoft .NET Framework by supporting both MyGeneration and CodeSmith. Our decision to support CodeSmith by no means indicates we are abandoning MyGeneration. MyGeneration will continue to be supported by EntitySpaces. We understand code generator loyalty, and we love MyGeneration. But, CodeSmith has its fervent followers, too. EntitySpaces 2008 will open up a new market for EntitySpaces and will give current EntitySpaces users a choice of generator.

    As of EntitySpaces 2008, the EntitySpaces Architecture will be a very viable choice for the CodeSmith Community. Supporting CodeSmith will have the added advantage of allowing users to generate their EntitySpaces architecture(s) from within Visual Studio 2005 via CodeSmith’s Microsoft Visual Studio 2005 integration.

    Supporting both MyGeneration and CodeSmith, as this post will outline, can be accomplished quite elegantly, and even allow for greater customization by the EntitySpaces Team.

    One Architecture - Two Code Generators

    The approach is straightforward. A master template will be created for each code generator. The master template will use the native user interface techniques of the given code generator to gather the user input. Next, the master template will launch the metadata sub-template which will extract the metadata using the MyGeneration MyMeta API or the CodeSmith SchemaExplorer API and create the EntitySpacesMetadata.xml file. The master template will then create an instance of the EntitySpacesPlugIn and populate it with the user’s selections and also provide it with a path to the EntitySpacesMetadata.xml file. Finally, the master template will launch a series of sub-templates just as EntitySpaces 2007 does now. The sub-templates will use only the EntitySpacesPlugIn which will run in both code generators. The only data the sub-templates will access will be the user input (which will be stored in our plug-in) and the intermediate metadata XML file. The sub-templates have no user interface nor will they call into the native code generator API. This approach will ensure that 90% or more of the code generation process will be the same regardless of what code generator is being used.

    A few diagrams might help visualize how this will be accomplished.

     

     

    The Metadata Sub-template creates the EntitySpacesMetadata.xml file which is then used, in conjunction with the EntitySpacesPlugin, by the common sub-templates.

     

     

    Summary 

    Our decision to support both MyGeneration and CodeSmith is not something that we have taken lightly. It has been seriously discussed for some time now. However, we did not want to cloud the EntitySpaces 2007 release with this announcement. Now, the time has come to let the cat out of the bag. However, EntitySpaces 2007 is by no means going to sit idle. We will be publishing a roadmap that will take ES2007 through the remainder of this year in just a few weeks. We can say now that hierarchical data binding and other very important features will make it into a follow on ES2007 release.

    Move over .netTiers and make room for your new neighbor, EntitySpaces 2008.

    From mobile devices to large scale enterprise solutions in need of serious transaction support, EntitySpaces can meet your needs. Whether you’re writing an ASP.NET application with medium trust requirements, or a Windows.Forms application, the EntitySpaces architecture is there for you. EntitySpaces is provider independent, which means that you can run the same binary code against any of the supported databases.EntitySpaces is available in both C# and VB.NET. EntitySpaces uses no reflection, no XML files, and sports a tiny foot print of less than 200k. Pound for pound, EntitySpaces is one tough, dependable .NET architecture.

    The EntitySpaces Team
    --

    EntitySpaces LLC
    Persistence Layer and Business Objects for Microsoft .NET
    http://www.entityspaces.net

  • 15 Visual Studio .NET Add Ins you won’t live w...

    If you are a .NET programmer, or even just a programmer, you must know the need for great tools in the process of developing, documenting, ... features. CodeSmith – A template-based code generator that allows you to generate code customized

    Posted in Fábio Pedrosa (View
 Technorati URL search 4 links from 2 sites)

  • Working With Database Metadata

    Download Source - 1 KB In this sample we will work directly with the database schema. CodeSmith enables this scenario through the use of the SchemaExplorer assembly, which provides ... those types from CodeSmith. We will use CodeSmith to generate a stored procedure based on any

    Posted in Software Devlopement Related Topics (View
 Technorati URL search 0 links from 0 sites)

Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems