<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html" />
  <link rel="self" type="application/atom+xml" href="http://www.insideria.com/atom.xml" />
  <id>tag:www.insideria.com,2009://34/tag:www.insideria.com,2008://34.22802-</id>
  <updated>2009-11-05T20:23:49Z</updated>
  <title>Comments for Example of Coding in Jaxer (http://www.insideria.com/2008/02/coding-in-jaxer.html)</title>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.21-en</generator>
  <entry>
    <id>tag:www.insideria.com,2008://34.22802</id>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blogs.oreilly.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=34/entry_id=22802" title="Example of Coding in Jaxer" />
    <published>2008-02-07T02:06:10Z</published>
    <updated>2008-02-12T10:08:42Z</updated>
    <title>Example of Coding in Jaxer</title>
    <summary>

So continuing on with my discussion with Jaxer, the new product from Aptana, today I got my hands a bit dirty with the code. I&apos;ve complained previously about the lack of documentation, so please bear in mind that any code sample I show will probably not be &apos;best practice&apos; - but since there isn&apos;t any best practices doc, I can&apos;t be wrong, right? (Of course, by the time I post this, I bet there will be one.)</summary>
    <author>
      <name>Raymond Camden</name>
      <uri>http://www.coldfusionjedi.com</uri>
    </author>
    
    <category term="Blogs" />
    
    <content type="html" xml:lang="en" xml:base="http://www.insideria.com/">
      <![CDATA[<p>So continuing on with my discussion with <a href="http://www.aptana.com/jaxer">Jaxer</a>, the new product from Aptana, today I got my hands a bit dirty with the code. I've complained previously about the lack of documentation, so please bear in mind that any code sample I show will probably not be 'best practice' - but since there isn't any best practices doc, I can't be wrong, right? (Of course, by the time I post this, I bet there will be one.)</p>

<p>I took some time to look over the <a href="http://www.aptana.com/node/150">Architecture  Review</a>. Jaxer works much like ColdFusion (and other server side languages), where the Jaxer server will preprocess your code before returning it to the browser. Along with removing any server side code, Jaxer will add JavaScript code to your response to help enable it's basic feature sets. Read the review for more details.</p>

<p>How about what Jaxer supports on the server side? The docs say database access is supported (SQLite and MySQL), file access is supported, and network access. "Network Access" is a bit vague. It sounds like it could support POP or SMTP, but that the code would have to be written yourself.</p>

<p>The primary modification to your code seems to be the runat attribute added to script blocks. For example, this will log a message on the server:</p>

<p>&lt;script runat="server"&gt;<br />
		Jaxer.Log.info("hi ray");<br />
&lt;/script&gt;</p>

<p>Another value for runat is server-proxy, which is rather cool. The meat of the functions will work on the server side, but the functions are callable from the front end. This is similar to the cfajaxproxy tag built in ColdFusion.</p>

<p>And lastly (again though - I'm guessing) is the "both" value. This lets you use a function both server side and client side. Here is an example from their sample code:</p>

<p>&lt;!-- This script block will be available on both client and server since the <br />
	runat attribute is set to 'both'. --&gt;<br />
&lt;script type="text/javascript" runat="both"&gt;<br />
	/*<br />
	 * Easy access to a named element in the DOM<br />
	 */<br />
	function $(id)<br />
	{ <br />
		return document.getElementById(id); <br />
	}<br />
&lt;/script&gt;</p>

<p>As I mentioned above, Jaxer will parse up your source code and return it modified. Using the example I mentioned earlier with the Logging, when I viewed the result in my browser, it was removed from the source. </p>

<div class="ap_r" style="margin: 16px;"><a href="http://www.insideria.com/upload/2008/02/coding_in_jaxer/ComparativeStack.png" class="highslide" onclick="return hs.expand(this)"><img src="http://www.insideria.com/upload/2008/02/coding_in_jaxer/ComparativeStack.png" alt="ComparativeStack.png" title="Click to enlarge" width="148"/></a></div>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.22802-comment:2014944</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.22802" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html#comment-2014944" />
    <title>Comment from Andrew Herron on 2008-02-07</title>
    <author>
        <name>Andrew Herron</name>
        <uri>http://www.kritikal.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.kritikal.com">
        <![CDATA[<p>Are you working on anything specific? I'd love to share thoughts and maybe create our own 'best practices'.</p>

<p>If Aptana really wants this to take off they best get along to creating some valuable docs that will help people pick it up.</p>

<p>Also, are you using the pre-built binary and if so on what OS? I've been trying to compile the source for my Ubuntu server but without ANY doc and my lack of source-building, it's certainly a battle uphill.</p>]]>
    </content>
    <published>2008-02-07T14:28:51Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.22802-comment:2014945</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.22802" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html#comment-2014945" />
    <title>Comment from Raymond Camden on 2008-02-07</title>
    <author>
        <name>Raymond Camden</name>
        <uri>http://www.coldfusionjedi.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.coldfusionjedi.com">
        <![CDATA[<p>Lots of questions. :)</p>

<p>1) Am I building anything specific? </p>

<p>No, right now I'm just playing. The lack of proper docs is a bit painful.</p>

<p>2) Am I using the pre-built binary:</p>

<p>Yes, I'm using it on Leopard. I did NOT do the 'Apache' integration, I'm just using the text server. I would like to so I can test a mixed ColdFusion/Jaxer environment, but I need to find a bit more time.</p>

<p>I'm a bit surprised no one on the Jaxer team has commented here yet. :)</p>]]>
    </content>
    <published>2008-02-07T14:33:04Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.22802-comment:2014953</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.22802" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html#comment-2014953" />
    <title>Comment from davey on 2008-02-07</title>
    <author>
        <name>davey</name>
        <uri>http://www.aptana.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.aptana.com">
        <![CDATA[<p>@raymond, Just came across your post. With regards to the documentation, we are underway on a relayout of the docs. We actually have a fair amount of content but we need to organize in much more accessible way than it is currently.</p>

<p>You should see a much improved doc structure in the next week or so.</p>

<p>@andrew, the self build stuff on linux is quite difficult, we'll happily try and give you whatever pointers we can, just keep posting your questions to the forums.</p>

<p>In the meantime you can use the drupal searching to find the posted jaxer content on the site.</p>

<p><a href="http://www.aptana.com/search/node/jaxer+type%3Apage">http://www.aptana.com/search/node/jaxer+type%3Apage</a></p>

<p>we are working to get this indexed and published in a way that looks more like a book/user guide.</p>

<p>If you have any questions about the product, just ping us on the forums and we'll be happy to help solve the issue.</p>

<p>cheers<br />
davey</p>]]>
    </content>
    <published>2008-02-08T00:37:38Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.22802-comment:2014955</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.22802" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html#comment-2014955" />
    <title>Comment from Raymond Camden on 2008-02-07</title>
    <author>
        <name>Raymond Camden</name>
        <uri>http://www.coldfusionjedi.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.coldfusionjedi.com">
        <![CDATA[<p>davey - sounds good. Can you post a comment here again when the docs are updated?</p>]]>
    </content>
    <published>2008-02-08T01:57:20Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.22802-comment:2014956</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.22802" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/02/coding-in-jaxer.html#comment-2014956" />
    <title>Comment from Andrew Herron on 2008-02-07</title>
    <author>
        <name>Andrew Herron</name>
        <uri>http://www.kritikal.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.kritikal.com">
        <![CDATA[<p>Top notch davey, thanks for the hard work.</p>]]>
    </content>
    <published>2008-02-08T02:13:52Z</published>
  </entry>

</feed
