Requests For Comment

Dec 17, 2009 at 12:31 AM

Anyone who'd like to talk about anything related to XLG has my ear.
Feel free to engage me by email, skype, facebook, linkedin, yahoo messenger, or what have you.

http://my.william-rawls.info 

In the upper left corner you can drop down the list of places to find me as well as more stuff I've done.

 

Dec 17, 2009 at 3:55 AM
Edited Dec 17, 2009 at 7:28 AM

So the next few (hopefully rapid) releases will start to make XLG easier to use and understand and I hope, a bit more user friendly all the way around.

My main focus is usability, moving toward an installable which won't wipe out your work (by storing your stuff in an organized but self controllable way), fixing errors, streamlining step creation, "tiny window" mode with stay-on-top support (for the now properly working AutoGen feature).

I need your help here because I know some of you have got critiques, criticisms, comments, request for features, "how does this work", "why didn't this work like I thought", how do I do X, etc.

Send me a flood of emails, replies, screenshots, suggested code changes, suggested templates, suggested features, videos showing how to do something... whatever. I need you and so does XLG.

I'm very much a supporter of the idea of a open source code generator that itself adheres to open standards like XML and XSL. I don't want to make it so hard to use it doesn't get used or fails because I haven't seen something in it fail spectacularly.

Let me hear your success stories as well. Even consider hiring me to do some work. I'd love to have a benefactor or 3.  


I've also got some new feature ideas / implementations like

  • Everything went into c:\data\code\xlg and pretty much depended on that. I'm going to actually introduce an installation and give you control over all that.
  • The "xlg\Support" folder structure has changed (namely that it has structure now).
  • Your own "My XLG" folder under your My Documents with all your custom files and a similar structure to the new "xlg\Support" folder.
  • Dropping the custom control with text boxes and ... buttons for a much more streamlined PropertyGrid
  • A TokenList editor for machine, pipeline, step, and user variable resolution with support for strings, files, folders, template choosing, email addresses, URLs, etc etc etc 
  • My XLG along with the new xlgTokenList feature will allow you to 
    • Store all your XLG related files where you want including:
      • Pipelines
        Containing all your .xlgs files, the files containing all the settings to do one or many generation steps
      • Etc
        Whatever you want including your default "Edit" button editor (Notepad2 right now)
      • Help
        Common xsd schemas and basic code support for all the xlg document types
        Plus documentation, tutorials, videos, etc (long term)
      • Logs
        XLG will start generating XML logs of all its actions giving you another source for information
      • Templates
        Multiple template folders supported, configured by default for standard [the ones I distribute] and yours)
        Mostly containing all .xsl files, but also any supporting files like 
        • Template-specific custom step settings, custom xml, scripts, and/or  Token files
        • Subdirectories clearly showing which templates can be used with one of the major gen-time metadata xml files
          • xlgDoc - Data provider generated metadata 
          • xlgFolder - Gather Provider generated metadata with "deep" info about a folder
          • xlgSqlToXml - Custom SQL execution that generates data as metadata
          • xlgTokenList - Design and gen-time support for processing lists of names and values that can later be dynamically inserted... as xsl... into an xsl template
            Yep... You'll be able to generate (some) dynamic XSL for per-step, per-genarate inclusion and compilation giving your templates information to things like your domain name, computer name, IP address, browsable filenames, answers to questions your template resolved immediately before compiling and running an XSL...
            This is a very fresh idea for me, more as it develops.
          • And for future types of generations like:
            • xs:schema / xsd import or derivation
              (I've finally generated xsd for xlg file types, by the by) 
            • .net XML documentation processor with an idea for automated testing  
        • Other supporting files a template may include or use like your own common xsl libraries or command line / power builder tools.
      • Generated code output folders, 
      • xlgd custom step settings
      • xlgToken files with user, template, pipeline, shared and machine level precidents.   
      • wherever you want, give you more control over where that area goes without having to worry I'm going to overright anything of yours (as well as isolate your stuff and mine that our jobs wouldn't want released). I'm switching from ListView / custom form control for editing the Pipeline files (the .xlgs file containing all the steps to be executed during gen-time.  to ListView / PropertyGrid 
    • Have XLG Pipeline ask and store information on your hard drive about you (like your name and email address), your company, your coding habits, some defaults for databases. 
    • That information can even be used to tell pipeline steps where everything should be allowing you to leave fields blank mostly.
    • That information can also be used to secure "Security Issue" information like passwords and connection strings letting you feel a bit safer about your code gen security.
    • Dynamically include an <xlgTokenList> or it's <xsl:variable> equivalent into a template immediately prior to generation.
    • A whole new set of resolvable tokens becomes possible with planned support for some sort of "Token Provider" to allow you to collect and store your own "last mile" information.  
    • More on Tokens as they develop.  

 

