<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Curl Global Community - Code Samples]]></title>
		<link>https://communities.curl.com/</link>
		<description><![CDATA[Curl Global Community - https://communities.curl.com]]></description>
		<pubDate>Tue, 05 May 2026 09:42:58 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Google Translation APIを使って翻訳]]></title>
			<link>https://communities.curl.com/showthread.php?tid=104</link>
			<pubDate>Thu, 07 Jul 2011 01:54:55 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=104</guid>
			<description><![CDATA[<a href="http://code.google.com/intl/ja/apis/language/translate/v2/using_rest.html" target="_blank" rel="noopener" class="mycode_url">Google Translation API</a> を使って翻訳をする方法です。<br />
<br />
このGoogle Translation APIを利用するには、<a href="https://code.google.com/apis/console/" target="_blank" rel="noopener" class="mycode_url">Google APIs Console</a>からAPI Keyを生成する必要があります。 <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>{define-proc public {translate<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version:int = 2,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key:String,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source:String,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source-locale:Locale,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target-locale:Locale<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}:String<br />
&nbsp;&nbsp;&nbsp;&nbsp;def site = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{format<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"https://www.googleapis.com/language/translate/v%i",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;def params = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{format <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"key=%s&amp;q=%s&amp;source=%s&amp;target=%s",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{url-encode-string source},<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source-locale.name,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target-locale.name<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;def target-url = {format "%s?%s", site, params}<br />
&nbsp;&nbsp;&nbsp;&nbsp;{with-open-streams<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tis = {read-open {url target-url}}<br />
&nbsp;&nbsp;&nbsp;&nbsp; do<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def json-val = {JsonValue-parse tis}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{return<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|| TODO: HTML decode<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{url-decode-string <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;json-val["data"]["translations"][0]["translatedText"]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://communities.curl.com/images/attachtypes/zip.gif" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=114" target="_blank" title="">Google Translation API_2.zip</a> (Size: 1.5 KB / Downloads: 1418)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<a href="http://code.google.com/intl/ja/apis/language/translate/v2/using_rest.html" target="_blank" rel="noopener" class="mycode_url">Google Translation API</a> を使って翻訳をする方法です。<br />
<br />
このGoogle Translation APIを利用するには、<a href="https://code.google.com/apis/console/" target="_blank" rel="noopener" class="mycode_url">Google APIs Console</a>からAPI Keyを生成する必要があります。 <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>{define-proc public {translate<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version:int = 2,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key:String,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source:String,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source-locale:Locale,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target-locale:Locale<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}:String<br />
&nbsp;&nbsp;&nbsp;&nbsp;def site = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{format<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"https://www.googleapis.com/language/translate/v%i",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;def params = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{format <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"key=%s&amp;q=%s&amp;source=%s&amp;target=%s",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{url-encode-string source},<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source-locale.name,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target-locale.name<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;def target-url = {format "%s?%s", site, params}<br />
&nbsp;&nbsp;&nbsp;&nbsp;{with-open-streams<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tis = {read-open {url target-url}}<br />
&nbsp;&nbsp;&nbsp;&nbsp; do<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def json-val = {JsonValue-parse tis}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{return<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|| TODO: HTML decode<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{url-decode-string <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;json-val["data"]["translations"][0]["translatedText"]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://communities.curl.com/images/attachtypes/zip.gif" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=114" target="_blank" title="">Google Translation API_2.zip</a> (Size: 1.5 KB / Downloads: 1418)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Google サジェストから候補データを取得し、オートコンプリートを作る]]></title>
			<link>https://communities.curl.com/showthread.php?tid=105</link>
			<pubDate>Thu, 07 Jul 2011 01:49:53 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=105</guid>
			<description><![CDATA[Google サジェストから候補データを取得し、オートコンプリート機能を作るサンプルです。<br />
<br />
以下のようにhttp://suggestqueries.google.comにリクエストを投げれば、JSONが返ってくるので、それを解析するだけでOK。<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>{define-proc {find-google-suggestions <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; word:String,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host-locale:Locale = {get-host-locale}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }:{Array-of String}<br />
&nbsp;&nbsp;&nbsp;&nbsp;def query = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"http://suggestqueries.google.com/complete/search?hl=%s&amp;qu=%s&amp;json=t"<br />
&nbsp;&nbsp;&nbsp;&nbsp;def suggestions = {{Array-of String}}<br />
&nbsp;&nbsp;&nbsp;&nbsp;def qu = {url-encode-string word}<br />
&nbsp;&nbsp;&nbsp;&nbsp;{with-open-streams<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tis = {read-open {url {format query, host-locale.name, qu}}}<br />
&nbsp;&nbsp;&nbsp;&nbsp; do<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def results = {JsonValue-parse tis} asa JsonArray<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{for v in results[1] asa JsonArray do<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{suggestions.append v asa String}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;{return suggestions}<br />
}<br />
<br />
{define-class public open GoogleSuggestionProvider<br />
&nbsp;&nbsp;{inherits AutocompleteProvider}<br />
<br />
&nbsp;&nbsp;{method public open {refresh acf:AutocompleteMixin}:void<br />
&nbsp;&nbsp;&nbsp;&nbsp;def word = acf.text-field.value<br />
&nbsp;&nbsp;&nbsp;&nbsp;{if word.size &gt; 0 then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{acf.populate-from-strings <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{find-google-suggestions word}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;{constructor public {default max-results:int = 10}<br />
&nbsp;&nbsp;&nbsp;&nbsp;{construct-super max-results}<br />
&nbsp;&nbsp;}<br />
}<br />
<br />
{value<br />
&nbsp;&nbsp;&nbsp;&nbsp;{AutocompleteTextField<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height = 1cm,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width = 10cm,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;font-size = 14px,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{GoogleSuggestionProvider},<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{on FocusIn at acf:AutocompleteTextField do<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{acf.provider.refresh acf}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></div></div><br />
この中では、<a href="http://sourceforge.net/projects/curl-ext/" target="_blank" rel="noopener" class="mycode_url">Curl External Library</a>のAutoCompleteTextFieldコントロールを使っています。<br />
<br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://communities.curl.com/images/attachtypes/zip.gif" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=113" target="_blank" title="">Google Suggestion API.zip</a> (Size: 8.9 KB / Downloads: 1270)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[Google サジェストから候補データを取得し、オートコンプリート機能を作るサンプルです。<br />
<br />
以下のようにhttp://suggestqueries.google.comにリクエストを投げれば、JSONが返ってくるので、それを解析するだけでOK。<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>{define-proc {find-google-suggestions <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; word:String,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host-locale:Locale = {get-host-locale}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }:{Array-of String}<br />
&nbsp;&nbsp;&nbsp;&nbsp;def query = <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"http://suggestqueries.google.com/complete/search?hl=%s&amp;qu=%s&amp;json=t"<br />
&nbsp;&nbsp;&nbsp;&nbsp;def suggestions = {{Array-of String}}<br />
&nbsp;&nbsp;&nbsp;&nbsp;def qu = {url-encode-string word}<br />
&nbsp;&nbsp;&nbsp;&nbsp;{with-open-streams<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tis = {read-open {url {format query, host-locale.name, qu}}}<br />
&nbsp;&nbsp;&nbsp;&nbsp; do<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def results = {JsonValue-parse tis} asa JsonArray<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{for v in results[1] asa JsonArray do<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{suggestions.append v asa String}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;{return suggestions}<br />
}<br />
<br />
{define-class public open GoogleSuggestionProvider<br />
&nbsp;&nbsp;{inherits AutocompleteProvider}<br />
<br />
&nbsp;&nbsp;{method public open {refresh acf:AutocompleteMixin}:void<br />
&nbsp;&nbsp;&nbsp;&nbsp;def word = acf.text-field.value<br />
&nbsp;&nbsp;&nbsp;&nbsp;{if word.size &gt; 0 then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{acf.populate-from-strings <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{find-google-suggestions word}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;}<br />
<br />
&nbsp;&nbsp;{constructor public {default max-results:int = 10}<br />
&nbsp;&nbsp;&nbsp;&nbsp;{construct-super max-results}<br />
&nbsp;&nbsp;}<br />
}<br />
<br />
{value<br />
&nbsp;&nbsp;&nbsp;&nbsp;{AutocompleteTextField<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height = 1cm,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width = 10cm,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;font-size = 14px,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{GoogleSuggestionProvider},<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{on FocusIn at acf:AutocompleteTextField do<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{acf.provider.refresh acf}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}</code></div></div><br />
この中では、<a href="http://sourceforge.net/projects/curl-ext/" target="_blank" rel="noopener" class="mycode_url">Curl External Library</a>のAutoCompleteTextFieldコントロールを使っています。<br />
<br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://communities.curl.com/images/attachtypes/zip.gif" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=113" target="_blank" title="">Google Suggestion API.zip</a> (Size: 8.9 KB / Downloads: 1270)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Order Entry Sample Application]]></title>
			<link>https://communities.curl.com/showthread.php?tid=103</link>
			<pubDate>Fri, 01 Jul 2011 01:31:48 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=103</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/order-entry/start.curl" target="_blank" rel="noopener" class="mycode_url">Order Entry Sample Application</a></span><br />
<br />
NOTE: This version of the Order Entry Sample Application requires release 6.0 of the Curl RTE.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Objective</span></span><br />
This document is intended to guide you through the process of evaluating the Curl technology, including the Curl language, runtime, and development tools. A sample application provides a concrete example that will help you appreciate various elements of the Curl platform. When you are done you will see why Curl is the best choice for developing rich, complex, data-intensive, web applications.<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Initialization</span></span><br />
In order to run the Order Entry Sample Application that serves as a medium for exploring and evaluating the Curl platform, please follow these simple, preliminary steps:<br />
<br />
<ol type="1" class="mycode_list"><li>Check the System Requirements for the Curl platform.<ul class="mycode_list"><li><a href="http://www.curl.com/download/ide/system.php" target="_blank" rel="noopener" class="mycode_url">http://www.curl.com/download/ide/system.php</a><br />
</li>
</ul>
</li>
<li>Download the Curl Integrated Development Environment (IDE) and Runtime Environment (RTE).<ul class="mycode_list"><li><a href="http://www.curl.com/download/ide/index.php" target="_blank" rel="noopener" class="mycode_url">http://www.curl.com/download/ide/index.php</a><br />
</li>
<li>NOTE: On Windows, the RTE is packaged with the IDE installer.<br />
</li>
</ul>
</li>
<li>Install the RTE and IDE.<ul class="mycode_list"><li>NOTE: On Windows, the RTE is installed automatically by the IDE installer.<br />
</li>
</ul>
</li>
<li>Download the Order Entry Sample Application<ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: line-through;" class="mycode_s">#</span></span><br />
</li>
</ul>
</li>
<li>Install the Order Entry Sample Application<ul class="mycode_list"><li>To install the Order Entry sample application, just unzip the distribution to any drive on your machine. It will create a directory named OrderEntry and contain a file named start.curl therein.<br />
</li>
</ul>
</li>
</ol>
 <br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Exploration</span></span><br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Integrated Development Environment</span></span><br />
Start by exploring the Curl development tools.<br />
<br />
<ol type="1" class="mycode_list"><li>Launch the IDE.<br />
</li>
<li>Launch the Curl Documentation Viewer.<ul class="mycode_list"><li>The Curl help system is readily accessible from the Curl IDE via the 'Help' menu.<br />
</li>
</ul>
</li>
</ol>
 <br />
You might have noticed by now that the Curl RTE is running. That is because the Curl IDE, Documentation Viewer, and RTE are all Curl applications, that is, they are written in Curl!<br />
<br />
Take some time to look at the Curl Documentation Viewer. You will notice, in the table of contents, that there are 4 main sections.<br />
<ul class="mycode_list"><li>Curl Developer's Guide<br />
</li>
<li>Curl IDE User's Guide<br />
</li>
<li>Curl VLE User's Guide<br />
</li>
<li>API Reference<br />
</li>
</ul>
 <br />
NOTE: You can even install your own Curl applications' documentation in the Curl Documentation Viewer!<br />
<br />
The IDE &amp; Visual Layout Editor (VLE) User's Guides provide detailed help on using the Curl development tools. The Curl Developer's Guide presents a narrative guide for learning about the Curl language and the libraries provided by the Curl RTE. The API Reference documents the classes, procedures, primitives, packages, etc. that make up the Curl language API. <br />
<br />
The Curl Developer's Guide is a good place to start learning all about Curl, beginning with a quick description of how to most productively use the Curl Documentation Viewer's features (contents, index, search).<br />
<br />
You will notice right away that the Curl Documentation Viewer is different than other documentation viewers. In particular, the Curl Developer's Guide and API Reference contain interactive examples. Since the documentation viewer is, itself, a Curl application, developers can write and test live Curl code in a Curl example box. This facilitates the learning of various Curl language concepts, and provides a convenient scratch pad for testing code snippets.<br />
<ul class="mycode_list"><li>In the "Look for:" field of the Curl Documentation Viewer's Index type "examples" and hit Enter to see this interactive feature displayed and described.<br />
</li>
</ul>
 <br />
The Curl Developer's Guide presents material for a tremendous variety of Curl language elements, including:<br />
<ul class="mycode_list"><li>the core language syntax, types, and libraries<br />
</li>
<li>formatted text presentations and graphical user interfaces<br />
</li>
<li>data management and display<br />
</li>
<li>charting<br />
</li>
<li>graphics programming<br />
</li>
<li>how to work with external resources<br />
</li>
<li>packaging and deploying your Curl applications on the web<br />
</li>
</ul>
 <br />
The API Reference describes over 100 separate libraries built into the Curl RTE, including IO, graphics, GUI, data access, and charting libraries, even IDE-related libraries to help document your applications, and profile and monitor your applications' performance characteristics.<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Evaluation</span></span><br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Sample Application</span></span><br />
Continue evaluating the Curl platform using the Order Entry Sample Application. You might have seen the Order Entry sample on the Curl website, or perhaps in an individual demonstration, but here is your chance to get your hands dirty, look at the code, play with the development tools, and get a feel for working with the Curl platform.<br />
<br />
The Order Entry sample application demonstrates:<br />
<ul class="mycode_list"><li>how to build rich, complex, data-intensive web applications that leverage the computing power of your clients' machines using familiar design patterns such as Model-View-Controller (MVC)<br />
</li>
<li>how to obtain data from web resources, then model and manage them on the client<ul class="mycode_list"><li>transformation<br />
</li>
<li>summary<br />
</li>
<li>aggregation<br />
</li>
<li>modification<br />
</li>
<li>change propagation<br />
</li>
<li>submission<br />
</li>
</ul>
</li>
<li>how to build visually appealing textual, form-based, tabular, and graphical presentations laid out in a cohesive user interface<ul class="mycode_list"><li>standard components<ul class="mycode_list"><li>RecordGrid<br />
</li>
<li>Tree<br />
</li>
<li>charts<br />
</li>
<li>forms<br />
</li>
</ul>
</li>
<li>specialized reports<ul class="mycode_list"><li>tabular report<br />
</li>
</ul>
</li>
<li>extensions beyond the standard Curl components<ul class="mycode_list"><li>MinMax display pane<br />
</li>
</ul>
</li>
</ul>
</li>
<li>how to customize your application's appearance using Curl stylesheets<br />
</li>
<li>how to coordinate the interactivity of your applications, including:<ul class="mycode_list"><li>management of user gestures<br />
</li>
<li>control of application workflow<br />
</li>
<li>processing actions and GUI changes<br />
</li>
<li>management of communication between application components<br />
</li>
</ul>
</li>
</ul>
 <br />
You will be running the sample application from the filesystem. The Order Entry sample uses a special Curl technique for managing application resources - a manifest - so when running from the local filesystem, the applet requires privilege.<br />
<br />
<ol type="1" class="mycode_list"><li>Launch the Curl Control Panel<br />
</li>
<li>Click on the "Security" tab of the Curl Control Panel<br />
</li>
<li>Click on "This Computer" to open the section for local directories<br />
</li>
<li>Click on "Add Privileged Directory..."<br />
</li>
<li>In the "Add Privileged Directory" dialog, enter the directory in which you unzipped the Order Entry sample application, then click "OK"<ul class="mycode_list"><li>For example, C:\OrderEntry<br />
</li>
<li>Note, you can browse to the directory using the "Browse..." button<br />
</li>
</ul>
</li>
<li>To learn more about privilege and manifests, see the Curl Documentation Viewer.</li>
</ol>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Running the Sample Application</span></span><br />
Now you may launch the Order Entry sample Curl application.<br />
<br />
<ol type="1" class="mycode_list"><li>Using a web browser, such as Internet Explorer, open the start.curl file located in the OrderEntry directory where you unzipped the OrderEntry.zip file.<br />
</li>
<li>The browser feeds the Curl source code to the RTE which, in turn, compiles the Curl source code into high performance, native machine code. The sample application is launched and presented in the browser. The initial tab, labeled "Edit", is for data entry. Select an order from the tree to see the master/detail view for Create, Read, Update, and Delete operations<br />
</li>
<li>The second tab, labeled "Data", is for data visualization. It presents derived results, in chart, tabular, and data grid form. Notice the dynamic visual feedback. Because Curl runs on the client machine, it is easy to provide complex feedback in immediate response to user gestures. Click on the "Data" tab.<br />
</li>
<li>Click on a bar in the bar chart to popup a different view of the data.<br />
</li>
<li>Move the pointer over the pie chart to see a complex tooltip.<br />
</li>
<li>Double-click a title bar to maximize the pane.<br />
</li>
<li>Double-click the title bar again to restore the pane to its original size.<br />
</li>
<li>Notice how the presentations update immediately when a different order is selected from the index.</li>
</ol>
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">The Project File</span></span><br />
Take a look at the implementation. It highlights some important aspects of the Curl platform.<br />
<ul class="mycode_list"><li>Open the project in the IDE. On Windows you can accomplish this by double-clicking on the project.cprj file found in the directory in which you unzipped the Order Entry sample application, or selecting File-&amp;gt;Open Project... from the IDE's "File" menu.<ul class="mycode_list"><li>For example, double-click or select C:\OrderEntry\project.cprj<br />
</li>
</ul>
</li>
</ul>
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Modeling Data on the Client</span></span><br />
One of the most powerful attributes of Curl's rich Internet application platform is the ability to model and manipulate data on a client machine. Curl applications can obtain data from local or external resources using accepted web standards such as HTTP, SOAP, and TCP sockets. The applications can then consume data structured using well-known formats such as CSV or XML, as well as others, including proprietary formats.<br />
<br />
Once the data exists on the client, it can be modeled, analyzed, aggregated, or otherwise processed for use in the application. Here are some examples in the Order Entry sample implementation:<br />
<br />
<ol type="1" class="mycode_list"><li>To see an example of some source code, find the {ct-read-orders-recordset} procedure. It is called from a ctBaseTrainingApplicationModel constructor in the file model/ctBaseTrainingApplicationModel.scurl (use the IDE's Edit-&amp;gt;Go to Line... menu to go to line 29).<br />
</li>
<li>{ct-read-orders-recordset} is implemented in model/ct-orders-recordset.scurl (use the IDE's Search-&amp;gt;Find... menu and search for "ct-read-orders-recordset". Some key data access and modeling features exploited by the Order Entry sample include:<ul class="mycode_list"><li>reading data from a resource<br />
</li>
<li>RecordSets - organize data as a set of records with named fields<br />
</li>
</ul>
</li>
</ol>
 Client-side modeling of data is good because it allows for highly interactive user interfaces and minimizes server trips. Curl is good for this because Curl compiles to native machine code, meaning Curl applications perform at very high levels, even with very large datasets.<br />
<br />
Take this opportunity to look at some documentation using the IDE's context-sensitive access to the Curl Documentation Viewer. While you are in the documentation viewer, do not be shy about poking around. The documentation is one of Curl's strengths, due in part to the volume, and in part because the live, interactive examples (executing right inside the viewer) provide a convenient place to try out code and facilitate the understanding of the Curl concepts they exemplify.<br />
<ul class="mycode_list"><li>In the IDE's Editor pane, place the cursor on the "RecordSet" data type for the orders variable in {ct-read-orders-recordset} and hit the F1 key. The Curl Documentation Viewer will launch and display the documentation for RecordSet.<br />
</li>
</ul>
 <br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Presenting the Data</span></span><br />
Once the data is available to the Curl application, it can be presented to the user in a variety of ways. An example of some presentation source code can be found here:<br />
<ul class="mycode_list"><li>{ct-totals-bar-chart}<ul class="mycode_list"><li>Called at line 293 of view/ctBaseTrainingApplicationLayout.curl<br />
</li>
<li>Implemented at line 121 of view/ct-charts.scurl<br />
</li>
</ul>
</li>
</ul>
 <br />
{ct-totals-bar-chart} takes RecordView (a kind of RecordSet) data, manipulates the data for display, then creates and returns a chart.<br />
<br />
The presentation components in the Order Entry sample demonstrate several standard Curl features, including:<br />
<ul class="mycode_list"><li>Charts<br />
</li>
<li>RecordView<br />
</li>
<li>ChartDataSeries<br />
</li>
<li>Event handling<br />
</li>
<li>Exception handling<br />
</li>
</ul>
 <br />
You can easily find chart documentation:<br />
<ul class="mycode_list"><li>In the IDE's Editor pane, place the cursor on the "LayeredChart" data type for the chart variable where {ct-totals-bar-chart} is called in view/ctBaseTrainingApplicationLayout.curl, and hit the F1 key. The Curl Documentation Viewer will launch and display the documentation for LayeredChart.<br />
</li>
</ul>
 <br />
A variety of presentations is good because it is the mark of a truly rich user interface. Curl is good for this because Curl offers a wealth of built-in presentation classes:<br />
<ul class="mycode_list"><li>charts<br />
</li>
<li>data grids<br />
</li>
<li>forms<br />
</li>
<li>graphical objects<br />
</li>
<li>enhanced text<br />
</li>
</ul>
 <br />
Curl is extensible, so new presentations are only a {define-class } away!<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Styling the Application</span></span><br />
The presentation objects can be styled using Curl StyleSheets. Styling is implemented using a styling library provided by Curl. The library is included, in pcurl format, with the Order Entry Sample Application.<br />
<ul class="mycode_list"><li>The pcurled format is a compressed, pre-processed format which is useful for hiding code and improving delivery speed.<br />
</li>
</ul>
 <br />
The library is incorporated into the sample as follows:<br />
<br />
<ol type="1" class="mycode_list"><li>identify the library to the sample<ul class="mycode_list"><li>see line 28 of the OrderEntry/manifest.mcurl file<br />
</li>
</ul>
</li>
<li>import the library where you wish to use it<ul class="mycode_list"><li>see line 15 of start.curl or line 38 of view/load.scurl<br />
</li>
</ul>
</li>
<li>install the stylesheet for use by calling {install-style-sheet}<ul class="mycode_list"><li>see line 17 of start.curl<br />
</li>
</ul>
 Notice how the default style sheet is augmented with user-defined StyleRules in the call to {install-style-sheet}.</li>
</ol>
<br />
NOTE: The IDE has features that make it easy to start a project that uses the styling library.<br />
<br />
Stylability is good because you can customize the look of GUI controls, and provide themes or branding to your application. Curl is good for this because the Curl stylesheets are separate from application source code. This allows designers and developers to work independently.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Coordinated Layout and Change Management</span></span><br />
The presentations have been connected to the data, so they can now be placed in a coordinated layout. Interactivity needs to be handled, and data changes need to be managed. The primary controller for the Order Entry application is ctBaseTrainingApplication. It is located in the controller package, in, predictably, the controller/ctBaseTrainingApplication.scurl file. This class handles layout management as well as data management.<br />
<ul class="mycode_list"><li>Look at the code in the controller/ctBaseTrainingApplication.scurl file.<br />
</li>
</ul>
 <br />
The Order Entry sample's RecordForm demonstrates data binding using Curl's macro.<br />
<br />
<ol type="1" class="mycode_list"><li>Open the view/LineItemForm.scurl.file.<br />
</li>
<li>Search for "{bind".<br />
As you review the code, you will learn how the application makes use of:<br />
<ul class="mycode_list"><li>Curl's graphical layout system<br />
</li>
<li>Coordination techniques<ul class="mycode_list"><li>Enqueue and handle events to provide a high-quality user experience <br />
</li>
<li>Change management, including data binding, to update the data model in response to user manipulation<br />
</li>
<li>Synchronizing presentation components with the updated model<br />
</li>
</ul>
</li>
</ul>
</li>
</ol>
 <br />
Check out the documentation for various features:<br />
<br />
<ol type="1" class="mycode_list"><li>In the "Look for:" field of the Curl Documentation Viewer's Index type "graphical containers" and hit Enter. You will find a wealth of information on the building blocks of Curl's GUI subsystem.<br />
</li>
<li>In the "Look for:" field of the Curl Documentation Viewer's Index type "events" and hit Enter. Read through the section on "Events".<br />
</li>
<li>In the "Look for:" field of the Curl Documentation Viewer's Index type "DataBinding" and hit Enter. Read through the section on "Forms and Bound Data".<br />
</li>
</ol>
Coordination is good because a coordinated layout makes for a cohesive user interface and facilitates functionality such as maximizing individual presentations (click on the "Data" tab and double-click on a chart's title bar), drill-down (click on a bar in a bar chart), mouseovers (move the pointer over a pie chart), and drag-and-drop (not implemented in the sample). Curl is good for this because you can use event handling, a familiar programming technique, as a way to add interactivity to an application. Curl also allows you to define your event handlers dynamically, as arguments to the constructor of the event target.<br />
This facilitates declarative creation of user interface objects along with the handlers of events that might be fired at those objects.<br />
<br />
Proper change management is good because it allows different presentations to remain synchronized, so if data changes are made in one presentation (e.g., in the line item editor on the "Edit" tab) all the presentations (e.g., those on the "Data" tab) reflect the change. Toward that end, Curl has given significant attention to data binding making it a powerful, yet easy to use way of managing changes to your data.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Some More IDE Features</span></span><br />
Now is a good time to take a look at some other IDE features and components. For example:<br />
<br />
<ol type="1" class="mycode_list"><li>Ctrl-right-click the "Curl Order Entry Sample" title at the top of the sample.<br />
</li>
<li>Select the "Graphic Hierarchy for []" to launch Curl's graphical hierarchy tool.<br />
</li>
<li>You can also select "Inspect []" to inspect an object's members and options.<br />
</li>
</ol>
 Another convenient feature is code completion.<br />
<ul class="mycode_list"><li>Somewhere in the start.curl file, start typing "{ct-rec" then hit Ctrl-Space to see the possible completions.<br />
</li>
</ul>
Of course a very powerful feature is the debugger, which is tightly integrated with the rest of the IDE. Try setting a breakpoint:<br />
<ul class="mycode_list"><li>Set a breakpoint by clicking in the vertical, gray column along the left-hand side of the Editor panel in start.curl.<ul class="mycode_list"><li>Try setting it next to the constructor of the ctBaseTrainingApplication class (line 112 of start.curl).<br />
</li>
</ul>
</li>
</ul>
 <br />
The next time the demo is run during this IDE session, the debugger will stop execution at this point. Refresh the browser containing the OrderEntry sample to see it in action.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Deploying Curl Applications</span></span><br />
You have seen a sample Curl application, taken some time to explore the tools used to build such an application, and now you can take a look at how Curl addresses the matter of deploying your applications. Curl does not require any special kind of server; a typical web server, simply configured to server Curl content, is all you need.<br />
<ul class="mycode_list"><li>In the "Look for:" field of the Curl Documentation Viewer's Index type "configure Web servers" and hit Enter to learn the configuration basics.<br />
</li>
</ul>
 <br />
Curl allows developers to compress and obfuscate their Curl source code in a pre-processed format called pcurl for fast delivery of applications to client machines in a format not easily read by humans. Illustrating the compression aspect of the pcurl format, ~115kB of source code in the Order Entry sample pcurls down to ~18kB.<br />
<ul class="mycode_list"><li>In the "Look for:" field of the Curl Documentation Viewer's Index type "pcurl files" and hit Enter to learn the about pcurl.<br />
</li>
</ul>
 <br />
NOTE: The pcurl feature in the IDE is considered a professional feature, thus is not immediately available in the free version of the IDE.<br />
<br />
The Curl IDE has many other features aimed at simplifying application deployment. For example:<br />
<ul class="mycode_list"><li>In the "Look for:" field of the Curl Documentation Viewer's Index type "projects" then double-click on the sub-entry "deploying" for a comprehensive discussion of deployment.<br />
</li>
</ul>
 <br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Visual Development Using the Visual Layout Editor</span></span><br />
Curl provides a visual development environment called the Visual Layout Editor (VLE) which you can use to develop the user interfaces for your Curl applications. The VLE is integrated with the IDE, making it easy to switch between environments as appropriate for the code you are working on. This is particularly useful when adding behaviors (using, for example, event handlers) to your user interface.<br />
<br />
One of the great features of the VLE is its extensibility. The VLE supports a tremendous number of Curl objects by default, but imagine you have your own component that is not included in the default VLE palette. Is it possible to place such a component into the visual development environment? Yes. You can define your own objects and add them to the VLE palette, thereby extending the capabilities of the VLE. Curl even provides a tool, the VLE Extension Editor, to help you do exactly this. Once the extension is installed, the VLE will load it during startup, making your component available each time you launch the VLE.<br />
<br />
Refer to the Curl VLE User's Guide to learn more about how to use and extend the VLE.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Summary</span></span><br />
The Order Entry sample application showed you that:<br />
<ul class="mycode_list"><li>Curl is the right platform for building web applications that consume moderate to large volumes of data and require high performance from visually appealing, rich user interfaces.<br />
</li>
<li>Curl can obtain data from local or external resources using accepted web standards such as HTTP, SOAP, and TCP sockets.<br />
</li>
<li>Curl applications can consume data structured using well-known formats such as CSV or XML, as well as others, including proprietary formats.<br />
</li>
<li>The Curl platform encourages you to model your data on the client to leverage the processing power of the user's machine. With data modeled on the client, performance and user experience are maximized while server trips are limited to incremental data requests or occasional code updates. Contrast that with conventional thin client technologies!<br />
</li>
</ul>
 <br />
While the Order Entry sample application is relatively small in size, it is representative of a typical Curl application because<br />
<ul class="mycode_list"><li>it has a rich user interface which is executed on the client<br />
</li>
<li>it uses libraries that are built-in to the RTE<br />
</li>
<li>it creates new classes and libraries, and extends existing classes and libraries to augment the Curl RTE<br />
</li>
<li>it uses Curl's styling library to customize the appearance of the GUI controls and the application<br />
</li>
<li>it consumes relational data<br />
</li>
<li>it transforms, sorts, filters, and presents data<br />
</li>
<li>application logic (e.g., aggregation and summary) is performed on the client<br />
</li>
<li>it allows the user to operate on the data and submit changes<br />
</li>
<li>it implements a change management mechanism using data binding<br />
</li>
</ul>
 <br />
The Order Entry sample uses CSV data read from a local file for the sake of simplicity. Any structured data will do, and other web-standard formats and mechanisms such as XML, HTTP, SOAP, and TCP sockets can also be used to obtain data from external resources. Your applications will be different, but the approach will be largely the same.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/order-entry/start.curl" target="_blank" rel="noopener" class="mycode_url">Order Entry Sample Application</a></span><br />
<br />
NOTE: This version of the Order Entry Sample Application requires release 6.0 of the Curl RTE.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1143-2-1056/OrderEntry.zip" target="_blank" rel="noopener" class="mycode_url">OrderEntry.zip</a></span><br />
]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/order-entry/start.curl" target="_blank" rel="noopener" class="mycode_url">Order Entry Sample Application</a></span><br />
<br />
NOTE: This version of the Order Entry Sample Application requires release 6.0 of the Curl RTE.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Objective</span></span><br />
This document is intended to guide you through the process of evaluating the Curl technology, including the Curl language, runtime, and development tools. A sample application provides a concrete example that will help you appreciate various elements of the Curl platform. When you are done you will see why Curl is the best choice for developing rich, complex, data-intensive, web applications.<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Initialization</span></span><br />
In order to run the Order Entry Sample Application that serves as a medium for exploring and evaluating the Curl platform, please follow these simple, preliminary steps:<br />
<br />
<ol type="1" class="mycode_list"><li>Check the System Requirements for the Curl platform.<ul class="mycode_list"><li><a href="http://www.curl.com/download/ide/system.php" target="_blank" rel="noopener" class="mycode_url">http://www.curl.com/download/ide/system.php</a><br />
</li>
</ul>
</li>
<li>Download the Curl Integrated Development Environment (IDE) and Runtime Environment (RTE).<ul class="mycode_list"><li><a href="http://www.curl.com/download/ide/index.php" target="_blank" rel="noopener" class="mycode_url">http://www.curl.com/download/ide/index.php</a><br />
</li>
<li>NOTE: On Windows, the RTE is packaged with the IDE installer.<br />
</li>
</ul>
</li>
<li>Install the RTE and IDE.<ul class="mycode_list"><li>NOTE: On Windows, the RTE is installed automatically by the IDE installer.<br />
</li>
</ul>
</li>
<li>Download the Order Entry Sample Application<ul class="mycode_list"><li><span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: line-through;" class="mycode_s">#</span></span><br />
</li>
</ul>
</li>
<li>Install the Order Entry Sample Application<ul class="mycode_list"><li>To install the Order Entry sample application, just unzip the distribution to any drive on your machine. It will create a directory named OrderEntry and contain a file named start.curl therein.<br />
</li>
</ul>
</li>
</ol>
 <br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Exploration</span></span><br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Integrated Development Environment</span></span><br />
Start by exploring the Curl development tools.<br />
<br />
<ol type="1" class="mycode_list"><li>Launch the IDE.<br />
</li>
<li>Launch the Curl Documentation Viewer.<ul class="mycode_list"><li>The Curl help system is readily accessible from the Curl IDE via the 'Help' menu.<br />
</li>
</ul>
</li>
</ol>
 <br />
You might have noticed by now that the Curl RTE is running. That is because the Curl IDE, Documentation Viewer, and RTE are all Curl applications, that is, they are written in Curl!<br />
<br />
Take some time to look at the Curl Documentation Viewer. You will notice, in the table of contents, that there are 4 main sections.<br />
<ul class="mycode_list"><li>Curl Developer's Guide<br />
</li>
<li>Curl IDE User's Guide<br />
</li>
<li>Curl VLE User's Guide<br />
</li>
<li>API Reference<br />
</li>
</ul>
 <br />
NOTE: You can even install your own Curl applications' documentation in the Curl Documentation Viewer!<br />
<br />
The IDE &amp; Visual Layout Editor (VLE) User's Guides provide detailed help on using the Curl development tools. The Curl Developer's Guide presents a narrative guide for learning about the Curl language and the libraries provided by the Curl RTE. The API Reference documents the classes, procedures, primitives, packages, etc. that make up the Curl language API. <br />
<br />
The Curl Developer's Guide is a good place to start learning all about Curl, beginning with a quick description of how to most productively use the Curl Documentation Viewer's features (contents, index, search).<br />
<br />
You will notice right away that the Curl Documentation Viewer is different than other documentation viewers. In particular, the Curl Developer's Guide and API Reference contain interactive examples. Since the documentation viewer is, itself, a Curl application, developers can write and test live Curl code in a Curl example box. This facilitates the learning of various Curl language concepts, and provides a convenient scratch pad for testing code snippets.<br />
<ul class="mycode_list"><li>In the "Look for:" field of the Curl Documentation Viewer's Index type "examples" and hit Enter to see this interactive feature displayed and described.<br />
</li>
</ul>
 <br />
The Curl Developer's Guide presents material for a tremendous variety of Curl language elements, including:<br />
<ul class="mycode_list"><li>the core language syntax, types, and libraries<br />
</li>
<li>formatted text presentations and graphical user interfaces<br />
</li>
<li>data management and display<br />
</li>
<li>charting<br />
</li>
<li>graphics programming<br />
</li>
<li>how to work with external resources<br />
</li>
<li>packaging and deploying your Curl applications on the web<br />
</li>
</ul>
 <br />
The API Reference describes over 100 separate libraries built into the Curl RTE, including IO, graphics, GUI, data access, and charting libraries, even IDE-related libraries to help document your applications, and profile and monitor your applications' performance characteristics.<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Evaluation</span></span><br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Sample Application</span></span><br />
Continue evaluating the Curl platform using the Order Entry Sample Application. You might have seen the Order Entry sample on the Curl website, or perhaps in an individual demonstration, but here is your chance to get your hands dirty, look at the code, play with the development tools, and get a feel for working with the Curl platform.<br />
<br />
The Order Entry sample application demonstrates:<br />
<ul class="mycode_list"><li>how to build rich, complex, data-intensive web applications that leverage the computing power of your clients' machines using familiar design patterns such as Model-View-Controller (MVC)<br />
</li>
<li>how to obtain data from web resources, then model and manage them on the client<ul class="mycode_list"><li>transformation<br />
</li>
<li>summary<br />
</li>
<li>aggregation<br />
</li>
<li>modification<br />
</li>
<li>change propagation<br />
</li>
<li>submission<br />
</li>
</ul>
</li>
<li>how to build visually appealing textual, form-based, tabular, and graphical presentations laid out in a cohesive user interface<ul class="mycode_list"><li>standard components<ul class="mycode_list"><li>RecordGrid<br />
</li>
<li>Tree<br />
</li>
<li>charts<br />
</li>
<li>forms<br />
</li>
</ul>
</li>
<li>specialized reports<ul class="mycode_list"><li>tabular report<br />
</li>
</ul>
</li>
<li>extensions beyond the standard Curl components<ul class="mycode_list"><li>MinMax display pane<br />
</li>
</ul>
</li>
</ul>
</li>
<li>how to customize your application's appearance using Curl stylesheets<br />
</li>
<li>how to coordinate the interactivity of your applications, including:<ul class="mycode_list"><li>management of user gestures<br />
</li>
<li>control of application workflow<br />
</li>
<li>processing actions and GUI changes<br />
</li>
<li>management of communication between application components<br />
</li>
</ul>
</li>
</ul>
 <br />
You will be running the sample application from the filesystem. The Order Entry sample uses a special Curl technique for managing application resources - a manifest - so when running from the local filesystem, the applet requires privilege.<br />
<br />
<ol type="1" class="mycode_list"><li>Launch the Curl Control Panel<br />
</li>
<li>Click on the "Security" tab of the Curl Control Panel<br />
</li>
<li>Click on "This Computer" to open the section for local directories<br />
</li>
<li>Click on "Add Privileged Directory..."<br />
</li>
<li>In the "Add Privileged Directory" dialog, enter the directory in which you unzipped the Order Entry sample application, then click "OK"<ul class="mycode_list"><li>For example, C:\OrderEntry<br />
</li>
<li>Note, you can browse to the directory using the "Browse..." button<br />
</li>
</ul>
</li>
<li>To learn more about privilege and manifests, see the Curl Documentation Viewer.</li>
</ol>
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Running the Sample Application</span></span><br />
Now you may launch the Order Entry sample Curl application.<br />
<br />
<ol type="1" class="mycode_list"><li>Using a web browser, such as Internet Explorer, open the start.curl file located in the OrderEntry directory where you unzipped the OrderEntry.zip file.<br />
</li>
<li>The browser feeds the Curl source code to the RTE which, in turn, compiles the Curl source code into high performance, native machine code. The sample application is launched and presented in the browser. The initial tab, labeled "Edit", is for data entry. Select an order from the tree to see the master/detail view for Create, Read, Update, and Delete operations<br />
</li>
<li>The second tab, labeled "Data", is for data visualization. It presents derived results, in chart, tabular, and data grid form. Notice the dynamic visual feedback. Because Curl runs on the client machine, it is easy to provide complex feedback in immediate response to user gestures. Click on the "Data" tab.<br />
</li>
<li>Click on a bar in the bar chart to popup a different view of the data.<br />
</li>
<li>Move the pointer over the pie chart to see a complex tooltip.<br />
</li>
<li>Double-click a title bar to maximize the pane.<br />
</li>
<li>Double-click the title bar again to restore the pane to its original size.<br />
</li>
<li>Notice how the presentations update immediately when a different order is selected from the index.</li>
</ol>
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">The Project File</span></span><br />
Take a look at the implementation. It highlights some important aspects of the Curl platform.<br />
<ul class="mycode_list"><li>Open the project in the IDE. On Windows you can accomplish this by double-clicking on the project.cprj file found in the directory in which you unzipped the Order Entry sample application, or selecting File-&amp;gt;Open Project... from the IDE's "File" menu.<ul class="mycode_list"><li>For example, double-click or select C:\OrderEntry\project.cprj<br />
</li>
</ul>
</li>
</ul>
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Modeling Data on the Client</span></span><br />
One of the most powerful attributes of Curl's rich Internet application platform is the ability to model and manipulate data on a client machine. Curl applications can obtain data from local or external resources using accepted web standards such as HTTP, SOAP, and TCP sockets. The applications can then consume data structured using well-known formats such as CSV or XML, as well as others, including proprietary formats.<br />
<br />
Once the data exists on the client, it can be modeled, analyzed, aggregated, or otherwise processed for use in the application. Here are some examples in the Order Entry sample implementation:<br />
<br />
<ol type="1" class="mycode_list"><li>To see an example of some source code, find the {ct-read-orders-recordset} procedure. It is called from a ctBaseTrainingApplicationModel constructor in the file model/ctBaseTrainingApplicationModel.scurl (use the IDE's Edit-&amp;gt;Go to Line... menu to go to line 29).<br />
</li>
<li>{ct-read-orders-recordset} is implemented in model/ct-orders-recordset.scurl (use the IDE's Search-&amp;gt;Find... menu and search for "ct-read-orders-recordset". Some key data access and modeling features exploited by the Order Entry sample include:<ul class="mycode_list"><li>reading data from a resource<br />
</li>
<li>RecordSets - organize data as a set of records with named fields<br />
</li>
</ul>
</li>
</ol>
 Client-side modeling of data is good because it allows for highly interactive user interfaces and minimizes server trips. Curl is good for this because Curl compiles to native machine code, meaning Curl applications perform at very high levels, even with very large datasets.<br />
<br />
Take this opportunity to look at some documentation using the IDE's context-sensitive access to the Curl Documentation Viewer. While you are in the documentation viewer, do not be shy about poking around. The documentation is one of Curl's strengths, due in part to the volume, and in part because the live, interactive examples (executing right inside the viewer) provide a convenient place to try out code and facilitate the understanding of the Curl concepts they exemplify.<br />
<ul class="mycode_list"><li>In the IDE's Editor pane, place the cursor on the "RecordSet" data type for the orders variable in {ct-read-orders-recordset} and hit the F1 key. The Curl Documentation Viewer will launch and display the documentation for RecordSet.<br />
</li>
</ul>
 <br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Presenting the Data</span></span><br />
Once the data is available to the Curl application, it can be presented to the user in a variety of ways. An example of some presentation source code can be found here:<br />
<ul class="mycode_list"><li>{ct-totals-bar-chart}<ul class="mycode_list"><li>Called at line 293 of view/ctBaseTrainingApplicationLayout.curl<br />
</li>
<li>Implemented at line 121 of view/ct-charts.scurl<br />
</li>
</ul>
</li>
</ul>
 <br />
{ct-totals-bar-chart} takes RecordView (a kind of RecordSet) data, manipulates the data for display, then creates and returns a chart.<br />
<br />
The presentation components in the Order Entry sample demonstrate several standard Curl features, including:<br />
<ul class="mycode_list"><li>Charts<br />
</li>
<li>RecordView<br />
</li>
<li>ChartDataSeries<br />
</li>
<li>Event handling<br />
</li>
<li>Exception handling<br />
</li>
</ul>
 <br />
You can easily find chart documentation:<br />
<ul class="mycode_list"><li>In the IDE's Editor pane, place the cursor on the "LayeredChart" data type for the chart variable where {ct-totals-bar-chart} is called in view/ctBaseTrainingApplicationLayout.curl, and hit the F1 key. The Curl Documentation Viewer will launch and display the documentation for LayeredChart.<br />
</li>
</ul>
 <br />
A variety of presentations is good because it is the mark of a truly rich user interface. Curl is good for this because Curl offers a wealth of built-in presentation classes:<br />
<ul class="mycode_list"><li>charts<br />
</li>
<li>data grids<br />
</li>
<li>forms<br />
</li>
<li>graphical objects<br />
</li>
<li>enhanced text<br />
</li>
</ul>
 <br />
Curl is extensible, so new presentations are only a {define-class } away!<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Styling the Application</span></span><br />
The presentation objects can be styled using Curl StyleSheets. Styling is implemented using a styling library provided by Curl. The library is included, in pcurl format, with the Order Entry Sample Application.<br />
<ul class="mycode_list"><li>The pcurled format is a compressed, pre-processed format which is useful for hiding code and improving delivery speed.<br />
</li>
</ul>
 <br />
The library is incorporated into the sample as follows:<br />
<br />
<ol type="1" class="mycode_list"><li>identify the library to the sample<ul class="mycode_list"><li>see line 28 of the OrderEntry/manifest.mcurl file<br />
</li>
</ul>
</li>
<li>import the library where you wish to use it<ul class="mycode_list"><li>see line 15 of start.curl or line 38 of view/load.scurl<br />
</li>
</ul>
</li>
<li>install the stylesheet for use by calling {install-style-sheet}<ul class="mycode_list"><li>see line 17 of start.curl<br />
</li>
</ul>
 Notice how the default style sheet is augmented with user-defined StyleRules in the call to {install-style-sheet}.</li>
</ol>
<br />
NOTE: The IDE has features that make it easy to start a project that uses the styling library.<br />
<br />
Stylability is good because you can customize the look of GUI controls, and provide themes or branding to your application. Curl is good for this because the Curl stylesheets are separate from application source code. This allows designers and developers to work independently.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Coordinated Layout and Change Management</span></span><br />
The presentations have been connected to the data, so they can now be placed in a coordinated layout. Interactivity needs to be handled, and data changes need to be managed. The primary controller for the Order Entry application is ctBaseTrainingApplication. It is located in the controller package, in, predictably, the controller/ctBaseTrainingApplication.scurl file. This class handles layout management as well as data management.<br />
<ul class="mycode_list"><li>Look at the code in the controller/ctBaseTrainingApplication.scurl file.<br />
</li>
</ul>
 <br />
The Order Entry sample's RecordForm demonstrates data binding using Curl's macro.<br />
<br />
<ol type="1" class="mycode_list"><li>Open the view/LineItemForm.scurl.file.<br />
</li>
<li>Search for "{bind".<br />
As you review the code, you will learn how the application makes use of:<br />
<ul class="mycode_list"><li>Curl's graphical layout system<br />
</li>
<li>Coordination techniques<ul class="mycode_list"><li>Enqueue and handle events to provide a high-quality user experience <br />
</li>
<li>Change management, including data binding, to update the data model in response to user manipulation<br />
</li>
<li>Synchronizing presentation components with the updated model<br />
</li>
</ul>
</li>
</ul>
</li>
</ol>
 <br />
Check out the documentation for various features:<br />
<br />
<ol type="1" class="mycode_list"><li>In the "Look for:" field of the Curl Documentation Viewer's Index type "graphical containers" and hit Enter. You will find a wealth of information on the building blocks of Curl's GUI subsystem.<br />
</li>
<li>In the "Look for:" field of the Curl Documentation Viewer's Index type "events" and hit Enter. Read through the section on "Events".<br />
</li>
<li>In the "Look for:" field of the Curl Documentation Viewer's Index type "DataBinding" and hit Enter. Read through the section on "Forms and Bound Data".<br />
</li>
</ol>
Coordination is good because a coordinated layout makes for a cohesive user interface and facilitates functionality such as maximizing individual presentations (click on the "Data" tab and double-click on a chart's title bar), drill-down (click on a bar in a bar chart), mouseovers (move the pointer over a pie chart), and drag-and-drop (not implemented in the sample). Curl is good for this because you can use event handling, a familiar programming technique, as a way to add interactivity to an application. Curl also allows you to define your event handlers dynamically, as arguments to the constructor of the event target.<br />
This facilitates declarative creation of user interface objects along with the handlers of events that might be fired at those objects.<br />
<br />
Proper change management is good because it allows different presentations to remain synchronized, so if data changes are made in one presentation (e.g., in the line item editor on the "Edit" tab) all the presentations (e.g., those on the "Data" tab) reflect the change. Toward that end, Curl has given significant attention to data binding making it a powerful, yet easy to use way of managing changes to your data.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Some More IDE Features</span></span><br />
Now is a good time to take a look at some other IDE features and components. For example:<br />
<br />
<ol type="1" class="mycode_list"><li>Ctrl-right-click the "Curl Order Entry Sample" title at the top of the sample.<br />
</li>
<li>Select the "Graphic Hierarchy for []" to launch Curl's graphical hierarchy tool.<br />
</li>
<li>You can also select "Inspect []" to inspect an object's members and options.<br />
</li>
</ol>
 Another convenient feature is code completion.<br />
<ul class="mycode_list"><li>Somewhere in the start.curl file, start typing "{ct-rec" then hit Ctrl-Space to see the possible completions.<br />
</li>
</ul>
Of course a very powerful feature is the debugger, which is tightly integrated with the rest of the IDE. Try setting a breakpoint:<br />
<ul class="mycode_list"><li>Set a breakpoint by clicking in the vertical, gray column along the left-hand side of the Editor panel in start.curl.<ul class="mycode_list"><li>Try setting it next to the constructor of the ctBaseTrainingApplication class (line 112 of start.curl).<br />
</li>
</ul>
</li>
</ul>
 <br />
The next time the demo is run during this IDE session, the debugger will stop execution at this point. Refresh the browser containing the OrderEntry sample to see it in action.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Deploying Curl Applications</span></span><br />
You have seen a sample Curl application, taken some time to explore the tools used to build such an application, and now you can take a look at how Curl addresses the matter of deploying your applications. Curl does not require any special kind of server; a typical web server, simply configured to server Curl content, is all you need.<br />
<ul class="mycode_list"><li>In the "Look for:" field of the Curl Documentation Viewer's Index type "configure Web servers" and hit Enter to learn the configuration basics.<br />
</li>
</ul>
 <br />
Curl allows developers to compress and obfuscate their Curl source code in a pre-processed format called pcurl for fast delivery of applications to client machines in a format not easily read by humans. Illustrating the compression aspect of the pcurl format, ~115kB of source code in the Order Entry sample pcurls down to ~18kB.<br />
<ul class="mycode_list"><li>In the "Look for:" field of the Curl Documentation Viewer's Index type "pcurl files" and hit Enter to learn the about pcurl.<br />
</li>
</ul>
 <br />
NOTE: The pcurl feature in the IDE is considered a professional feature, thus is not immediately available in the free version of the IDE.<br />
<br />
The Curl IDE has many other features aimed at simplifying application deployment. For example:<br />
<ul class="mycode_list"><li>In the "Look for:" field of the Curl Documentation Viewer's Index type "projects" then double-click on the sub-entry "deploying" for a comprehensive discussion of deployment.<br />
</li>
</ul>
 <br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Visual Development Using the Visual Layout Editor</span></span><br />
Curl provides a visual development environment called the Visual Layout Editor (VLE) which you can use to develop the user interfaces for your Curl applications. The VLE is integrated with the IDE, making it easy to switch between environments as appropriate for the code you are working on. This is particularly useful when adding behaviors (using, for example, event handlers) to your user interface.<br />
<br />
One of the great features of the VLE is its extensibility. The VLE supports a tremendous number of Curl objects by default, but imagine you have your own component that is not included in the default VLE palette. Is it possible to place such a component into the visual development environment? Yes. You can define your own objects and add them to the VLE palette, thereby extending the capabilities of the VLE. Curl even provides a tool, the VLE Extension Editor, to help you do exactly this. Once the extension is installed, the VLE will load it during startup, making your component available each time you launch the VLE.<br />
<br />
Refer to the Curl VLE User's Guide to learn more about how to use and extend the VLE.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="text-decoration: underline;" class="mycode_u">Summary</span></span><br />
The Order Entry sample application showed you that:<br />
<ul class="mycode_list"><li>Curl is the right platform for building web applications that consume moderate to large volumes of data and require high performance from visually appealing, rich user interfaces.<br />
</li>
<li>Curl can obtain data from local or external resources using accepted web standards such as HTTP, SOAP, and TCP sockets.<br />
</li>
<li>Curl applications can consume data structured using well-known formats such as CSV or XML, as well as others, including proprietary formats.<br />
</li>
<li>The Curl platform encourages you to model your data on the client to leverage the processing power of the user's machine. With data modeled on the client, performance and user experience are maximized while server trips are limited to incremental data requests or occasional code updates. Contrast that with conventional thin client technologies!<br />
</li>
</ul>
 <br />
While the Order Entry sample application is relatively small in size, it is representative of a typical Curl application because<br />
<ul class="mycode_list"><li>it has a rich user interface which is executed on the client<br />
</li>
<li>it uses libraries that are built-in to the RTE<br />
</li>
<li>it creates new classes and libraries, and extends existing classes and libraries to augment the Curl RTE<br />
</li>
<li>it uses Curl's styling library to customize the appearance of the GUI controls and the application<br />
</li>
<li>it consumes relational data<br />
</li>
<li>it transforms, sorts, filters, and presents data<br />
</li>
<li>application logic (e.g., aggregation and summary) is performed on the client<br />
</li>
<li>it allows the user to operate on the data and submit changes<br />
</li>
<li>it implements a change management mechanism using data binding<br />
</li>
</ul>
 <br />
The Order Entry sample uses CSV data read from a local file for the sake of simplicity. Any structured data will do, and other web-standard formats and mechanisms such as XML, HTTP, SOAP, and TCP sockets can also be used to obtain data from external resources. Your applications will be different, but the approach will be largely the same.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/order-entry/start.curl" target="_blank" rel="noopener" class="mycode_url">Order Entry Sample Application</a></span><br />
<br />
NOTE: This version of the Order Entry Sample Application requires release 6.0 of the Curl RTE.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1143-2-1056/OrderEntry.zip" target="_blank" rel="noopener" class="mycode_url">OrderEntry.zip</a></span><br />
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[3D Bar Chart]]></title>
			<link>https://communities.curl.com/showthread.php?tid=102</link>
			<pubDate>Fri, 01 Jul 2011 01:24:18 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=102</guid>
			<description><![CDATA[3D rendering is used to display a bar graph. You can change the viewpoint by dragging with the mouse. <br />
<br />
To run the 3D bar chart click on the link below.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/bar-chart-3d/start.curl" target="_blank" rel="noopener" class="mycode_url">3D Bar Chart</a></span><br />
<br />
Download the zip file attachment below to get the source code for the 3D Bar Chart application. <br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped 3D Bar Chart demo source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1061-8-1105/bar-chart-3d.zip" target="_blank" rel="noopener" class="mycode_url">bar-chart-3d.zip</a></span>]]></description>
			<content:encoded><![CDATA[3D rendering is used to display a bar graph. You can change the viewpoint by dragging with the mouse. <br />
<br />
To run the 3D bar chart click on the link below.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/bar-chart-3d/start.curl" target="_blank" rel="noopener" class="mycode_url">3D Bar Chart</a></span><br />
<br />
Download the zip file attachment below to get the source code for the 3D Bar Chart application. <br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped 3D Bar Chart demo source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1061-8-1105/bar-chart-3d.zip" target="_blank" rel="noopener" class="mycode_url">bar-chart-3d.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Image Filters]]></title>
			<link>https://communities.curl.com/showthread.php?tid=101</link>
			<pubDate>Fri, 01 Jul 2011 01:22:45 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=101</guid>
			<description><![CDATA[Explore the operation of various 2D image filters that are built into the Curl RTE. This is a code sample created to help you understand how the Curl language's built-in graphics filters work and are used.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Description</span><br />
Each of the filters presented here can be used and applied to any graphical element in your application.<br />
<br />
By selecting one of the available filters from the drop-down list and then altering the configurable parameter using the slide bar, it is easy to see the generated effect.<br />
<br />
While demonstrating and teaching the various graphics filters, this demo also shows: <ul class="mycode_list"><li>Client-side processing performing an operation on a graphic without any server interaction.<br />
</li>
<li>Utilization of the same graphic file being rendered in multiple ways, reducing the overall page download size.<br />
</li>
</ul>
 It is easy to imagine having these filters applied to images using programmatic methods to create simple animation effects.<br />
<br />
This sample code also shows how custom controls for Web applications are created using the same technology as the image processing, highlighting the flexible nature of Curl.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Instructions</span><br />
Very simply: <ul class="mycode_list"><li>click on the drop down list and select an image filter to apply<br />
</li>
<li>slide the scroll bar to alter the magnitude of the effect<br />
</li>
<li>to use the effect in your application, highlight the line of code generated, then copy and paste it into your program.<br />
</li>
</ul>
 <br />
<br />
To run the Image Filter application click on the link below. <br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/filters/start.curl" target="_blank" rel="noopener" class="mycode_url">Image Filters</a></span><br />
<br />
Download the zip file attachment below to get the complete source for the Image Filter application. <br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped Image Filters demo source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1058-8-1106/filters.zip" target="_blank" rel="noopener" class="mycode_url">filters.zip</a></span>]]></description>
			<content:encoded><![CDATA[Explore the operation of various 2D image filters that are built into the Curl RTE. This is a code sample created to help you understand how the Curl language's built-in graphics filters work and are used.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Description</span><br />
Each of the filters presented here can be used and applied to any graphical element in your application.<br />
<br />
By selecting one of the available filters from the drop-down list and then altering the configurable parameter using the slide bar, it is easy to see the generated effect.<br />
<br />
While demonstrating and teaching the various graphics filters, this demo also shows: <ul class="mycode_list"><li>Client-side processing performing an operation on a graphic without any server interaction.<br />
</li>
<li>Utilization of the same graphic file being rendered in multiple ways, reducing the overall page download size.<br />
</li>
</ul>
 It is easy to imagine having these filters applied to images using programmatic methods to create simple animation effects.<br />
<br />
This sample code also shows how custom controls for Web applications are created using the same technology as the image processing, highlighting the flexible nature of Curl.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Instructions</span><br />
Very simply: <ul class="mycode_list"><li>click on the drop down list and select an image filter to apply<br />
</li>
<li>slide the scroll bar to alter the magnitude of the effect<br />
</li>
<li>to use the effect in your application, highlight the line of code generated, then copy and paste it into your program.<br />
</li>
</ul>
 <br />
<br />
To run the Image Filter application click on the link below. <br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/filters/start.curl" target="_blank" rel="noopener" class="mycode_url">Image Filters</a></span><br />
<br />
Download the zip file attachment below to get the complete source for the Image Filter application. <br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped Image Filters demo source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1058-8-1106/filters.zip" target="_blank" rel="noopener" class="mycode_url">filters.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Water Picture]]></title>
			<link>https://communities.curl.com/showthread.php?tid=100</link>
			<pubDate>Fri, 01 Jul 2011 01:15:32 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=100</guid>
			<description><![CDATA[The digital water simulation applet applies procedural graphics to enliven existing images in 2D graphics. <br />
<br />
<span style="font-weight: bold;" class="mycode_b">Description</span><br />
One of our favorite demonstrations.<ul class="mycode_list"><li>procedural graphics, image processing functionality<br />
</li>
<li>high level constructs - displacement mesh example<br />
</li>
<li>efficient specialized iterations<br />
</li>
<li>exploits processing capacity on the client machine<br />
</li>
</ul>
 <br />
Make existing static images come to life using Curl.<br />
<span style="font-weight: bold;" class="mycode_b">Instructions</span><ul class="mycode_list"><li>Move the pointer across the picture. It changes, just as if you'd dragged your finger through the water.<br />
</li>
<li>Try rain mode, too, and adjust the scales for changing effects.<br />
</li>
<li>You can use Curl to develop imaginative ways to make the user experience more interactive.<br />
</li>
<li>The power of client-side computing lets you simulate the properties of water (or anything else procedurally feasible) in real time and present eye-catching animation with both quality and speed.<br />
</li>
</ul>
 <br />
To run the water simulation applet on your computer click on the link below.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/water-picture/start.curl" target="_blank" rel="noopener" class="mycode_url">Water Picture</a></span><br />
<br />
You can also get the source code to this application by downloading the zip file attachment below.<br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped Water Picture demo source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1056-11-1107/water-picture.zip" target="_blank" rel="noopener" class="mycode_url">water-picture.zip</a></span>]]></description>
			<content:encoded><![CDATA[The digital water simulation applet applies procedural graphics to enliven existing images in 2D graphics. <br />
<br />
<span style="font-weight: bold;" class="mycode_b">Description</span><br />
One of our favorite demonstrations.<ul class="mycode_list"><li>procedural graphics, image processing functionality<br />
</li>
<li>high level constructs - displacement mesh example<br />
</li>
<li>efficient specialized iterations<br />
</li>
<li>exploits processing capacity on the client machine<br />
</li>
</ul>
 <br />
Make existing static images come to life using Curl.<br />
<span style="font-weight: bold;" class="mycode_b">Instructions</span><ul class="mycode_list"><li>Move the pointer across the picture. It changes, just as if you'd dragged your finger through the water.<br />
</li>
<li>Try rain mode, too, and adjust the scales for changing effects.<br />
</li>
<li>You can use Curl to develop imaginative ways to make the user experience more interactive.<br />
</li>
<li>The power of client-side computing lets you simulate the properties of water (or anything else procedurally feasible) in real time and present eye-catching animation with both quality and speed.<br />
</li>
</ul>
 <br />
To run the water simulation applet on your computer click on the link below.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/water-picture/start.curl" target="_blank" rel="noopener" class="mycode_url">Water Picture</a></span><br />
<br />
You can also get the source code to this application by downloading the zip file attachment below.<br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped Water Picture demo source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1056-11-1107/water-picture.zip" target="_blank" rel="noopener" class="mycode_url">water-picture.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rotating Teapot]]></title>
			<link>https://communities.curl.com/showthread.php?tid=99</link>
			<pubDate>Fri, 01 Jul 2011 01:13:17 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=99</guid>
			<description><![CDATA[The "teapot" is a classic example of 3D rendering. The Curl RTE renders it using hardware-accelerated 3D graphics. This famous teapot is rendered using Curl's real-time rendering of vector-based graphical elements.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Description</span><br />
Curl's 3-D graphics engine rotates a surface model created from a table of coordinates.<br />
<br />
You'll have to check out the code to believe it. Definitely no animated .GIF files here, the model is created and then rotated. Simple in theory, but not so easy with other technologies.<br />
<br />
See the instructions so you don't miss anything. <ul class="mycode_list"><li>procedural graphics<br />
</li>
<li>3D visualization of surface model<br />
</li>
<li>realtime rendering<br />
</li>
<li>camera angle adjustments<br />
</li>
</ul>
 <span style="font-weight: bold;" class="mycode_b">Instructions</span><br />
For you purists out there: sorry, this teapot does have a bottom.<br />
<br />
Run this one full screen if you can't see the whole thing in your browser.<br />
<br />
Click on "Run/Stop", then sit back and watch the teapot spin. Couldn't be simpler (or much more impressive).<br />
<br />
But if you want to see ultra-cool, try this: <ul class="mycode_list"><li>Click and drag your mouse to zoom around the teapot. This changes the camera angle for viewing the teapot, and the reference points for the calculations.<br />
</li>
<li>Try the left and right buttons to see the difference.<br />
</li>
<li>Slide the bar at the bottom to the left to decrease the resolution.<br />
</li>
<li>Slide the bar to the right to increase the resolution. There are lots of calculations going on here, so it might slow down a bit.<br />
</li>
</ul>
 If you are good, you can zoom inside the teapot, and watch it spin from the inside!<br />
<br />
To run the rotating teapot applet application click on the link below.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/teapot/start.curl" target="_blank" rel="noopener" class="mycode_url">Rotating Teapot</a></span><br />
<br />
Download the zip file attachment below to get the complete source code for this application. <br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped Rotating Teapot demo source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1059-8-1108/teapot.zip" target="_blank" rel="noopener" class="mycode_url">teapot.zip</a></span>]]></description>
			<content:encoded><![CDATA[The "teapot" is a classic example of 3D rendering. The Curl RTE renders it using hardware-accelerated 3D graphics. This famous teapot is rendered using Curl's real-time rendering of vector-based graphical elements.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Description</span><br />
Curl's 3-D graphics engine rotates a surface model created from a table of coordinates.<br />
<br />
You'll have to check out the code to believe it. Definitely no animated .GIF files here, the model is created and then rotated. Simple in theory, but not so easy with other technologies.<br />
<br />
See the instructions so you don't miss anything. <ul class="mycode_list"><li>procedural graphics<br />
</li>
<li>3D visualization of surface model<br />
</li>
<li>realtime rendering<br />
</li>
<li>camera angle adjustments<br />
</li>
</ul>
 <span style="font-weight: bold;" class="mycode_b">Instructions</span><br />
For you purists out there: sorry, this teapot does have a bottom.<br />
<br />
Run this one full screen if you can't see the whole thing in your browser.<br />
<br />
Click on "Run/Stop", then sit back and watch the teapot spin. Couldn't be simpler (or much more impressive).<br />
<br />
But if you want to see ultra-cool, try this: <ul class="mycode_list"><li>Click and drag your mouse to zoom around the teapot. This changes the camera angle for viewing the teapot, and the reference points for the calculations.<br />
</li>
<li>Try the left and right buttons to see the difference.<br />
</li>
<li>Slide the bar at the bottom to the left to decrease the resolution.<br />
</li>
<li>Slide the bar to the right to increase the resolution. There are lots of calculations going on here, so it might slow down a bit.<br />
</li>
</ul>
 If you are good, you can zoom inside the teapot, and watch it spin from the inside!<br />
<br />
To run the rotating teapot applet application click on the link below.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/teapot/start.curl" target="_blank" rel="noopener" class="mycode_url">Rotating Teapot</a></span><br />
<br />
Download the zip file attachment below to get the complete source code for this application. <br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped Rotating Teapot demo source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1059-8-1108/teapot.zip" target="_blank" rel="noopener" class="mycode_url">teapot.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Fire Simulator]]></title>
			<link>https://communities.curl.com/showthread.php?tid=98</link>
			<pubDate>Fri, 01 Jul 2011 01:11:49 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=98</guid>
			<description><![CDATA[This example displays flames by simulating them mathematically, not just by showing a series of precomputed images. The fire in this demo is procedurally generated locally on the client machine. It is not an animated series of pictures, but instead a complex mathematical function that has been downloaded to your computer as programming code. <br />
<br />
<span style="font-weight: bold;" class="mycode_b">Description</span><br />
This demo shows the combination of high level programming constructs for graphical events with fast, pixel-level graphics control. It also demonstrates how high-level constructs can be created by the programmer if they are needed and don't currently exist.<br />
<br />
The fire itself combines: <ul class="mycode_list"><li>Random number generator<br />
</li>
<li>Spectrum<br />
</li>
<li>Displacement Mesh<br />
</li>
<li>Blur Algorithm<br />
</li>
</ul>
The algorithm contains: <ul class="mycode_list"><li>A distortion field to swirl the fire<br />
</li>
<li>A blur that spreads the flame<br />
</li>
<li>A flame generator<br />
</li>
<li>A dispersion filter<br />
</li>
</ul>
 Note that any user modifications are handled at the user machine, without server interaction.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Instructions</span><ul class="mycode_list"><li>Select and de-select the various checkboxes that relate to the algorithm for drawing / animating the fire. Alterations of these boxes change the dynamics of the fire without needing to transmit or receive any additional instructions or pictures from the network server.<br />
</li>
<li>You can use the check boxes to turn on and off the convection and dispersion, replace the jets with a checkerboard pattern, and turn the animation on and off.<br />
</li>
</ul>
 <br />
To run the Fire Simulator application click on the link below.<br />
<br />
<a href="http://communities.curl.com/demos/fire/start.curl" target="_blank" rel="noopener" class="mycode_url">Fire Simulator</a><br />
<br />
Download the zip file attachment below to get the complete source for the Fire Simulator. <br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped fire simulator demo source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://developers.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1057-18-1109/fire.zip" target="_blank" rel="noopener" class="mycode_url">fire.zip</a></span>]]></description>
			<content:encoded><![CDATA[This example displays flames by simulating them mathematically, not just by showing a series of precomputed images. The fire in this demo is procedurally generated locally on the client machine. It is not an animated series of pictures, but instead a complex mathematical function that has been downloaded to your computer as programming code. <br />
<br />
<span style="font-weight: bold;" class="mycode_b">Description</span><br />
This demo shows the combination of high level programming constructs for graphical events with fast, pixel-level graphics control. It also demonstrates how high-level constructs can be created by the programmer if they are needed and don't currently exist.<br />
<br />
The fire itself combines: <ul class="mycode_list"><li>Random number generator<br />
</li>
<li>Spectrum<br />
</li>
<li>Displacement Mesh<br />
</li>
<li>Blur Algorithm<br />
</li>
</ul>
The algorithm contains: <ul class="mycode_list"><li>A distortion field to swirl the fire<br />
</li>
<li>A blur that spreads the flame<br />
</li>
<li>A flame generator<br />
</li>
<li>A dispersion filter<br />
</li>
</ul>
 Note that any user modifications are handled at the user machine, without server interaction.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Instructions</span><ul class="mycode_list"><li>Select and de-select the various checkboxes that relate to the algorithm for drawing / animating the fire. Alterations of these boxes change the dynamics of the fire without needing to transmit or receive any additional instructions or pictures from the network server.<br />
</li>
<li>You can use the check boxes to turn on and off the convection and dispersion, replace the jets with a checkerboard pattern, and turn the animation on and off.<br />
</li>
</ul>
 <br />
To run the Fire Simulator application click on the link below.<br />
<br />
<a href="http://communities.curl.com/demos/fire/start.curl" target="_blank" rel="noopener" class="mycode_url">Fire Simulator</a><br />
<br />
Download the zip file attachment below to get the complete source for the Fire Simulator. <br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped fire simulator demo source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://developers.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1057-18-1109/fire.zip" target="_blank" rel="noopener" class="mycode_url">fire.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Ray Tracing]]></title>
			<link>https://communities.curl.com/showthread.php?tid=97</link>
			<pubDate>Fri, 01 Jul 2011 01:08:42 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=97</guid>
			<description><![CDATA[This code sample does 3D rendering using rendering algorithms directly programmed in Curl software, showing the high performance of code generated by the Curl compiler. The Curl content language is also showcased, since active elements are mixed in with, and controlled from, the accompanying descriptive text. <br />
<br />
If it's hard to believe that ray tracing can be done in real time by a plug-in, you can use the mouse to move the light and watch the shadows change, or turn the lake to plastic. <br />
<br />
To learn more, read The Coolest Interactive Ray Tracing Tutorial on the Web, which is totally written in Curl and contains a nice gallery of ray traced Curl procedural graphics.<br />
<br />
To run the Ray Tracing application click on the link below. <br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/raytrace/start.curl" target="_blank" rel="noopener" class="mycode_url">Ray Tracing</a></span><br />
<br />
Download the zip file attachment below to get the complete source for the Ray Tracing application.<br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped raytracing source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1062-9-1110/raytrace.zip" target="_blank" rel="noopener" class="mycode_url">raytrace.zip</a></span>]]></description>
			<content:encoded><![CDATA[This code sample does 3D rendering using rendering algorithms directly programmed in Curl software, showing the high performance of code generated by the Curl compiler. The Curl content language is also showcased, since active elements are mixed in with, and controlled from, the accompanying descriptive text. <br />
<br />
If it's hard to believe that ray tracing can be done in real time by a plug-in, you can use the mouse to move the light and watch the shadows change, or turn the lake to plastic. <br />
<br />
To learn more, read The Coolest Interactive Ray Tracing Tutorial on the Web, which is totally written in Curl and contains a nice gallery of ray traced Curl procedural graphics.<br />
<br />
To run the Ray Tracing application click on the link below. <br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/raytrace/start.curl" target="_blank" rel="noopener" class="mycode_url">Ray Tracing</a></span><br />
<br />
Download the zip file attachment below to get the complete source for the Ray Tracing application.<br />
<br />
You will also need the to download and unzip the Styled Controls package from the link below. The<br />
unzipped contents should be placed alongside the unzipped raytracing source.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/zips/COM.CURL.GUI.STYLED-6.0-en.zip" target="_blank" rel="noopener" class="mycode_url">Styled Controls Package Zip File</a></span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1062-9-1110/raytrace.zip" target="_blank" rel="noopener" class="mycode_url">raytrace.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Molecule Viewer]]></title>
			<link>https://communities.curl.com/showthread.php?tid=96</link>
			<pubDate>Fri, 01 Jul 2011 01:07:29 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=96</guid>
			<description><![CDATA[Hardware-accelerated rendering is used to show a 3D view of chemical molecules. Use the Help / About the Demo menu command to learn how to operate the code sample. <br />
<br />
To run the Molecule Viewer click on the link below. <br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/molecules/start.curl" target="_blank" rel="noopener" class="mycode_url">Molecule Viewer</a></span><br />
<br />
Download the zip file attachment below to get the complete source code for the Molecule Viewer.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1060-8-1111/molecules.zip" target="_blank" rel="noopener" class="mycode_url">molecules.zip</a></span>]]></description>
			<content:encoded><![CDATA[Hardware-accelerated rendering is used to show a 3D view of chemical molecules. Use the Help / About the Demo menu command to learn how to operate the code sample. <br />
<br />
To run the Molecule Viewer click on the link below. <br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/demos/molecules/start.curl" target="_blank" rel="noopener" class="mycode_url">Molecule Viewer</a></span><br />
<br />
Download the zip file attachment below to get the complete source code for the Molecule Viewer.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1060-8-1111/molecules.zip" target="_blank" rel="noopener" class="mycode_url">molecules.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[TreeControl with Draggable Nodes and Json Data]]></title>
			<link>https://communities.curl.com/showthread.php?tid=95</link>
			<pubDate>Fri, 01 Jul 2011 01:05:56 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=95</guid>
			<description><![CDATA[ This is a customized TreeControl that supports data binding and rearranging the nodes by drag and drop. The value of the control is represented as a JSON string. <br />
<br />
The test applet shows the tree at the left and a TextArea at the right. Both are bound to the "data" field of the same RecordSet, so editing either one will affect the other one. As you drag nodes around in the tree, you'll see the string value change in the TextArea. If you edit in the TextArea (tab away to "finish" the edit), the tree will be updated to match. If you create bad JSON, it will throw an exception, of course, so do something simple like changing a + to a -! <br />
<br />
When you drop a node, the JsonTreeItem.move method is invoked. This rearranges the nodes as appropriate and updates the data value. This causes the control to rebuild the UI as needed. <br />
<br />
There can be improved but it is a good start. One thing I haven't done yet is to recognize when the item is dropped at some amount of indent. In that case, the dropped node should go in as a child node.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/downloadBody/1230-102-1-2318/jsontree.zip" target="_blank" rel="noopener" class="mycode_url">jsontree.zip</a></span>]]></description>
			<content:encoded><![CDATA[ This is a customized TreeControl that supports data binding and rearranging the nodes by drag and drop. The value of the control is represented as a JSON string. <br />
<br />
The test applet shows the tree at the left and a TextArea at the right. Both are bound to the "data" field of the same RecordSet, so editing either one will affect the other one. As you drag nodes around in the tree, you'll see the string value change in the TextArea. If you edit in the TextArea (tab away to "finish" the edit), the tree will be updated to match. If you create bad JSON, it will throw an exception, of course, so do something simple like changing a + to a -! <br />
<br />
When you drop a node, the JsonTreeItem.move method is invoked. This rearranges the nodes as appropriate and updates the data value. This causes the control to rebuild the UI as needed. <br />
<br />
There can be improved but it is a good start. One thing I haven't done yet is to recognize when the item is dropped at some amount of indent. In that case, the dropped node should go in as a child node.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/downloadBody/1230-102-1-2318/jsontree.zip" target="_blank" rel="noopener" class="mycode_url">jsontree.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[CDBC Database Explorer]]></title>
			<link>https://communities.curl.com/showthread.php?tid=94</link>
			<pubDate>Fri, 01 Jul 2011 01:04:27 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=94</guid>
			<description><![CDATA[This sample applet can establish a connection with a CDBC server and lets you explore and even modify the databases and tables exposed by the connection. To use it, you must set up your own CDBC server, as explained in the online documentation (search for "database server" in the documentation index). The main purpose of this applet is to give a developer who wants to learn about CDBC some working code to play with.<br />
<br />
The applet shows both the power and the limitations of the CDBC BasicConnection. We chose the name BasicConnection because this was released in the spirit of a beta: it is useful, but it has some limitations. We want to hear from developers that use it or even decide not to use it. We are currently working on more powerful middleware solutions under the umbrella of our CDK open source project.<br />
<br />
One thing to note is that the security of the connection is established by the server. The CDBC servlet connects to the database server using one fixed set of credentials. Anyone with access to a BasicConnection has the access privileges granted by those credentials. Used in this way, CDBC is suitable for prototyping, experimental, or even small office uses, where access is limited to a small group of machines that are behind a firewall. An added level of security is available if the server is configured for HTTP basic authentication at the connection URL. A client will then have to provide a username and password in order to establish the connection. If you use https in combination with basic authentication then the connection should be secure.<br />
<br />
This applet is pretty simple. First select a connection (the only choice is localhost, but you can easily modify the code add more if you set up more servers). When the connection is selected, the other controls are populated with the available databases and tables. When you change the selection, the selected table is shown below in a RecordGrid. If an error occurs, the stack trace is shown. Uncheck the Trap Errors checkbox if you'd rather the exception be thrown so you can debug it. A panel at the bottom shows the events that are fired at the underlying RecordSet.<br />
<br />
Buttons are also provided to add a record or delete the current record. You can reload the data from the server, revert your changes, or commit them with the Save button.<br />
<br />
Finally, there is an area where you can enter SQL statements. Press the Execute button if you don't expect any results when the statements are executed. Press the Query button if the statement is a query and you want the results to be shown in the RecordGrid.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://developers.curl.com/servlet/JiveServlet/download/1260-1-1137/db-explorer-sample.curl" target="_blank" rel="noopener" class="mycode_url">db-explorer-sample.curl</a></span>]]></description>
			<content:encoded><![CDATA[This sample applet can establish a connection with a CDBC server and lets you explore and even modify the databases and tables exposed by the connection. To use it, you must set up your own CDBC server, as explained in the online documentation (search for "database server" in the documentation index). The main purpose of this applet is to give a developer who wants to learn about CDBC some working code to play with.<br />
<br />
The applet shows both the power and the limitations of the CDBC BasicConnection. We chose the name BasicConnection because this was released in the spirit of a beta: it is useful, but it has some limitations. We want to hear from developers that use it or even decide not to use it. We are currently working on more powerful middleware solutions under the umbrella of our CDK open source project.<br />
<br />
One thing to note is that the security of the connection is established by the server. The CDBC servlet connects to the database server using one fixed set of credentials. Anyone with access to a BasicConnection has the access privileges granted by those credentials. Used in this way, CDBC is suitable for prototyping, experimental, or even small office uses, where access is limited to a small group of machines that are behind a firewall. An added level of security is available if the server is configured for HTTP basic authentication at the connection URL. A client will then have to provide a username and password in order to establish the connection. If you use https in combination with basic authentication then the connection should be secure.<br />
<br />
This applet is pretty simple. First select a connection (the only choice is localhost, but you can easily modify the code add more if you set up more servers). When the connection is selected, the other controls are populated with the available databases and tables. When you change the selection, the selected table is shown below in a RecordGrid. If an error occurs, the stack trace is shown. Uncheck the Trap Errors checkbox if you'd rather the exception be thrown so you can debug it. A panel at the bottom shows the events that are fired at the underlying RecordSet.<br />
<br />
Buttons are also provided to add a record or delete the current record. You can reload the data from the server, revert your changes, or commit them with the Save button.<br />
<br />
Finally, there is an area where you can enter SQL statements. Press the Execute button if you don't expect any results when the statements are executed. Press the Query button if the statement is a query and you want the results to be shown in the RecordGrid.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://developers.curl.com/servlet/JiveServlet/download/1260-1-1137/db-explorer-sample.curl" target="_blank" rel="noopener" class="mycode_url">db-explorer-sample.curl</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Style Designer]]></title>
			<link>https://communities.curl.com/showthread.php?tid=93</link>
			<pubDate>Fri, 01 Jul 2011 01:03:19 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=93</guid>
			<description><![CDATA[<span style="font-style: italic;" class="mycode_i">Note 22 May 2009:</span> Another update for 7.0 Added a ScrollBox to improve the appearance if the window is small.<br />
<br />
The <a href="http://communities.curl.com/demos/style-designer-7.0-1.0.5/style-designer-app.curl" target="_blank" rel="noopener" class="mycode_url">Style Designer</a> is a Curl applet that allows you to create a skin and style sheet for the <a href="http://www.curl.com/developer/libraries/styled-controls/style-library-intro.php" target="_blank" rel="noopener" class="mycode_url">styled controls</a> that were introduced with Version 6.0 of the Curl RTE. Use this applet to create your own unique look for the Curl styled controls.<br />
<br />
The left side of the applet is a collection of properties for the the skinnable Curl controls. Adjust the colors, highlighting, and other attributes to design a look that you like. The sample dialogs on the right hand side of the window show you what the controls look like when your skin is installed. <br />
<br />
The Style Designer maintains a collection of styles in a file. Use New Style or Clone Style to create a new style. Use the drop down list in the upper right to select the style you want to work with. You can export and import one style at a time to a text file. This is useful if you want to share or exchange one or a few styles with others. <br />
<br />
When you create a new style all colors are shades of gray. The Clone Style operation will create a new style that looks just like the current style. This makes it easy to experiment with variations on a style without losing the original. When you are happy with a style you've created you can write out a style sheet file that you can use in any Curl applets you develop. Choose Write Style Sheet... from the File menu to write out a Curl style sheet. <br />
<br />
Some sample styles are provided in the file <a href="http://communities.curl.com/demos/style-designer-7.0-1.0.5/sample-styles.csv" target="_blank" rel="noopener" class="mycode_url">sample-styles.csv</a> (right-click to download).<br />
<br />
The Style Designer is designed to run as a Curl detached applet, meaning that it can run from the web but without a web browser. To launch the Style Designer as a detached applet. Due to limitations in the markup for user-created content on this web site, please paste this link into your browser: curl://launch/<a href="http://communities.curl.com/demos/style-designer-7.0-1.0.5/style-designer.dcurl" target="_blank" rel="noopener" class="mycode_url">http://communities.curl.com/demos/style-...gner.dcurl</a><br />
<br />
The applet works like a traditional desktop application. The styles you design are stored in a file which is saved on your local disk drive or network. Choose New from the File menu to create a new file. Choose Save or Save As... to save the file. (It happens to use csv "comma separated value" files, mainly because it was easy to do in Curl.) <br />
<br />
The style designer source code is attached. You may want to make your own improvements, or you may just want to read the code to see how it works. Once you have unzipped the files you can run the applet from your local hard disk. However, note that you will need to grant the applet permission to run locally via the Curl Control Panel. <br />
<br />
To launch the applet from your hard disk, navigate to the style-designer folder and double-click on style-designer.dcurl. If you haven't already granted privileges to the style-designer directory, the applet will fail because it cannot read from a local drive without permission. Once you have granted privileges, double clicking this file will launch the application. <br />
<br />
Here's how to give the applet permission to read and write local files. When the Curl RTE is running, click the Curl RTE icon on the Windows task bar to bring up the Curl control panel. Select the Security tab, then click the This Computer section heading to open the security settings for your computer. Click the Add Privileged Directory... link and enter the directory where you unzipped the Style Designer (or a parent directory). Click OK. From now on, any Curl applet launched from this directory will have full access to the local machine. Double-click on style-designer.dcurl to launch it from your local drive.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1156-5-1058/style-designer-screen.png" target="_blank" rel="noopener" class="mycode_url">style-designer-screen.png</a><br />
<a href="http://communities.curl.com/download/1156-5-1059/style-designer-1.0.0-src.zip" target="_blank" rel="noopener" class="mycode_url">style-designer-1.0.0-src.zip</a><br />
<a href="http://communities.curl.com/download/1156-5-1209/style-designer-R7.0-V1.0.5-src.zip" target="_blank" rel="noopener" class="mycode_url">style-designer-R7.0-V1.0.5-src.zip</a></span>]]></description>
			<content:encoded><![CDATA[<span style="font-style: italic;" class="mycode_i">Note 22 May 2009:</span> Another update for 7.0 Added a ScrollBox to improve the appearance if the window is small.<br />
<br />
The <a href="http://communities.curl.com/demos/style-designer-7.0-1.0.5/style-designer-app.curl" target="_blank" rel="noopener" class="mycode_url">Style Designer</a> is a Curl applet that allows you to create a skin and style sheet for the <a href="http://www.curl.com/developer/libraries/styled-controls/style-library-intro.php" target="_blank" rel="noopener" class="mycode_url">styled controls</a> that were introduced with Version 6.0 of the Curl RTE. Use this applet to create your own unique look for the Curl styled controls.<br />
<br />
The left side of the applet is a collection of properties for the the skinnable Curl controls. Adjust the colors, highlighting, and other attributes to design a look that you like. The sample dialogs on the right hand side of the window show you what the controls look like when your skin is installed. <br />
<br />
The Style Designer maintains a collection of styles in a file. Use New Style or Clone Style to create a new style. Use the drop down list in the upper right to select the style you want to work with. You can export and import one style at a time to a text file. This is useful if you want to share or exchange one or a few styles with others. <br />
<br />
When you create a new style all colors are shades of gray. The Clone Style operation will create a new style that looks just like the current style. This makes it easy to experiment with variations on a style without losing the original. When you are happy with a style you've created you can write out a style sheet file that you can use in any Curl applets you develop. Choose Write Style Sheet... from the File menu to write out a Curl style sheet. <br />
<br />
Some sample styles are provided in the file <a href="http://communities.curl.com/demos/style-designer-7.0-1.0.5/sample-styles.csv" target="_blank" rel="noopener" class="mycode_url">sample-styles.csv</a> (right-click to download).<br />
<br />
The Style Designer is designed to run as a Curl detached applet, meaning that it can run from the web but without a web browser. To launch the Style Designer as a detached applet. Due to limitations in the markup for user-created content on this web site, please paste this link into your browser: curl://launch/<a href="http://communities.curl.com/demos/style-designer-7.0-1.0.5/style-designer.dcurl" target="_blank" rel="noopener" class="mycode_url">http://communities.curl.com/demos/style-...gner.dcurl</a><br />
<br />
The applet works like a traditional desktop application. The styles you design are stored in a file which is saved on your local disk drive or network. Choose New from the File menu to create a new file. Choose Save or Save As... to save the file. (It happens to use csv "comma separated value" files, mainly because it was easy to do in Curl.) <br />
<br />
The style designer source code is attached. You may want to make your own improvements, or you may just want to read the code to see how it works. Once you have unzipped the files you can run the applet from your local hard disk. However, note that you will need to grant the applet permission to run locally via the Curl Control Panel. <br />
<br />
To launch the applet from your hard disk, navigate to the style-designer folder and double-click on style-designer.dcurl. If you haven't already granted privileges to the style-designer directory, the applet will fail because it cannot read from a local drive without permission. Once you have granted privileges, double clicking this file will launch the application. <br />
<br />
Here's how to give the applet permission to read and write local files. When the Curl RTE is running, click the Curl RTE icon on the Windows task bar to bring up the Curl control panel. Select the Security tab, then click the This Computer section heading to open the security settings for your computer. Click the Add Privileged Directory... link and enter the directory where you unzipped the Style Designer (or a parent directory). Click OK. From now on, any Curl applet launched from this directory will have full access to the local machine. Double-click on style-designer.dcurl to launch it from your local drive.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1156-5-1058/style-designer-screen.png" target="_blank" rel="noopener" class="mycode_url">style-designer-screen.png</a><br />
<a href="http://communities.curl.com/download/1156-5-1059/style-designer-1.0.0-src.zip" target="_blank" rel="noopener" class="mycode_url">style-designer-1.0.0-src.zip</a><br />
<a href="http://communities.curl.com/download/1156-5-1209/style-designer-R7.0-V1.0.5-src.zip" target="_blank" rel="noopener" class="mycode_url">style-designer-R7.0-V1.0.5-src.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Curl Version 7 Sample Application: Sales Dashboard]]></title>
			<link>https://communities.curl.com/showthread.php?tid=92</link>
			<pubDate>Fri, 01 Jul 2011 01:00:38 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=92</guid>
			<description><![CDATA[The Curl Sales Dashboard application is a Curl implementation of a sales dashboard designed by Stephen Few. Mr. Few is Founder &amp; Principal of <a href="http://www.perceptualedge.com/" target="_blank" rel="noopener" class="mycode_url">Perceptual Edge</a>, and author of <a href="http://www.amazon.com/Information-Dashboard-Design-Effective-Communication/dp/0596100167/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1211224562&amp;sr=8-1" target="_blank" rel="noopener" class="mycode_url">Information Dashboard Design</a>.<br />
<br />
Design is important. This dashboard design features compact, effective display of crucial information for a regional sales manager. Every area and component of the display is designed to clearly communicate the information contained therein.<br />
<br />
The underlying data is obtained from a subset of the standard Salesforce.com data schema. This set of coherent, tractable, business-critical information can be sensibly transformed, aggregated, and presented by a Curl client application.<br />
<br />
The dashboard illustrates several important aspects of rich client data visualization.<br />
<br />
<span style="font-style: italic;" class="mycode_i">Local Data Storage</span><br />
The data is stored locally using SQLite, allowing rich clients to leverage the computing power of the client machine. This highly scalable architecture minimizes the latency associated with wire transfers, while freeing server resources to handle data\[-only\] requests from more clients.<br />
<br />
<span style="font-style: italic;" class="mycode_i">Client-side Computation and Presentation</span><br />
Rich Internet applications really prove their worth when it comes to performance and usability. The Curl Sales Dashboard leverages the power of today's client machines to perform simple and complex data transformations and aggregations, then presents the data in appealing ways, while avoiding superfluous server round-trips.<br />
<br />
<span style="font-style: italic;" class="mycode_i">Specialized Display Components</span><br />
The dashboard uses several standard Curl display components, but it also demonstrates the use of custom components. People familiar with Stephen Few's designs will recognize his signature sparklines and bullet graphs. These specialized components were built specifically for this dashboard with relatively few lines of code. They readily consume the data and present them, quickly, in sophisticatedly simple ways.<br />
<br />
<span style="font-style: italic;" class="mycode_i">Flexible User Interface</span><br />
The bar for usability in rich client applications is set high, so it is important to be able to offer users flexibility with regard to things like<br />
<ul class="mycode_list"><li>Layout<br />
</li>
<li>Styling<br />
</li>
<li>Visual Feedback (for example, tooltips)<br />
</li>
<li>Drilldown (for example, popups)<br />
</li>
</ul>
 <br />
as applied to their data. The extent of flexibility in these aspects is governed by the designer of the application, not the technology used to build it.<br />
<br />
The legend in the lower right-hand corner of the dashboard applies to all data presented in bar charts. Some individual presentations also include presentation-specific legends where appropriate.<br />
<br />
The dashboard employs some interactive features such as tooltips and drilldowns. Hovering the pointer over a data point or bar pops up a tooltip displaying the exact value. The Regional Breakdown presentation offers drilldown functionality in the Current Quarter Sales chart. When a hand cursor is present over the bars a user may click on the bar to drilldown into the region for more data. The Key Metrics and Regional Breakdown presentations also contain alert graphics indicating a metric or region is performing below a certain level.<br />
<br />
Buttons at the top right of the dashboard provide access to Help and detailed information About the dashboard.<br />
<br />
The data presented in the dashboard covers just one well-defined example. Specific metrics, rollups, content transformations, etc. will vary for every organization. Your competitive advantage is embodied in the information you make available. You are encouraged to take the code and apply your data to it, with the caveat that the existing code was not intended to be suitable for arbitrary datasets. You might need to modify the code in some ways to support your specific case(s).<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Installation Notes</span><br />
<br />
The URL for installing the Sales Dashboard application directly from the Curl Developer Center is<br />
<br />
curl://offline/curl://launch/http://communities.curl.com/demos/nitro/SalesDashboard/occ-start.dcurl<br />
<br />
Limitations in the infrastructure of this Web site prevent making the above link directly clickable, but if you paste the above URL into the address field of your browser, you can install the Sales Dashboard application on your system. You will need to have the current <a href="http://www.curl.com/download/rte/index.php" target="_blank" rel="noopener" class="mycode_url">Curl Version 7 RTE</a> installed on your machine first. (If you are running Firefox, you may see a popup window asking whether to run the Curl RTE File Loader. After you authorize this operation, the installation window for the Sales Dashboard application will be displayed.)<br />
<br />
This demo requires Curl Version 7. If you're using earlier, beta releases, you will get a "This library is not compatible with early beta releases" error.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Source Code</span><br />
<br />
If you want to see how the Sales Dashboard sample works, please download the attached zip file, which contains all the source files used to build the application. You can modify these source files to create your own variations.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Other Notes</span><br />
The dashboard is best viewed at a resolution of 1024x768 pixels or greater. Note that locales other than 'en' might yield unexpected display artifacts.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1306-10-1192/SalesDashboard090126.zip" target="_blank" rel="noopener" class="mycode_url">SalesDashboard090126.zip</a></span>]]></description>
			<content:encoded><![CDATA[The Curl Sales Dashboard application is a Curl implementation of a sales dashboard designed by Stephen Few. Mr. Few is Founder &amp; Principal of <a href="http://www.perceptualedge.com/" target="_blank" rel="noopener" class="mycode_url">Perceptual Edge</a>, and author of <a href="http://www.amazon.com/Information-Dashboard-Design-Effective-Communication/dp/0596100167/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1211224562&amp;sr=8-1" target="_blank" rel="noopener" class="mycode_url">Information Dashboard Design</a>.<br />
<br />
Design is important. This dashboard design features compact, effective display of crucial information for a regional sales manager. Every area and component of the display is designed to clearly communicate the information contained therein.<br />
<br />
The underlying data is obtained from a subset of the standard Salesforce.com data schema. This set of coherent, tractable, business-critical information can be sensibly transformed, aggregated, and presented by a Curl client application.<br />
<br />
The dashboard illustrates several important aspects of rich client data visualization.<br />
<br />
<span style="font-style: italic;" class="mycode_i">Local Data Storage</span><br />
The data is stored locally using SQLite, allowing rich clients to leverage the computing power of the client machine. This highly scalable architecture minimizes the latency associated with wire transfers, while freeing server resources to handle data\[-only\] requests from more clients.<br />
<br />
<span style="font-style: italic;" class="mycode_i">Client-side Computation and Presentation</span><br />
Rich Internet applications really prove their worth when it comes to performance and usability. The Curl Sales Dashboard leverages the power of today's client machines to perform simple and complex data transformations and aggregations, then presents the data in appealing ways, while avoiding superfluous server round-trips.<br />
<br />
<span style="font-style: italic;" class="mycode_i">Specialized Display Components</span><br />
The dashboard uses several standard Curl display components, but it also demonstrates the use of custom components. People familiar with Stephen Few's designs will recognize his signature sparklines and bullet graphs. These specialized components were built specifically for this dashboard with relatively few lines of code. They readily consume the data and present them, quickly, in sophisticatedly simple ways.<br />
<br />
<span style="font-style: italic;" class="mycode_i">Flexible User Interface</span><br />
The bar for usability in rich client applications is set high, so it is important to be able to offer users flexibility with regard to things like<br />
<ul class="mycode_list"><li>Layout<br />
</li>
<li>Styling<br />
</li>
<li>Visual Feedback (for example, tooltips)<br />
</li>
<li>Drilldown (for example, popups)<br />
</li>
</ul>
 <br />
as applied to their data. The extent of flexibility in these aspects is governed by the designer of the application, not the technology used to build it.<br />
<br />
The legend in the lower right-hand corner of the dashboard applies to all data presented in bar charts. Some individual presentations also include presentation-specific legends where appropriate.<br />
<br />
The dashboard employs some interactive features such as tooltips and drilldowns. Hovering the pointer over a data point or bar pops up a tooltip displaying the exact value. The Regional Breakdown presentation offers drilldown functionality in the Current Quarter Sales chart. When a hand cursor is present over the bars a user may click on the bar to drilldown into the region for more data. The Key Metrics and Regional Breakdown presentations also contain alert graphics indicating a metric or region is performing below a certain level.<br />
<br />
Buttons at the top right of the dashboard provide access to Help and detailed information About the dashboard.<br />
<br />
The data presented in the dashboard covers just one well-defined example. Specific metrics, rollups, content transformations, etc. will vary for every organization. Your competitive advantage is embodied in the information you make available. You are encouraged to take the code and apply your data to it, with the caveat that the existing code was not intended to be suitable for arbitrary datasets. You might need to modify the code in some ways to support your specific case(s).<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Installation Notes</span><br />
<br />
The URL for installing the Sales Dashboard application directly from the Curl Developer Center is<br />
<br />
curl://offline/curl://launch/http://communities.curl.com/demos/nitro/SalesDashboard/occ-start.dcurl<br />
<br />
Limitations in the infrastructure of this Web site prevent making the above link directly clickable, but if you paste the above URL into the address field of your browser, you can install the Sales Dashboard application on your system. You will need to have the current <a href="http://www.curl.com/download/rte/index.php" target="_blank" rel="noopener" class="mycode_url">Curl Version 7 RTE</a> installed on your machine first. (If you are running Firefox, you may see a popup window asking whether to run the Curl RTE File Loader. After you authorize this operation, the installation window for the Sales Dashboard application will be displayed.)<br />
<br />
This demo requires Curl Version 7. If you're using earlier, beta releases, you will get a "This library is not compatible with early beta releases" error.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Source Code</span><br />
<br />
If you want to see how the Sales Dashboard sample works, please download the attached zip file, which contains all the source files used to build the application. You can modify these source files to create your own variations.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Other Notes</span><br />
The dashboard is best viewed at a resolution of 1024x768 pixels or greater. Note that locales other than 'en' might yield unexpected display artifacts.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1306-10-1192/SalesDashboard090126.zip" target="_blank" rel="noopener" class="mycode_url">SalesDashboard090126.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Curl Version 7 Sample Application: Timeline Viewer]]></title>
			<link>https://communities.curl.com/showthread.php?tid=91</link>
			<pubDate>Fri, 01 Jul 2011 00:59:27 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=91</guid>
			<description><![CDATA[This simple viewer for historical timeline data illustrates how applications built on the Curl platform can load substantial data sets and provide a rich, interactive user interface for exploring them.<br />
<br />
This application was inspired by a browser-based, AJAX <a href="http://simile.mit.edu/timeline/examples/religions/christianity.html" target="_blank" rel="noopener" class="mycode_url">timeline viewer</a> built by the <a href="http://simile.mit.edu/" target="_blank" rel="noopener" class="mycode_url">SIMILE</a> project at MIT. This Curl viewer is driven by the same XML timeline files that were created in association with that project.<br />
<br />
The URL for installing the timeline viewer directly from the Curl Developer Center is<br />
<br />
curl://offline/curl://launch/http://developers.curl.com/demos/nitro/timeline/start.dcurl <br />
Limitations in the infrastructure of this Web site prevent making the above link directly clickable, but if you paste the above URL into the address field of your browser, you can install the timeline viewer on your system. You will need to have the Curl <a href="http://www.curl.com/download/rte/index.php" target="_blank" rel="noopener" class="mycode_url">Version 7 RTE</a> installed on your machine first. (If you are running Firefox, you may see a popup window asking whether to run the Curl RTE File Loader. After you authorize this operation, the installation window for the timeline viewer will be displayed.)<br />
<br />
Once you have the application installed and running, you can click the Help button to read the operating instructions.<br />
<br />
The Curl capabilities demonstrated by this program are useful in many interactive data visualization applications. In business and science, there are many instances of time-based data including server logs and transaction histories. Many data sets are provided as XML files similar to the timeline files used by this viewer. The clickable links that are included in the viewer's pop-up information windows illustrate how Curl can be used not only to display a data set, but to present that data set in a way that serves as a starting point for exploring other, related resources and information. Finally, the application can run offline as well as online.<br />
<br />
If you want to see how this timeline viewer works, please download the attached zip file, which contains all the source files used to build the application. You can modify these source files to create your own variations of this viewer.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1240-20-1119/timeline.zip" target="_blank" rel="noopener" class="mycode_url">timeline.zip</a></span>]]></description>
			<content:encoded><![CDATA[This simple viewer for historical timeline data illustrates how applications built on the Curl platform can load substantial data sets and provide a rich, interactive user interface for exploring them.<br />
<br />
This application was inspired by a browser-based, AJAX <a href="http://simile.mit.edu/timeline/examples/religions/christianity.html" target="_blank" rel="noopener" class="mycode_url">timeline viewer</a> built by the <a href="http://simile.mit.edu/" target="_blank" rel="noopener" class="mycode_url">SIMILE</a> project at MIT. This Curl viewer is driven by the same XML timeline files that were created in association with that project.<br />
<br />
The URL for installing the timeline viewer directly from the Curl Developer Center is<br />
<br />
curl://offline/curl://launch/http://developers.curl.com/demos/nitro/timeline/start.dcurl <br />
Limitations in the infrastructure of this Web site prevent making the above link directly clickable, but if you paste the above URL into the address field of your browser, you can install the timeline viewer on your system. You will need to have the Curl <a href="http://www.curl.com/download/rte/index.php" target="_blank" rel="noopener" class="mycode_url">Version 7 RTE</a> installed on your machine first. (If you are running Firefox, you may see a popup window asking whether to run the Curl RTE File Loader. After you authorize this operation, the installation window for the timeline viewer will be displayed.)<br />
<br />
Once you have the application installed and running, you can click the Help button to read the operating instructions.<br />
<br />
The Curl capabilities demonstrated by this program are useful in many interactive data visualization applications. In business and science, there are many instances of time-based data including server logs and transaction histories. Many data sets are provided as XML files similar to the timeline files used by this viewer. The clickable links that are included in the viewer's pop-up information windows illustrate how Curl can be used not only to display a data set, but to present that data set in a way that serves as a starting point for exploring other, related resources and information. Finally, the application can run offline as well as online.<br />
<br />
If you want to see how this timeline viewer works, please download the attached zip file, which contains all the source files used to build the application. You can modify these source files to create your own variations of this viewer.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1240-20-1119/timeline.zip" target="_blank" rel="noopener" class="mycode_url">timeline.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Curl Version 7 Sample Application: Curl eyeDecide]]></title>
			<link>https://communities.curl.com/showthread.php?tid=90</link>
			<pubDate>Fri, 01 Jul 2011 00:58:01 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=90</guid>
			<description><![CDATA[Curl eyeDecide is an application built using Curl's recently released Version 7 Enterprise RIA platform. Designed by <a href="http://www.involutionstudios.com/" target="_blank" rel="noopener" class="mycode_url">Involution Studios</a>, it features complex visual analysis of global data from <a href="http://www.gapminder.org/" target="_blank" rel="noopener" class="mycode_url">Gapminder.org</a>, and demonstrates the value of visualization in the analysis of complex data. Curl eyeDecide provides visual analysis of population, economic, environmental, and health indicators to give insight into global trends. With Curl eyeDecide, users will be able to examine the cause and effect of metrics such as income per capita, and life expectancy. By offering multiple linked views of different data sets, and visualizing the data as it changes over time, Curl eyeDecide enables key causes and effects to be easily spotted.<br />
<br />
Curl eyeDecide highlights several features in Curl Version 7:<br />
<ul class="mycode_list"><li>As a detached applet, it runs independently of the browser, in its own view, and is accessible from desktop and start menu.</li>
<li>As an "occasionally connected computing" (OCC) applet, it is installed on the local machine, so as to be available for use when disconnected. Like any web delivered application however, it is automatically updated whenever is is launched when connected.</li>
<li>It uses an embedded SQLite database for local data storage.</li>
<li>It demonstrates Curl's new SplashScreen API.</li>
</ul>
 <br />
Once you have installed and launched the application, you can immediately start exploring its features. To learn more about the application, click on the "Curl eyeDecide" text at the top right corner of the window. There you will also find a help document to guide you through the various features.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Installation Notes</span><br />
<br />
The URL for installing the Curl eyeDecide application directly from the Curl Developer Center is<br />
<br />
curl://offline/curl://launch/http://developers.curl.com/demos/nitro/eyeDecide/occ-start.dcurl <br />
Limitations in the infrastructure of this Web site prevent making the above link directly clickable, but if you paste the above URL into the address field of your browser, you can install the Curl eyeDecide application on your system. You will need to have the current <a href="http://www.curl.com/download/rte/index.php" target="_blank" rel="noopener" class="mycode_url">Curl Version 7 RTE</a> installed on your machine first. (NOTE: If you are running Firefox, you may see a popup window asking whether to run the Curl RTE File Loader. After you authorize this operation, the installation window for the Curl eyeDecide application will be displayed.)<br />
<br />
This demo requires Curl Version 7. If you're using earlier, beta releases, you will get a "This library is not compatible with early beta releases" error.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Release Notes</span><br />
<br />
The release notes are available <a href="http://communities.curl.com/demos/nitro/eyeDecide/README.txt" target="_blank" rel="noopener" class="mycode_url">here</a>.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Source Code</span><br />
<br />
If you want to see how the Curl eyeDecide sample works, please download the attached zip file, which contains all the source files used to build the application. You can modify these source files to create your own variations.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1398-10-1290/Curl-eyeDecide-1.0.2.zip" target="_blank" rel="noopener" class="mycode_url">Curl-eyeDecide-1.0.2.zip</a></span>]]></description>
			<content:encoded><![CDATA[Curl eyeDecide is an application built using Curl's recently released Version 7 Enterprise RIA platform. Designed by <a href="http://www.involutionstudios.com/" target="_blank" rel="noopener" class="mycode_url">Involution Studios</a>, it features complex visual analysis of global data from <a href="http://www.gapminder.org/" target="_blank" rel="noopener" class="mycode_url">Gapminder.org</a>, and demonstrates the value of visualization in the analysis of complex data. Curl eyeDecide provides visual analysis of population, economic, environmental, and health indicators to give insight into global trends. With Curl eyeDecide, users will be able to examine the cause and effect of metrics such as income per capita, and life expectancy. By offering multiple linked views of different data sets, and visualizing the data as it changes over time, Curl eyeDecide enables key causes and effects to be easily spotted.<br />
<br />
Curl eyeDecide highlights several features in Curl Version 7:<br />
<ul class="mycode_list"><li>As a detached applet, it runs independently of the browser, in its own view, and is accessible from desktop and start menu.</li>
<li>As an "occasionally connected computing" (OCC) applet, it is installed on the local machine, so as to be available for use when disconnected. Like any web delivered application however, it is automatically updated whenever is is launched when connected.</li>
<li>It uses an embedded SQLite database for local data storage.</li>
<li>It demonstrates Curl's new SplashScreen API.</li>
</ul>
 <br />
Once you have installed and launched the application, you can immediately start exploring its features. To learn more about the application, click on the "Curl eyeDecide" text at the top right corner of the window. There you will also find a help document to guide you through the various features.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Installation Notes</span><br />
<br />
The URL for installing the Curl eyeDecide application directly from the Curl Developer Center is<br />
<br />
curl://offline/curl://launch/http://developers.curl.com/demos/nitro/eyeDecide/occ-start.dcurl <br />
Limitations in the infrastructure of this Web site prevent making the above link directly clickable, but if you paste the above URL into the address field of your browser, you can install the Curl eyeDecide application on your system. You will need to have the current <a href="http://www.curl.com/download/rte/index.php" target="_blank" rel="noopener" class="mycode_url">Curl Version 7 RTE</a> installed on your machine first. (NOTE: If you are running Firefox, you may see a popup window asking whether to run the Curl RTE File Loader. After you authorize this operation, the installation window for the Curl eyeDecide application will be displayed.)<br />
<br />
This demo requires Curl Version 7. If you're using earlier, beta releases, you will get a "This library is not compatible with early beta releases" error.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Release Notes</span><br />
<br />
The release notes are available <a href="http://communities.curl.com/demos/nitro/eyeDecide/README.txt" target="_blank" rel="noopener" class="mycode_url">here</a>.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Source Code</span><br />
<br />
If you want to see how the Curl eyeDecide sample works, please download the attached zip file, which contains all the source files used to build the application. You can modify these source files to create your own variations.<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1398-10-1290/Curl-eyeDecide-1.0.2.zip" target="_blank" rel="noopener" class="mycode_url">Curl-eyeDecide-1.0.2.zip</a></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Source code for COM.CURL.IO.JSON]]></title>
			<link>https://communities.curl.com/showthread.php?tid=89</link>
			<pubDate>Fri, 01 Jul 2011 00:56:37 +0000</pubDate>
			<guid isPermaLink="false">https://communities.curl.com/showthread.php?tid=89</guid>
			<description><![CDATA[There was a support request for JSON support for Curl 5.0 applets. The source code for the JSON package is attached.<br />
<br />
Here is a trivial applet that uses the package:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>{curl 5.0 applet}<br />
{curl-file-attributes character-encoding = windows-latin-1}<br />
{applet ||manifest = manifest.mcurl,<br />
&nbsp;&nbsp;&nbsp;&nbsp;{compiler-directives<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;allow-import-locations? = true,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;careful? = true<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
{import * from COM.CURL.IO.JSON,<br />
&nbsp;&nbsp;&nbsp;&nbsp;location = json-src/load-json.scurl<br />
}<br />
<br />
{let x:JsonObject = {JsonObject a, 33}}<br />
<br />
{value x[a]}</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1423-1-1304/com-curl-io-json.zip" target="_blank" rel="noopener" class="mycode_url">com-curl-io-json.zip</a></span>]]></description>
			<content:encoded><![CDATA[There was a support request for JSON support for Curl 5.0 applets. The source code for the JSON package is attached.<br />
<br />
Here is a trivial applet that uses the package:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>{curl 5.0 applet}<br />
{curl-file-attributes character-encoding = windows-latin-1}<br />
{applet ||manifest = manifest.mcurl,<br />
&nbsp;&nbsp;&nbsp;&nbsp;{compiler-directives<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;allow-import-locations? = true,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;careful? = true<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
<br />
{import * from COM.CURL.IO.JSON,<br />
&nbsp;&nbsp;&nbsp;&nbsp;location = json-src/load-json.scurl<br />
}<br />
<br />
{let x:JsonObject = {JsonObject a, 33}}<br />
<br />
{value x[a]}</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b"><a href="http://communities.curl.com/download/1423-1-1304/com-curl-io-json.zip" target="_blank" rel="noopener" class="mycode_url">com-curl-io-json.zip</a></span>]]></content:encoded>
		</item>
	</channel>
</rss>