codegen.html 9.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="Asciidoctor 1.5.4"><title>codegen</title><link rel="stylesheet" href="./asciidoctor.css">
  2. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
  3. <link rel="stylesheet" href="./coderay-asciidoctor.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css"></head><body class="article toc2 toc-left"><div id="header"><div id="toolbar"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/src/docs/asciidoc/jme3/advanced/atom_framework/codegen.adoc"><i class="fa fa-pencil-square" aria-hidden="true"></i></a><a href="https://github.com/jMonkeyEngine/wiki/new/master/src/docs/asciidoc/jme3/advanced/atom_framework/"><i class="fa fa-plus-square" aria-hidden="true"></i></a><input dir="auto" style="position: relative; vertical-align: top;" spellcheck="false" autocomplete="off" class="searchbox__input aa-input" id="doc-search" name="search" placeholder="Search in the doc" required="required" type="search"></div><h1>codegen</h1><div class="details"><span class="author" id="author"></span><br><span id="revnumber">version ,</span> <span id="revdate">2016/03/17 20:48</span></div><div id="toc" class="toc2"><div id="toctitle">Table of Contents</div><ul class="sectlevel1"><li><a href="#codegen-introduction">Codegen Introduction</a><ul class="sectlevel2"><li><a href="#inspired-by">Inspired by</a></li><li><a href="#vs-metawidget-oim">VS MetaWidget OIM</a></li><li><a href="#vs-emf">VS EMF</a></li><li><a href="#vs-morph-beanmapping-orm">VS Morph/ BeanMapping / ORM</a></li></ul></li><li><a href="#first-look">First look</a><ul class="sectlevel3"><li><a href="#generation">Generation</a></li><li><a href="#simulation">Simulation</a></li></ul></li><li><a href="#architecture-designs">Architecture &amp; Designs</a><ul class="sectlevel3"><li><a href="#metawidget-architecture">MetaWidget Architecture</a></li><li><a href="#emf-architecture">EMF Architecture</a></li><li><a href="#codegen-architecture">CodeGen Architecture</a></li><li><a href="#layouts">Layouts</a></li><li><a href="#builders">Builders</a></li><li><a href="#blocks">Blocks</a></li></ul></li><li><a href="#documentation">Documentation</a></li></ul></div></div><div id="content"><div class="sect2"><h3 id="codegen-introduction">Codegen Introduction</h3><div class="paragraph"><p>Code generator for various - cross platform programming languages and paradims. All in one!</p></div>
  4. <div class="paragraph"><p>Powered by AtomCore and JME3.</p></div>
  5. <div class="sect2"><h3 id="inspired-by">Inspired by</h3><div class="paragraph"><p>ECore</p></div>
  6. <div class="paragraph"><p>UML</p></div>
  7. <div class="paragraph"><p>MetaWidget</p></div>
  8. <div class="paragraph"><p>Other game engines and editor: UDK, Unity, Blender, GameMaker…</p></div>
  9. <div class="paragraph"><p>Other node base editor:</p></div>
  10. <div class="paragraph"><p>Web world:</p></div>
  11. <div class="sect3"><h4 id="features">Features</h4><div class="paragraph"><p>Node &amp; Flow &amp; Graph base</p></div>
  12. <div class="paragraph"><p>Model base</p></div>
  13. <div class="paragraph"><p>Scope &amp; Instruction &amp; Control base</p></div></div>
  14. <div class="sect3"><h4 id="comparasion">Comparasion</h4></div></div>
  15. <div class="sect2"><h3 id="vs-metawidget-oim">VS MetaWidget OIM</h3><div class="paragraph"><p><a href="http://metawidget.org/">http://metawidget.org/</a></p></div>
  16. <div class="paragraph"><p>is for generating UI from objects.</p></div>
  17. <div class="paragraph"><p><strong>CodeGen</strong> is for generating data (objects) from (data) objects.</p></div></div>
  18. <div class="sect2"><h3 id="vs-emf">VS EMF</h3><div class="paragraph"><p><a href="https://www.eclipse.org/modeling/emf/">https://www.eclipse.org/modeling/emf/</a></p></div>
  19. <div class="paragraph"><p><a href="http://www.eclipse.org/ecoretools/">http://www.eclipse.org/ecoretools/</a></p></div>
  20. <div class="paragraph"><p>is for model based generation.</p></div>
  21. <div class="paragraph"><p><strong>CodeGen</strong> works upon EMF and also support others: flow base - scope base paradigm.</p></div>
  22. <div class="paragraph"><p>CodeGen tools toward Netbean instead of Eclipse to suite with JME3&#8217;s SDK. Also CodeGen toward Games, not general applications!</p></div></div>
  23. <div class="sect2"><h3 id="vs-morph-beanmapping-orm">VS Morph/ BeanMapping / ORM</h3><div class="paragraph"><p>Work in higher level than those.</p></div>
  24. <div class="paragraph"><p>That&#8217;s said!</p></div>
  25. <div class="paragraph"><p><strong>CodeGen</strong> work in higher level, solve other problems and depends on MetaWidget, EMF, Morph, BeanMapping and ORM.</p></div></div></div>
  26. <div class="sect3"><h4 id="first-look">First look</h4><div class="sect3"><h4 id="generation">Generation</h4><div class="paragraph"><p><a href="http://en.wikipedia.org/wiki/Code_generation_%28compiler%29">http://en.wikipedia.org/wiki/Code_generation_%28compiler%29</a></p></div>
  27. <div class="paragraph"><p>Atom support code generation from multiple sources and to various targets to help speed up and unite production pipeline. CodeGen - Ultimate tools for code genration corporate with AtomExAsset - Ultimate tools for game assets management is 2 facilities in charge for the job.</p></div>
  28. <div class="paragraph"><p>Sources</p></div>
  29. <div class="ulist"><ul><li><p>UML</p></li><li><p>ECore</p></li><li><p>Java code or Java classes with annotations</p></li><li><p>Code gen diagrams (modified UML diagrams for games)</p></li><li><p>3D Model and assets</p></li></ul></div>
  30. <div class="paragraph"><p>Targets</p></div>
  31. <div class="ulist"><ul><li><p>Other Model format - via ECore, UML</p></li><li><p>Groovy or Java - via ECore, UML, ANTLR</p></li><li><p>Java bytecode - via instrument and transformation ASM</p></li><li><p>JavaScript - via GWT, ANTLR (supervisor translation)</p></li><li><p>StringTemplate, XML, Text, Configurations … and other textbased - via StringTemplate</p></li><li><p>Assetpack and other kind of assets - via processing pipeline</p></li></ul></div></div>
  32. <div class="sect3"><h4 id="simulation">Simulation</h4></div></div>
  33. <div class="sect3"><h4 id="architecture-designs">Architecture &amp; Designs</h4><div class="sect3"><h4 id="metawidget-architecture">MetaWidget Architecture</h4><div class="paragraph"><p><a href="http://metawidget.sourceforge.net/doc/reference/en/html/ch02.html">http://metawidget.sourceforge.net/doc/reference/en/html/ch02.html</a></p></div>
  34. <div class="paragraph"><p><a href="http://metawidget.sourceforge.net/elevator.php">http://metawidget.sourceforge.net/elevator.php</a></p></div>
  35. <div class="admonitionblock tip"><table><tr><td class="icon"><i class="fa icon-tip" title="Tip"></i></td><td class="content"><div class="paragraph"><p>MORAL: Object has “similar semantic with its UI. A thing has conceptal similarties with its representation, if there is a projection from it to the representation.</p></div></td></tr></table></div></div>
  36. <div class="sect3"><h4 id="emf-architecture">EMF Architecture</h4><div class="paragraph"><p><a href="http://wiki.eclipse.org/index.php/EMF/FAQ">http://wiki.eclipse.org/index.php/EMF/FAQ</a></p></div>
  37. <div class="admonitionblock tip"><table><tr><td class="icon"><i class="fa icon-tip" title="Tip"></i></td><td class="content"><div class="paragraph"><p>MORAL:</p></div></td></tr></table></div></div>
  38. <div class="sect3"><h4 id="codegen-architecture">CodeGen Architecture</h4><div class="paragraph"><p>The initial idea of CodeGen is “there is similarity between two, there is a transform available, learnt from above.</p></div>
  39. <div class="paragraph"><p>Also take a look at wisdoms and <a href="../../../jme3/advanced/atom_framework/atomcore/algorithms.html">Algorithms</a> which AtomCore sketchs for Generation:</p></div>
  40. <div class="ulist"><ul><li><p>[Math] A function from one set to another set.</p></li><li><p>[Physics] Energy from one form to another.</p></li><li><p>[Language] Translate sematic from one to another language need a dictionary.</p></li><li><p>[Art] Nothing new, just a cover</p></li><li><p>[Computing] Template is a good abstraction of algorimths.</p></li><li><p>[Programming] DRY and open source.</p></li><li><p>[New techs &amp; trends] Topology and well defined network actually a virtue.</p></li></ul></div></div>
  41. <div class="sect3"><h4 id="layouts">Layouts</h4><div class="paragraph"><p>GraphLayout</p></div></div>
  42. <div class="sect3"><h4 id="builders">Builders</h4><div class="paragraph"><p>BlockBuilder</p></div></div>
  43. <div class="sect3"><h4 id="blocks">Blocks</h4><div class="paragraph"><p>CodeBlock</p></div>
  44. <div class="paragraph"><p>PlaceHolderBlock</p></div></div></div>
  45. <div class="sect1"><h2 id="documentation">Documentation</h2><div class="sectionbody"></div></div></div><div id="footer"><div id="footer-text">Version <br>Last updated 2016-08-29 15:36:15 UTC</div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script><script>docsearch({
  46. apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
  47. indexName: 'jmonkeyengine',
  48. inputSelector: '#doc-search',
  49. debug: false // Set debug to true if you want to inspect the dropdown
  50. });</script></body></html>