Dec 17, 2009 at 7:36 AM

Some of these ideas are really me incorporating some features I put into my old open source code generator addin for VB6, Slice and Dice.

Slice and Dice (Sandy for short) never got the kind of upgrade I wanted, so XLG will begin to include many of it's impressive capabilities while hopefully remaining accessible through open standards like xml, xsl, xsd, and automated xml metadata providers, automated action providers (providing real-time action execution at various points including pregen, postgen, prebuild, postbuild, prestep, poststep, onsteperror, various points in metadata creation, in response to monitored events (like when a xsl, xml, xsd, or even database structure changes, etc.

My big failing with Slice and Dice was that I created a new way to explain to the computer how to accomplish some coding task, but the language was 100% custom. Now the language will be open standards oriented. So as these features come online, let me know how close or far off base I am.

william.rawls@gmail.com on email or facebook

willrawls on yahoo or skype

Dec 17, 2009 at 7:39 AM
Edited Dec 17, 2009 at 5:04 PM

Here is the contents of the new XLG.Pipeline.Defaults.xlgt file, a xlgTokenList document with configurable defaults for lots of stuff:

 

<xlgTokenList ID="XLG.Pipeline.Defaults" Scope="XlgDefaults">
	<!-- NOTE: These tokens are loaded with XLG.Pipeline and fully resolve from defaults (if not already set) before anything happens -->
	<Tokens>
		<Token Name="MyName" Prompt="What is your name?" Default="William M. Rawls" />
		<Token Name="MyEmail" Prompt="What is your email address? (stored internally on your hard drive, not distributed)" As="EmailAddress" Default="william.rawls@gmail.com" />
		<Token Name="MyID" As="SecurityIssue"  Default="@{Guid}" Prompt="Got some value you'd like to identify your work with? This defaults to a new guid and is set only once" />
		<Token Name="CompanyName" Prompt="What is your company's name? Your response should be a single word, valid namespace" />

		<Token Name="Outputs" Default="C:\Data\Code\Gloves" As="ExistingPath" Prompt="Which folder should XLG Output to? (each step writes to a different sub folder)"/>

		<Token Name="XlgBasePath" Default="@{..}" As="ExistingPath" />
		<Token Name="XlgBin" Default="@{.}" As="ExistingPath"/>
		<Token Name="XlgSupport" Default="${XlgBasePath}\Support" As="ExistingPath" />

		<Token Name="StandardTemplates" Default="${XlgSupport}\Templates" As="TemplatesFolder"/>
		<Token Name="MyTemplates" Default="${MyXlg}\Templates" As="MyTemplatesFolder" />

		<Token Name="MyXlg" Default="@{MyDocuments}\My XLG" As="InsuredPath"
