Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3756238
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:49:17+00:00 2026-05-19T09:49:17+00:00

I use CodeSmith for the PLINQO templates, to build my DAL from my DB

  • 0

I use CodeSmith for the PLINQO templates, to build my DAL from my DB objects; it works great!

I believe that’s the primary use of code generator apps, but I’m curious… what other code would you consider using a code generator for? Do you have any CodeSmith templates that you use frequently (if so, what does it do)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:49:17+00:00Added an answer on May 19, 2026 at 9:49 am

    I haven’t used CodeSmith, but I’ve done a fair bit of code generation. Noteably I wrote most of a configuration management (CM) system for a WiMAX system, where the CM code was generated for 3 different platforms. The only difference was the CM model for each platform.

    The model was in a custom Domain Specific Language (DSL) that we built had a parser for. The language was a basic container/element style where containers could nest and have an identifier, and elements were of pre-defined types. Documentation was an attribute of elements and containers. You could add Lua snippets to the element and container definitions to do semantic validation (e.g., the value is in the correct range, if it’s an IP address is it in a CIDR range defined elsewhere, etc.).

    The parser generated a syntax tree that we then pushed at templates. The template language was a partial C implementation of StringTemplate. We used it to generate:

    • A model specific C API that applications could call into to get configuration values,
    • The collected Lua code for validating the model and providing useful error messages,
    • Two “backends” for the API that would manage values in memory (for temporary manipulation of a model), and in a database system (for sharing amongst processes),
    • Configuration file parser and writer,
    • HTML documentation, and
    • Command Line Interface (CLI) implementation for interactive viewing and changing of a configuration.

    In retrospect, I should have simply used Lua directly as the DSL. It would have been more verbose, but having the parser already there and lots of Lua templating choices available to me would have saved a lot of development effort.

    For things that have a repetivie structure and well defined rules about what those things need to do, code generation can be a wonderful thing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use Codesmith to create our code generation templates and have had success in
We use Codesmith to generate some code, and when we open up the projects,
Use case: I find a piece of code that I do not understand at
Use Case: End-User searches for something and an ArrayCollection is returned with Result objects.
use this code, in the Preferences activity, to know when the reset preference has
use case example I have a servlet that is receiving login requests. If a
I am trying to use StructureMap to register some types that implement a generic
The code in question is written by robot (CodeSmith) and it is a pain
use qcvalues_test go select [finalConc] ,[rowid] from qvalues where rowid in (select rowid from
I usually use Codesmith & NetTiers for my datalayers, and as they can be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.