<?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>HCoder.org &#187; web</title>
	<atom:link href="http://hcoder.org/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://hcoder.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 15 Apr 2012 21:43:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Small experiments with Cherokee</title>
		<link>http://hcoder.org/2012/03/10/small-experiments-with-cherokee/</link>
		<comments>http://hcoder.org/2012/03/10/small-experiments-with-cherokee/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 20:28:17 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[cherokee]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://hcoder.org/?p=1343</guid>
		<description><![CDATA[A couple of weeks ago I decided to move my wiki (see Wiki-Toki on GitHub) and my package repository (see Arepa on CPAN) over to a new machine. The idea was to move it to some infrastructure I &#8220;controlled&#8221; myself and was paying for (mainly inspired by the blog post &#8220;A Set of Tenets I [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago I decided to move my wiki (see <a href="https://github.com/emanchado/Wiki-toki">Wiki-Toki</a> on GitHub) and my package repository (see <a href="https://metacpan.org/module/Arepa">Arepa</a> on CPAN) over to a new machine. The idea was to move it to some infrastructure I &#8220;controlled&#8221; myself and was paying for (mainly inspired by the blog post &#8220;<a href="http://camendesign.com/blog/tenets">A Set of Tenets I Have Set Myself</a>&#8220;). As I was curious about <a href="http://www.cherokee-project.com/">Cherokee</a> and this was an excellent opportunity to learn it, I decided to use it as the web server.</p>
<p>I have to say I was pretty impressed by how easy it was to set it up. Although I did have several small problems, most of them were less related to Cherokee itself, and more related to me not being very familiar with Node application configuration outside of Joyent&#8217;s environment, or FastCGI configuration. In particular, the web-based configuration is brilliant: you don&#8217;t have to open or know the format of any configuration files, but instead configure everything from a pretty powerful UI (which in the end writes a text configuration file of course, so you can always automate or generate the configuration if you need to). I even knew this already, but seeing it in action was pretty impressive. To avoid security problems with people accessing that configuration interface, there&#8217;s this little tool called <a href="http://www.cherokee-project.com/doc/other_bundle_cherokee-admin.html">cherokee-admin</a> that starts <em>another</em> web server with the configuration interface (tip: pass the <tt>-b</tt> option without parameters if you want to connect to it from a different machine, which is the case unless you&#8217;re installing Cherokee in your own PC). On start it generates a random admin password, which you use to login.</p>
<p>Static content serving, CGI, FastCGI, specifying certain error codes for certain paths, and reverse proxying was all very easy to set up. There was only a small problem I bumped into: tweaking URLs in reverse-proxied responses. In my situation, I was doing reverse proxying from port 443 to port 3000. As the final application didn&#8217;t know about the proxy, it generated URL redirections to &#8220;http://&#8230;:3000/&#8221; instead of &#8220;https://&#8230;/&#8221;, so part of the process of proxying was fixing those URLs. Cherokee, of course, supports this out of the box, in a section called &#8220;URL Rewriting&#8221;. Each entry in that section takes a regular expression and a substitution string. My first attempt (&#8220;http://example.com:3000/&#8221; -&gt; &#8220;https://example.com/&#8221;) didn&#8217;t work: all URL redirections were changed to &#8220;https://example.com/&#8221;, disregarding the rest of the URL. After some time trying different things, I decided to try with &#8220;http://example.com:3000/(.*)&#8221; and &#8220;https://example.com/$1&#8243;. As it turns out, that worked like a charm! The documentation does mention that it uses Perl-compatible regular expressions, but I thought the <a href="http://www.cherokee-project.com/doc/modules_handlers_proxy.html">HTTP reverse proxy documentation</a> could have been more explicit in this regard.</p>
<p>But apart from that detail, everything was very smooth and I&#8217;m very, very happy with it :-)</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=1343&amp;md5=81ec40c5b566d3d808ec8bf984de36d2" title="Flattr" target="_blank"><img src="http://hcoder.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://hcoder.org/2012/03/10/small-experiments-with-cherokee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2012%2F03%2F10%2Fsmall-experiments-with-cherokee%2F&amp;language=en_GB&amp;category=text&amp;title=Small+experiments+with+Cherokee&amp;description=A+couple+of+weeks+ago+I+decided+to+move+my+wiki+%28see+Wiki-Toki+on+GitHub%29+and+my+package+repository+%28see+Arepa+on+CPAN%29+over+to+a+new+machine.+The+idea...&amp;tags=admin%2Ccherokee%2Cproxy%2Cservers%2Cweb%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Book review: Javascript Web Applications</title>
		<link>http://hcoder.org/2011/09/20/book-review-javascript-web-applications/</link>
		<comments>http://hcoder.org/2011/09/20/book-review-javascript-web-applications/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 20:42:17 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://hcoder.org/?p=1168</guid>
		<description><![CDATA[This is my review of &#8220;Javascript Web Applications&#8221; by Alex MacCaw, part of the O&#8217;Reilly Blogger Review Program (in a nutshell: you can choose an ebook from a given selection, and you get it for free if you make a review and post it in any consumer site). It&#8217;s a book about using Javascript to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://oreilly.com/bloggers/"><img src="http://cdn.oreilly.com/bloggers/blogger-review-badge-200.png" alt="I review for the O'Reilly Blogger Review Program" width="200" height="150" align="right" border="0" /></a> This is my review of &#8220;<a href="http://shop.oreilly.com/product/0636920018421.do">Javascript Web Applications</a>&#8221; by <a href="http://alexmaccaw.co.uk/">Alex MacCaw</a>, part of the O&#8217;Reilly Blogger Review Program (in a nutshell: you can choose an ebook from a given selection, and you get it for free if you make a review and post it in any consumer site). It&#8217;s a book about using Javascript to write (mostly) client-side web applications. The book cover says &#8220;jQuery Developers&#8217; Guide to Moving State to the Client&#8221;, which is somewhat misleading: although most examples that could be written with jQuery <em>are</em> written with jQuery, it&#8217;s a book that anyone interested in Javascript can use, enjoy and learn from, regardless of their library of choice. It doesn&#8217;t even assume you know jQuery, and there&#8217;s a whole appendix dedicated to introducing the reader to the library, should she need it.</p>
<h2>Structure</h2>
<p>The book teaches how to write web applications using Javascript, always following the MVC pattern. It&#8217;s divided in four parts:</p>
<ol>
<li>The first two chapters serve as an introduction to both the MVC pattern and the Javascript language. Although this book is not aimed at total Javascript newbies, you don&#8217;t have to know that much to follow the book. For example, it explains prototypes and constructor functions.</li>
<li>Chapters 3 to 5 cover the implementation details of MVC in Javascript (one chapter for the Model, another for the Controller and the last one about the View).</li>
<li>Chapters 6 to 10 cover many practicalities of client-side web development, like dependency management, unit testing, debugging, interesting browser APIs and deployment tips.</li>
<li>The last three chapters cover Javascript libraries: Spine, Backbone and JavascriptMVC.</li>
</ol>
<p>Additionally, there are three appendices covering <a href="http://jquery.org">jQuery</a>, <a href="http://lesscss.org/">Less</a> and CSS3.</p>
<h2>Highlights and references</h2>
<ul>
<li>Chapter 10 (&#8220;Deploying&#8221;) is full of very good tips and information.</li>
<li>Both the Backbone and the JavascriptMVC chapters were brilliant, looking forward to use any of them soon.</li>
<li>All the <a href="https://github.com/maccman/book-assets">example code</a> is on GitHub.</li>
<li>Page 24: &#8220;The secret to making large Javascript applications is not make large Javascript applications&#8221;.</li>
<li><a href="http://plugins.jquery.com/project/HJS">HJS plugin</a> for jQuery for a nice syntax to create classes.</li>
<li><a href="https://github.com/kriskowal/es5-shim">ES5-shim</a> for browsers that don&#8217;t support Ecmascript 5 yet.</li>
<li>Chapter 2 was a very good introduction about events. removeEventListener (p. 41), stopPropagation/preventDefault (p. 43), list of properties (p. 44), load vs. DOMContentLoaded (p. 45), delegating events (p. 46) and custom events (p. 47-49), among others.</li>
<li>Reference to <a href="http://michaux.ca/articles/javascript-namespacing">blog post about namespacing</a>.</li>
<li>Object.create discussed on page 55.</li>
<li>Using URL hash for URLs on pages 82, 83.</li>
<li>Didn&#8217;t really understand the explanation for the HTML5 history API on p. 85. Alternatively, see the <a href="http://dev.opera.com/articles/view/introducing-the-html5-history-api/">HTML5 history API</a> on Dev Opera.</li>
<li>Very interesting file API on p. 103 and p. 111. Forget the drag-n-drop (<a href="http://www.quirksmode.org/blog/archives/2009/09/the_html5_drag.html">reason</a>) and the copy/paste.</li>
<li>Tips about when to load your Javascript on p. 156.</li>
<li>The JavascriptMVC chapter was brilliant, see p. 208-213 for the class syntax (nicer and more compact, supports this._super()), p. 210 for instrospection and namespaces, p. 211, 212 for model attributes and observables, and p. 213 for setters. Very cool server encapsulation on p. 215. Type conversion and CRUD events on p. 218. JMVC views on p. 219. Templated actions and final example on p. 226-228.</li>
</ul>
<p>Note that all page references are pages in the PDF file, not pages in the book!</p>
<h2>Wrapping up</h2>
<p>This book is packed with very practical information and <em>a lot</em> of code that will teach you how to write applications in Javascript. It builds up from relatively simple code to more advanced stuff, including tips, use of libraries, etc. It&#8217;s one of those books that makes you want to play with all the stuff you&#8217;re learning, and try it all in your next project.</p>
<p>However, sometimes the amount of code makes the book hard to read. Some parts (eg. beginning of the chapter about controllers) are a bit tiring as you have to read and understand so much code, esp. if you&#8217;re not that used to reading more-or-less advanced Javascript. It also lacks information about some important tools like <a href="http://www.opera.com/dragonfly/">Dragonfly</a> (it almost feels like there&#8217;s nothing for developing with Opera) or <a href="http://code.google.com/p/js-test-driver/">js-test-driver</a>.</p>
<p>In summary, this is the perfect book if you know <em>a bit</em> of Javascript and want to learn modern techniques and libraries that will get you started in <em>serious</em> client-side programming. <em>Especially</em> if you are one of those server-side programmers that don&#8217;t like Javascript but has to use it anyway (because despite all its warts, it&#8217;s a really nice language!). If you&#8217;re a Javascript wizard and you have been developing client-side code for years, this book may not be for you.</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=1168&amp;md5=083124645c164fd06570fbd5e5ccfc84" title="Flattr" target="_blank"><img src="http://hcoder.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://hcoder.org/2011/09/20/book-review-javascript-web-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2011%2F09%2F20%2Fbook-review-javascript-web-applications%2F&amp;language=en_GB&amp;category=text&amp;title=Book+review%3A+Javascript+Web+Applications&amp;description=This+is+my+review+of+%26%238220%3BJavascript+Web+Applications%26%238221%3B+by+Alex+MacCaw%2C+part+of+the+O%26%238217%3BReilly+Blogger+Review+Program+%28in+a+nutshell%3A+you+can+choose+an+ebook+from+a+given+selection%2C...&amp;tags=books%2Cjavascript%2Cprogramming%2Creview%2Cweb%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Opera Unite: another milestone</title>
		<link>http://hcoder.org/2009/06/20/opera-unite-another-milestone/</link>
		<comments>http://hcoder.org/2009/06/20/opera-unite-another-milestone/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 23:17:00 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Freedom]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[unite]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[So we finally managed to get some public release of Opera Unite out of the door. That was a really good thing, first because it&#8217;s a very cool idea and we had to let others play with it and make it evolve, and second because it was painful keeping a secret for so long ;-) [...]]]></description>
			<content:encoded><![CDATA[<p>So we finally managed to get some public release of <a href="http://unite.opera.com/">Opera Unite</a> out of the door. That was a really good thing, first because it&#8217;s a very cool idea and we had to let others play with it and make it evolve, and second because it was painful keeping a secret for so long ;-)</p>
<p>In case you have been hiding under a rock these days and you don&#8217;t know what I&#8217;m talking about: Opera Unite is the latest crazy idea from <a href="http://opera.com">Opera Software</a>. Basically, embedding a web server inside the web browser, so that people can be more than spectators on the web, share their data without having to upload to third party services, and generally change the way they interact with the web. The cool thing is that the system is not limited to sharing files or whatever, you can actually program your own Opera Unite <em>services</em> to do pretty much <em>anything</em> you want (<a href="http://dev.opera.com/articles/view/opera-unite-developer-primer/">check</a> <a href="http://dev.opera.com/articles/view/markuper-unite-template-library/">the</a> <a href="http://dev.opera.com/articles/view/an-introduction-to-opera-unite/">documentation</a> in <a href="http://dev.opera.com">Dev Opera</a> if you&#8217;re a developer). However, do note that this is just a <a href="http://labs.opera.com">Labs</a> release, that is, just a preview of relatively immature software. For a more complete introduction, go to the Labs <a href="http://labs.opera.com/news/2009/06/16/">blog post introducing Opera Unite</a>.</p>
<p>Opera created quite a bit of hype before the release, which seemed to work pretty well. In particular, the teasing in the <em><span class="caps">HTML</span> comments</em> of the preview <span class="caps">URL</span> (<a href="http://opera.com/freedom">http://opera.com/freedom</a>), which were being <em>updated</em> every day by adding some more words, was brilliant. There has been a lot of press coverage of Opera Unite this week, and even some Russian fella created the website <a href="http://unitehowto.com/">unitehowto.com</a> <strong>the same day</strong> Unite was released, and he wrote (collected?) a bunch of information, articles and tutorials about Opera Unite.</p>
<p>I have to say that, although there has been some quite challenging times while developing Opera Unite (it&#8217;s a quite ambitious project that involves several departments with massively different backgrounds and values, what did you expect?), I&#8217;m quite happy with the result and I think we have made, in general, a good job. As I said, this is just a very rough version, and there&#8217;s a lot of work left to do, but I&#8217;m sure it will improve a lot before we release the final version. That said, I&#8217;m sure that the most exciting things about Unite will, without doubt, start happening once people start writing interesting services, changing the way we see Opera Unite and the way we see the web. I&#8217;m so eager to see what people are going to build with this&#8230;</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=69&amp;md5=92b4b217f590a946341878e212def563" title="Flattr" target="_blank"><img src="http://hcoder.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://hcoder.org/2009/06/20/opera-unite-another-milestone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2009%2F06%2F20%2Fopera-unite-another-milestone%2F&amp;language=en_GB&amp;category=text&amp;title=Opera+Unite%3A+another+milestone&amp;description=So+we+finally+managed+to+get+some+public+release+of+Opera+Unite+out+of+the+door.+That+was+a+really+good+thing%2C+first+because+it%26%238217%3Bs+a+very+cool+idea+and...&amp;tags=opera%2Cunite%2Cweb%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Work-related news</title>
		<link>http://hcoder.org/2008/07/22/work-related-news/</link>
		<comments>http://hcoder.org/2008/07/22/work-related-news/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 21:22:00 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Freedom]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[continuous]]></category>
		<category><![CDATA[curriculum]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Some time ago, Opera announced the Opera Web Standards Curriculum project. It&#8217;s a very interesting collection of articles that can be used as &#8220;curriculum&#8221; to learn about web development. It gets extra geeks points for using a Creative Commons license for the articles themselves. Even the W3C mentioned it :-) I just found some time [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago, Opera <a href="http://www.opera.com/pressreleases/en/2008/07/08/">announced</a> the <a href="http://www.opera.com/wsc/">Opera Web Standards Curriculum</a> project. It&#8217;s a very interesting collection of articles that can be used as &#8220;curriculum&#8221; to learn about web development. It gets extra geeks points for using a Creative Commons license for the articles themselves. Even <a href="http://www.w3.org/QA/2008/07/web-standards-curriculum">the W3C mentioned it</a> <code>:-)</code> I just found some time to have a look at it, that&#8217;s why I&#8217;m posting now <code>:-)</code></p>
<p>The other news is that finally the <a href="http://my.opera.com/operaqa/blog">Opera QA blog</a> is online, and has the first non-hello-world-article (written by yours truly), &#8220;<a href="http://my.opera.com/operaqa/blog/show.dml/2358111">Continuous Integration: Team Testing</a>&#8221;. I&#8217;m very excited about this, because it&#8217;s the first time I&#8217;ll participate directly in a company blog, and because the IT world needs more (and better) QA, so hopefully we&#8217;ll be able to spread the word and make the world a better place <code>:-D</code></p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=32&amp;md5=9b41b00f4a42e2567a45c112eb187178" title="Flattr" target="_blank"><img src="http://hcoder.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://hcoder.org/2008/07/22/work-related-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2008%2F07%2F22%2Fwork-related-news%2F&amp;language=en_GB&amp;category=text&amp;title=Work-related+news&amp;description=Some+time+ago%2C+Opera+announced+the+Opera+Web+Standards+Curriculum+project.+It%26%238217%3Bs+a+very+interesting+collection+of+articles+that+can+be+used+as+%26%238220%3Bcurriculum%26%238221%3B+to+learn+about+web+development.+It...&amp;tags=blog%2Ccontinuous%2Ccurriculum%2Cdevelopment%2Cintegration%2Copera%2Cqa%2Cstandards%2Cweb%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