Prompt="Where would you like your 'My XLG' folder to be located? (containing your own templates, xlg pipline files, etc)."/> <Token Name="MyPipelines" Default="${MyXlg}\Pipelines" As="InsuredPath" Prompt="Where would you like your XLG Pipelines (.xlgs files) written?" /> <Token Name="MyLogs" Default="${MyXlg}\Logs" As="InsuredPath" Prompt="Where would you like your XLG log files (.xlgl files) written?" /> <Token Name="MyTokenLists" Default="${MyXlg}\Tokens\MyTokens.xlgt" As="InsuredPath" Prompt="Which .xlgt (xlgTokenList) file would you like to keep your settings in?" /> <Token Name="MyDefaults" Default="${MyTokenLists}\MyDefaults.xlgt" As="InsuredFile" /> <Token Name="DefaultTemplate" Default="#{CSharp DAL XLG MetX}" As="Template" Prompt="Which template would you like to use by default when creating a new step?" /> <Token Name="DefaultDatabaseName" Prompt="Which database name would you like to target, as it would appear in a connection string" Default="AdventureWorks" /> <Token Name="DefaultConnectionString" Default="Server=localhost;Database=${DefaultDatabaseName};Integrated Security=true;" As="ConnectionString" 
Prompt="What connection string would you like to use when creating steps?"/>
		<Token Name="DefaultProviderName" Default="System.Data.SqlClient" />
		<Token Name="DefaultParentNamespace" Prompt="Namespace (by default) would you like all generated classes to use?"  Default="${CompanyName}.Data" />

		<Token Name="DefaultSqlServerDatabase" Prompt="Which SQL Server database would you like to use by default?" Default="AdventureWorks" />
		<Token Name="DefaultSqlServer" Prompt="Which SQL Server would you like to use by default?" Default="localhost" />
	</Tokens>
	<!--
	To resolve tokens during Gen-time or use them anywhere in the XLG.Pipeline interface, 
	
	(_Token Xml_)
		Resolves to the entire set of tokens in XML format. 
		This would force asl unresolved values to resolve at once. Useful in xlgd files
		All sensitive values so named are encrypted
	
	(_Token Xml Unsafe_)
Resolves to the entire set of tokens in XML format (an <xlgTokens> text node). This would force asl unresolved values to resolve at once. Useful in xlgd files All sensitive values so named are DECRYPTED. Use with care (_EditTokens_) Resolves to an empty string. However, gen time is paused and the user is presented with the XLG Pipeline tokens editor with values for all tokens resolved based on curent gen-time. Changes made are effective only until the end of gen-time for the current step. (_UseTokens filename_)
Takes the supplied .xlgt file (must already exist) and uses just those resolved tokens during gen-time until the next step is executed or until another call to (__) is made (_NormalTokens_) Stops using any previously supplied temporary token list (if any). (_AddTokens filename_)
Takes the supplied .xlgt file (must already exist) and adds tokens in that file to the current gen-time (_Set name=value_) Sets or Clears the value of a token (_name_) Simple resolve based on the As attribute (defaults to string) If the token has an As attribute of ConnectionString, SecurityIssue, or Password (_name_) will return the encrypted value (_!name_) will return the decrypted value When a value doesn't decrypt, it is treated as if it was never entered usually asking the user what the value should be Encrypted values are unique as follows: in this file: Tied to the machine in a xlgs file: Tied to the logged in user in a log file: One way MD5 hash (_._) Returns the path XLG.Pipeline.exe is currently running in (_.._) Returns the parent path XLG.Pipeline.exe is currently running in (and presumably where Support is). (_Guid_) Returns a new Guid as a string (_Folder SpecialFolderName_) Resolves to one of the values for System.Enviornment.SpecialFolders
Example (_Folder MyDocuments_) would resolve the logged in user's my documents folder (_Env name_) If any other value is passed, it is resolved as if passed to System.Environment.ExpandEnvironmentVariables (_Xsl name_) Resolves to a full path and filename for a template that must exist under either your "My Xlg Templates" (in your My Documents folder) or in the folder referenced in ${StandardTemplates} (whichever comes first) NOTE: If this doesn't resolve, pipeline processing will be shut down. (_!TokenName_) Same as $, but the value is encrypted to the current windows user. If another user tries to use the file, this value won't decrypt and it will be as if no value exists (typically prompting the user for more input) NOTE: Every time a xlgs is loaded, the tokens below are merged with the tokens in xlgs. When the same token is in both files, the value in the xlgs is used. -->
</xlgTokenList>

 

 

