<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Clickframes</title>
	<atom:link href="http://www.clickframes.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clickframes.org</link>
	<description>Web Application Framework</description>
	<lastBuildDate>Fri, 19 Feb 2010 14:24:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Code Generation for Web Applications with Clickframes</title>
		<link>http://www.clickframes.org/blog/2010/02/code-generation-for-web-applications-with-clickframes/</link>
		<comments>http://www.clickframes.org/blog/2010/02/code-generation-for-web-applications-with-clickframes/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 22:02:49 +0000</pubDate>
		<dc:creator>Vineet Manohar</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://new.clickframes.org/?p=86</guid>
		<description><![CDATA[Clickframes is a Code Generation framework written in Java designed specifically to generate (Java) web applications. Clickframes lets you jump start your new project with working generated code at minute zero. Keep what you've learnt in one project and reuse in another project using Clickframes Code Generation templates, or simply use the templates that come with Clickframes. The key to the Clickframes approach is separating what an application does and how it does it. What an application does is specific to the project, but how it does it can be generalized and reused across multiple project using code generation.]]></description>
			<content:encoded><![CDATA[<h3>What is Clickframes?</h3>
<p><a href="http://www.clickframes.org" target="_blank">Clickframes</a> is a Code Generation framework written in Java designed specifically to generate (Java) web applications.</p>
<h3>Philosophy behind Clickframes</h3>
<p>There are 2 aspects to a web application:</p>
<ol>
<li><em>What</em> the application does.</li>
<li><em>How</em> it does it.</li>
</ol>
<p>The key idea behind Clickframes is <strong>separation of these two concerns</strong>.</p>
<p><em>What</em> the application can be defined by focusing on end user experience &#8211; <strong>what</strong> the end user sees, <strong>what</strong> the user clicks and so on. When users open a webapp in a browser they see a page, links,  forms, inputs, content. They don&#8217;t see how the page was produced, which technology, framework or database was used on the back end. Defining what an application does boils does to defining a web page, after all a web application is most part is a collection of web pages linked to each other via links and form actions.</p>
<p>On the other hand, <em>how</em> an application is implemented consists of every little detail that happens &#8220;behind the scenes&#8221;. Which technology, platform and database is used, all the choices which result in a working application &#8211; but are never directly seen by the end user directly.</p>
<p><strong>Clickframes separates these two aspects of the application by defining an application model</strong> called Appspec. <strong>Appspec is a rich data structure which represents the application behavior</strong>. The business analyst defines the application behavior using the Appspec model. The developer writes code generators to implement a generic Appspec and then runs them for the specific Appspec written by the business analyst. Appspec becomes a contract and a way of communication between the analyst and the developer. In the meantime QA takes the Appspec and writes tests against it. Appspec becomes a way of communication and the single source of truth for the various members of the team.</p>
<p>To give you a concrete sense of what I am talking about, let&#8217;s say that the Appspec has a page called &#8220;home&#8221;. The developer may choose to implement this using a simple jsp file &#8220;home.jsp&#8221;. The developer then generalizes this implementation and creates a code generator to produce a file called [page id].jsp for every page in the Appspec. Again, the philosophy being &#8220;if I can figure out how to implement one page, I can apply the same approach for all pages&#8221;. This approach implemented via a set of code generators applied against the application definition (or Appspec) is the key idea of the Clickframes approach. The result is an automatically generated application for a given target platform/technology (e.g. &#8220;jsp&#8221; in the previous example) which produces consistent code for the entire application. This code is produced using code generators at minute zero of your project, i.e. even before you start working on your project. You can then take the generated code and start customizing it. This is a great productivity boost as you can use the same code generators from one project to another as they are not specific to any particular application, but are written for the generic Appspec model for the given target technology/platform. Such code generators usually exists are code generation templates and are referred to as <strong>Clickframes Plugin</strong>.</p>
<h3>Terminology</h3>
<p>To recap the terminology:</p>
<p><strong>Appspec (Application Specification) &#8211; </strong>Appspec is <strong><em>what</em></strong> the web application does, from an end user&#8217;s perspective. It essentially captures the behavior of the application. How many pages does the application have, how many forms does each page have. How many input fields on each page. What type of input fields (e.g. text, textarea, radio, dropdown). Are there any validation rules on the input fields (e.g. must be 8-12 characters, or must be a zipcode, must be a valid email format). What is the next page when the user submits a form on a page. How many links on the page, do the links point to another page in the application or an external link. The list goes on,  but you get the idea.</p>
<p><strong>Clickframes Plugin &#8211; </strong>Clickframes Plugin is a code generator, usually implemented by creating a set of templates, which inputs an Appspec and generates code. A plugin is usually a zip file consisting of dozens of templates written in plain text or velocity. Plugins can also be written or extended in Java using the Clickframes Plugin API.</p>
<p><strong>Clickframes Plugin Authors &#8211; </strong>(Usually) Senior or Experienced developers who have a good understanding of the target technology create a plugin to implement the Appspec. Note that this activity needs to be done only once per technology. For example, once I have created a Seam2 plugin, you can generate any number of applications by simply writing an Appspec for your application and generate Seam code by using the plugin.</p>
<p><strong>Target language/platform</strong> &#8211; Clickframes is a Code Generation framework that you use before you even start your project. It generates code that you then compile and run. Target platform refers to the platform on which the generate code runs. Example target platforms are Java/Tomcat, Java/Seam/JBoss, JSF/Tomcat, PHP. If you are willing to write your own code generation templates, you can generate code for any language/target platform.</p>
<h3>Why Clickframes?</h3>
<p>One advantage of Clickframes is that it acts as a medium of communication between the various members of the team.</p>
<p>However, the most powerful feature of Clickframes is the Clickframes Code Generation Plugins. Once you write a plugin for a technology or platform, you can instantly generate a full working application by simply writing the Appspec for that application and running the Clickframes Plugin on this Appspec . Writing an Appspec should be much easier than implementing the application itself.</p>
<h3>Hello, World example</h3>
<p>Let say an application has one page which has the text &#8220;Hello, World&#8221;. You can create the Appspec by either using the Java API or XML format.</p>
<h4>Creating appspec via XML</h4>
<pre name="code" class="xml">&lt;appspec&gt;
  &lt;pages&gt;
    &lt;page id="home"&gt;
     &lt;contents&gt;
      &lt;content id="message1"&gt;Hello, world&lt;/content&gt;
     &lt;/contents&gt;
    &lt;/page&gt;
  &lt;/pages&gt;
&lt;/appspec&gt;</pre>
<h4>Creating appspec via Java</h4>
<pre name="code" class="java">Appspec appspec = new Appspec();
Page home = new Page();
Content message1 = new Content();
message1.setId("message1");
message1.setText("Hello, World");
home.getContents().add(message1);
appspec.getPages().addPage(home);</pre>
<h4>Clickframes sample JSP Plugin</h4>
<p>Now lets build a simple JSP code generator. <em>This code generator is just for the purpose of illustration and is not intended to be a real production quality plugin.</em></p>
<p>Create a file called <strong>${page.id}.jsp.</strong> Since the file name consists of the variable ${page} this file will automatically be applied to all pages in the application.</p>
<p>Contents of <strong>${page.id}.jsp</strong> below. All templates are written in <a href="http://velocity.apache.org/engine/releases/velocity-1.6.2/user-guide.html" target="_blank">Apache Velocity</a>.</p>
<p>The ${page} variable passed to the template represents the Java object defined above.</p>
<pre name="code" class="xml">&lt;html&gt;
 &lt;body&gt;
#foreach ($content in $page.contents)
  &lt;div id="${content.id}"&gt;${content.text}&lt;/div&gt;
#end
 &lt;/body&gt;
&lt;/html&gt;</pre>
<p>Running this plugin against the above model will produce one file called &#8220;<strong>home.jsp</strong>&#8221; with the following content.</p>
<pre name="code" class="xml">&lt;html&gt;
 &lt;body&gt;
  &lt;div id="message1"&gt;Hello, World&lt;/div&gt;
 &lt;/body&gt;
&lt;/html&gt;</pre>
<p>You can now add a dozen pages to your application and reuse the same code generation template.</p>
<h3>A more comprehensive demo</h3>
<p>The above example is good to give you a quick sense of how the code generation works. However, real applications contains forms, links, inputs, actions, entities, databases and so on. The following example uses a JSF Seam2 plugin which is used to generate a simple Issue Tracker Application.</p>
<p>The best way to jump in and get your feet wet is by seeing and running the code. I have created a JSF Seam2 plugin which generates JSF2 and Seam based web applications.</p>
<p>Here&#8217;s the <a href="http://code.google.com/p/clickframes-seam-issuetracker-demo/source/browse/trunk/src/main/clickframes/appspec.xml" target="_blank">Appspec</a> for the application and you can browse the generated code <a href="http://code.google.com/p/clickframes-seam-issuetracker-demo/source/browse/trunk/" target="_blank">here</a>. There is a hosted version of running demo at <a href="http://demo.clickframes.org/tracker/">http://demo.clickframes.org/tracker/</a></p>
<p><strong>Checkout the project code:</strong></p>
<pre name="code" class="css">svn checkout http://clickframes-seam-issuetracker-demo.googlecode.com/svn/trunk/ clickframes-seam-issuetracker-demo</pre>
<p><strong>Run it:</strong></p>
<pre name="code" class="css">cd clickframes-seam-issuetracker-demo
mvn glassfish:run</pre>
<p>See the application run at <a href="http://localhost:8080/issuetracker/" target="_blank">http://localhost:8080/issuetracker/</a><br />
You can type any login/password to login. The login module implemented by default does passes any input. In the future I plan modify the plugin to properly implement login.</p>
<p><strong>Key demo features:</strong></p>
<ul>
<li><strong>Security</strong>: pages with login-required=&#8221;true&#8221; will automatically prompt you for login.</li>
<li><strong>AJAX</strong> input validation: inputs with validation will prompt you with an error as you type if the validation fails</li>
<li><strong>Built-in CRUD implementation</strong> using in-memory database: actions marked with &#8220;update&#8221; or &#8220;create&#8221; will actually create an entity and store it in an in memory database</li>
</ul>
<p>Note that this application is 100% generated directly from the <a href="http://code.google.com/p/clickframes-seam-issuetracker-demo/source/browse/trunk/src/main/clickframes/appspec.xml" target="_blank">Appspec</a>. What is means is that you can modify the application behavior by modifying the Appspec and regenerate the application.</p>
<p><strong>Regenerate:</strong></p>
<pre name="code" class="css">mvn clickframes:generate</pre>
<h4>Can you really model every single thing about a web application?</h4>
<p>No. Clickframes focuses on things which <em>can</em> be easily modeled. Even if you are able to capture 50% of the application features in the Appspec, you can generate a working application which implements 50% of requirement without writing a single line of code. That&#8217;s quite a jump in productivity. You can then hand code the remaining application the usual way.</p>
<h3>Case for Clickframes</h3>
<p>Clickframes is not for all web applications. If the Clickframes model fits your application model then I urge you to give Clickframes a try. With Clickframes you can produce consistent code for your entire application. You can bake the best practices right into the code generation templates. Moreover, you can use these templates from one project to another.</p>
<h3>References and Links</h3>
<ul>
<li>Clickframes official website: <a href="http://www.clickframes.org" target="_blank">www.clickframes.org</a></li>
<li>Follow Clickframes on Twitter: <a href="http://twitter.com/clickframes" target="_blank">http://twitter.com/clickframes</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.clickframes.org/blog/2010/02/code-generation-for-web-applications-with-clickframes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ignite Boston Video</title>
		<link>http://www.clickframes.org/blog/2009/11/ignite-boston-video/</link>
		<comments>http://www.clickframes.org/blog/2009/11/ignite-boston-video/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 21:14:20 +0000</pubDate>
		<dc:creator>Jonathan Abbett</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://new.clickframes.org/?p=107</guid>
		<description><![CDATA[The video from the Clickframes talk at Ignite Boston 6 is now online. The Quicktime Video is here. Warning, big!]]></description>
			<content:encoded><![CDATA[<p>The video from the Clickframes talk at Ignite Boston 6 is now online. The <a href="http://cdn.oreilly.com/ignite/boston/6/Ignite_19_William_Crawford.mov">Quicktime Video</a> is here. Warning, big!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickframes.org/blog/2009/11/ignite-boston-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://cdn.oreilly.com/ignite/boston/6/Ignite_19_William_Crawford.mov" length="24326466" type="video/quicktime" />
		</item>
		<item>
		<title>They call it CLIPr, CLIPr&#8230;</title>
		<link>http://www.clickframes.org/blog/2009/09/they-call-it-clipr-clipr/</link>
		<comments>http://www.clickframes.org/blog/2009/09/they-call-it-clipr-clipr/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 21:13:19 +0000</pubDate>
		<dc:creator>Jonathan Abbett</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://new.clickframes.org/?p=105</guid>
		<description><![CDATA[Faster than lightning, CLIPr lets you upload an appspec and preview the CLIPs without having to download or install anything locally.]]></description>
			<content:encoded><![CDATA[<p>Faster than lightning, <a href="http://tools.clickframes.org/clipr">CLIPr</a> lets you upload an appspec and preview the CLIPs without having to download or install anything locally.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickframes.org/blog/2009/09/they-call-it-clipr-clipr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CF @ WebInno23</title>
		<link>http://www.clickframes.org/blog/2009/09/cf-webinno23/</link>
		<comments>http://www.clickframes.org/blog/2009/09/cf-webinno23/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 21:11:28 +0000</pubDate>
		<dc:creator>Jonathan Abbett</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://new.clickframes.org/?p=100</guid>
		<description><![CDATA[The Beacon16 gang will be serving a Clickframes &#8220;side dish&#8221; at the next Web Innovators Group bash: Tuesday, September 29, 2009, 6:30 pm, at the Royal Sonesta Cambridge. It’s free, but RSVP is required. See you there!]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.beacon16.com/">Beacon16</a> gang will be serving a Clickframes &#8220;side dish&#8221; at the next <a href="http://webinno23.eventbrite.com/">Web Innovators Group</a> bash: Tuesday, September 29, 2009, 6:30 pm, at the <a href="http://maps.google.com/maps?oe=utf-8&#038;client=firefox-a&#038;ie=UTF8&#038;q=Royal+Sonesta+Cambridge+40+Edwin+H+Land+Blvd+Cambridge,+MA+02142&#038;fb=1&#038;gl=us&#038;hq=Royal+Sonesta+Cambridge+40+Edwin+H&#038;hnear=Land+Blvd+Cambridge,+MA+02142&#038;ei=lDmySuaTB4fozQT-5vyYAg&#038;hl=en&#038;sll=42.362654,-71.077142&#038;sspn=0.012142,0.039246&#038;cd=1&#038;usq=Royal+Sonesta+Cambridge+40+Edwin+H&#038;geocode=FcN3hgIdC3zD-w&#038;cid=4763370814089381738&#038;li=lmd&#038;ll=42.367026,-71.074805&#038;spn=0.010955,0.01929&#038;z=16&#038;iwloc=A">Royal Sonesta Cambridge</a>. It’s free, but RSVP is required. See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickframes.org/blog/2009/09/cf-webinno23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CF @ Ignite Boston 6</title>
		<link>http://www.clickframes.org/blog/2009/09/cf-ignite-boston-6/</link>
		<comments>http://www.clickframes.org/blog/2009/09/cf-ignite-boston-6/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 21:10:25 +0000</pubDate>
		<dc:creator>Jonathan Abbett</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://new.clickframes.org/?p=98</guid>
		<description><![CDATA[See Will Crawford’s 5-minute Clickframes talk at Ignite Boston 6 on Thursday, September 17, hosted by O’Reilly Media and Fidelity Investments.]]></description>
			<content:encoded><![CDATA[<p>See Will Crawford’s 5-minute Clickframes talk at <a href="http://igniteboston.eventbrite.com/">Ignite Boston 6</a> on Thursday, September 17, hosted by O’Reilly Media and Fidelity Investments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickframes.org/blog/2009/09/cf-ignite-boston-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CF @ Expo:QA 2009</title>
		<link>http://www.clickframes.org/blog/2009/07/clickframes-expo-qa-200/</link>
		<comments>http://www.clickframes.org/blog/2009/07/clickframes-expo-qa-200/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 21:09:33 +0000</pubDate>
		<dc:creator>Jonathan Abbett</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://new.clickframes.org/?p=93</guid>
		<description><![CDATA[Nicole Zanetti will present &#8220;The Single Source of Truth: Quality Assurance Can Keep Up in an Agile Environment&#8221; at Expo:QA 2009 in Madrid. The conference is being held October 27-29.]]></description>
			<content:encoded><![CDATA[<p>Nicole Zanetti will present &#8220;The Single Source of Truth: Quality Assurance Can Keep Up in an Agile Environment&#8221; at <a href="http://www.expoqa.com/en/conference-programa-detallado.php#e92">Expo:QA 2009</a> in Madrid. The conference is being held October 27-29.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickframes.org/blog/2009/07/clickframes-expo-qa-200/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
