{"id":200,"date":"2009-02-06T14:30:00","date_gmt":"2009-02-06T19:30:00","guid":{"rendered":"http:\/\/2d823b65bb.nxcli.io\/2009\/02\/the-21st-odf-toolkit-scenario.html"},"modified":"2009-12-27T21:06:47","modified_gmt":"2009-12-28T02:06:47","slug":"21st-odf-toolkit-scenario","status":"publish","type":"post","link":"https:\/\/www.robweir.com\/blog\/2009\/02\/21st-odf-toolkit-scenario.html","title":{"rendered":"The 21st ODF Toolkit Scenario"},"content":{"rendered":"<p>Back in 2006 I gave a short in talk at a <a href=\"http:\/\/conference2006.kde.org\/codingmarathon\/opendocumentday.php\">KDE conference<\/a> in Dublin on the topic of &#8220;A Standard ODF Object Model&#8221;, essentially laying out my thoughts on why we needed an &#8220;ODF Toolkit&#8221;.  As part of that presentation I listed &#8220;20 Prototypical App Dev Scenarios&#8221;, my attempt to enumerate all the fundamental patterns of use for ODF.  I did a blog post on this list <a href=\"https:\/\/2d823b65bb.nxcli.io\/blog\/2006\/09\/odf-twenty-patterns-of-use.html\">later that year<\/a>.<\/p>\n<p>I&#8217;d like to augment that list with a new pattern of use, a clever idea suggested to me by Jomar Silva in an email quite a while ago, but an idea which I just recently warmed up to.  I believe this technique could be quite powerful and should take its place as the 21st scenario for any ODF Toolkit.<\/p>\n<p>It goes something like this:<\/p>\n<p>If you have a toolkit written in a language, say Java, and the toolkit has API&#8217;s which you can use to both read and write ODF documents, then you can write a program that will read an ODF document and write out the Java code that would be needed to re-create that same ODF document.  So it is a code generation pattern.   Java code reads ODF and writes source code for Java program that can then be compiled to write ODF.<\/p>\n<p>This is very useful in a number of situations.   For example, you can design your document in a familiar tool, like your word processor.  Get all of the styles and layout correct and then run the code generator to generate the Java source file.  Then hand-edit the source code to make changes, such as substitutions, insertions, looping to copy content down a row, etc.  You could even adopt a place-holder convention in your original document, to make it easier to find the areas that you wanted to replace.   For example &#8220;REPLACE-FNAME&#8221; and &#8220;REPLACE-LNAME&#8221; might be be a good place-holder.<\/p>\n<p>Of course, this idea is of general applicability, not just limited to ODF.  It could be applied, and for all I know has been applied to HTML, etc.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in 2006 I gave a short in talk at a KDE conference in Dublin on the topic of &#8220;A Standard ODF Object Model&#8221;, essentially laying out my thoughts on why we needed an &#8220;ODF Toolkit&#8221;. As part of that presentation I listed &#8220;20 Prototypical App Dev Scenarios&#8221;, my attempt to enumerate all the fundamental [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[9],"tags":[],"class_list":{"0":"post-200","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-odf","7":"entry"},"_links":{"self":[{"href":"https:\/\/www.robweir.com\/blog\/wp-json\/wp\/v2\/posts\/200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.robweir.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.robweir.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.robweir.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.robweir.com\/blog\/wp-json\/wp\/v2\/comments?post=200"}],"version-history":[{"count":1,"href":"https:\/\/www.robweir.com\/blog\/wp-json\/wp\/v2\/posts\/200\/revisions"}],"predecessor-version":[{"id":317,"href":"https:\/\/www.robweir.com\/blog\/wp-json\/wp\/v2\/posts\/200\/revisions\/317"}],"wp:attachment":[{"href":"https:\/\/www.robweir.com\/blog\/wp-json\/wp\/v2\/media?parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.robweir.com\/blog\/wp-json\/wp\/v2\/categories?post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.robweir.com\/blog\/wp-json\/wp\/v2\/tags?post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}