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

<channel>
	<title>gnuu.org &#187; cusec</title>
	<atom:link href="http://gnuu.org/tag/cusec/feed/" rel="self" type="application/rss+xml" />
	<link>http://gnuu.org</link>
	<description>my word against yours, fight.</description>
	<lastBuildDate>Fri, 16 Jul 2010 22:12:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Seaside Statefulness: Call-and-Answer</title>
		<link>http://gnuu.org/2009/01/26/seaside-statefulness-call-and-answer/</link>
		<comments>http://gnuu.org/2009/01/26/seaside-statefulness-call-and-answer/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 08:00:44 +0000</pubDate>
		<dc:creator>Loren Segal</dc:creator>
				<category><![CDATA[post]]></category>
		<category><![CDATA[avi bryant]]></category>
		<category><![CDATA[continuations]]></category>
		<category><![CDATA[cusec]]></category>
		<category><![CDATA[seaside]]></category>
		<category><![CDATA[smalltalk]]></category>
		<category><![CDATA[stateless http]]></category>

		<guid isPermaLink="false">http://gnuu.org/2009/01/26/seaside-statefulness-call-and-answer/</guid>
		<description><![CDATA[So Avi Bryant spoke at CUSEC this last week and I was fortunate enough to sit in on a Seaside tutorial that he gave to a couple of people. It got me really interested in this Smalltalk web framework stuff. Smalltalk is of course nothing new except for the fact that it was the first [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="Seaside - The framework for developing sophisticated web applications in Smalltalk" align="right" src="http://seaside.st/styles/logo-plain.png" width="194" height="104" /></p>
<p>So <a href="http://www.avibryant.com/">Avi Bryant</a> spoke at <a href="http://2009.cusec.net/">CUSEC</a> this last week and I was fortunate enough to sit in on a <a href="http://www.seaside.st">Seaside</a> tutorial that he gave to a couple of people. It got me really interested in this Smalltalk web framework stuff. Smalltalk is of course nothing new except for the fact that it was the first language to have some of the awesome code features we use today, but that&#8217;s all in the past, so let&#8217;s move on. </p>
<p>The interesting part is that playing with Seaside is completely unlike learning Smalltalk (unless you&#8217;ve never seen a language with lambdas). It&#8217;s a complete mind-blowing experience on its own level; a revolutionary way to look at web application development, <strong>not</strong> <em>&quot;let&#8217;s do what Ruby on Rails does.. in Smalltalk!&quot;</em>. The revolution is in the idea that the statelessness of HTTP need not be transitive. It&#8217;s the idea that you shouldn&#8217;t have to reconstruct bits and pieces of many web requests and figure out what your user just did. In short, it brings back the workflow based semantics that make desktop app development so much more intuitive by comparison. In shorter: <em>it&#8217;s the future</em>. Smalltalk might not be, but these concepts definitely are.</p>
<h3>State: Big Deal? </h3>
<p>There&#8217;s something <em>really</em> sexy about being able to do the following:</p>
<p> <small style="padding-bottom: 0px; display: block; font-family: monospace; margin-bottom: 0px">AuthRegisterTask&gt;&gt;#go</small>
<pre class="sh_smalltalk" line="1">go

  | user |
  user := self call: AuthRegisterComponent new.
  user username ~= ''
    ifTrue:  [ self inform: ('Good Job ', user username)  ]
    ifFalse: [ self inform: 'You did not register' ]
</pre>
<p>The code above starts from class <tt>AuthRegisterTask</tt>, throws you off to a register screen (<tt>AuthRegisterComponent</tt>) and then returns a new <tt>AuthUser</tt> object back to the task. The task then validates and sends you off to another <tt>inform:</tt> page (helper page with some text and a simple &quot;Ok&quot; button that brings you back to the previous page when clicked) with the success/failure results. A total of <big><strong><u>4</u></strong></big> web requests are happening here from start to finish, but by looking at the code (assuming haven&#8217;t seen Seaside before) you would never know it. In fact, it looks like you just created an <tt>AuthRegisterComponent</tt> object and verified the results&#8212; the implementation details of how those results are retrieved are properly hidden from you. They&#8217;re hidden because they&#8217;re ugly.</p>
<p><tt>AuthRegisterComponent</tt> is implemented as:</p>
<p><small style="padding-bottom: 0px; display: block; font-family: monospace; margin-bottom: 0px">AuthRegisterComponent&gt;&gt;#renderContentOn:</small> </p>
<pre class="sh_smalltalk" line="1">renderContentOn: html

  | user |
  user := AuthUser new.
  html form: [
    html paragraph with: [
      html span with: 'Username'.
      html textInput on: #username of: user.
      ].
    html paragraph with: [
      html span with: 'Password'.
      html textInput on: #password of: user.
      ].
    html submitButton callback: [ self answer: user ].
    ].
</pre>
<p>The magic here is in the <tt>call:</tt> and <tt>answer:</tt> methods. This is where Seaside communicates (continuation style) between requests by saving and restoring state like a conventional application would.</p>
<h3>Seaside: Pages are not Islands</h3>
<p>Of course the example I used wasn&#8217;t perfect, but it&#8217;s the shortest illustration I can come up with right now. A much more appropriate (and much longer) example would be a 3+ page wizard style registration where the user might follow one of many possible flow graphs to complete the form. Seaside would handle this with ease because it does not treat <em>pages as islands</em>. In fact, such a wizard would be as easy as implementing one in Swing, or using some Neatbeans auto-wizardifier because the logic and implementation would be equivalent. This is not the case when dealing with the web. You usually have to hack your session and throw tons of state in there to emulate what continuations do in a very clean fashion.</p>
<h3>AJAX WAT? AJAX Where Art Thou.</h3>
<p>In researching the necessity for such behaviour, I came across <a href="http://lists.squeakfoundation.org/pipermail/seaside/2007-December/015571.html">an interesting post</a> from Avi himself (dating to 2007) where he states that AJAX trumps <em>most </em>(not all) of the benefits of continuations. It is indeed true that AJAX does emulate the concept of statefulness in some sense, but I&#8217;d say AJAX is not nearly as elegant as the above code. Using JavaScript to make requests for tiny tidbits of data, or using JavaScript as glue to throw back to the browser, is almost the opposite of elegant. AJAX surely has it&#8217;s place, but I&#8217;d rather see more of the above than more crappy &amp;&amp; broken JS.</p>
<h3>Continuations FTW?</h3>
<p>Moral of the story: you should learn continuations because they will blow your mind.</p>]]></content:encoded>
			<wfw:commentRss>http://gnuu.org/2009/01/26/seaside-statefulness-call-and-answer/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>CUSEC Getting Some Great Press</title>
		<link>http://gnuu.org/2008/01/20/cusec-getting-some-great-press/</link>
		<comments>http://gnuu.org/2008/01/20/cusec-getting-some-great-press/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 21:36:40 +0000</pubDate>
		<dc:creator>Loren Segal</dc:creator>
				<category><![CDATA[post]]></category>
		<category><![CDATA[cusec]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://gnuu.org/2008/01/20/cusec-getting-some-great-press/</guid>
		<description><![CDATA[So, for three years I&#8217;ve been attending a conference in Montreal called CUSEC, a ridiculously long acronym that I&#8217;ll spare everybody on. Let&#8217;s just pretend it&#8217;s a software conference mainly targeted at university students— and it&#8217;s organized by them too. It&#8217;s actually been a huge success story, having a conference organized by a bunch of engineers [...]]]></description>
			<content:encoded><![CDATA[<p>So, for three years I&#8217;ve been attending a conference in Montreal called <a href="http://www.cusec.net" title="Canadian Undergraduate Software Engineering Conference">CUSEC</a>, a ridiculously long acronym that I&#8217;ll spare everybody on. Let&#8217;s just pretend it&#8217;s a software conference mainly targeted at university students— and it&#8217;s organized by them too. It&#8217;s actually been a huge success story, having a conference organized by a bunch of engineers who you would think would otherwise rather just drink and play WoW, and getting great results out of it, inviting notable speakers, having more and more delegates turn out, etc.. It&#8217;s also been extremely awesome that these very notable speakers actually <em>enjoyed</em> their talks and experience at CUSEC— So much so that <a href="http://headrush.typepad.com/creating_passionate_users/2006/02/reigniting_pass.html" title="Kathy Sierra"><em>every</em></a><em> </em><a href="http://chadfowler.com/2006/1/25/fight-the-traffic-keynote-presentation" title="Chad Fowler"><em>single</em></a><em> </em><a href="http://www.tbray.org/ongoing/When/200x/2008/01/18/CUSEC-2008" title="Tim Bray"><em>one</em></a> <a href="http://blog.jonudell.net/2008/01/23/hacking-the-noosphere/" title="Jon Udell">with a blog</a> <a href="http://www.zedshaw.com/conferences/cusec2008.html" title="Zed Shaw - Steak and Strippers">wrote about it</a> after the conference&#8211; <em>and said something good</em>.</p>
<p><a href="http://flickr.com/photos/alexwclee/2206368983/"><img align="right" width="240" src="http://gnuu.org/wp-content/uploads/2008/01/2206368983_eaf5c5798e_m.jpg" alt="Sarah On The Phone @ CUSEC 2008" height="160" /></a></p>
<p>This year we were lucky enough to have <a href="http://2008.cusec.net/en/speakers.php">some great speakers</a>, though someone who may stand out to people reading this would be <strong>Jeff Atwood</strong> of <a href="http://www.codinghorror.com" title="CodingHorror: Jeff Atwood's blog">codinghorror.com</a> fame. Not only did he give a really great talk, but he also was nice enough to give CUSEC a <a href="http://www.codinghorror.com/blog/archives/001039.html" title="See you at CUSEC 2008">nice little plug</a> on his website a few days ago, which will probably get the conference a little bit of recognition with his 75,000 RSS subscribers and 100,000+ a day readers (his words, not mine, check his presentation for more crazy facts).</p>
<p>It&#8217;s great to see that CUSEC is actually getting good press from the speakers and that they <em>actually</em> find the experience to be unique. If only we could invite these guys and gals back to speak every year&#8230;</p>
<p><strong>Update 1 &#8211; Jan 20th 08:</strong> You can find photos from the event if you look up <a href="http://flickr.com/photos/tags/cusec2008" title="CUSEC Photos">&#8220;cusec2008&#8243; in Flickr</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://gnuu.org/2008/01/20/cusec-getting-some-great-press/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
