<?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>nooshu &#187; small Archives </title>
	<atom:link href="http://nooshu.com/tag/small/feed" rel="self" type="application/rss+xml" />
	<link>http://nooshu.com</link>
	<description>Kneeling on the shoulders of giants</description>
	<lastBuildDate>Fri, 20 Jan 2012 11:38:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A little bit of MicroJS</title>
		<link>http://nooshu.com/a-little-bit-of-microjs?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-little-bit-of-microjs</link>
		<comments>http://nooshu.com/a-little-bit-of-microjs#comments</comments>
		<pubDate>Sun, 29 May 2011 18:12:10 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Interesting]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Vanilla JavaScript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[small]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1732</guid>
		<description><![CDATA[For some projects you may not need a fully featured JavaScript library. But what are the alternatives?]]></description>
			<content:encoded><![CDATA[<p>Recently there was a flurry of talk around a little something called MicroJS, mainly thanks to a website of the same name created by <a href="http://mir.aculo.us/">Thomas Fuchs</a>, author of the <a href="http://script.aculo.us/">script.aculo.us</a> user interface library. I&#8217;m not sure if Thomas coined the term &#8220;MicroJS&#8221; or if it&#8217;s been in use for a while, but it describes the micro-framework methodology perfectly. So what is a micro-framework? The best way to answer that is to first ask what is a JavaScript framework?</p>
<p>JavaScript frameworks have been around since around 2005 (looking at the Prototype and jQuery history); their purpose is to allow developers to easily add interactivity to a page by creating a JavaScript abstraction layer to build from. The library takes care of any cross browser issues and quirks, allowing developers to focus on the &#8220;cool&#8221; stuff, building websites. As a developer I can&#8217;t thank all the library authors enough; without them my working life would be so much more stressful (and my hair would be even grayer than it is now!).</p>
<p>Once you know what a JavaScript framework is, it doesn&#8217;t take a genius to guess what a micro-framework is. Where as a full framework will have many tools (methods) a developer can use, a micro-framework only focuses on a very specific set of functions. I like the knife analogy: a full-framework like Dojo would be a Swiss Army knife where as a micro-framework could be considered a small pen knife. So which do you use in a project? This completely depends on the project in hand. I&#8217;ve put together a small list of pros and cons for each (let me know if you have any others):</p>
<h3>Full Framework</h3>
<ul>
<li><strong>Pros</strong></li>
<li>Extensive set of features to cater for most eventualities.</li>
<li>Consistent API across features.</li>
<li>Large user base with lots of community support.</li>
<li>Huge number of working examples available.</li>
<li>Many developers to fix bugs and add additional functionality.</li>
<li>Single point of reference of documentation.</li>
</ul>
<ul>
<li><strong>Cons</strong></li>
<li>Large code base could be very daunting to new users.</li>
<li>Large page footprint.</li>
<li>Many features of the library may not be needed.</li>
</ul>
<h3>Micro-Framework</h3>
<ul>
<li><strong>Pros</strong></li>
<li>Small page weight, usually less than 5K.</li>
<li>Small set of features so very quick to pick up and use.</li>
<li>Main focus on a very specific set of functionality.</li>
<li>No feature creep or excess code.</li>
<li>Use the right tool for the right job.</li>
</ul>
<ul>
<li><strong>Cons</strong></li>
<li>Small number of developers, bugs and issues may take a while to be fixed.</li>
<li>Development of the framework may stop completely.</li>
<li>May be very little support from the author and the community.</li>
<li>Fellow developers in your team may not be familiar with the framework.</li>
<li>Mixing micro-frameworks could conflict if badly coded.</li>
<li>Multiple frameworks could mean multiple HTTP requests.</li>
<li>Multiple points of reference for API docs.</li>
<li>Multiple frameworks could lead to an overlap in functionality.</li>
</ul>
<p>Many of the cons for micro-frameworks stem from using more than one at a time, but if you only plan on using one then they can be ignored.</p>
<p>Micro-frameworks caught my eye recently due to a couple of small projects I&#8217;d been working on. The projects all used vanilla JavaScript as there was no need for a helper library. I later realised I needed to attach a few events and manipulate the DOM but I wanted to avoid including jQuery in the project as I only needed a small fraction of its functionality. Luckily the MicroJS website came to the rescue.</p>
<p>The examples below are taken from <a href="https://github.com/ded/qwery">Query</a>, <a href="https://github.com/ded/bonzo">Bonzo</a>, <a href="https://github.com/kbjr/Events.js">Events.js</a> and <a href="https://github.com/fat/bean">Bean</a>. As you can see the usage for each is pretty self-explanatory with lots more functionality is available from each library&#8217;s website. If you&#8217;re a jQuery user the syntax will look <a href="http://www.dustindiaz.com/qwery">very familiar</a>.</p>
<p><strong>CSS selector and DOM utility</strong></p>
<div class="codecolorer-container javascript default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">/*<br />
Query - Dustin Diaz<br />
https://github.com/ded/qwery<br />
CSS selector engine<br />
*/</span><br />
query<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myid&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
query<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.myclass&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
query<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myid .myclass div a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
query<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a, div, strong&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">/*<br />
Query Paired with Bonzo - Dustin Diaz<br />
https://github.com/ded/bonzo<br />
DOM utility<br />
*/</span><br />
query<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myid&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
query<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.myclass&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">offset</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">50</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
query<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myid .myclass div a&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;anchorClass&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
query<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a, div, strong&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p><strong>Events</strong></p>
<div class="codecolorer-container javascript default customCodeColor" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">/*<br />
Events.js - James Brumond<br />
https://github.com/kbjr/Events.js<br />
Event handler library<br />
*/</span><br />
Events.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span>window<span style="color: #339933;">,</span> <span style="color: #3366CC;">'load'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//Page loaded, do something</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #006600; font-style: italic;">//Invoke the page load event</span><br />
Events.<span style="color: #660066;">invoke</span><span style="color: #009900;">&#40;</span>window<span style="color: #339933;">,</span> <span style="color: #3366CC;">'load'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #006600; font-style: italic;">//Mouse click event</span><br />
Events.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span>selectedElements<span style="color: #339933;">,</span> <span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//Mouse has been clicked</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #006600; font-style: italic;">//Very handy keystroke event</span><br />
Events.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span>document<span style="color: #339933;">,</span> <span style="color: #3366CC;">'keystroke.Ctrl+Shift+Alt+S'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; saveMySlices<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">/*<br />
Bean - Dustin Diaz<br />
https://github.com/fat/bean<br />
Event handler library<br />
*/</span><br />
bean.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>selectedElements<span style="color: #339933;">,</span> <span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//Mouse has been clicked</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #006600; font-style: italic;">//DOM has loaded</span><br />
bean.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>document<span style="color: #339933;">,</span> <span style="color: #3366CC;">'DOMContentLoaded'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//Page loaded, do something</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #006600; font-style: italic;">//Invoke an event on an element</span><br />
bean.<span style="color: #660066;">fire</span><span style="color: #009900;">&#40;</span>selectedElement<span style="color: #339933;">,</span> <span style="color: #3366CC;">'click'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #006600; font-style: italic;">//Remove the event from an element</span><br />
bean.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span>selectedElement<span style="color: #339933;">,</span> <span style="color: #3366CC;">'click'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>I&#8217;ll be trying out a few more of these micro-frameworks for my personal projects in the future as the ability to select only the functionality you need really appeals to me. Are there any other micro-frameworks you&#8217;ve used that you&#8217;d recommend? Leave me a comment and I&#8217;ll check them out.</p>
<p><strong>Update</strong>: It just so happens that a handy library website has emerged inspired by the MicroJS website called <a href="http://www.everyjs.com/">EveryJS</a>. The website lists all library&#8217;s rather than just micro versions. Not all are listed but I&#8217;m sure they will be added soon so it&#8217;s one to keep your eye on.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/a-little-bit-of-microjs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looking for a new CMS for small websites</title>
		<link>http://nooshu.com/looking-for-a-new-cms-for-small-websites?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=looking-for-a-new-cms-for-small-websites</link>
		<comments>http://nooshu.com/looking-for-a-new-cms-for-small-websites#comments</comments>
		<pubDate>Thu, 15 Jul 2010 09:16:16 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[small]]></category>

		<guid isPermaLink="false">http://nooshu.com/?p=1264</guid>
		<description><![CDATA[I've had a couple of security scares with FrogCMS recently so have decided to look for another small CMS solution.]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been looking at other small CMS solutions for future projects. For a while now I&#8217;ve been using <a href="http://www.madebyfrog.com/">Frog CMS</a>; unfortunately development seems to have stopped which is a shame. At the weekend I stumbled across quite a <a href="http://www.madirish.net/?article=227">major security concern</a> with Frog involving a Cross-site request forgery (CSRF). Using Google it is even possible to find ready to be used scripts (which I won&#8217;t link to here). Being hacked using CSRF is unlikely to happen as it requires a user who regularly uses the site to click on a rogue link, but even so it&#8217;s quite concerning.</p>
<p>Now I could keep using Wolf CMS (which is a variation on Frog) but my thoughts are why keep all your eggs in one basket. If Frog is vulnerable then its likely that Wolf will be too. So time to look about for a new small CMS.</p>
<p>The CMS will be used for very small websites (5 &#8211; 20 pages) where MODx, Drupal and WordPress are just overkill; It gets updated regularly and is based on PHP / MySQL. I&#8217;ve been having a search and have found a few that look really promising:</p>
<h3><a href="http://textpattern.com/">Textpattern</a></h3>
<p>Very clean looking CMS (love the typography on its homepage&#8230; not that it matters) and having tried the <a href="http://php.opensourcecms.com/scripts/details.php?scriptid=86&#038;name=Textpattern">demo</a> I can see the admin interface is simple to use and all the features are easy to find. I think the admin area needs a little work in terms of design, but the comments on Opensourcecms all seem to be very positive so I&#8217;ll definatly be installing it locally and having a closer look.</p>
<div id="attachment_1269" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/07/textpattern-cms.gif"><img src="http://nooshu.com/wp-content/uploads/2010/07/textpattern-cms-518x432.gif" alt="Text pattern homepage" title="textpattern-cms" width="518" height="432" class="size-medium wp-image-1269" /></a><p class="wp-caption-text">A flexible, elegant and easy-to-use CMS. We shall see!</p></div>
<h3><a href="http://www.concrete5.org/">Concrete5</a></h3>
<p>Another interesting CMS, the video on the homepage makes it look like some sort of action movie, maybe a little over the top but whatever. I was unable to find a live demo of the CMS unfortunately, but the screencasts from the video looked very promising. There&#8217;s also an option of Concrete5 hosting the CMS, which removes the (sometimes) tricky setup process; great for non-technical people.</p>
<div id="attachment_1272" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/07/concrete5.jpg"><img src="http://nooshu.com/wp-content/uploads/2010/07/concrete5-518x437.jpg" alt="concrete5 homepage" title="concrete5" width="518" height="437" class="size-medium wp-image-1272" /></a><p class="wp-caption-text">Dramatic homepage video, but how well does it work? Live demo please!</p></div>
<h3><a href="http://www.cmsmadesimple.org/">CMS Made Simple</a></h3>
<p>Of the new CMS&#8217; I&#8217;ve looked at CMS Made Simple is my favorite. The <a href="http://www.opensourcecms.com/demo/2/10/CMS+Made+Simple">live demo</a> looked good with a very intuitive administrator area. Some of the comments on Opensourcecms were quite negative; so I&#8217;ll have to do some testing of the installation and template system before I commit to building a live site with it.</p>
<div id="attachment_1274" class="wp-caption alignnone" style="width: 528px"><a href="http://nooshu.com/wp-content/uploads/2010/07/cmsmadesimple.jpg"><img src="http://nooshu.com/wp-content/uploads/2010/07/cmsmadesimple-518x374.jpg" alt="CMS Made Simple homepage" title="cmsmadesimple" width="518" height="374" class="size-medium wp-image-1274" /></a><p class="wp-caption-text">Some negative comments but it looks very promising.</p></div>
<p>For my next small project I&#8217;ll be using one of these small CMS&#8217;, but which one will it be? When i decide I&#8217;ll be sure to update you. Got any other suggestions? Why not leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://nooshu.com/looking-for-a-new-cms-for-small-websites/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