<?xml version="1.0" encoding="utf-8" ?>
<xlgTokenList ID="XLG.Pipeline.Defaults" Scope="XlgDefaults">
<!-- NOTE: These tokens are loaded with XLG.Pipeline and fully resolve from defaults (if not already set) before anything happens -->
<Tokens>
<Token Name="MyName" Prompt="What is your name?" Default="William M. Rawls" />
<Token Name="MyEmail" Prompt="What is your email address? (stored internally on your hard drive, not distributed)" As="EmailAddress" Default="william.rawls@gmail.com" />
<Token Name="MyID" As="SecurityIssue"  Default="@{Guid}" Prompt="Got some value you'd like to identify your work with? This defaults to a new guid and is set only once" />
<Token Name="CompanyName" Prompt="What is your company's name? Please make sure the response is in the form of a single valid keyword in your chosen programming language (C# for instance)." Default="FBMC" />
<Token Name="Outputs" Default="C:\Data\Code\Gloves" As="ExistingPath" Prompt="Under which folder would you like all generating steps to output in? Each step most likely will write into its own subfolder of this folder."/>
<Token Name="XlgBasePath" Default="@{..}" As="ExistingPath" />
<Token Name="XlgBin" Default="@{.}" As="ExistingPath"/>
<Token Name="XlgSupport" Default="${XlgBasePath}\Support" As="ExistingPath" />
<Token Name="StandardTemplates" Default="${XlgSupport}\Templates" As="TemplatesFolder"/>
<Token Name="MyTemplates" Default="${MyXlg}\Templates" As="MyTemplatesFolder" />
<Token Name="MyXlg" Default="@{MyDocuments}\My XLG" As="InsuredPath" Prompt="Where would you like your 'My XLG' folder to be located? (containing your own templates, xlg pipline files, etc)."/>
<Token Name="MyPipelines" Default="${MyXlg}\Pipelines" As="InsuredPath" Prompt="Where would you like your XLG Pipelines (.xlgs files) written?" />
<Token Name="MyLogs" Default="${MyXlg}\Logs" As="InsuredPath" Prompt="Where would you like your XLG log files (.xlgl files) written?" />
<Token Name="MyTokenLists" Default="${MyXlg}\Tokens\MyTokens.xlgt" As="InsuredPath" Prompt="Where would you like XLG Pipeline to look for xlgToken files? (.xlgt files)? These are in addition to the global Tokens installed with XLG Pipeline as well as the Tokens in each Pipeline file." />
<Token Name="MyDefaults" Default="${MyTokenLists}\MyDefaults.xlgt" As="InsuredFile" />
<Token Name="DefaultTemplate" Default="#{CSharp DAL XLG MetX}" As="Template" Prompt="Which template would you like to use by default when creating a new step?" />
<Token Name="DefaultDatabaseName" Prompt="Which database name would you like to target, as it would appear in a connection string" Default="AdventureWorks" />
<Token Name="DefaultConnectionString" Default="Server=localhost;Database=${DefaultDatabaseName};Integrated Security=true;" As="ConnectionString" Prompt="What default connection string would you like to use when creating steps?"/>
<Token Name="DefaultProviderName" Default="System.Data.SqlClient" />
<Token Name="DefaultParentNamespace" Prompt="Namespace (by default) would you like all generated classes to use?"  Default="${CompanyName}.Data" />
<Token Name="DefaultSqlServerDatabase" Prompt="Which SQL Server database would you like to use by default?" Default="AdventureWorks" />
<Token Name="DefaultSqlServer" Prompt="Which SQL Server would you like to use by default?" Default="localhost" />
</Tokens>
<!--
To resolve tokens during Gen-time, 
${*xml}
Resolves to the entire set of tokens in XML format. 
This would force asl unresolved values to resolve at once. Useful in xlgd files
All sensitive values so named are encrypted
${*xml unsafe}
Resolves to the entire set of tokens in XML format (an <xlgTokens> text node). 
This would force asl unresolved values to resolve at once. Useful in xlgd files
All sensitive values so named are DECRYPTED. Use with care
  
