<?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>IO 9elements</title>
	<atom:link href="http://9elements.com/io/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://9elements.com/io</link>
	<description>Webninja&#039;s arise!</description>
	<lastBuildDate>Tue, 07 May 2013 16:38:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Free PSD: HTC one, iPhone &amp; iMac</title>
		<link>http://9elements.com/io/index.php/free-psd-htc-one-iphone-imac/</link>
		<comments>http://9elements.com/io/index.php/free-psd-htc-one-iphone-imac/#comments</comments>
		<pubDate>Tue, 07 May 2013 16:36:12 +0000</pubDate>
		<dc:creator>Eray Basar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9elements.com/io/?p=1149</guid>
		<description><![CDATA[We were recently asked to create a series of devices for our fantastic client cliqz (app store). They were looking for a great way to show that they are multi platform, namely iOS, Web and Android. So we created a nice visual to better showcase their product on an iPhone, an HTC one and a [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://9elements.com/io/index.php/free-psd-htc-one-iphone-imac/blogbanner/" rel="attachment wp-att-1150"><img class="size-full wp-image-1150" alt="free HTC, iMac, iPhone vector PSD " src="http://9elements.com/io/wp-content/uploads/2013/05/blogbanner.png" width="550" height="270" /></a></p>
<p>We were recently asked to create a series of devices for our fantastic client <a href="http://cliqz.com/">cliqz</a> (<a href="https://itunes.apple.com/us/app/cliqz/id482594697?ls=1&amp;mt=8">app store</a>). They were looking for a great way to show that they are multi platform, namely iOS, Web and Android. So we created a nice visual to better showcase their product on an iPhone, an HTC one and a gorgeous iMac. You can see a glimpse of the result on top :) The finished piece will be on their website soon.</p>
<p>Now, here comes the great part: Thanks to cliqz, you can <a title="Download the free PSD" href="http://9elements.com/downloads/Devices_Vectors_9elements.psd">download the full PSD featuring all three devices here</a>!</p>
<p>This is for educational purposes, we want you to dig through the psd and check out the layer styles so you can learn how to do this yourself. You are also allowed to use all three for personal or commercial use. Credit is not necessary but well appreciated! Please don&#8217;t try to make a profit by selling this psd or an altered version of it, we want this to be free. We&#8217;d also appreciate you not rehosting this file elsewhere, but rather link to this article if you want to share it with your friends and colleagues!</p>
]]></content:encoded>
			<wfw:commentRss>http://9elements.com/io/index.php/free-psd-htc-one-iphone-imac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript MVC frameworks: A Comparison of Marionette and Chaplin</title>
		<link>http://9elements.com/io/index.php/comparison-of-marionette-and-chaplin/</link>
		<comments>http://9elements.com/io/index.php/comparison-of-marionette-and-chaplin/#comments</comments>
		<pubDate>Mon, 08 Apr 2013 13:28:39 +0000</pubDate>
		<dc:creator>Mathias Schäfer</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[backbone]]></category>
		<category><![CDATA[chaplin]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[marionette]]></category>
		<category><![CDATA[single-page applications]]></category>

		<guid isPermaLink="false">http://9elements.com/io/?p=1128</guid>
		<description><![CDATA[Русский перевод JavaScript application development is a hot topic and people are wondering which framework they should pick. In this post I’m going to compare two of them. Marionette and Chaplin are frameworks on top of the popular Backbone.js library. Both seek to ease the development of single-page JavaScript applications. In such applications, the client [...]]]></description>
				<content:encoded><![CDATA[<style>#post-1128 .entry h2 { margin: 20px 0; font-size: 155%; text-transform: none; } #post-1128 .entry h3 { margin: 10px 0; font-size: 130%; text-transform: none; } #post-1128 .entry em { color: black; }</style>
<p><a href="http://habrahabr.ru/post/177843/">Русский перевод</a></p>
<p>JavaScript application development is a hot topic and people are wondering which framework they should pick. In this post I’m going to compare two of them.</p>
<p><a href="http://marionettejs.com">Marionette</a> and <a href="http://chaplinjs.org">Chaplin</a> are frameworks on top of the popular <a href="http://backbonejs.org">Backbone.js</a> library. Both seek to ease the development of single-page JavaScript applications. In such applications, the client performs tasks that were typically performed on the server, like rendering raw data into HTML.</p>
<p>Backbone is designed as a minimalist library instead of a full-featured framework. My experience has shown that Backbone can only provide the foundation of a JavaScript application architecture. Both Marionette and Chaplin arose because Backbone is providing too little structure for real-world apps. They respond to the same problems. So there are a lot of similarities between the two – perhaps more than differences.</p>
<p>First of all I have to disclose that I’m a co-author of Chaplin. But I’ve also worked with Marionette in production and I’m following Marionette’s development. There is another ambitious framework on top of Backbone, named <a href="http://thoraxjs.org/">Thorax</a>. Since I haven’t worked with it in production I don’t feel entitled to include Thorax in this comparison.</p>
<h2 id="contents">Contents</h2>
<ol>
<li><a href="#non-technical">Non-technical aspects</a></li>
<li><a href="#common-features">Common features that fill Backbone’s gaps</a></li>
<li><a href="#marionette-features">Key features of Marionette</a></li>
<li><a href="#marionette-downsides">Downsides of Marionette</a></li>
<li><a href="#chaplin-features">Key features of Chaplin</a></li>
<li><a href="#chaplin-downsides">Downsides of Chaplin</a></li>
<li><a href="#conclusion">Conclusion</a></li>
</ol>
<h2 id="non-technical">Non-technical aspects</h2>
<p>I’m going to talk about the technical details soon, but let’s face it, decisions between software libraries are largely influenced by their perceived momentum, reputation, success stories and documentation.</p>
<p><a href="https://github.com/marionettejs/backbone.marionette">Marionette</a> and <a href="https://github.com/chaplinjs/chaplin">Chaplin</a> are MIT-licensed open-source projects that are being actively developed on Github. The authors have developed several bigger Backbone apps and took their experience to write layers on top of Backbone so you don’t have repeat their mistakes again.</p>
<p>Well-known companies are using Marionette and Chaplin to develop their products. It’s hard to estimate, but the user base is probably about the same size. The Marionette ecosystem is broader, so a lot of people use parts of Marionette without using the whole library.</p>
<p>Chaplin was more popular in the beginning, but Marionette has recently gained popularity. Marionette is beginner-friendly and has a great documentation, which is probably the most important reason for people to choose it. I think the commitment of Derick Bailey, the creator of Marionette, is one of the reasons for Marionette’s success. He <a href="http://lostechies.com/derickbailey">wrote numerous key articles</a> about developing Backbone apps. He is giving talks and <a href="http://www.watchmecode.net/">recording screencasts</a>, too.</p>
<h2 id="common-features">Common features that fill Backbone’s gaps</h2>
<h3 id="common-event-based-architecture">Event-based architectures without the mess</h3>
<p>Backbone’s key feature is the separation of concerns between models and views. They are connected using events and event listening. Using Backbone.Events, you can build an <a href="http://en.wikipedia.org/wiki/Event-driven_architecture">event-driven architecture</a>. This is a great way to decouple the parts of your application.</p>
<p>Both Marionette and Chaplin identify the major pain points of Backbone apps. In an event-based architecture, cleaning up listeners is crucial. Components in your application need to have a defined lifecycle: A particular component creates another and is responsible for its later disposal. Marionette and Chaplin both address this problem with different approaches. They not only advocate event-based communication using Publish/Subscribe and related patterns, but also provide good means to avoid its pitfalls.</p>
<h3 id="common-architecture">Application architecture</h3>
<p>Models and views are low-level patterns. On top of that, Backbone only provides <a href="http://backbonejs.org/#Router">Routers</a>. This is a very thin layer and probably the most confusing and problematic part of Backbone. With Backbone.Router alone, it’s not possible to set up a proper top-level architecture that controls the lifecycle of your objects. Both Marionette and Chaplin re-introduce <em>controllers</em> and a managing layer on top of them.</p>
<h3 id="common-view-conventions">Strong view conventions</h3>
<p>Following Backbone’s philosophy of simplicity, Backbone views and view rendering are rather abstract patterns. A Backbone view holds and controls a specific DOM element, but Backbone leaves it up to you how to fill this element and how to add it to the live DOM – the <code>render</code> method of views is empty per default.</p>
<p>Marionette and Chaplin provide view classes with a sane default rendering mechanism (see <a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.itemview.md">Marionette.ItemView</a> and <a href="https://github.com/chaplinjs/chaplin/blob/master/docs/chaplin.view.md">Chaplin.View</a>). You just need to choose a template language like <a href="https://github.com/twitter/hogan.js">Mustache/Hogan</a>, <a href="http://handlebarsjs.com/">Handlebars</a> of <a href="https://github.com/netzpirat/haml-coffee">HAML Coffee</a>.</p>
<p>Both libraries have conventions on when to render views and how to add them to the DOM. You can transform the model data before it is passed to the template. This is useful for computed properties, for example.</p>
<p>Views are probably the most complex part of your application, so Marionette and Chaplin provide several helpers and shortcuts. They allow to nest views in a safe way and declare named regions. They allow to register model events in a declarative way, which is easier and more readable than calling <code>this.listenTo(this.model, …);</code> several times.</p>
<p>If you’re using plain Backbone you will definitely miss the view classes for rendering collections (see <a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.compositeview.md">Marionette.CompositeView</a> and <a href="https://github.com/chaplinjs/chaplin/blob/master/docs/chaplin.collection_view.md">Chaplin.CollectionView</a>). Using item views and two templates – a container template and an item template –, complex interactive lists can be implemented with clean and well-structured code. These collection views listen for collection events and render only those models that have been added, removed or changed their position.</p>
<h2 id="marionette-features">Key features of Marionette</h2>
<p>Marionette is a treasure trove for useful patterns to structure your app. It’s quite modular, you don’t need to use all what Marionette provides. It’s easy to start with some features of Marionette and discover others later. Some of Marionette’s features come from separate Backbone plugins, namely <a href="https://github.com/marionettejs/backbone.babysitter">Backbone.BabySitter</a> and <a href="https://github.com/marionettejs/backbone.wreqr">Backbone.Wreqr</a>. They are part of the Marionette family.</p>
<p>Marionette has some great unique features. In my opinion, the strongest points are <em>application modules</em> and the smart <em>view management</em>.</p>
<h3 id="marionette-modules">Application modules</h3>
<p>Application modules are independent parts of your app that may consist of routers, controllers, models and views. <a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.application.module.md">Modules</a> can be started and stopped, and you can define initializers as well as finalizers. Modules can also be lazy-loaded when a route matches, they don’t need to be active right from the beginning.</p>
<p><a href="https://github.com/marionettejs/bbclonemail">BBCloneMail</a> is an example app that consists of two modules (<a href="https://github.com/marionettejs/bbclonemail/tree/master/public/javascripts/bbclonemail/mail">mail</a> and <a href="https://github.com/marionettejs/bbclonemail/tree/master/public/javascripts/bbclonemail/contacts">contacts</a>). In this example, only one module is active at the same time. In general, app modules don’t have to be exclusionary. The modules have associated routers that need to be active since the beginning (<a href="https://github.com/marionettejs/bbclonemail/blob/master/public/javascripts/bbclonemail/contacts/router.js">contacts router</a>, <a href="https://github.com/marionettejs/bbclonemail/blob/master/public/javascripts/bbclonemail/mail/router.js">mail router</a>).</p>
<p>Modules can be nested. Your main application, <a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.application.md">Marionette.Application</a>, is also module. Technically there are some differences between Marionette.Application and Marionette.Module, but I hope <a href="https://github.com/marionettejs/backbone.marionette/issues/452">in the future</a> they will get more similar.</p>
<p>You probably don’t need several modules right from the beginning, but it’s a powerful feature that helps to break up an app into smaller, coherent units.</p>
<h3 id="marionette-view-management">View management</h3>
<p>Another strong part of Marionette is its sophisticated view management. Views can be nested easily and safely using the aforementioned <a href="https://github.com/marionettejs/backbone.babysitter">BabySitter</a>. In addition, Marionette introduces abstractions called <em>Layouts and Regions</em>. A <a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.layout.md">Layout</a> is a view that holds several named Regions. So what is a <a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.region.md">Region</a>? It’s an object that manages an element in the DOM where it can insert a view. Example regions are <code>header</code>, <code>navigation</code>, <code>main</code>, <code>sidebar</code> and <code>footer</code>.</p>
<p>How and where should I render views and append them to the DOM? Regions are the answer. Instead of messing with DOM element references directly, you declare a Region once and later just say <code>mainRegion.show(view)</code>, for example. This renders the view and attaches it to the DOM element that corresponds to the region. A Region holds only one view at a given time, so the old view is “closed” (i.e. removed from DOM and disposed safely).</p>
<p>With nested regions, building a complex UI gets easier and the code gets more readable and maintainable.</p>
<h2 id="marionette-downsides">Downsides of Marionette</h2>
<p>For brevity, I have just mentioned two unique points of Marionette. Most of its features are mature and well implemented. What I don’t like are thin abstraction layers and unclear best practices.</p>
<h3 id="marionette-routing">Routing and controllers</h3>
<p>For example, Marionette provides little on top of Backbone.Router. In my opinion, this in important because Backbone.Router provides no convention on how to dispose the objects created (typically models and views) when another route gets active. It’s possible to implement a central cleanup using <code>route</code> events, but that’s a hack.</p>
<p>In Marionette there are application modules that can be <a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.application.module.md#stopping-modules">stopped</a> and Regions than can be <a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.region.md#basic-use">closed</a>. But as far as I can see, you’re not supposed to start and stop modules over and over and close regions explicitly.</p>
<p><a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.approuter.md">Marionette.AppRouter</a> is a step in the right direction. The idea is to separate the route configuration from the actual handler code. An AppArouter delegates all route matches to a separate <a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.controller.md">Controller</a> instance.</p>
<p>Controllers in Marionette don’t have a single fixed purpose, they just control something. They can listen to events using the Backbone.Events mixin, they have <code>initialize</code> and <code>close</code> methods. This is definitely useful, but it’s up to you whether you use them and how. Typically, this is the place where you create models and views.</p>
<h3 id="marionette-private">Global vs. private objects</h3>
<p>In Marionette, the modules and classes are saved in a global hierarchical namespace, for example <a href="https://github.com/marionettejs/bbclonemail/blob/master/public/javascripts/bbclonemail/mail/mailapp.js"><code>BBCloneMail.MailApp.Controller</code></a>. The actual instances don’t have to be global, but it’s tempting to do so. In the BBCloneMail example, some objects are passed and returned while others are global (e.g. <a href="https://github.com/marionettejs/bbclonemail/blob/master/public/javascripts/bbclonemail/mail/mailapp.js#L90-L94"><code>BBCloneMail.MailApp.controller</code></a>).</p>
<p>From reading the code it’s unclear which objects are global and which are actually accessed globally. When using Marionette, I suggest to implement an <a href="http://en.wikipedia.org/wiki/Object-capability_model">object-capability model</a> that defines ways to connect objects without using the global scope.</p>
<h3 id="marionette-templating">Templating defaults</h3>
<p>Per default, views read their templates from the DOM and compile them using the Underscore template engine (<a href="http://underscorejs.org/#template">_.template</a>). That’s easy to start with, but it’s not a good practice to embed the template code in your HTML. Eventually, templates should be separated files that can be precompiled and lazy-loaded. Of course, you can change Marionette’s default behavior easily: The <a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.renderer.md#using-pre-compiled-templates">Renderer singleton</a> is in charge.</p>
<h2 id="chaplin-features">Key features of Chaplin</h2>
<p>Compared to Marionette, Chaplin acts more like a framework. It’s more opinionated and has stronger conventions in several areas. It took ideas from server-side MVC frameworks like Ruby on Rails which follow the <a href="http://en.wikipedia.org/wiki/Convention_over_configuration">convention over configuration</a> principle. The goal of Chaplin is to provide well-proven guidelines and a convenient developing environment.</p>
<h3 id="chaplin-coffeescript-oop">CoffeeScript and OOP</h3>
<p>Chaplin is written in <a href="http://coffeescript.org">CoffeeScript</a>, a meta-language that compiles to JavaScript. However, Chaplin applications <em>do not have to be written in CoffeeScript</em>. In the end, Chaplin is just another JavaScript library.</p>
<p>Using CoffeeScript is part of Chaplin’s idea to make application development easier and more robust. CoffeeScript enforces guidelines from Douglas Crockford’s book “JavaScript – The Good Parts”. Like Marionette, Chaplin is advocating the <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Functions_and_function_scope/Strict_mode">ECMAScript 5 Strict Mode</a>.</p>
<p>With CoffeeScript, class declarations and class-based inheritance are more compact compared to Backbone’s <code>extend</code> feature. While Marionette tries to get around <code>super</code> calls, Chaplin embraces method overriding and tries to make class-based inheritance work smoothly. For example, if you declare event handlers on a derived class and on its super class, both will be applied.</p>
<h3 id="chaplin-modules">Modularization using CommonJS or AMD</h3>
<p>Chaplin requires you to structure your JavaScript code in <a href="http://wiki.commonjs.org/wiki/Modules/1.1">CommonJS</a> or <a href="https://github.com/amdjs/amdjs-api/wiki/AMD">AMD</a> modules. Every module needs to declare its dependencies and might export a value, for example a constructor function or a single object. In Chaplin, one file typically contains one class and defines one module.</p>
<p>By splitting up your code into reusable modules and declaring dependencies in a machine-readable way, code can be loaded and packaged automatically.</p>
<p><a href="http://www.sitepen.com/blog/2012/06/25/amd-the-definitive-source/">Using AMD</a> isn’t easy, you need to get familiar with loaders like <a href="http://requirejs.org/">Require.js</a> and optimizers like <a href="https://github.com/jrburke/r.js/">r.js</a>. As an alternative, you can use the CommonJS module format and <a href="http://brunch.io">Brunch</a> as a processor.</p>
<p><a href="https://github.com/marionettejs/backbone.marionette/wiki/Using-marionette-with-requirejs">Marionette also supports AMD</a>. You can structure Marionette apps using AMD modules if you like, but it’s not a requirement.</p>
<h3 id="chaplin-strcuture">Fixed application structure</h3>
<p>Chaplin provides a core application structure that is <em>quite fixed</em>. It handles the main flow in your app.</p>
<ul>
<li>The <code>Application</code> is the root class that starts the following parts</li>
<li>The <code>Router</code> replaces Backbone.Router</li>
<li>The <code>Dispatcher</code> starts and stops controllers when a route matches</li>
<li>The <code>Layout</code> is the top-level view that observes clicks on links</li>
</ul>
<p>In Chaplin, there is a central place where to define all routes. A route points to a controller action. For example, the URL pattern <code>/cars/:id</code> points to <code>cars#show</code>, that is the <code>show</code> method of the <code>CarsController</code>.</p>
<p>A <em>controller</em> is the place where you create models. It’s also responsible for creating the view for the main content area. So a controller usually represents one screen of your app interface.</p>
<h3 id="chaplin-disposal">Object disposal and controlled sharing</h3>
<p>The main idea of Chaplin are disposable controllers. The basic rule is: The current controller <em>and all its children</em> (models, collections, views) are disposed when another route matches. Even if the route points to another action of the same controller, the controller instance is disposed and a new one is created.</p>
<p>Throwing objects away when another route matches is a simple and effective rule for cleaning up references. Of course, some objects need to remain in memory in order to reuse them later. The <a href="https://github.com/chaplinjs/chaplin/blob/master/docs/chaplin.composer.md">Chaplin.Composer</a> allows you to share models and views in a <em>controlled way</em>. You need to mark them as reusable explicitly. If the saved object is not reused in the next controller action, it is automatically disposed.</p>
<p>In a Chaplin app, every object should be disposable. All Chaplin classes have a <code>dispose</code> method that will render the object unusable and cut all ties.</p>
<h3 id="chaplin-private">Private instances and Publish/Subscribe</h3>
<p>A well-known rule of JavaScript programming is to avoid global variables. Chaplin tries to enforce this best practice. Classes are CommonJS/AMD modules that are hidden in a closure scope. All instances should be private. Two instances should not have references to each other unless they are closely related, like a view and its model.</p>
<p>Objects may communicate in a decoupled way using the <a href="http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern">Publish/Subscribe pattern</a>. For this purpose the <a href="https://github.com/chaplinjs/chaplin/blob/master/docs/chaplin.mediator.md">Chaplin.Mediator</a> exists. The mediator can also be used to share selected instances globally, like the user object. After creating the necessary properties, the mediator object is sealed so it doesn’t become the kitchen sink of your app.</p>
<h3 id="chaplin-view-management">View management</h3>
<p>Chaplin is also strong at <a href="https://github.com/chaplinjs/chaplin/blob/master/docs/chaplin.view.md">view management</a>. It has app-wide named regions and subview managing. Chaplin takes a different approach on rendering views and attaching them to the DOM. Views may have an <code>autoRender</code> flag and a <code>container</code> option. With these enabled, views are rendered on creation and are automatically attached to the DOM. Instead of <code>container</code>, you can specify <code>region</code> in order to attach the view to a previously registered region.</p>
<p>Apart from the app-wide regions there are no abstraction classes like Marionette.Layout and Marionette.Region. In a Marionette app, you typically create several nested Layouts and Regions. In a Chaplin app, you have fewer key regions and directly nest views inside of them. Of course you can create reusable views that behave like a Marionette.Layout, for example a <code>ThreePaneView</code>.</p>
<h2 id="chaplin-downsides">Downsides of Chaplin</h2>
<p>As one of the main authors of Chaplin, I may be biased. But I do see weaknesses and room for improvement. It’s obvious that Marionette found better solutions to specific problems.</p>
<p>As I pointed out, Chaplin defines each component’s lifecycle and therefore is strong in memory management. When developing Backbone applications, this was one of our major problems. Chaplin found a solution that works well, but it isn’t perfect and it’s <a href="https://github.com/chaplinjs/chaplin/issues/465">surely debatable</a>. This feature already evolved and needs to evolve even further.</p>
<p>For beginners, it’s not easy to grasp the whole Chaplin picture. Memory management, modularization and other Chaplin concepts are still new to many JavaScript developers. While Chaplin’s rigidity seems to be a burden in the beginning, an app will benefit from it in the long term.</p>
<p>Publish/Subscribe isn’t a unique feature of Chaplin but can be compared to Marionette’s <a href="https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.application.md#appvent-event-aggregator">application vent</a>. In fact Marionette is more flexible because every application module comes with its own Event Aggregator.</p>
<p>Chaplin is using Publish/Subscribe to broadcast events, but also to trigger commands with callbacks. This is rather a misuse of the pattern. <a href="https://github.com/marionettejs/backbone.wreqr">Backbone.Wreqr</a> implements the <a href="https://github.com/marionettejs/backbone.wreqr#commands-and-request--response">Command and Request/Response</a> patterns for this purpose. Chaplin <a href="https://github.com/chaplinjs/chaplin/issues/527">should learn from Marionette</a> in this regard.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Marionette is rather modular, you can pick the patterns you like. (In my opinion, you should pick most of them because they can improve your app.) Instead of having one central structure, you can create a <em>composite</em> architecture with independent application modules. This offers great flexibility and allows decoupling, but you need to figure out how to use these building blocks properly.</p>
<p>Chaplin is more like a framework, it’s centralized and rather strict. The Chaplin authors think these guidelines offer convenience and boost productivity. Your mileage may vary, of course.</p>
<p>Because of its goals, Chaplin has a broader scope and deals with several problems that other libraries do not address. For example, Chaplin has a feature-rich routing and dispatching system that replaces Backbone.Router but makes use of Backbone.History.</p>
<p>Compared with Marionette, Chaplin is rather monolithic. That doesn’t mean you can’t do things differently. You can configure, modify or exchange the core classes and break all rules.</p>
<h3 id="shoulders-of-giants">Standing on the shoulders of giants</h3>
<p>So which library should you pick? I don’t think it’s an exclusive choice. Obviously, you should build upon the library whose core concepts meet your demands. But you should examine both to understand and apply their patterns.</p>
<p>When using Backbone, you need to set up a scalable architecture yourself. <a href="https://speakerdeck.com/molily/application-frameworks-on-top-of-backbone-dot-js-talk-at-apps-dot-berlin-dot-js">Do not write applications in plain Backbone</a> and make the same mistakes others did, but put yourself on the shoulders of giants. Have a deeper look at Marionette, Thorax, <a href="https://github.com/aurajs/aura">Aura</a>, Chaplin and other architectures to learn from them.</p>
<p>To get started with Chaplin, I recommend to use one of the boilerplates:<br />
The <a href="https://github.com/chaplinjs/chaplin-boilerplate">CoffeeScript boilerplate</a> with Handlebars templates or the same in <a href="https://github.com/chaplinjs/chaplin-boilerplate-plain">plain JavaScript</a>. These incorporate several conventions we consider useful: Folder structure and file naming conventions, coding style, template engines. These are part of “the Chaplin experience”.</p>
<p>If you’re looking for a mature quick-start developing environment, you may give <a href="http://brunch.io">Brunch with Chaplin</a> or <a href="https://github.com/chaplinjs/chaplin-rails">Chaplin’s Ruby on Rails boilerplate</a> a try.</p>
<p>For a more hands-on introduction to Marionette, see this article on Smashing Magazine: <a href="http://coding.smashingmagazine.com/2013/02/11/introduction-backbone-marionette/">part one</a> and <a href="http://coding.smashingmagazine.com/2013/04/02/thorough-introduction-backbone-marionette-part-2-modules/">part two</a>. In the <a href="https://github.com/marionettejs/backbone.marionette/wiki">Marionette Wiki</a>, there’s a whole list of <a href="https://github.com/marionettejs/backbone.marionette/wiki/Books%2C-Articles%2C-Blog-Posts%2C-and-Presentations">articles, screencasts and presentations</a>.</p>
<h2>Credits</h2>
<p>Thanks to Derick Bailey, Sebastian Deutsch, Paul Miller and Paul Wittmann for their feedback on this article and their contributions to both Marionette and Chaplin.</p>
]]></content:encoded>
			<wfw:commentRss>http://9elements.com/io/index.php/comparison-of-marionette-and-chaplin/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Customizing Core Data Migrations</title>
		<link>http://9elements.com/io/index.php/customizing-core-data-migrations/</link>
		<comments>http://9elements.com/io/index.php/customizing-core-data-migrations/#comments</comments>
		<pubDate>Tue, 22 Jan 2013 14:04:18 +0000</pubDate>
		<dc:creator>Christopher Gretzki</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[core data]]></category>
		<category><![CDATA[custom migration policy]]></category>
		<category><![CDATA[lightweight]]></category>
		<category><![CDATA[migrations]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[versioned core data model]]></category>

		<guid isPermaLink="false">http://9elements.com/io/?p=1003</guid>
		<description><![CDATA[If you are using Core Data, need to change your database scheme but Core Data cannot infer the changes on its own. And you don&#8217;t want to dig into the Core Data Programming Guide, you have come to the right place. Custom migration is quite a powerful tool and you can perform all kinds of [...]]]></description>
				<content:encoded><![CDATA[<p>If you are using Core Data, need to change your database scheme but Core Data cannot infer the changes on its own. And you don&#8217;t want to dig into the <a href="http://developer.apple.com/library/mac/#documentation/cocoa/Conceptual/CoreData/cdProgrammingGuide.html" title="Core Data Programming Guide" target="_blank">Core Data Programming Guide</a>, you have come to the right place.</p>
<p><span id="more-1003"></span><br />
Custom migration is quite a powerful tool and you can perform all kinds of transformations, e.g., change relationships or merge entities. In this guide, only changes of the attribute&#8217;s type are discussed, but this might be a good starting point for other kinds of migrations, too.</p>
<p>(This guide refers to Xcode Version 4.5.2 (4G2008a) and iOS &gt;=5.)</p>
<p>&nbsp;</p>
<p><strong>TABLE OF CONTENTS</strong></p>
<ol>
<li>Versioned Core Data Model</li>
<li>Lightweight Migrations</li>
<li>Example Scenario</li>
<li>Custom Mapping Models</li>
<li>Custom Migration Policy</li>
<li>Conclusion</li>
</ol>
<p>&nbsp;</p>
<p><strong>1. VERSIONED CORE DATA MODEL</strong></p>
<p>You can skip this section if you are already familiar with versioned Core Data models.</p>
<p>If you simply change your model it will be incompatible with the Core Data store used to create it and Core Data wont be able to open it. Therefore you need to add a model version:</p>
<ol>
<li>Select your Core Data model file in Project Navigator</li>
<li>Choose <em>Add Model Version..</em> from Editor menu item</li>
<li>The <em>Based on model</em> field should indicate your previous model version</li>
</ol>
<p>If you do this for the first time, this turns the original document into a file package that groups both versions of the model, each represented by an individual <em>.xcdatamodel</em> file:<br />
One for the original Core Data model and one for your updated model.<br />
Choose the latter in Project Navigator and change your model as required. Now tell Core Data to use your new model:</p>
<ol>
<li>Select the container Core Data model in Project Navigator</li>
<li>In File Inspector (<em>View -&gt; Utilities -&gt; File Inspector</em>) choose the latest version in the <em>Versioned Core Data Model</em> dropdown. Check that the green checkmark switched from the old to the new version in the File Inspector.</li>
</ol>
<p><strong>2. LIGHTWEIGHT MIGRATIONS</strong></p>
<p>Core Data needs to know how to map the entities and properties from a source model to the destination model. For the following cases, Core Data can infer the changes automatically, which is referred to as <em>lightweight migration</em>:</p>
<ul>
<li>Addition of new attributes</li>
<li>Removal of attributes</li>
<li>Changing a non-optional attribute to an optional</li>
<li>Changing an optional attribute into a non-optional, and defining a default value</li>
<li>Renaming an entity or property (if the <em>renaming identifier</em> is set appropriately)</li>
<li>Please refer to <a title="Core Data Model Versioning and Data Migration Programming Guide" href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreDataVersioning/Articles/vmLightweightMigration.html" target="_blank">Core Data Model Versioning and Data Migration Programming Guide</a> for the complete list.</li>
</ul>
<p>In order to activate lightweight migrations, you have to pass the following options </p>
<pre>
NSDictionary *options = @{
    NSMigratePersistentStoresAutomaticallyOption : @YES,
    NSInferMappingModelAutomaticallyOption : @YES
};
</pre>
<p>when invoking:</p>
<pre>
addPersistentStoreWithType:configuration:URL:options:error:
</pre>
<p>If Core Data cannot infer the mapping model automatically, it will not be able to open the persistent store. Resetting the simulator or reinstalling your app will do the trick. But if your app was already released on the App Store you want to guarantee your customers a smooth update process. That is where custom mapping models come into play.</p>
<p>&nbsp;</p>
<p><strong>3. EXAMPLE SCENARIO</strong></p>
<p>Let us assume we have a view controller that shows comments. Therefore, we have got an entity named <em>Comment</em> consisting of three attributes: <em>author</em>,<em> text </em>and<em> createdAt</em>, all of type <em>String</em>.</p>
<p><img class="alignnone size-full wp-image-1062" alt="entityVersion1" src="http://9elements.com/io/wp-content/uploads/2013/01/entityVersion1.png" width="582" height="355" /></p>
<p>Furthermore, the server delivering the data sends the creation date in a custom format that requires further processing.<br />
We released our app to the App Store, just to realize afterwards that it would have been more efficient to store the transformed timestamp in our entity instead of doing the transformation whenever we access this attribute. Thus, let us add a new model version, update the type of the timestamp attribute from <em>String</em> to <em>Date</em> and set this model version to be the current version.</p>
<p><img class="alignnone  wp-image-1068" alt="entityVersion2+updatedVersion" src="http://9elements.com/io/wp-content/uploads/2013/01/entityVersion2+updatedVersion.png" width="545" height="236" /></p>
<p>Since Core Data will not be able to infer the mapping model on its own, let us create a custom mapping model.</p>
<p>&nbsp;</p>
<p><strong>4. CUSTOM MAPPING MODELS</strong></p>
<p>To create a custom Core Data mapping model:</p>
<ol>
<li>Open the new file dialog <em>File -&gt; New -&gt; File</em></li>
<li>Choose the <em>Mapping Model</em> template (<em>Core Data -&gt; Mapping Model</em>)</li>
<li>Choose the source and target version of your versioned Core Data model</li>
</ol>
<p><img class="alignnone size-full wp-image-1080" alt="defaultMappingModel" src="http://9elements.com/io/wp-content/uploads/2013/01/defaultMappingModel.png" width="470" height="236" /></p>
<blockquote><p>IMPORTANT NOTE:<br />
If your Core Data model evolved over several versions since your last App Store release, you have to choose the version used in your App Store release as the source in the mapping model! Otherwise the mapping model will not be applied when updating from that release.</p></blockquote>
<p>&nbsp;</p>
<p><strong>5. CUSTOM MIGRATION POLICY</strong></p>
<p>The custom mapping model contains an entity mapping called <em>CommentToComment</em>, which contains attribute mappings prepopulated to perform a simple copy and paste of all attribute values. Since we want to perform a custom transformation on the <em>createdAt</em> attribute, change its attribute mapping to:</p>
<pre>
FUNCTION($entityPolicy, "dateFromTimestamp:" , $source.createdAt)
</pre>
<p>This tells the migration manager to call <code>dateFromTimestamp:</code><br />
on the entity migration policy object and to pass the <em>createdAt</em> value of the source entity. Last, we need to ensure Core Data finds our custom transformation method:</p>
<ol>
<li>Create <em>CommentTransformationPolicy</em> class as a subclass of <em>NSEntityMigrationPolicy</em></li>
<li>Define and implement the transformation method <em>dateFromTimestamp:</em></li>
</ol>
<pre>
+ (NSDateFormatter *)dateFormatter{
   static NSDateFormatter *sharedDateFormatter = nil;
   if (!sharedDateFormatter){
      sharedDateFormatter = [[NSDateFormatter alloc] init];
      [sharedDateFormatter setDateFormat:@"yyyy-MM-dd'T'HHmmssZZ"];
   }
   return sharedDateFormatter;
}

- (NSDate *)dateFromTimestamp:(NSString* )timestamp{
   return [[[self class] dateFormatter] dateFromString:s];
}</pre>
<ol>
<li>Register this class as custom entity migration policy in the mapping model:
<ul>
<li>Select the mapping model file in the project navigator</li>
<li>Select the <em>CommentToComment</em> entry in <em>Entity Mappings</em></li>
<li>Fill out <em>CommentTransformationPolicy</em> in <em>Custom Policy</em> field of the mapping model inspector (<em>View -&gt; Utilites -&gt; Show Data Model Inspector</em>)</li>
</ul>
</li>
</ol>
<p><a href="http://9elements.com/io/wp-content/uploads/2013/01/customMappingModel.png"><img class="alignnone  wp-image-1077" alt="customMappingModel" src="http://9elements.com/io/wp-content/uploads/2013/01/customMappingModel.png" width="554" height="184" /></a></p>
<p>&nbsp;</p>
<p><strong>6. CONCLUSION</strong></p>
<p>We now have a working custom migration that smoothly updates the app&#8217;s database. This way, you save time writing your own methods to detect whether a migration is actually necessary. If you have got any questions or suggestions feel free to leave a comment or tweet me <a title="@c_gretzki" href="https://twitter.com/c_gretzki" target="_blank">@c_gretzki</a>.</p>
<p>Special thanks to <a title="@martinwinter" href="http://twitter.com/martinwinter" target="_blank">Martin Winter</a> for pointing me to the mystical <em>FUNCTION($entityPolicy, &#8220;dateFromTimestamp:&#8221; , $source.createdAt)</em> syntax ;)!</p>
]]></content:encoded>
			<wfw:commentRss>http://9elements.com/io/index.php/customizing-core-data-migrations/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Continuous Integration of iOS Projects using Jenkins, CocoaPods, and Kiwi</title>
		<link>http://9elements.com/io/index.php/continuous-integration-of-ios-projects-using-jenkins-cocoapods-and-kiwi/</link>
		<comments>http://9elements.com/io/index.php/continuous-integration-of-ios-projects-using-jenkins-cocoapods-and-kiwi/#comments</comments>
		<pubDate>Wed, 16 Jan 2013 15:25:43 +0000</pubDate>
		<dc:creator>Manuel Binna</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ci]]></category>
		<category><![CDATA[cocoapods]]></category>
		<category><![CDATA[continuousintegration]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[jenkins]]></category>
		<category><![CDATA[kiwi]]></category>
		<category><![CDATA[rbenv]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://9elements.com/io/?p=896</guid>
		<description><![CDATA[This article explains the set up of a Continuous Integration (CI) environment for Xcode projects that use Kiwi to implement unit tests. It shows how to configure Jenkins to set up the correct Ruby environment for CocoaPods, how to install all necessary gems and pods, and finally how to run the Kiwi specs from the [...]]]></description>
				<content:encoded><![CDATA[<p>This article explains the set up of a Continuous Integration (CI) environment for Xcode projects that use <a title="Kiwi" href="https://github.com/allending/Kiwi" target="_blank">Kiwi</a> to implement unit tests. It shows how to configure <a title="Jenkins" href="http://jenkins-ci.org" target="_blank">Jenkins</a> to set up the correct Ruby environment for <a title="CocoaPods" href="http://cocoapods.org" target="_blank">CocoaPods</a>, how to install all necessary gems and pods, and finally how to run the Kiwi specs from the command line within a Jenkins build job. The article assumes that the Xcode project is already configured to run Kiwi specs from within Xcode.</p>
<p><span id="more-896"></span></p>
<h1>Hardware</h1>
<p>Our CI environment runs on dedicated hardware. We took one of our unused Mac Minis, installed a fresh copy of OS X Mountain Lion (version 10.8.2 as of this writing) and created an OS X user named “jenkins”. This user is the only user on the system and the system is not used for other purposes than running a Jenkins server.</p>
<p>As an alternative, the CI environment could be installed in a virtual machine or even in the developer&#8217;s OS X account on her own computer. But this is not our setup and you are on your own if you want to configure this setup instead.</p>
<h1>Setting Up Jenkins</h1>
<p>At <a title="9elements.com" href="http://www.9elements.com" target="_blank">9elements</a>, we use the excellent OS X package manager <a title="Homebrew" href="http://mxcl.github.com/homebrew" target="_blank">Homebrew</a>. SSH into your CI computer and install Jenkis via Homebrew:</p>
<pre>$ brew install jenkins</pre>
<p>We want Jenkins to <em>always</em> run, even after an unexpected system restart. Create a new file <code>~/Library/LaunchAgents/org.jenkins-ci.plist</code> with the following content:</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
  &lt;dict&gt;
    &lt;key&gt;KeepAlive&lt;/key&gt;
    &lt;true/&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;org.jenkins-ci&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
      &lt;string&gt;/usr/bin/java&lt;/string&gt;
      &lt;string&gt;-server&lt;/string&gt;
      &lt;string&gt;-d64&lt;/string&gt;
      &lt;string&gt;-XX:+UseG1GC&lt;/string&gt;
      &lt;string&gt;-Xms512m&lt;/string&gt;
      &lt;string&gt;-Xmx512m&lt;/string&gt;
      &lt;string&gt;-XX:MaxGCPauseMillis=500&lt;/string&gt;
      &lt;string&gt;-jar&lt;/string&gt;
      &lt;string&gt;/usr/local/opt/jenkins/libexec/jenkins.war&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;
    &lt;true/&gt;
  &lt;/dict&gt;
&lt;/plist&gt;</pre>
<p>This causes Jenkins to always launch after the OS X user “jenkins” logged into the system. The parameters for <code>/usr/bin/java</code> are explained in the article <a title="java - the Java application launcher" href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html" target="_blank">java &#8211; the Java application launcher</a>. After restarting the system the user “jenkins” is not automatically logged in. Go to System Preferences → Users &amp; Groups → Login Options → Automatic login and select the user “jenkins” from the drop-down list.</p>
<p>Disclaimer: We are fully aware that this allows people with physical access to the CI computer to access it without entering a password. We configured OS X to show a screensaver after 1 minute of inactivity and require the user’s password to unlock the screensaver. However, an unauthorized person with physical access could restart the computer and use this time window to access the computer. Decide on your own if you actually want to do this.</p>
<p>It is not possible to run application tests when Jenkins is configured via <code>/Library/LaunchDaemons</code>. Jenkins needs to have access to the window manager to be able to launch and interact with the iOS Simulator through the tool <code>ios-sim</code> (more on that later). This is the error that occurs if Jenkins is configured as a system daemon [<a title="phonegap/ios-sim/issues/5" href="https://github.com/phonegap/ios-sim/issues/5" target="_blank">phonegap/ios-sim/issues/5</a>]:</p>
<pre>[DEBUG] Session could not be started: Error 
Domain=DTiPhoneSimulatorErrorDomain Code=2 
UserInfo=0x100270b90 "Simulator session timed out."</pre>
<p>We have not been able to successfully configure a &#8220;headless&#8221; Jenkins (via the parameter <code>-Djava.awt.headless=true</code>) that can run the Kiwi specs.</p>
<h1>Running Kiwi Specs from the Command Line</h1>
<p>Kiwi is a nice framework for implementing unit tests in iOS projects. It allows the developer to write unit tests in the popular <a title="RSpec" href="http://rspec.info" target="_blank">RSpec</a> flavor.</p>
<p>Xcode knows two different types of unit test targets: application test targets and logic test targets. Application tests run inside the iOS application (simulator or device) and allow the tests to access all parts of the running application. Logic tests run outside of the application and can only test specific classes. The Xcode user interface supports both test target types. However, application tests are not supported when run from the command line. Unfortunately, Kiwi specs need an application test target to work properly. This means that running Kiwi specs within a CI environment (that needs them to be run from the command line) is not officially supported by Xcode. Two answers on Stack Overflow [<a title="Xcode 4: Run tests from the command line (xcodebuild)?" href="http://stackoverflow.com/a/10823483/504494" target="_blank">SO1</a>, <a title="Xcode 4.5 command line unit testing" href="http://stackoverflow.com/a/12682617/504494" target="_blank">SO2</a>] provide help. It is possible to recreate the behavior when pressing CMD+U in the user interface of Xcode (where application tests are officially supported) on the command line.</p>
<ol>
<li>Copy the Gist <a title="mbinna/RunUnitTests.sh" href="https://gist.github.com/4492087" target="_blank">mbinna/RunUnitTests.sh</a> and paste it into the “Run Unit Tests” build phase of the application test target.</li>
<li>Create a new scheme named “CommandLineUnitTests” for the Kiwi test target.</li>
<li>Select the checkbox &#8220;Shared&#8221; and add this scheme to the VCS repository, so that it is available on the other computers that work with this repository.</li>
<li>Add the application test target to the section Build by pressing the + button<br />
<a href="http://9elements.com/io/wp-content/uploads/2013/01/Screen-Shot-2013-01-10-at-14.27.48.png"><img class="alignnone  wp-image-906" alt="Xcode Modify Scheme" src="http://9elements.com/io/wp-content/uploads/2013/01/Screen-Shot-2013-01-10-at-14.27.48.png" width="506" height="385" /></a></li>
</ol>
<p>The additional scheme is necessary to run tests from the command line. <code>xcodebuild</code> does not provide a &#8220;test&#8221; action that would provide the same behavior of pressing CMD+U in Xcode. The additional scheme builds the project and runs the unit tests (as can be seen in the column &#8220;Run&#8221; in the screenshot above).</p>
<p>The customized script to run unit tests (configured in step 1 above) uses the tool <code>ios-sim</code> to install and launch applications in the iOS Simulator from the command line. Install <code>ios-sim</code> via Homebrew:</p>
<pre>$ brew install ios-sim</pre>
<p>You can now run your Kiwi specs from the command line by invoking the follwing command:</p>
<pre>$ xcodebuild -sdk iphonesimulator \
             -workspace SampleProject.xcworkspace \
             -scheme CommandLineUnitTests \
             -configuration Debug \
             RUN_APPLICATION_TESTS_WITH_IOS_SIM=YES \ 
             ONLY_ACTIVE_ARCH=NO \
             clean build 2&gt;&amp;1</pre>
<p>This command performs a clean build of your project and runs the Kiwi specs in the iOS Simulator afterwards. The environment variable <code>RUN_APPLICATION_TESTS_WITH_IOS_SIM=YES</code> is necessary to run the unit tests with the custom approach specified by the script <a title="mbinna/RunUnitTests.sh" href="https://gist.github.com/4492087" target="_blank">RunUnitTests.sh</a>. <code>ONLY_ACTIVE_ARCH=NO</code> ensures that <code>xcodebuild</code> builds all supported architectures, not only the currently active architecture. Only compiling the active architecture is often used in the configuration Debug to reduce compile times during development.</p>
<h1>Configuring rbenv, Bundler, CocoaPods</h1>
<p>The management of dependencies to third-party projects became much easier with <a title="CocoaPods" href="http://cocoapods.org" target="_blank">CocoaPods</a>. CocoaPods is a package manager for iOS projects that installs third-party projects. The content of the <a title="Example Podfile" href="https://github.com/CocoaPods/CocoaPods/wiki/A-Podfile" target="_blank">Podfile</a> specifies which dependencies (and which version of each dependency) CocoaPods installs. We recently <a title="CocoaPods Best Practices" href="http://9elements.com/io/index.php/cocoapods-best-practices" target="_blank">published</a> an article about best practices for dealing with a CocoaPods-enabled Xcode project. CocoaPods is a Ruby <a title="RubyGems on Wikipedia" href="http://en.wikipedia.org/wiki/RubyGems" target="_blank">gem</a> and thus runs with the Ruby version that is installed in the system. Besides iOS, 9elements is also doing a lot of <a title="Ruby" href="http://www.ruby-lang.org" target="_blank">Ruby</a> and <a title="Ruby on Rails" href="http://rubyonrails.org" target="_blank">Ruby on Rails</a> development. Different Ruby projects may require different versions of Ruby. We want our CocoaPods to run in a controlled Ruby environment. To meet this requirement, we use <a title="rbenv" href="https://github.com/sstephenson/rbenv" target="_blank">rbenv</a> (together with <a title="ruby-build" href="https://github.com/sstephenson/ruby-build" target="_blank">ruby-build</a>) to install and switch between different versions and flavors of Ruby.</p>
<pre>$ rbenv local 1.9.3-p327</pre>
<p>This sets the official Ruby 1.9.3-p327 as the local Ruby installation for our project. Be sure to check the generated file <code>.ruby-version</code> into your repository.</p>
<p>We also use <a title="Bundler" href="http://gembundler.com/" target="_blank">Bundler</a> to install the gems for the currently selected Ruby version. This eliminates potential problems when two or more developers use different versions of Ruby (or even different types of Ruby interpreters). The steps to setup our Ruby environment for CocoaPods are as follows:</p>
<pre>$ bundle init</pre>
<p>This creates an initial Gemfile that you can customize. Add the following to your newly created Gemfile:</p>
<pre>source "https://rubygems.org"</pre>
<pre>gem "cocoapods", "0.16.0"</pre>
<p>Now you can install the gem with Bundler:</p>
<pre>$ bundle install</pre>
<p>Be sure to check the two files <code>Gemfile</code> and <code>Gemfile.lock</code> into your repository. Now we can install the gems:</p>
<pre>$ bundle exec pod install</pre>
<p>Now we are ready to configure our Jenkins server.</p>
<h1>Configuring a New Job in Jenkins</h1>
<p>Create a new job with the “Build a free-style software project” template. Fill out the required information to checkout the repository and configure the build trigger. Add a new build step of type “Execute shell”. Paste the following commands into this build step:</p>
<pre>#!/usr/bin/env bash
source ~/.bash_profile

bundle install
bundle exec pod repo update
bundle exec pod install

DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
xcodebuild -sdk iphonesimulator \
           -workspace SampleProject.xcworkspace \
           -scheme CommandLineUnitTests \
           -configuration Debug \
           RUN_APPLICATION_TESTS_WITH_IOS_SIM=YES \
           ONLY_ACTIVE_ARCH=NO \
           clean build 2&gt;&amp;1</pre>
<p>By default, Jenkins uses the shell <code>/bin/sh</code> in “Execute shell” build steps. However, we want to use our shell profile configured in <code>~/.bash_profile</code>, because it contains the <code>rbenv</code> initialization that is necessary to actually use <code>rbenv</code>. The script sets the shell to be bash and uses the profile configured in <code>~/.bash_profile</code>. It installs the required gems by executing <code>bundle install</code> followed by <code>bundle exec pod repo update</code> and <code>bundle exec pod install</code> to install the required pods. It sets the <code>DEVELOPER_DIR</code> to use the current stable version of Xcode. This is only needed if you installed serveral version of Xcode (stable, beta, GM, &#8230;) and want to ensure that the correct one is used in the build step.  The last step invokes <code>xcodebuild</code> by providing the workspace, the scheme, and the environment variables necessary to properly run the Kiwi specs from the command line.</p>
<h1>Displaying Kiwi Spec Output in Jenkins’ Web Interface</h1>
<p>Jenkins has built-in support for JUnit test reports. The gem <a title="OCUnit2JUnit" href="https://github.com/ciryon/OCUnit2JUnit">OCUnit2JUnit</a> parses the output of xcodebuild and generates JUnit-style output for Jenkins.</p>
<p><a href="http://9elements.com/io/wp-content/uploads/2013/01/Screen-Shot-2013-01-10-at-17.50.35.png"><img class="wp-image-944 alignnone" alt="Build Results Overview" src="http://9elements.com/io/wp-content/uploads/2013/01/Screen-Shot-2013-01-10-at-17.50.35.png" width="565" height="100" /></a></p>
<p><img class="size-full wp-image-943 alignnone" alt="Test Result Trend" src="http://9elements.com/io/wp-content/uploads/2013/01/Screen-Shot-2013-01-10-at-17.49.58.png" width="507" height="289" /></p>
<p>Add the gem OCUnit2JUnit to the Gemfile:</p>
<pre>gem "ocunit2junit", "1.2"</pre>
<p>and install it via</p>
<pre>$ bundle install</pre>
<p>Now edit the “Execute shell” build step in the build job to pipe the output of xcodebuild to ocunit2junit:</p>
<pre>xcodebuild -sdk iphonesimulator \
           -workspace SampleProject.xcworkspace \
           -scheme CommandLineUnitTests \
           -configuration Debug \
           RUN_APPLICATION_TESTS_WITH_IOS_SIM=YES \
           ONLY_ACTIVE_ARCH=NO \
           clean build 2&gt;&amp;1 | bundle exec ocunit2junit</pre>
<p>Add a new post-build action of type “Publish JUnit test result report”. Enter “test-reports/*.xml” (without quotes) into the field “Test report XMLs”. Start a new build and check if everything is working as expected.</p>
<h1>Conclusion</h1>
<p>We now have a working CI environment that checks out the repository, builds the projects, and runs the Kiwi specs. This process could be much easier if Apple provided official support for running application tests from the command line. Until this happens, we use the “inofficial” solution presented here.</p>
<p>Let us know in the comments if there is a better way to do certain things or if something is missing in this article. You can also find me on Twitter <a title="Manuel Binna on Twitter" href="https://twitter.com/mbinna">@mbinna</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://9elements.com/io/index.php/continuous-integration-of-ios-projects-using-jenkins-cocoapods-and-kiwi/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>CocoaPods Best Practices</title>
		<link>http://9elements.com/io/index.php/cocoapods-best-practices/</link>
		<comments>http://9elements.com/io/index.php/cocoapods-best-practices/#comments</comments>
		<pubDate>Wed, 09 Jan 2013 18:54:31 +0000</pubDate>
		<dc:creator>Sebastian Deutsch</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[cocoapods]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://9elements.com/io/?p=882</guid>
		<description><![CDATA[CocoaPods is a relatively new way to manage Xcode library dependencies like the Facebook iOS SDK et al. If you are coming from the Ruby world you know this kind of workflow from bundler. CocoaPods can be easily installed as a gem via &#8216;gem install cocoapods&#8217; but this is where the pain begins. What if one developer [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://9elements.com/io/index.php/cocoapods-best-practices/cocoapods-2/" rel="attachment wp-att-892"><img class="alignnone size-full wp-image-892" alt="cocoapods" src="http://9elements.com/io/wp-content/uploads/2013/01/cocoapods1.png" width="520" height="207" /></a></p>
<p><a href="http://cocoapods.org/">CocoaPods</a> is a relatively new way to manage Xcode library dependencies like the <a href="https://github.com/facebook/facebook-ios-sdk">Facebook iOS SDK</a> et al. If you are coming from the Ruby world you know this kind of workflow from <a href="http://gembundler.com/">bundler</a>. CocoaPods can be easily installed as a gem via &#8216;gem install cocoapods&#8217; but this is where the pain begins. What if one developer is using CocoaPods 0.14.0 and another developer is using CocoaPods 0.16.0? To ease that problem we are using CocoaPods together with bundler.<span id="more-882"></span></p>
<p><strong>Always use the same version of CocoaPods</strong></p>
<p>We have a Gemfile where we exactly specify the CocoPods version we want to use:</p>
<pre>source 'http://rubygems.org'
gem 'cocoapods', '0.16.0'</pre>
<p>So we never use a globally installed version of CocoaPods but a version that can be executed via bundler: bundle exec pod install</p>
<p><strong>Always specify the version of a pod</strong></p>
<p>When we started using CocoaPods we simple added our dependencies and let CocoaPods take care of the versions by locking them in the file Podfile.lock:</p>
<pre>pod 'Facebook-iOS-SDK'
pod 'SBJson'
pod 'TestFlightSDK'
pod 'GoogleAnalytics-iOS-SDK'
...</pre>
<p>But we soon found out that if you updated a specific version, things sometimes tend to break. In our case Google decided to break a header file in version 2.0beta3 of their Google Analytics SDK. Version 2.0beta4 fixes that problem, but if you just run &#8220;bundle exec pod update&#8221; it not just updates a specific dependency &#8211; it updates all the pods. One of those pods broke our build chain. If you archived our project in Xcode it started to generate a Generic Xcode Archive instead of an iOS App Archive. We did not suspect that CocoaPods is the problem in the first place and Googled that problem for hours. &#8220;Skip install&#8221; had the correct value and everything seemed to look fine. Then we started to work with an old Podfile again and everything was ok. So here comes the fix: we created a new Podfile and manually added all versions. After that, we just upgraded Google Analytics to the latest version.</p>
<pre>pod 'Facebook-iOS-SDK', '3.1.1'
pod 'SBJson', '3.1.1'
pod 'TestFlightSDK', '1.2.beta2'
pod 'GoogleAnalytics-iOS-SDK', '2.0beta4'
...</pre>
<p>And the problem was gone. So a best practice for us became to concretely add the version numbers for each pod so that we control the update mechanism.</p>
<p><strong>Specify the version of your Ruby</strong></p>
<p>That brings us to our last best practice. Since we are doing a lot of Ruby on Rails consulting we need to switch between different Ruby versions a lot and we use <a href="https://github.com/sstephenson/rbenv">rbenv</a> to control these environments. We wanted to apply the same control in our Xcode projects, so we specify the Ruby version in an .rbenv-version file:</p>
<p><code>1.9.3-p327</code></p>
<p><strong>Always check in the Pods directory</strong></p>
<p>Since there is no global repository for CocoaPods every maintainer of a library is responsible for keeping his versions online &#8211; which has actually gone wrong in the past. Some versions disappear or repositories are temporarily offline. So check in the Pods directory in your version control guarantees that you can reconstruct a specific version at any time. Also you don’t have to tell your designer friends how to install CocoaPods.</p>
<p>Through all that practices we can guarantee that a new developer is always getting the same environment for development without surprises. Hopefully CocoaPods will add the feature to update a specific pod in the near future. If you want to see the efforts of our latest app then download our social video player <a href="https://itunes.apple.com/app/watchlater/id423572879">Watchlater</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://9elements.com/io/index.php/cocoapods-best-practices/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Box of Javascript Chocolates (part 1)</title>
		<link>http://9elements.com/io/index.php/a-box-of-javascript-chocolates-part-1/</link>
		<comments>http://9elements.com/io/index.php/a-box-of-javascript-chocolates-part-1/#comments</comments>
		<pubDate>Mon, 07 Jan 2013 17:35:29 +0000</pubDate>
		<dc:creator>Rin Raeuber</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://9elements.com/io/?p=771</guid>
		<description><![CDATA[There are a lot of awesome jQuery plugins and Javascript libraries out there, and with every new one it gets more difficult to keep track. Some might save you hours of work, others just add that teaspoon of UI love, that little big detail, that separates a good UI from a UI that feels great [...]]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter wp-image-779" title="box-of-chocolate" alt="" src="http://9elements.com/io/wp-content/uploads/2012/12/box-of-chocolate-11297440000LZg1.jpg" width="550" /></p>
<p>There are a lot of awesome jQuery plugins and Javascript libraries out there, and with every new one it gets more difficult to keep track. Some might save you hours of work, others just add that teaspoon of UI love, that <a href="http://littlebigdetails.com/">little big detail</a>, that separates a good UI from a UI that feels great and makes using your app fun. Here are some of our picks – virtual chocolates, all sugar-free and low-calorie.</p>
<p>Feel free to add yours in the comments!</p>
<p><span id="more-771"></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4>Galleries</h4>
<p style="text-align: center;"><img class="wp-image-772 aligncenter" title="nivo image slider" alt="Nivo Image Slider" src="http://9elements.com/io/wp-content/uploads/2012/12/Screen-Shot-2012-12-21-at-10.53.16.png" width="424" height="246" /></p>
<ul>
<li><a href="http://nivo.dev7studios.com/">Nivo Slider</a> lets you create image sliders with transitions. <a href="http://nivo.dev7studios.com/de&lt;/ul&gt; &lt;p&gt;mos/">[Demo]</a></li>
<li><a href="http://dev.herr-schuessler.de/jquery/popeye/"> jQuery.popeye </a> is an alternative to lightboxes, especially if you don&#8217;t want to disrupt the user experience by having a modal window pop up. <a href="http://dev.herr-schuessler.de/jquery/popeye/demo.html">[Demo]</a></li>
<li><a href="http://www.catchmyfame.com/catchmyfame-jquery-plugins/jquery-infinite-carousel-plugin/"> Infinite Carousel </a> displays your images in a continuous loop. <a href="http://www.catchmyfame.com/jquery/infinitecarousel3/demo/d4.html">[Demo]</a></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4>UI Helpers</h4>
<p><img class="aligncenter wp-image-787" title="tooltip" alt="Tooltip with tipped" src="http://9elements.com/io/wp-content/uploads/2012/12/tooltip.jpg" width="561" height="249" /></p>
<ul>
<ul>
<li><a href="http://jamescryer.github.com/grumble.js/"> grumble.js </a> lets you create bubble style tooltips you can freely position and rotate.</li>
<li>If you&#8217;re not into bubbles, try <a href="http://projects.nickstakenburg.com/tipped">tipped</a>. It has everything, from the simple classic one-line tooltip to more advanced ones.</li>
</ul>
</ul>
<p style="text-align: center;"><img class="aligncenter wp-image-799" title="Custom Dropdown with ddSlick" alt="Screen Shot 2012-12-21 at 12.11.18" src="http://9elements.com/io/wp-content/uploads/2012/12/Screen-Shot-2012-12-21-at-12.11.18.png" width="293" height="294" /></p>
<ul>
<ul>
<li>If you need custom drop downs with images and descriptions, try <a href="http://designwithpc.com/Plugins/ddSlick">ddSlick</a>. <a href="http://designwithpc.com/Plugins/ddSlick#demo">[Demo]</a></li>
<li>Before you code that tag form field with autocomplete, check out <a href="http://textextjs.com/">TextExt</a> – it might save you a lot of work.</li>
<li>Have users explore all the awesome details of whatever with <a href="http://thecodeplayer.com/walkthrough/magnifying-glass-for-images-using-jquery-and-css3"> Magnifying Glass</a>. It&#8217;s just an eyecandy, but isn&#8217;t it always about the little details?</li>
</ul>
</ul>
<p><img class="aligncenter size-full wp-image-802" title="Magnifying Glass" alt="Screen Shot 2012-12-21 at 12.19.14" src="http://9elements.com/io/wp-content/uploads/2012/12/Screen-Shot-2012-12-21-at-12.19.14.png" width="376" height="432" /></p>
<ul>
<li><a href="http://labs.voronianski.com/jquery.avgrund.js/#"> Avgrund</a> displays nice modal boxes with depth of field.</li>
<li><a href="https://github.com/davist11/jQuery-Stickem"> jQuery Stick &#8216;em</a> can make elements stick to a fixed point as you scroll. Useful for explanations in the sidebar. <a href="http://davist11.github.com/jQuery-Stickem/">[Demo]</a></li>
<li><a href="http://needim.github.com/noty/"> noty </a> is a slick alternative for jQuery&#8217;s standard alert dialog. It provides a queue and several layouts.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4>Typography and Text</h4>
<ul>
<ul>
<li>If you&#8217;re looking for down-to-the-letter control and kerning of your type, <a href="http://kerningjs.com/"> kerning.js</a> and <a href="http://letteringjs.com/"> Lettering.js </a> might be for you.</li>
</ul>
</ul>
<p style="text-align: center;"><img class="aligncenter wp-image-812" title="slabtext" alt="slabtext" src="http://9elements.com/io/wp-content/uploads/2012/12/slabtext.png" width="300" height="397" /></p>
<ul>
<li>Love big responsive headlines? Try <a href="http://www.frequency-decoder.com/demo/slabText/"> slabText</a>.</li>
<li>With <a href="http://tcorral.github.com/Cutter.js/"> Cutter.js</a> you can truncate HTML code without losing the markup.</li>
<li>No excuses for ugly unformatted documentation: Create instant Markdown documents with <a href="http://strapdownjs.com/"> Strapdown.js</a>.</li>
<li>Speaking of Markdown, <a href="https://github.com/coreyti/showdown"> Showdown </a> is a Javascript port of Markdown.</li>
<li>Looking for a lightweight syntax highlighter? Look no further: <a href="http://prismjs.com/">Prism.js</a></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4>Data</h4>
<ul>
<ul>
<li><a href="http://listjs.com/">list.js</a> makes your HTML lists and tables searchable, sortable and filterable.</li>
<li>If you rather sort by drag and drop, <a href="http://farhadi.ir/projects/html5sortable/">HTML5 Sortable</a> is for you.</li>
<li>Remember that sleepless night some weeks ago when you thought it might be a fun project to code Excel for the web? Have a look at <a href="http://warpech.github.com/jquery-handsontable/">Handsontable</a>. It&#8217;s a data-grid editor.</li>
<li>For displaying large data sets there&#8217;s <a href="http://rjackson.github.com/pivot.js/">Pivot.js</a>.</li>
</ul>
</ul>
<p><img class="aligncenter size-full wp-image-818" title="Datatables" alt="Datatables" src="http://9elements.com/io/wp-content/uploads/2012/12/datatables.png" width="550" /></p>
<ul>
<li>For even larger project, try <a href="http://datatables.net/"> Datatables </a>.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4>Responsive Design</h4>
<ul>
<li>Wanna serve high resolution images for users with Retina displays? <a href="http://retinajs.com/">Retina.js</a> is here to help.</li>
<li><a href="https://github.com/adamdbradley/foresight.js">foresight.js</a> is an alternative to Retina.js that detects whether the user has a Retina display and a fast enough network connection for hi-res images.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4>Form Styling</h4>
<ul>
<li>Replace endless select boxes with a more user-friendly alternative with <a href="http://harvesthq.github.com/chosen/">Chosen</a>.</li>
<li>For even more select box awesomeness, have a look at <a href="http://ivaynberg.github.com/select2/">Select2</a>. It can use remote data sets, offers multiple select and tagging.</li>
<li><a href="http://remy.bach.me.uk/superlabels_demo/">Super Labels </a> is a nice and user-friendly way to label form fields.</li>
<li><a href="http://arthurgouveia.com/prettyCheckable/">prettyCheckable</a> brings better looking checkboxes and radio buttons.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4>Forms</h4>
<ul>
<ul>
<li><a href="http://elclanrs.github.com/jq-idealforms/">Ideal Forms</a> is a framework that helps you build and validate your forms.</li>
<li>As a lightweight alternative, there&#8217;s <a href="http://rickharrison.github.com/validate.js/">validate.js</a>.</li>
<li>Need to validate credit card numbers? <a href="http://paweldecowski.github.com/jQuery-CreditCardValidator/">jQuery Credit Card Validator</a></li>
<li>Tired of users misspelling their email address? Try <a href="https://github.com/Kicksend/mailcheck">mailcheck</a>.</li>
<li>If you want to offer users the possibility to search using complex queries, <a href="http://documentcloud.github.com/visualsearch/">VisualSearch.js</a> might be for you.</li>
<li>Give your users feedback about their password strength with <a href="https://github.com/danpalmer/jquery.complexify.js">Complexify</a>.</li>
</ul>
</ul>
<p><img class="aligncenter size-full wp-image-831" title="jQuery File Upload" alt="fileupload" src="http://9elements.com/io/wp-content/uploads/2012/12/fileupload.png" width="550" height="306" /></p>
<ul>
<li>Add pretty file uploads to your app with <a href="http://blueimp.github.com/jQuery-File-Upload/">jQuery File Upload</a>. It&#8217;s got progress bars, image preview and uploads are resumable.</li>
<li>If you just want the resumable uploads, go straight to <a href="https://github.com/23/resumable.js">resumable.js</a> – it does just that.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h4>Time Savers</h4>
<ul>
<li>Has this ever happened to you: You started filling out a lengthy form on some website, and halfway through the process your browser crashed and everything you entered was lost? Yeah, that sucks. Protect your users from mishaps like this with <a href="http://coding.smashingmagazine.com/2011/12/05/sisyphus-js-client-side-drafts-and-more/">Sisyphus.js</a>.</li>
<li>For money and currency formatting there&#8217;s a little helper called <a href="http://josscrowcroft.github.com/accounting.js/">accounting.js</a>.</li>
<li>If you not only want to display currencies, but also convert them, check out <a href="http://josscrowcroft.github.com/money.js/">money.js</a>.</li>
<li>Formatting, parsing and validating dates is another tedious task. Let <a href="http://momentjs.com/">moment.js</a> do it for you.</li>
<li><a href="http://pragmaticly.github.com/smart-time-ago/">Smart Time Ago</a> intelligently updates the relative timestamps in your document.</li>
<li><a href="https://github.com/ScottHamper/Cookies">cookies.js</a> is for managing … – guess what – cookies!</li>
<li>For zipping and unzipping files, there&#8217;s <a href="http://gildas-lormeau.github.com/zip.js/">zip.js</a>.</li>
<li>With <a href="http://stringjs.com/">string.js</a> come handy methods like <code>slugify</code>, <code>truncate()</code> and <code>isEmpty()</code>.</li>
<li>Let&#8217;s be honest: Google Maps is awesome, but its Javascript API can really be a pain. <a href="http://hpneo.github.com/gmaps/">gmaps.js</a> soothes this pain.</li>
<li>If you need a preloader for your HTML5 game, try <a href="http://thinkpixellab.com/pxloader/">PxLoader</a>.</li>
<li>Working with URIs a lot? <a href="http://medialize.github.com/URI.js/">URI.js</a> can help you. It offers methods for working with query strings, detecting URIs within text and much more.</li>
<li>For dealing with touch events in the browser, there&#8217;s <a href="https://github.com/jairajs89/Touchy.js">Touchy.js</a>.</li>
</ul>
<p>This is a collection of things we&#8217;re using in our day to day projects. We find these things on <a href="http://coding.smashingmagazine.com/2012/09/23/useful-javascript-libraries-jquery-plugins-web-developers/">Smashing Magazine</a> who originally created a post with useful plugins, additional links came from <a href="http://dailyjs.com/">Daily.js</a> and <a href="http://badassjs.com/">Badass.js</a>.</p>
<p>Many thanks to all the hard working developers who created all these plugins &#8211; you make a better web happen!</p>
]]></content:encoded>
			<wfw:commentRss>http://9elements.com/io/index.php/a-box-of-javascript-chocolates-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Help us to create the best tool for publishing anything online.</title>
		<link>http://9elements.com/io/index.php/help-us-to-create-the-best-tool-for-publishing-anything-online/</link>
		<comments>http://9elements.com/io/index.php/help-us-to-create-the-best-tool-for-publishing-anything-online/#comments</comments>
		<pubDate>Sun, 30 Dec 2012 14:52:11 +0000</pubDate>
		<dc:creator>Eray Basar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9elements.com/io/?p=840</guid>
		<description><![CDATA[Building websites today is usually a totally bloated and inefficient process: First, there is a designer who creates layouts and designs in photoshop. After that, the designs are iterated together with clients or teams. Making changes to the overall design in Photoshop, e.g. changing fonts, colors and margins is a ridiculously time-consuming task &#8211; compared [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://salon.io/join?utm_source=9elements_io&amp;utm_medium=blogpost&amp;utm_campaign=9elements_io" target="_blank"><img class="aligncenter size-full wp-image-839" title="Screen Shot 2012-12-21 at 8.31.54 PM" src="http://9elements.com/io/wp-content/uploads/2012/12/Screen-Shot-2012-12-21-at-8.31.54-PM1.png" alt="salon.io" width="550" height="377" /></a></p>
<p>Building websites today is usually a totally bloated and inefficient process: First, there is a designer who creates layouts and designs in photoshop. After that, the designs are iterated together with clients or teams. Making changes to the overall design in Photoshop, e.g. changing fonts, colors and margins is a ridiculously time-consuming task &#8211; compared to making the same changes in css.  After the designs are finalised (or even worse &#8211; not finalised) some poor coder is asked to build HTML &amp; CSS markup. A tedious job, if you&#8217;ve done that, you probably know what I mean. And then, there comes the CMS, but I will just skip that topic for now.</p>
<p>If I remember correctly, we had the same process already 10 years ago. Some earlier versions of Photoshop for the designer, and a different text editor maybe. But there has always been this huge friction within this process, mostly due to the several tools and stakeholders involved in it. (And because Photoshop is NOT a web publishing tool).</p>
<p>Worst of all, it makes it very hard for non-coders to easily create something beautiful in the web.</p>
<p>When Sebastian and Stefan were guest lectures at the <a href="http://www.hfg-offenbach.de/" target="_blank">Hochschule für Gestaltung in Offenbach</a>, they realized that there was no tool for design students to build their portfolios in a &#8220;what you see is what you get&#8221; fashion. There were some CMS solutions, like squarespace, but these work with templates. It was simply not possible to instantly create and design for the web. That&#8217;s what they wanted to change with <a href="http://salon.io/join?utm_source=9elements_io&amp;utm_medium=blogpost&amp;utm_campaign=9elements_io" target="_blank">Salon.io</a>, and we were happy to help here.</p>
<p>Technically, there were all the ingredients to develop such a product:  Thanks to HTML5, we were able to create a drag&#8217;n'drop interface. We made it a single page app, using backbone.js, which was essential to make salon feel as smooth as a desktop app. In fact, salon is one of the very first backbone applications we&#8217;ve created and backbone itself was still in it infancy (v0.3).</p>
<p>After over a year of development, already thousands of designers, photographers and illustrators have created their portfolios with salon. It&#8217;s definitely worth to check out some of the <a href="http://salon.io/hq/examples">great examples</a> what they have built. The <a href="http://salon.io/hq/what-our-users-say">user-feedback</a> is overwhelming.</p>
<p><span style="color: #ffffff; font-family: MuseoSans; font-size: 24px; font-style: italic; line-height: 33.58333206176758px; text-align: center; -webkit-text-size-adjust: none; -webkit-text-stroke-color: rgba(0, 0, 0, 0); -webkit-text-stroke-width: 1px; background-color: #ff7d5f;">Salon.io is malleable and allows designers to move closer to a flow </span><span style="color: #ffffff; font-family: MuseoSans; font-size: 24px; font-style: italic; line-height: 33.58333206176758px; text-align: center; -webkit-text-size-adjust: none; -webkit-text-stroke-color: rgba(0, 0, 0, 0); -webkit-text-stroke-width: 1px; background-color: #ff7d5f;">of creativity. The ability to stream consciousness and employ improvisation in web design is now becoming a very possible thing </span><span style="color: #ffffff; font-family: MuseoSans; font-size: 24px; font-style: italic; line-height: 33.58333206176758px; text-align: center; -webkit-text-size-adjust: none; -webkit-text-stroke-color: rgba(0, 0, 0, 0); -webkit-text-stroke-width: 1px; background-color: #ff7d5f;">with Salon.io </span><br style="color: #ffffff; font-family: MuseoSans; font-size: 24px; font-style: italic; line-height: 33.58333206176758px; text-align: center; -webkit-text-size-adjust: none; -webkit-text-stroke-color: rgba(0, 0, 0, 0); -webkit-text-stroke-width: 1px; background-color: #ff7d5f;" /><em>Naveen</em></p>
<p>The Salon team has chosen not to take any VC money, this is why we kicked off a crowdsourcing campaign for salon over a month ago. Now, everyone can get premium memberships for half of the price and support further iterations on the product. After all, there are still so many awesome things in the pipeline.<br />
If you haven&#8217;t tried out Salon, you should definitely do that. Chances are that you will enjoy this whole new way of publishing anything online.</p>
<p>And please spread the word to support <a href="http://salon.io/join?utm_source=9elements_io&amp;utm_medium=blogpost&amp;utm_campaign=9elements_io" target="_blank">Salon.io</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://9elements.com/io/index.php/help-us-to-create-the-best-tool-for-publishing-anything-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts about App.net</title>
		<link>http://9elements.com/io/index.php/thoughts-about-app-net/</link>
		<comments>http://9elements.com/io/index.php/thoughts-about-app-net/#comments</comments>
		<pubDate>Tue, 14 Aug 2012 03:34:25 +0000</pubDate>
		<dc:creator>Sebastian Deutsch</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9elements.com/io/?p=757</guid>
		<description><![CDATA[Dalton Caldwell and his team had a crazy idea to create a new social network called App.net. They also had a crazy business plan &#8211; people should actually PAY for being part of that social network: 50$ for a yearly membership. Blasphemy! But it worked. Through a kickstarter like campaign they successfully raised over 750.000$. [...]]]></description>
				<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">Dalton Caldwell and his team had a crazy idea to create a new social network</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">called App.net. They also had a crazy business plan &#8211; people should actually PAY for</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">being part of that social network: 50$ for a yearly membership.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">Blasphemy! But it worked. Through a kickstarter like campaign they successfully</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">raised over 750.000$.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">Now unlike to other startups real money is involved &#8211; and that changes everything.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">App.net can give a shit on advertisers and or even more crude monetization strategies.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">They won&#8217;t have to sell your data to 3rd parties. They won&#8217;t have to screw their developer ecosystem.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">They just have to make their customers happy.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">And it works! All basic functions look pretty solid and it&#8217;s superfun to</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">read the global timeline (remember the early days of Twitter when that</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">was possible too). The (API)[https://github.com/appdotnet/api-spec] is ready and all over the mighty internetz people are talking about what to (do)[https://social-igniter.com/blog/2012/08/why-we-support-app-dot-net] (next)[http://daltoncaldwell.com/a-response-to-brennan-novak]. Third party apps</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">are popping up for the web or mobile platforms, there is a brief list (on their github page)[https://github.com/appdotnet/api-spec/wiki/Directory-of-third-party-devs-and-apps].</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">It&#8217;s really impressive to see what people are building just within a few days.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">But with all the praise I have to admit that the things you can do on App.net are really basic and they have to</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">proof their &#8220;raison d&#8217;être&#8221;. That are the features that I&#8217;m expecting in the near future:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">App.net should be a interface that reflects my digital me. I want to put information</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">inside, I want to pull information out. Let&#8217;s get rid of (the data silos)[http://timkadlec.com/2011/01/no-more-data-silos/].</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">For example when I&#8217;m changing my email I have to login to a plethora of webservices and change my email</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">for each one of them. Why can&#8217;t I change my email at a centralized point and all the services</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">will know how to notify me? I want an easy to use single sign on mechanism with fine</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">granular control over which data will be shared or modified.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">I want to add arbitrary data to my digital profile. Some of the data should be semantically</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">structured, but I want to be able to add arbitrary data (even if it just makes sense for me).</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">I want to add semantic information to a post, like Twitter does with Twitter Cards. And for arbitrary data</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">let me or other deveopers define aggregations like Facebook does with the OpenGraph.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">Let me access the data in any format I want (json, rss, etc) and don&#8217;t forget that there has to be something like a realtime notification system in case my data changes.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">Please let me also connect to people that are not App.net (for some people 50$ is a lot of money).</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">They may be on Twitter, Facebook or Google Plus. It&#8217;s sufficient if I can mantain my friend graph and if</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">I know how to contact them. That might also solve your problem with reach.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">I understand that some of this wishes are difficult technical challenges &#8211; especially at scale. But</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">I believe that the open web has to go there and explore what&#8217;s doable since the status quo is a mess.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">PS: And please create a repost mechanism fast &#8211; I need it fast ;-)</div>
<p><img class="alignnone size-full wp-image-761" title="explosion" src="http://9elements.com/io/wp-content/uploads/2012/08/explosion.jpg" alt="explosion" width="548" height="229" /></p>
<p>Dalton Caldwell and his team had a crazy idea to create a new social network called <a href="http://app.net" target="_blank">App.net</a>. They also had a crazy business plan &#8211; people should actually <strong>PAY</strong> for being part of that social network: $50 for a yearly membership. Blasphemy! But it worked. Through a kickstarter like campaign they successfully raised over $750.000.<br />
<span id="more-757"></span><br />
Now unlike to other startups real money is involved &#8211; and that changes everything. App.net can give a shit on advertisers and or even more crude monetization strategies. They won&#8217;t have to <a href="http://www.nytimes.com/2012/02/05/opinion/sunday/facebook-is-using-you.html?pagewanted=all" target="_blank">sell your data</a> to 3rd parties. They won&#8217;t have to screw their <a href="http://mashable.com/2011/03/12/twitter-api-clients/" target="_blank">developer ecosystem</a>. They just have to make their customers happy.</p>
<p>And it works! All basic functions looks pretty solid and it&#8217;s superfun to read the global timeline (remember the early days of Twitter when that was possible too). The <a href="https://github.com/appdotnet/api-spec" target="_blank">API</a> is ready and all over the mighty internetz people are talking about what to <a href="https://social-igniter.com/blog/2012/08/why-we-support-app-dot-net" target="_blank">do</a> <a href="http://daltoncaldwell.com/a-response-to-brennan-novak">next</a>. Third party apps are popping up for the web or mobile platforms, there is a brief list on their <a href="https://github.com/appdotnet/api-spec/wiki/Directory-of-third-party-devs-and-apps" target="_blank">GitHub page</a>.</p>
<p>It&#8217;s really impressive to see what people are building just within a few days.</p>
<p>But with all the praise I have to admit that the things you can do on App.net are really basic and they have to proof their &#8220;raison d&#8217;être&#8221;. That are the features that I&#8217;m expecting in the near future:</p>
<p>App.net should be a interface that reflects my digital me. I want to put information inside, I want to pull information out. Let&#8217;s get rid of <a href="http://timkadlec.com/2011/01/no-more-data-silos/" target="_blank">the data silos</a>. For example when I&#8217;m changing my email I have to login to a plethora of web services and change my email for each one of them. Why can&#8217;t I change my email at a centralized point and all the services will know how to notify me? I want an easy to use single sign on mechanism with fine granular control over which data will be shared or modified.</p>
<p>I want to add arbitrary data to my digital profile. Some of the data should be semantically structured, but I want to be able to add arbitrary data (even if it just makes sense for me). I want to add semantic information to a post, like Twitter does with <a href="https://dev.twitter.com/docs/cards" target="_blank">Twitter Cards</a>. And for arbitrary data let me or other developers define aggregations like Facebook does with the <a href="http://developers.facebook.com/docs/opengraph/">Open Graph</a>. Let me access the data in any format I want (json, rss, etc) and don&#8217;t forget that there has to be something like a realtime notification system in case my data changes.</p>
<p>Please let me also connect to people that are not App.net (for some people $50 is a lot of money). They may be on Twitter, Facebook or Google Plus. It&#8217;s sufficient that I can maintain my friend graph and that I know how to contact them. It might also solve your problem with reach.</p>
<p>I understand that some of these wishes are difficult technical challenges &#8211; especially at scale. But I believe that the open web has to go there and explore what&#8217;s doable since the status quo is a mess.</p>
<p>PS: And please create a repost mechanism fast &#8211; I need it ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://9elements.com/io/index.php/thoughts-about-app-net/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Forgif.me for I have sinned</title>
		<link>http://9elements.com/io/index.php/forgif-me-for-i-have-sinned/</link>
		<comments>http://9elements.com/io/index.php/forgif-me-for-i-have-sinned/#comments</comments>
		<pubDate>Sun, 22 Jul 2012 18:29:23 +0000</pubDate>
		<dc:creator>Eray Basar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9elements.com/io/?p=747</guid>
		<description><![CDATA[One week from a crazy idea to building it. One week of pure fun. A great collaboration between @rattazong, @toshiyori and @padschneider. We present you a site for animated gifs, but with a whole different interface. It&#8217;s sole purpose is to bring the maximum viewing and discovery pleasure for animated gifs. No small hover animations, no [...]]]></description>
				<content:encoded><![CDATA[<p><img src="http://9elements.com/io/wp-content/uploads/2012/07/tumblr_m13fyw5okV1qgeowfo1_250.gif" alt="tumblr_m13fyw5okV1qgeowfo1_250" title="tumblr_m13fyw5okV1qgeowfo1_250" width="550" height="340" class="aligncenter size-full wp-image-748" /><br />
One week from a crazy idea to building it. One week of pure fun. A great collaboration between <a href="http://twitter.com/rattazong">@rattazong,</a> <a href="http://twitter.com/toshiyori">@toshiyori</a> and <a href="http://twitter.com/padschneider">@padschneider</a>.<br />
We present you a site for animated gifs, but with a whole different interface. It&#8217;s sole purpose is to bring the maximum viewing and discovery pleasure for animated gifs.<br />
No small hover animations, no huge loading times, no crashing browser tab, no CPU drain.<br />
It can all be that simple.</p>
<p>Now have fun:<br />
<a href="http://forgif.me">http://forgif.me</a></p>
]]></content:encoded>
			<wfw:commentRss>http://9elements.com/io/index.php/forgif-me-for-i-have-sinned/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rebuilding the Google Plus iPad timeline with CSS3</title>
		<link>http://9elements.com/io/index.php/rebuilding-the-google-plus-ipad-timeline-with-css3/</link>
		<comments>http://9elements.com/io/index.php/rebuilding-the-google-plus-ipad-timeline-with-css3/#comments</comments>
		<pubDate>Fri, 20 Jul 2012 14:57:49 +0000</pubDate>
		<dc:creator>Eray Basar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9elements.com/io/?p=736</guid>
		<description><![CDATA[We really loved the google plus timeline of their recently released iPad app, so we decided to rebuild it with CSS3 and to mash it up with our popular img.ly photo stream. Check it out here. It was almost a surprise how smooth the transitions work with CSS3 &#8211; even compared to the native counterpart. [...]]]></description>
				<content:encoded><![CDATA[<p><img src="http://9elements.com/io/wp-content/uploads/2012/07/Screen-Shot-2012-07-20-at-4.46.46-PM.png" alt="Screen Shot 2012-07-20 at 4.46.46 PM" title="Screen Shot 2012-07-20 at 4.46.46 PM" width="550" height="292" class="aligncenter size-full wp-image-740" /><br />
We really loved the google plus timeline of their recently released iPad app, so we decided to rebuild it with CSS3 and to mash it up with our popular <a href="http://img.ly">img.ly</a> photo stream. Check it out <a href="http://timeline.9elements.com">here</a>.<br />
It was almost a surprise how smooth the transitions work with CSS3 &#8211; even compared to the native counterpart.<br />
So expect to see part of this experiment integrated into the img.ly redesign, which will be coming up soon. If you&#8217;re curious about the relaunch, make sure to follow <a href="http://twitter.com/imgly">@imgly</a> or <a href="http://twitter.com/9elements">@9elements</a>.</p>
<p>That said, we open sourced the code, so grab it on <a href="https://github.com/9elements/fancy-timeline-transition">github</a> if you like to play around. </p>
]]></content:encoded>
			<wfw:commentRss>http://9elements.com/io/index.php/rebuilding-the-google-plus-ipad-timeline-with-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.088 seconds -->
<!-- Cached page served by WP-Cache -->
