<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://blog.invenzzia.org/en/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>Invenzzia... in English - components</title>
  <link>http://blog.invenzzia.org/en/</link>
  <description></description>
  <language>en</language>
  <pubDate>Fri, 25 Jul 2008 17:12:15 +0100</pubDate>
  <copyright>Copyright &amp;copy; Invenzzia</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>OPT 2.0.0-dev5</title>
    <link>http://blog.invenzzia.org/en/post/OPT-200-dev5</link>
    <guid isPermaLink="false">urn:md5:33bdfac78deef21d193dfecd8a90f928</guid>
    <pubDate>Fri, 21 Mar 2008 14:38:00 +0100</pubDate>
    <dc:creator>Zyx</dc:creator>
        <category>Open Power Template</category>
        <category>components</category><category>development</category><category>opt2</category>    
    <description>&lt;p&gt;The new development version became available a bit later that I planned, but on the other hand, I managed to add much more new things. The DTD issue is solved, as well as XML prologs, CDATA support and code escaping. The expression compiler is done and the programmers may use now brand new component implementation. This is a significant step towards the first beta release and the end is closer than further. There are only a few instructions to code, the rest is almost completed and works. The compiler, programmers' API and most of the stuff also works. I think of making the first real tests on my home website and creating the Open Power Forms library compatible with the new OPT.&lt;/p&gt;    &lt;p&gt;In the new OPT, I've redesigned the component design from scratch. It is much more flexible now and allows to make easily many interesting effects. The base rules are still the same, but the rest has changed. This is a sample code showing, how the component-based work with the forms is going to look like:&lt;/p&gt;

&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&amp;lt;opt:snippet name=&amp;quot;componentView&amp;quot;&amp;gt;
  &amp;lt;com:div class=&amp;quot;field&amp;quot; invalid=&amp;quot;field error&amp;quot;&amp;gt;
    &amp;lt;p&amp;gt;{$opt.component.title}: &amp;lt;opt:display /&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;p class=&amp;quot;desc&amp;quot; opt:if=&amp;quot;$opt.component.description&amp;quot;&amp;gt;{$opt.component.description}&amp;lt;/p&amp;gt;
    &amp;lt;opt:onEvent name=&amp;quot;error&amp;quot; message=&amp;quot;info&amp;quot;&amp;gt;
      &amp;lt;p class=&amp;quot;error&amp;quot;&amp;gt;{@info}&amp;lt;/p&amp;gt;
    &amp;lt;/opt:onEvent&amp;gt;
  &amp;lt;/com:div&amp;gt;
&amp;lt;/opt:snippet&amp;gt;

&amp;lt;div class=&amp;quot;form&amp;quot;&amp;gt;
&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;skrypt.php&amp;quot;&amp;gt;

&amp;lt;opt:input name=&amp;quot;name&amp;quot; template=&amp;quot;componentView&amp;quot;&amp;gt;
   &amp;lt;opt:set name=&amp;quot;title&amp;quot; str:value=&amp;quot;Enter your name&amp;quot; /&amp;gt;
   &amp;lt;opt:set name=&amp;quot;description&amp;quot; str:value=&amp;quot;At least 3 letters&amp;quot; /&amp;gt;
&amp;lt;/opt:input&amp;gt;

&amp;lt;opt:input name=&amp;quot;surname&amp;quot; template=&amp;quot;componentView&amp;quot;&amp;gt;
   &amp;lt;opt:set name=&amp;quot;title&amp;quot; str:value=&amp;quot;Enter your surname&amp;quot; /&amp;gt;
   &amp;lt;opt:set name=&amp;quot;description&amp;quot; str:value=&amp;quot;At least 3 letters&amp;quot; /&amp;gt;
&amp;lt;/opt:input&amp;gt;

&amp;lt;opt:input name=&amp;quot;age&amp;quot; template=&amp;quot;componentView&amp;quot;&amp;gt;
   &amp;lt;opt:set name=&amp;quot;title&amp;quot; str:value=&amp;quot;Enter your age&amp;quot; /&amp;gt;
   &amp;lt;opt:set name=&amp;quot;description&amp;quot; str:value=&amp;quot;Scope: 10-99 years&amp;quot; /&amp;gt;
&amp;lt;/opt:input&amp;gt;

&amp;lt;div class=&amp;quot;foot&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Send&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/pre&gt;


&lt;p&gt;The new implementation makes use of the &lt;code&gt;opt:snippet&lt;/code&gt; instruction and template inheritance. If you had enough time, you might code the component objects, so that the field titles and descriptions will be unnecessary in the template. A component can handle events, displaying itself and its neighbourhood, managing parameters and tag attributes (we use the &lt;code&gt;com&lt;/code&gt; namespace for it). OPT contains only the component mechanism, and the components itself must be written by the end user. The reason is very simple. In order to make a useful component, we should integrate it with the input validation classes, language system, error management etc. The demands are much bigger than OPT is able and is supposed to provide. However, there will be a ready-to-use component implementation: Open Power Forms library.&lt;/p&gt;


&lt;p&gt;Unfortunately for the English manual is not started yet. Even the Polish users must use a partially-complete text, without formatting, because the new rendering system is not ready. However, we'll do everything to translate all the text together with some other materials (advices, FAQ, maybe even a tutorial?) into English, before the first final release is done. There is a team, I'll try also to ask some friends and we'll make a serious English support. Just be patient.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://www.invenzzia.org/download/opt-2.0.0-dev5.tar.gz&quot; hreflang=&quot;en&quot;&gt;Download OPT-2.0.0-dev5&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description>
    
    
    
          <comments>http://blog.invenzzia.org/en/post/OPT-200-dev5#comment-form</comments>
      <wfw:comment>http://blog.invenzzia.org/en/post/OPT-200-dev5#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.invenzzia.org/en/feed/rss2/comments/21</wfw:commentRss>
      </item>
    
</channel>
</rss>