${$}
  Resolves to an empty string.
  However, gen time is paused and the user is presented with the XLG Pipeline tokens editor
 with values for all tokens resolved based on curent gen-time. Changes made are effective 
 only until the end of gen-time for the current step.
${=XlgtFilename}
  Takes the supplied .xlgt file (must already exist) and uses just those token during gen-time 
 until the next step 
 or until another call to ${=} is made
${=}
Stops using any previously supplied temporary token list (if any).
 
${+=XlgtFilename}
  Takes the supplied .xlgt file (must already exist) and adds tokens in that file to the current gen-time
 
${-=TokenName}
  Clears the value of a token 
${TokenName}
Simple resolve based on the As attribute (defaults to string)
If the token has an As attribute of 
 ConnectionString, SecurityIssue, or Password
  ${} will return the encrypted value
  !{} will return the decrypted value
When a value doesn't decrypt, it is treated as if it was never entered usually asking the user what the value should be
 
Encrypted values are unique as follows:
 in this file: Tied to the machine
     in a xlgs file: Tied to the logged in user
 in a log file: One way MD5 hash
 
@{.}
Returns the path XLG.Pipeline.exe is currently running in
@{..}
   Returns the parent path XLG.Pipeline.exe is currently running in (and presumably where Support is).
@{Guid}
Returns a new Guid as a string
 
@{SpecialFolderName}
Resolves to one of the values for System.Enviornment.SpecialFolders
 
@{EnvVariableString}
If any other value is passed, it is resolved as if passed to System.Environment.ExpandEnvironmentVariables
 
#{TemplateName}
Resolves to a full path and filename for a template 
 that must exist under either your "My Xlg Templates" (in your My Documents folder) 
 or in the folder referenced in ${StandardTemplates} (whichever comes first)
NOTE: If this doesn't resolve, pipeline processing will be shut down.
!{TokenName}
Same as $, but the value is encrypted to the current windows user.
If another user tries to use the file, this value won't decrypt and it will be as if no value exists (typically prompting the user for more input)
NOTE: Every time a xlgs is loaded, the tokens below are merged with the tokens in xlgs.
  When the same token is in both files, the value in the xlgs is used.
-->
</xlgTokenList>
Dec 17, 2009 at 7:53 AM

The file above are considered "XLG Defaults"

Each name/value pair is a token (resolvable string variable) with a unique name, default value, last known/entered value, type information, a question (prompt) XLG Pipeline should ask you when it needs a value for the first time.

Your responses would be collected the first time XLG Pipeline is run and then written/merged into your My XLG\Tokens\MyTokens.xlgt file.

These values would never get overwritten when you upgraded XLG and allow you to move them easily between computers while still maintaining some security.

XLG Defaults have a low priority for resolution
Your MyTokens file would have higher priority for resolution (if both have a value yours is taken as an override) than an XLG Default and

Pipelines (.xlgs files) (which now have a xlgTokenList section) would have an even higher priority allowing your values or a Pipeline to have, say it's own namespace or output folder.

All Token files can be seen and edited from inside XLG. 

Token files will be themselves convertable at gen-time to

  • a quick reference HTML, 
  • an xml node(s) injected into say an xlgDoc, or 
  • even turned into a series of <xsl:variable /> nodes and injected just-in-time into a template at gen-time.

The long and short of it is tokens can be used, mostly in Pipelines, to give you control. At the same time, most fields now have excellent defaults which let you not have to worry about folders or even where say a step setting file should go.