Development with Code Generation: Difference between revisions
Jump to navigation
Jump to search
(→YML) |
|||
Line 8: | Line 8: | ||
* TODO: write into Templates | * TODO: write into Templates | ||
* Plugin writers for different output (Winforms, GTK, ASP.net) | * Plugin writers for different output (Winforms, GTK, ASP.net) | ||
=== | === YAML === | ||
YAML is a text file format that is shorter and easier to write and read than XML, but you can get the same structure than XML. This is achieved by not having opening and closing tags, but by using identation to define the hierarchy of elements. It is more friedly to read than XML, since it is less technical (no markup!). | |||
* | |||
* see a parser for YAML: http://yaml-net-parser.sourceforge.net/default.html | * [http://en.wikipedia.org/wiki/YAML Overview] | ||
* we have our own converter from yaml to xml: project Ict.Tools.CodeGeneration, Yml2Xml.cs, Ict.Tools.CodeGeneration.Yml2Xml | * [http://yaml.org/spec/1.2/ Official specification] | ||
** | * Parsers | ||
** yml2xml maps the YAML into XML | ** see a parser for YAML: http://yaml-net-parser.sourceforge.net/default.html | ||
** For openPETRA we have developed our own converter from yaml to xml: project Ict.Tools.CodeGeneration, Yml2Xml.cs, Ict.Tools.CodeGeneration.Yml2Xml | |||
*** Advantage: we can write short yaml code, but can use the comfort of the XML parser in .Net to walk through the hierarchy | |||
*** yml2xml maps the YAML into XML | |||
=== XAML === | === XAML === |
Revision as of 15:06, 7 July 2010
Tools
- In csharp/ICT/PetraTools
- uses CSParser to parse existing C# files
- write code:
- can comment generated code
- can insert regions with name ManualCode (need endregion ManualCode as well)
- TODO: write into Templates
- Plugin writers for different output (Winforms, GTK, ASP.net)
YAML
YAML is a text file format that is shorter and easier to write and read than XML, but you can get the same structure than XML. This is achieved by not having opening and closing tags, but by using identation to define the hierarchy of elements. It is more friedly to read than XML, since it is less technical (no markup!).
- Overview
- Official specification
- Parsers
- see a parser for YAML: http://yaml-net-parser.sourceforge.net/default.html
- For openPETRA we have developed our own converter from yaml to xml: project Ict.Tools.CodeGeneration, Yml2Xml.cs, Ict.Tools.CodeGeneration.Yml2Xml
- Advantage: we can write short yaml code, but can use the comfort of the XML parser in .Net to walk through the hierarchy
- yml2xml maps the YAML into XML
XAML
- TODO: XAML idea
Documentation YML for OpenPetra Forms
see also Documentation GUI generation with YAML and Documentation YAML for OpenPetra Forms for details