<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>iJoshSmith</title>
	<atom:link href="http://ijoshsmith.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ijoshsmith.com</link>
	<description>The journal of a .NET developer who learned to write Apple software</description>
	<lastBuildDate>Tue, 21 May 2013 19:34:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ijoshsmith.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>iJoshSmith</title>
		<link>http://ijoshsmith.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ijoshsmith.com/osd.xml" title="iJoshSmith" />
	<atom:link rel='hub' href='http://ijoshsmith.com/?pushpress=hub'/>
		<item>
		<title>Objective-C workflow for iOS apps</title>
		<link>http://ijoshsmith.com/2013/03/24/objective-c-workflow-for-ios-apps/</link>
		<comments>http://ijoshsmith.com/2013/03/24/objective-c-workflow-for-ios-apps/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 05:06:33 +0000</pubDate>
		<dc:creator>Josh Smith</dc:creator>
				<category><![CDATA[iOS 6]]></category>
		<category><![CDATA[Objective-C]]></category>

		<guid isPermaLink="false">http://ijoshsmith.com/?p=489</guid>
		<description><![CDATA[This article reviews a simple, lightweight Objective-C workflow component for iOS applications. The source code and demo app can be downloaded from GitHub and freely used under the permissive MIT license. Repository: https://github.com/ijoshsmith/iOS-Workflow Workflow as a conceptual tool Workflow diagrams are often &#8230; <a href="http://ijoshsmith.com/2013/03/24/objective-c-workflow-for-ios-apps/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=489&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:center;"><img class="size-full wp-image aligncenter" id="i-1324" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/workflow-concept.png?w=490" width="490" height="544" /></p>
<p>This article reviews a simple, lightweight Objective-C workflow component for iOS applications. The source code and demo app can be downloaded from GitHub and freely used under the permissive MIT license.</p>
<p>Repository: <a href="https://github.com/ijoshsmith/iOS-Workflow">https://github.com/ijoshsmith/iOS-Workflow</a></p>
<h1>Workflow as a conceptual tool</h1>
<p>Workflow diagrams are often used to investigate and document complex problems. They consist of boxes connected by arrows. A box can represent various things, depending on its shape, but for our purposes here it represents a decision or a work item.</p>
<p>Decision boxes have two or more arrows pointing away from them, each arrow representing a distinct result for whatever decision was made. A work item box, on the other hand, has no more than one arrow pointing away from it. That arrow shows what happens after the task is completed. If the box does not have an arrow pointing at another box, it is a final node in the workflow. A workflow can have more than one final node, if necessary.</p>
<p>Daunting problems can be decomposed, rationalized, discussed, and solved using this modest set of tools. However, solving a problem in the abstract is not the same as implementing that solution in code. Converting the solution depicted by a workflow diagram into robust code that can deal with the realities of software, such as asynchronous Web service calls that might fail, is no small job.</p>
<h1>Workflow as a design pattern</h1>
<p>I have learned a simple truth through experience. If the solution to a problem is complicated enough that you need a workflow diagram to understand it, you should structure that solution in code as a workflow, if possible. The conceptual tools used to create and understand the solution to a difficult problem can, and should, be leveraged when implementing and troubleshooting that solution in source code.</p>
<p>The biggest benefit of structuring your solution as a workflow is that the plumbing needed to coordinate disparate, asynchronous decisions and work items does not interfere with the code that solves a complex problem. Domain logic is complicated enough by itself! Another major advantage of having direct correspondence between a workflow diagram and class files is that the diagram turns into a map of your code base, which can be very helpful (especially if you add the diagram file to your Xcode project).</p>
<p>After using this approach in two large iOS projects, both of which worked out very well, I decided to create a component that can be reused in any iOS app to model code as a workflow consisting of decisions and work items.</p>
<h1>Introducing JASWorkflow</h1>
<p>I set out to create a lightweight, yet useful, workflow implementation. Nothing too fancy, just the bare essentials for what I believe is needed by most apps that benefit from using a workflow to solve a complicated problem. Here is a list of features in <strong>JASWorkflow</strong>:</p>
<ul>
<li>A workflow node can represent a <strong>binary</strong> <strong>decision</strong> (yes/no) or a <strong>work item</strong>.</li>
<li>When executed, a node can immediately return its final result, or indicate that its result is “pending” and report the real result later. This is useful for <strong>async processing</strong>, such as calling a Web service.</li>
<li>You can provide the workflow with a <strong>completion block</strong> that will be invoked when it finishes executing its nodes.</li>
<li>You can explain to a workflow how to translate the result of a final node into a <strong>semantically relevant outcome</strong> value, which is passed to your completion block.</li>
<li>Your completion block and every executed node <strong>runs on the same thread</strong> from which your code started executing the workflow.</li>
<li>A workflow object is <strong>self-preserving</strong>. It prevents itself from being deallocated while executing, so that your code does not need to hold a strong reference to the workflow object until it completes.</li>
<li>An executing workflow supports <strong>cancellation</strong>.</li>
<li>A completed workflow supports <strong>reuse</strong> (e.g. reset and executed again).</li>
<li>Nodes can share data with each other via the workflow’s <strong>userInfo</strong> property.</li>
</ul>
<p>The rest of this article shows how to put <strong>JASWorkflow</strong> to use.</p>
<h1>Workflow example</h1>
<p>For the sake of clarity I present a simplistic workflow example. In reality, the trivial problem solved here would most likely not beckon to be implemented as a workflow, but that is irrelevant for our purposes. It merely provides context for a discussion about implementing a workflow. Without further ado, I give you the Health Workflow:</p>
<p><img class="size-full wp-image" id="i-1330" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/01-health-workflow.png?w=490" width="490" height="489" /></p>
<p>The workflow diagram above, created with the Grafio app on my iPad, shows the steps needed to determine if a person is healthy. First the test subject is asked if he is willing to exercise. If the answer is No, he is asked if he is injured. An uninjured person who is unwilling to exercise is deemed unhealthy. An injured person’s health status cannot be determined because an injury is a valid reason for not exercising. If the test subject says he is willing to exercise, and then proves it by lifting weights and doing sit-ups, he is considered healthy. I’m not a doctor, but I play one on the Internet!</p>
<p>The demo iPhone app, which is part of the source code download available on GitHub, has a button and label for each possible outcome.</p>
<p><img class="size-full wp-image" id="i-1332" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/02-test-harness.png?w=424" width="424" height="602" /></p>
<p>The goal is to execute a Health Workflow when the user taps a button. The workflow must simulate predefined decisions made by the test subject, and then display the workflow’s outcome value next to the button. This allows us to verify that our code is functioning properly for every route through the workflow.</p>
<h1>Programmatic workflow representation</h1>
<p>Our goal it so convert the workflow diagram seen at the top of the previous section into Objective-C classes, enums, and so forth. Let’s begin that process by creating a diagram equivalent to the one above, but this time each box is labelled with a programmatic identifier.</p>
<p><img class="alignnone size-full wp-image-498" alt="" src="http://ijoshsmith.files.wordpress.com/2013/03/health-workflow-types.png?w=640"   /></p>
<p>Three rounded boxes at the bottom represent the possible outcomes of a completed workflow, labelled with enum value names. All other boxes are labelled with node class names. Next let’s turn our attention to the outcome values.</p>
<h1>Defining outcomes</h1>
<p>All three outcomes for the Health Workflow are listed in the <strong>DEMOOutcome</strong> enum. I also included a helper function that is used when displaying an outcome to the user.</p>
<p><img class="size-full wp-image" id="i-1336" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/04-workflow-outcomes.png?w=506" width="506" height="256" /></p>
<p>A workflow’s outcome values do not need to be expressed as an enum. Strings, or any other kind of object, would be fine. Later on I show how these values are associated with nodes, so that a workflow can translate a final node’s result to some meaningful outcome value.</p>
<h1>Implementing nodes</h1>
<p>The real brains of a workflow is in its nodes. Each discrete decision and item of work should be encapsulated in a subclass of <strong>JASDecision</strong> or <strong>JASWorkItem</strong>. Both of those classes are direct subclasses of <strong>JASWorkflowNode</strong>, as shown in the abridged class declarations below:</p>
<p><img class="size-full wp-image" id="i-1338" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/05-node-interfaces.png?w=500" width="500" height="428" /></p>
<p>Note that <strong>JASWorkflowNode</strong> does not have any awareness of other nodes. Its two subclasses introduce properties that enable nodes to be linked together. The names of those properties are closely tied to values in the <strong>JASWorkflowNodeResult</strong> enum seen previously. For example, <strong>JASDecision</strong>’s <strong>yes</strong> property references the next node to execute if the decision node’s result is <strong>JASWorkflowNodeYes</strong>.</p>
<p>Below is the node that represents the decision of whether or not the test subject is willing to exercise. The <strong>mockResult</strong> property is needed for testing purposes, since this node does not actually know how to do anything aside from return a mocked result value.</p>
<p><img class="size-full wp-image" id="i-1339" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/06-willexercise-interface.png?w=406" width="406" height="174" /></p>
<p>The implementation of this decision node is seen below.</p>
<p><img class="size-full wp-image" id="i-1341" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/07-willexercise-impl.png?w=451" width="451" height="129" /></p>
<p>Keep in mind, in a real app each node would add value to a workflow, not simply return an externally determined result. I won’t bother showing the <strong>DEMODecisionIsInjured</strong> class, since it is very similar to the code seen above. Instead, let’s now see how a work item node is declared:</p>
<p><img class="size-full wp-image" id="i-1342" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/08-dositups-interface.png?w=466" width="466" height="178" /></p>
<p>This node does not immediately produce its final value. The node returns ‘<strong>Pending</strong>’ from the <strong>execute</strong> method, and two seconds later reports back to the workflow a result of ‘<strong>Complete</strong>’. During those two seconds the workflow sleeps, allowing the thread on which it runs to do other work. This delayed completion emulates a node that must wait for a Web service to respond, or any other asynchronous event needed by iOS apps.</p>
<p><img class="size-full wp-image" id="i-1344" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/09-dositups-impl.png?w=509" width="509" height="490" /></p>
<p>The <strong>DEMOWorkItemLiftWeights</strong> class is very similar to this, so I won’t bore you with it.</p>
<h1>Executing a workflow</h1>
<p>Now that we have defined outcomes and nodes it is time to compose them into a workflow. Before diving into the code that creates and executes a workflow, first let’s review an abridged declaration of the <strong>JASWorkflow</strong> class. The complete class declaration is full of informative, yet verbose, API documentation.</p>
<p><img class="size-full wp-image" id="i-1346" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/10-workflow-interface.png?w=526" width="526" height="427" /></p>
<p>In a previous section I showed the user interface for the demo app, which displays a button and label for each of the three possible Health Workflow outcomes. Here is the action method for a button that tests which outcome is produced if the test subject will not exercise because he is injured (which, I remind you, should be ‘<strong>Inconclusive</strong>’):</p>
<p><img class="size-full wp-image" id="i-1347" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/11-demo-action.png?w=437" width="437" height="98" /></p>
<p>That method calls a helper method responsible for creating a workflow with predefined decision values, executing the workflow, and updating a label with the result.</p>
<p><img class="size-full wp-image" id="i-1349" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/12-demo-run.png?w=581" width="581" height="617" /></p>
<p>The first thing the above method does is call into yet another helper method to create a <strong>JASWorkflow</strong> and return, via an out parameter, the first node to execute. We will visit that method shortly, but for now turn your focus to the use of the <strong>startExecutingWithNode:completion:</strong> method.</p>
<p>The first point of interest is that a workflow can start executing at any node, there is no arbitrary enforcement of a “first” node. This increases the flexibility of a workflow, since there may be several viable entry points, determined at run-time.</p>
<p>Although the code shown above does not make it explicit, the <strong>startExecutingWithNode:completion:</strong> method is a non-blocking call. In other words, the flow of execution does not wait until the workflow completes before moving past a call to that method. When the workflow eventually finishes executing nodes, it will invoke your completion handler block.</p>
<p>The completion handler block accepts three parameters. The first is named <strong>outcome</strong> and points to a semantically relevant value based on the result of the final node to execute, or nil if no such value exists. In the next method I explain more about this very useful and powerful feature.</p>
<p>The second parameter to the completion handler block is named <strong>finalNode</strong> and it points to the last node to execute before the workflow completed. If the workflow encountered an error, this node’s <strong>error</strong> property will point to an <strong>NSError</strong> object.</p>
<p>The last parameter is named <strong>cancelled</strong> and it will be YES if the workflow was cancelled via the <strong>cancel</strong> method. If the workflow was cancelled, the <strong>outcome</strong> and <strong>finalNode</strong> arguments will be nil.</p>
<p>Next up is the method that creates and configures a workflow and its nodes. This is where the magic happens.</p>
<p><img class=" wp-image" id="i-1351" alt="" src="http://joshsmithonwpf.files.wordpress.com/2013/03/13-demo-make.png?w=633&#038;h=694" width="633" height="694" /></p>
<p>I annotated each part of that method with a letter to assist with explaining how it works.</p>
<p><strong>Part A</strong> is equivalent to drawing boxes in a workflow diagram. This is where the four workflow nodes are created. Note that a node can be passed data via its initializer, such as the <strong>initWithCount:</strong> method for the sit-ups node, or via properties, accessor methods, etc. Alternatively, nodes can access and share data by using the workflow’s <strong>userInfo</strong> property, which exposes a mutable dictionary.</p>
<p><strong>Part B</strong> uses Key-Value Coding to set up mock return values for both decision nodes. I use KVC instead of a direct property assignment because those variables are typed as <strong>JASDecision</strong> pointers, and that class does not declare the <strong>mockResult</strong> property (both of its subclasses declare that property).</p>
<p><strong>Part C</strong> is equivalent to drawing arrows between boxes in a workflow diagram. This is where the order in which nodes execute is determined.</p>
<p><strong>Part D</strong> creates an instance of <strong>JASWorkflow</strong> that manages four nodes. The workflow object owns (i.e. retains) the nodes passed into its initializer, and only those nodes. All other pointers to nodes are weak, meaning that a node not passed into the workflow’s initializer will be immediately deallocated unless your code explicitly keeps a strong reference to it. All nodes used in a workflow should be passed to its initializer.</p>
<p><strong>Part E</strong> shows how to map the result of a final node to an outcome value. There are three uses of the <strong>ifFinalNode:producesResult:evaluateTo:</strong> method, one for each value of the <strong>DEMOOutcome</strong> enum. This is how the workflow knows what value to pass for the <strong>outcome</strong> parameter of your completion handler block. When a node produces a result, such as <strong>JASWorkflowNodeResultNo</strong>, for which it does not have a node to execute next, the workflow is complete. At that time, the workflow tries to translate the [finalNode, result] combination into an outcome value. It can only produce an outcome value if your code supplied one via the <strong>ifFinalNode:producesResult:evaluateTo:</strong> method.</p>
<p><strong>Part F</strong> points the <strong>rootNode</strong> out parameter at the first node to execute, which in this demo is the node that asks if the test subject is willing to exercise.</p>
<h1>Summary</h1>
<p>I have had nothing but success when applying this approach to implementing complex, asynchronous aspects of production iOS apps. If you are the kind of person who finds workflow diagrams useful, like I do, be sure to consider giving it try next time you’re faced with a gnarly problem whose solution can be clearly expressed with boxes and arrows.</p>
<p>All of the code reviewed here, and more, is <a title="Download the source code" href="https://github.com/ijoshsmith/iOS-Workflow">available on GitHub</a>.</p>
<p>Happy coding!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ijoshsmith.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ijoshsmith.wordpress.com/489/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=489&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ijoshsmith.com/2013/03/24/objective-c-workflow-for-ios-apps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c118e7be6c761d4575ad543460778524?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Josh Smith</media:title>
		</media:content>

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/workflow-concept.png?w=490" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/01-health-workflow.png?w=490" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/02-test-harness.png?w=424" medium="image" />

		<media:content url="http://ijoshsmith.files.wordpress.com/2013/03/health-workflow-types.png" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/04-workflow-outcomes.png?w=506" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/05-node-interfaces.png?w=500" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/06-willexercise-interface.png?w=406" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/07-willexercise-impl.png?w=451" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/08-dositups-interface.png?w=466" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/09-dositups-impl.png?w=509" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/10-workflow-interface.png?w=526" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/11-demo-action.png?w=437" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/12-demo-run.png?w=581" medium="image" />

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/03/13-demo-make.png?w=633" medium="image" />
	</item>
		<item>
		<title>Slides from iOS for .NET Devs presentation</title>
		<link>http://ijoshsmith.com/2013/01/29/slides-from-ios-for-net-devs-presentation/</link>
		<comments>http://ijoshsmith.com/2013/01/29/slides-from-ios-for-net-devs-presentation/#comments</comments>
		<pubDate>Wed, 30 Jan 2013 02:21:30 +0000</pubDate>
		<dc:creator>Josh Smith</dc:creator>
				<category><![CDATA[iOS Programming for .NET Developers]]></category>

		<guid isPermaLink="false">http://ijoshsmith.com/?p=486</guid>
		<description><![CDATA[Recently I spoke at the Southeast Valley .NET User Group, in Arizona, about iOS programming from a .NET developer&#8217;s perspective. I really enjoyed speaking to the group and they had a bunch of good questions for me. Sharing my experiences &#8230; <a href="http://ijoshsmith.com/2013/01/29/slides-from-ios-for-net-devs-presentation/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=486&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Recently I spoke at the Southeast Valley .NET User Group, in Arizona, about iOS programming from a .NET developer&#8217;s perspective. I really enjoyed speaking to the group and they had a bunch of good questions for me. Sharing my experiences in the &#8220;other world&#8221; is an interesting challenge!</p>
<p><a href="http://joshsmithonwpf.files.wordpress.com/2013/01/user-group-1.jpg"><img class="alignnone size-full wp-image-1317" alt="Josh speaking about iOS" src="http://joshsmithonwpf.files.wordpress.com/2013/01/user-group-1.jpg?w=640"   /></a></p>
<p>I went into detail about how native iOS programming compares to .NET programming. The presentation briefly covered many of the topics that my book &#8216;<a href="http://iosfordotnetdevs.com">iOS Programming for .NET Developers</a>&#8216; goes into in great detail. For example, I spent some time comparing Objective-C to C# and showing how to translate between them.</p>
<p><a href="http://joshsmithonwpf.files.wordpress.com/2013/01/user-group-2.jpg"><img class="alignnone size-full wp-image-1318" alt="Josh talking about Objective-C" src="http://joshsmithonwpf.files.wordpress.com/2013/01/user-group-2.jpg?w=640"   /></a></p>
<p>I exported my slide deck to a PDF, which can be downloaded from this blog post.</p>
<p><a href="http://joshsmithonwpf.files.wordpress.com/2013/01/ios4dotnetdevs_slides.pdf">iOS Programming for .NET Devs Slides</a></p>
<p>Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ijoshsmith.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ijoshsmith.wordpress.com/486/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=486&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ijoshsmith.com/2013/01/29/slides-from-ios-for-net-devs-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c118e7be6c761d4575ad543460778524?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Josh Smith</media:title>
		</media:content>

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/01/user-group-1.jpg" medium="image">
			<media:title type="html">Josh speaking about iOS</media:title>
		</media:content>

		<media:content url="http://joshsmithonwpf.files.wordpress.com/2013/01/user-group-2.jpg" medium="image">
			<media:title type="html">Josh talking about Objective-C</media:title>
		</media:content>
	</item>
		<item>
		<title>Deciding between native iOS and Xamarin (MonoTouch)</title>
		<link>http://ijoshsmith.com/2013/01/04/deciding-between-native-ios-and-xamarin-monotouch/</link>
		<comments>http://ijoshsmith.com/2013/01/04/deciding-between-native-ios-and-xamarin-monotouch/#comments</comments>
		<pubDate>Fri, 04 Jan 2013 17:17:14 +0000</pubDate>
		<dc:creator>Josh Smith</dc:creator>
				<category><![CDATA[MonoTouch]]></category>
		<category><![CDATA[Objective-C]]></category>

		<guid isPermaLink="false">http://ijoshsmith.com/?p=482</guid>
		<description><![CDATA[An old friend of mine, who I worked with back when I was a .NET developer, emailed me recently. He was looking for some advice on which platform to use for creating iOS software, mostly focusing on native versus Xamarin &#8230; <a href="http://ijoshsmith.com/2013/01/04/deciding-between-native-ios-and-xamarin-monotouch/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=482&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>An old friend of mine, who I worked with back when I was a .NET developer, emailed me recently. He was looking for some advice on which platform to use for creating iOS software, mostly focusing on native versus Xamarin (MonoTouch). My answer does not delve into specifics about Xamarin, because it&#8217;s been years since I used their platform in earnest. It does, however, express my opinion on native vs. non-native. He left out other options, such as PhoneGap, perhaps because he simply was not yet aware that they exist.</p>
<p>Below is his email, followed by my reply. I don&#8217;t expect this to settle the matter once and for all (where&#8217;s the fun in that?!) but perhaps it will give others a new perspective on the topic.</p>
<p><strong>His Question</strong></p>
<p>Since I have started playing around with iOS, two questions that came to my mind and I thought I should ask you.<br />
<em>To be or not to be native iOS?</em><br />
<em>Xamarin or not to Xamarin?</em><br />
My real purpose is</p>
<ul>
<li>to create some productivity apps for handheld devices and</li>
<li>to create some re-usable control libraries.</li>
</ul>
<p>It will be great if you can share your expertise on this <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>My Reply</strong></p>
<p>Your question is a good one, which I&#8217;ve discussed with many people. So far my answer is broken down into three considerations:</p>
<ol>
<li><em>Reach</em> &#8211; Is getting the same codebase onto as many devices as possible a high priority, or are you more interested in keeping the app on one operating system for the first launch (in order to create the best app possible &#8211; no compromises)?</li>
<li><em>User Experience</em> &#8211; Are you willing to make sacrifices in the user experience to use a non-native layer (ex. building HTML-based UI via PhoneGap)?</li>
<li><em>Budget</em> &#8211; Can you afford to build a separate app for each platform? If so, that&#8217;s probably the best route since you won&#8217;t need to rely on lowest common denominator solutions that bring their own bugs and limitations to the table.</li>
</ol>
<p>In your particular case, the re-usable control libraries should be native because I doubt that such performance-sensitive, low-level rendering code would be reusable via Xamarin&#8217;s platform across different OS&#8217;s. You can always wrap your native libs with their runtime wrapping API, which I read about a while back, and use them from Xamarin apps if necessary.</p>
<p>Regarding the productivity apps, I don&#8217;t know enough details about your situation to say anything definite. Using Xamarin for those apps might make sense, and you will probably have a temporary advantage of avoiding the learning curve associated with native iOS programming (note: I wrote <em>temporary</em>). Truth be told, learning native iOS programming isn&#8217;t all that difficult, it just takes time and a little brain rewiring. Also, when working with Xamarin, or PhoneGap, you often end up dealing with Objective-C code anyways (plug-ins, StackOverflow examples, etc).</p>
<p>I have a bias toward native since it is inherently better than any 3rd party layer, and I&#8217;m not interested in dealing with the bugs of Apple and another company as well. Unfortunately, technical preferences don&#8217;t usually drive business decisions!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ijoshsmith.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ijoshsmith.wordpress.com/482/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=482&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ijoshsmith.com/2013/01/04/deciding-between-native-ios-and-xamarin-monotouch/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c118e7be6c761d4575ad543460778524?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Josh Smith</media:title>
		</media:content>
	</item>
		<item>
		<title>Save 20% on iOS Programming for .NET Developers this month</title>
		<link>http://ijoshsmith.com/2012/10/19/save-20-on-ios-programming-for-net-developers-this-month/</link>
		<comments>http://ijoshsmith.com/2012/10/19/save-20-on-ios-programming-for-net-developers-this-month/#comments</comments>
		<pubDate>Fri, 19 Oct 2012 15:16:27 +0000</pubDate>
		<dc:creator>Josh Smith</dc:creator>
				<category><![CDATA[iOS Programming for .NET Developers]]></category>

		<guid isPermaLink="false">http://ijoshsmith.com/?p=479</guid>
		<description><![CDATA[If you buy a paperback copy of iOS Programming for .NET Developers this month (October, 2012) be sure to use this coupon code to save 20% on your purchase: OCTBOOKS12 Visit Lulu.com to pick up your copy and get started &#8230; <a href="http://ijoshsmith.com/2012/10/19/save-20-on-ios-programming-for-net-developers-this-month/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=479&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>If you buy a paperback copy of <a href="http://bit.ly/Tjhfvm">iOS Programming for .NET Developers</a> this month (October, 2012) be sure to use this coupon code to save 20% on your purchase: <strong>OCTBOOKS12</strong></p>
<p>Visit <a href="http://bit.ly/Tjhfvm">Lulu.com</a> to pick up your copy and get started learning one of the most in-demand skills on the market today.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ijoshsmith.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ijoshsmith.wordpress.com/479/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=479&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ijoshsmith.com/2012/10/19/save-20-on-ios-programming-for-net-developers-this-month/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c118e7be6c761d4575ad543460778524?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Josh Smith</media:title>
		</media:content>
	</item>
		<item>
		<title>Determine the size of a View by inspecting its NIB</title>
		<link>http://ijoshsmith.com/2012/09/25/determine-the-size-of-a-view-by-inspecting-its-nib/</link>
		<comments>http://ijoshsmith.com/2012/09/25/determine-the-size-of-a-view-by-inspecting-its-nib/#comments</comments>
		<pubDate>Wed, 26 Sep 2012 04:28:23 +0000</pubDate>
		<dc:creator>Josh Smith</dc:creator>
				<category><![CDATA[Interface Builder]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[UICollectionView]]></category>
		<category><![CDATA[UITableView]]></category>

		<guid isPermaLink="false">http://ijoshsmith.com/?p=472</guid>
		<description><![CDATA[I was exploring the UICollectionView API tonight and stumbled upon an old problem. Both UITableView and UICollectionView ask their delegate for size information about the cells they display. When creating cells in separate XIB files, which I normally do, this &#8230; <a href="http://ijoshsmith.com/2012/09/25/determine-the-size-of-a-view-by-inspecting-its-nib/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=472&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I was exploring the UICollectionView API tonight and stumbled upon an old problem. Both UITableView and UICollectionView ask their delegate for size information about the cells they display. When creating cells in separate XIB files, which I normally do, this means that the delegate must somehow know how big the root View is in that XIB. The easiest way to do that is evil: hard-code the cell&#8217;s size in the delegate. Duplication! Yuck!! No more!!!</p>
<p>It dawned on me that this entire problem can be avoided by doing a one-time lookup of the View&#8217;s natural size, as it exists in the XIB file (and, at run-time, in the view&#8217;s NIB). I posted a Gist on GitHub that shows my simple solution:</p>
<p><script src="https://gist.github.com/3785992.js"></script></p>
<p>Happy coding!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ijoshsmith.wordpress.com/472/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ijoshsmith.wordpress.com/472/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=472&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ijoshsmith.com/2012/09/25/determine-the-size-of-a-view-by-inspecting-its-nib/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c118e7be6c761d4575ad543460778524?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Josh Smith</media:title>
		</media:content>
	</item>
		<item>
		<title>Brief overview of Auto Layout in iOS 6</title>
		<link>http://ijoshsmith.com/2012/09/24/brief-overview-of-auto-layout-in-ios-6/</link>
		<comments>http://ijoshsmith.com/2012/09/24/brief-overview-of-auto-layout-in-ios-6/#comments</comments>
		<pubDate>Mon, 24 Sep 2012 17:48:09 +0000</pubDate>
		<dc:creator>Josh Smith</dc:creator>
				<category><![CDATA[Auto Layout]]></category>
		<category><![CDATA[iOS 6]]></category>
		<category><![CDATA[iOS6]]></category>
		<category><![CDATA[iPhone 5]]></category>

		<guid isPermaLink="false">http://ijoshsmith.com/?p=459</guid>
		<description><![CDATA[This blog post examines the basics of Auto Layout in iOS 6 and suggests resources for learning more about the topic. Introduction to Auto Layout Starting with iOS 6 Apple has given developers a powerful new way to create user &#8230; <a href="http://ijoshsmith.com/2012/09/24/brief-overview-of-auto-layout-in-ios-6/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=459&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This blog post examines the basics of Auto Layout in iOS 6 and suggests resources for learning more about the topic.</p>
<p><strong>Introduction to Auto Layout</strong></p>
<p>Starting with iOS 6 Apple has given developers a powerful new way to create user interfaces that intelligently adapt to layout changes. This SDK addition, known as Auto Layout, enables a developer to express spatial relationships between views, leaving UIKit to update each view’s frame as needed to honor them. Relationships are expressed via layout constraints, which are objects of type NSLayoutConstraint, that can be added to a view by passing the addConstraint: or addConstraints: messages to it.</p>
<p>Auto Layout replaces the “springs and struts” autosizing layout mechanism used in the past. All new XIB and storyboard files have Auto Layout enabled by default. It is possible to port old views to use Auto Layout because it is smart enough to translate autosizing information into layout constraints.</p>
<p>The fact that Auto Layout was released at the same time as iPhone 5 is no coincidence. With iPhone 5’s screen being 4 inches tall, instead of the traditional 3.5 inches, there is a more pressing need to create adaptable user interfaces. If the rumored mini iPad is ever released, this concern will be even more pervasive for iOS developers. However, for simple views the old autosizing model works fine. For example, an app I have been developing at work relies heavily on UITableView and was created using autosizing, for running on iOS 5 and iPhone 4. When we tested the app out on iOS 6 and iPhone 5 simulator, there were almost no UI layout problems. For more complicated and custom user interfaces, however, the outcome probably won’t be as pain-free.</p>
<p>Auto Layout is also very helpful for supporting internationalization. Not only does it make the work of accommodating variable length display text easier, it also intrinsically supports right-to-left languages, such as Hebrew and Arabic. In the Auto Layout API the terms “leading” and “trailing” are used to generically refer to the start and end of a line, respectively. For left-to-right languages, such as English, leading means left and trailing means right. For right-to-left languages, it’s reversed. By relying on these generic concepts built into the API, it frees you, the application developer, from needing to take such locale-specific issues into account when building views.</p>
<p><strong>How to use Auto Layout</strong></p>
<p>Interface Builder (IB) now has support for working with layout constraints in an iOS app. It allows you to create and configure layout constraints on views without having to write a line of code. The screenshot below shows how constraints are now part of the document outline, and how the selected constraint is highlighted with a white border in the visual designer.</p>
<p><img class="alignnone size-full wp-image-460" title="Auto Layout in Interface Builder" src="http://ijoshsmith.files.wordpress.com/2012/09/ib.png?w=640" alt=""   /></p>
<p>There is an ASCII-art inspired language named <a title="Visual Format Language documentation" href="https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AutolayoutPG/Articles/formatLanguage.html#//apple_ref/doc/uid/TP40010853-CH3-SW1">Visual Format Language</a> (VFL) that can be used to ideographically express relationships between views. VFL text is written in code files, not IB, and acts as a facade over the cumbersome underlying API. Similar to the layout constraints support in IB, this language supports a subset of the functionality available in the API.</p>
<p><img class="alignnone size-full wp-image-461" title="Visual Format Language" src="http://ijoshsmith.files.wordpress.com/2012/09/vfl.png?w=640" alt=""   /></p>
<p>Most of the time the support in IB and VFL will cover your needs. However, the full power of layout constraints is available for situations that need it. Code can be written that creates individual NSLayoutConstraint objects and specifies all parameters required to create a single constraint, including things that are not available in other formats, such as a multiplier that allows a constraint to operate on a percentage of a value. The example below demonstrates this.</p>
<p><img class="alignnone size-full wp-image-462" title="Auto Layout in code" src="http://ijoshsmith.files.wordpress.com/2012/09/code.png?w=640" alt=""   /></p>
<p><strong>Cardinal rule of Auto Layout</strong></p>
<p>There is something fundamental about Auto Layout that you must know in order to use it properly:</p>
<p><strong><span style="text-decoration:underline;">Constraints must provide enough information to determine one, and only one, size and location for a view.</span></strong></p>
<p>If you don’t provide enough constraints, Auto Layout cannot accurately determine a view’s frame. If you provide too many constraints, such that multiple frames are possible for the same view, Auto Layout cannot accurately determine a view’s frame. If you violate the cardinal rule, either your app will crash or a large amount of helpful troubleshooting information will be logged to the Output window in Xcode.</p>
<p><strong>Recommended Resources</strong></p>
<p>There is far too much to say about Auto Layout for this introductory blog post. My goal here is to give a newcomer enough information about the topic so that it makes sense. If you have been working with iOS for a while, I&#8217;m sure you will see why it’s such an important topic to learn about. I suggest the following resources for an in-depth treatment of the subject:</p>
<p>The free tutorial on Ray Wenderlich’s site <a href="http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2">Beginning Auto Layout in iOS 6: Part 1/2</a></p>
<p>Both chapters about Auto Layout in Ray Wenderlich’s excellent book ‘<a href="http://www.raywenderlich.com/store/ios-6-by-tutorials">iOS 6 by Tutorials</a>’</p>
<p>Apple’s documentation: <a href="https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AutolayoutPG/Articles/Introduction.html">Cocoa Auto Layout Guide</a></p>
<p>All three presentations about Auto Layout at <a href="https://developer.apple.com/videos/wwdc/2012/">WWDC 2012</a></p>
<p>I published a simple demo project that shows how to work with Auto Layout in code on <a href="https://github.com/ijoshsmith/Auto-Layout-Demo">GitHub</a>.</p>
<div></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ijoshsmith.wordpress.com/459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ijoshsmith.wordpress.com/459/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=459&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ijoshsmith.com/2012/09/24/brief-overview-of-auto-layout-in-ios-6/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c118e7be6c761d4575ad543460778524?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Josh Smith</media:title>
		</media:content>

		<media:content url="http://ijoshsmith.files.wordpress.com/2012/09/ib.png" medium="image">
			<media:title type="html">Auto Layout in Interface Builder</media:title>
		</media:content>

		<media:content url="http://ijoshsmith.files.wordpress.com/2012/09/vfl.png" medium="image">
			<media:title type="html">Visual Format Language</media:title>
		</media:content>

		<media:content url="http://ijoshsmith.files.wordpress.com/2012/09/code.png" medium="image">
			<media:title type="html">Auto Layout in code</media:title>
		</media:content>
	</item>
		<item>
		<title>Check out the iOS 6 Feast</title>
		<link>http://ijoshsmith.com/2012/09/20/check-out-the-ios-6-feast/</link>
		<comments>http://ijoshsmith.com/2012/09/20/check-out-the-ios-6-feast/#comments</comments>
		<pubDate>Thu, 20 Sep 2012 23:23:04 +0000</pubDate>
		<dc:creator>Josh Smith</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[iOS Programming for .NET Developers]]></category>

		<guid isPermaLink="false">http://ijoshsmith.com/?p=456</guid>
		<description><![CDATA[Ray Wenderlich, whose iOS programming tutorials have helped countless aspiring iOS developers learn the trade, is now hosting a gigantic feast of iOS 6 goodness. He has dubbed it the iOS 6 Feast because there is course after course of &#8230; <a href="http://ijoshsmith.com/2012/09/20/check-out-the-ios-6-feast/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=456&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Ray Wenderlich, whose iOS programming tutorials have helped countless aspiring iOS developers learn the trade, is now hosting a gigantic feast of iOS 6 goodness. He has dubbed it the <a title="iOS 6 Feast" href="http://www.raywenderlich.com/20912/introducing-the-ios-6-feast">iOS 6 Feast</a> because there is course after course of delicious knowledge being served. His team has been hard at work preparing tutorials, books, and sample code to help make it easier for the rest of us to quickly learn about the new features in iOS 6.</p>
<p>The last course of Ray&#8217;s feast is a growing list of iOS-related products being given away for free. I decided to contribute a free copy of my book <a title="iOS Programming for .NET Developers" href="http://iosfordotnetdevs.com">iOS Programming for .NET Developers</a>.</p>
<p>Yesterday I bought, and have since been devouring, one of his team&#8217;s new books titled <a href="http://www.raywenderlich.com/store/ios-6-by-tutorials">iOS 6 by Tutorials</a>. It is an unbelievably large and comprehensive book about all of the great new features that iOS devs must know about to remain relevant and tasty in the job market. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ijoshsmith.wordpress.com/456/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ijoshsmith.wordpress.com/456/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=456&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ijoshsmith.com/2012/09/20/check-out-the-ios-6-feast/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c118e7be6c761d4575ad543460778524?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Josh Smith</media:title>
		</media:content>
	</item>
		<item>
		<title>What&#8217;s so bad about delighting users?</title>
		<link>http://ijoshsmith.com/2012/09/18/whats-so-bad-about-delighting-users/</link>
		<comments>http://ijoshsmith.com/2012/09/18/whats-so-bad-about-delighting-users/#comments</comments>
		<pubDate>Tue, 18 Sep 2012 15:26:35 +0000</pubDate>
		<dc:creator>Josh Smith</dc:creator>
				<category><![CDATA[User Experience]]></category>

		<guid isPermaLink="false">http://ijoshsmith.com/?p=449</guid>
		<description><![CDATA[This is a sponsored post from my good friends over at Infragistics. Think of the last time you heard someone say &#8220;no, we can&#8217;t put that feature in the application because it might make our users more comfortable&#8221;.  It is &#8230; <a href="http://ijoshsmith.com/2012/09/18/whats-so-bad-about-delighting-users/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=449&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This is a sponsored post from my good friends over at <a title="Infragistics" href="http://infragistics.com">Infragistics</a>.</p>
<hr />
<p><img class="alignnone size-full wp-image-450" title="delighting users" src="http://ijoshsmith.files.wordpress.com/2012/09/delighting-users.jpg?w=640&#038;h=416" alt="" width="640" height="416" /></p>
<p>Think of the last time you heard someone say &#8220;no, we can&#8217;t put that feature in the application because it might make our users more comfortable&#8221;.  It is probably difficult to think of a time someone said something like that to you because it&#8217;s not the way we think as developers and even as designers most of the time.  So, why then are many vocal people in the design community rallying against designs that try to incorporate real world elements?  There&#8217;s even a <a href="http://skeu.it">website</a> dedicated to ridiculing these designs. I think these designers are missing the point.  The main reason these elements are put in the design in the first place is to add a bit of familiarity to the interface.  It&#8217;s to delight the user!</p>
<p><a href="http://en.wikipedia.org/wiki/Skeuomorphism">Skeuomorphism</a> is a hot word these days.  The loose definition cited on Wikipedia is &#8220;an element of design or structure that serves little or no purpose in the artifact fashioned from the new material but was essential to the object made from the original material.&#8221;  A classic example from the physical world is the leather grain texture applied to a lot of vinyl automobile interiors.  Opponents of skeuomorphism will frequently point to Apple&#8217;s recent application designs for iOS and OS X.  The examples will include <a href="http://upload.wikimedia.org/wikipedia/en/2/2f/ICal_5.0_closeup.png">iCal</a> which features stitched leather and torn paper edges and <a href="http://goodereaderimages.goodereader.netdna-cdn.com/blog/uploads/images/ibooks-publishing1.png">iBooks</a> with its wood grain 3D bookshelf.  The latest app to catch fire was the Podcasts app which has a near replica of a reel to reel tape deck complete with fairly accurate mechanics.  It serves no purpose in the app other than to delight the user.  Are there more &#8220;authentically digital&#8221; ways to represent the same information this tape deck illustrates?  Sure.  Are they even half as engaging and cause people to write articles about them?  Nope.</p>
<p>I think it&#8217;s time we look at a different definition of skeuomorphism that I&#8217;d like to propose for the opponents of it.  Here&#8217;s how I&#8217;d like to redefine it: &#8220;taking an element from something most people are familiar with  and incorporating it into something most people aren&#8217;t familiar with&#8221;.  We tend to forget as developers and designers of applications that the majority of our users are not comfortable with computers and software.  Having that extra little bit of familiarity and delight might be the little thing that helps them connect with our app.  Is the use of skeuomorphism a little heavy handed at times?  I certainly would not argue with that.  I would argue that it is helping more than it is hurting though.  After all, what&#8217;s so bad about delighting users?</p>
<p>If you&#8217;d like to discuss this topic with me further, you can find me on Twitter <a href="http://twitter.com/brentschooley">@brentschooley</a>.  My colleague Ambrose Little (<a href="http://twitter.com/ambroselittle">@ambroselittle</a>) also covered this topic in great detail <a href="http://www.infragistics.com/community/blogs/ambrose_little/archive/2012/06/29/skeuomorphic-design-is-bad.aspx">here</a> so please read that as well if you found this interesting.</p>
<h2>About the Author</h2>
<p><strong>Twitter:</strong> <a href="http://twitter.com/brentschooley">@brentschooley</a><br />
<strong>Blog:</strong> <a href="http://bit.ly/igbrent">http://bit.ly/igbrent</a><br />
<strong>Brief bio: </strong>Brent Schooley is a technical evangelist for Infragistics. His<br />
current focuses include mobile technologies and Windows 8. He is a<br />
developer who focuses on good design. He is the author of &#8220;<a href="http://bit.ly/designwin8">Designing</a><br />
<a href="http://bit.ly/designwin8">for Windows 8</a>&#8220;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ijoshsmith.wordpress.com/449/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ijoshsmith.wordpress.com/449/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=449&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ijoshsmith.com/2012/09/18/whats-so-bad-about-delighting-users/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c118e7be6c761d4575ad543460778524?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Josh Smith</media:title>
		</media:content>

		<media:content url="http://ijoshsmith.files.wordpress.com/2012/09/delighting-users.jpg" medium="image">
			<media:title type="html">delighting users</media:title>
		</media:content>
	</item>
		<item>
		<title>Preparing for an iOS Developer Job Interview</title>
		<link>http://ijoshsmith.com/2012/08/31/preparing-for-an-ios-developer-job-interview/</link>
		<comments>http://ijoshsmith.com/2012/08/31/preparing-for-an-ios-developer-job-interview/#comments</comments>
		<pubDate>Fri, 31 Aug 2012 15:19:49 +0000</pubDate>
		<dc:creator>Josh Smith</dc:creator>
				<category><![CDATA[iOS Programming for .NET Developers]]></category>
		<category><![CDATA[Jobs]]></category>

		<guid isPermaLink="false">http://ijoshsmith.com/?p=444</guid>
		<description><![CDATA[Do you have an interview lined up for an iOS development gig and want to make sure you&#8217;ve got all your bases covered? Check out this article I wrote about preparing for iOS developer job interviews, recently published by Software &#8230; <a href="http://ijoshsmith.com/2012/08/31/preparing-for-an-ios-developer-job-interview/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=444&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Do you have an interview lined up for an iOS development gig and want to make sure you&#8217;ve got all your bases covered? Check out this article I wrote about preparing for iOS developer job interviews, recently published by <a href="http://sdjournal.org/software-reverse-engineering/">Software Developer&#8217;s Journal</a>. It is available in the free &#8220;teaser&#8221; preview of this month&#8217;s edition. The article covers ten essential topics about native iOS development that you should know before walking in the door to talk shop.</p>
<p><a href="http://sdjournal.org/software-reverse-engineering/"><img class="alignnone size-full wp-image-445" title="SD Journal" src="http://ijoshsmith.files.wordpress.com/2012/08/miniteaser.jpg?w=640" alt=""   /></a></p>
<p><a href="http://sdjournal.org/software-reverse-engineering/">Click here</a> to visit their site and download the free edition. If you want to continue your iOS education, check out my book <a href="http://iosfordotnetdevs.com">iOS Programming for .NET Developers</a> for the in-depth treatment!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ijoshsmith.wordpress.com/444/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ijoshsmith.wordpress.com/444/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=444&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ijoshsmith.com/2012/08/31/preparing-for-an-ios-developer-job-interview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c118e7be6c761d4575ad543460778524?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Josh Smith</media:title>
		</media:content>

		<media:content url="http://ijoshsmith.files.wordpress.com/2012/08/miniteaser.jpg" medium="image">
			<media:title type="html">SD Journal</media:title>
		</media:content>
	</item>
		<item>
		<title>Colin Eberhardt reviews iOS Programming for .NET Developers</title>
		<link>http://ijoshsmith.com/2012/07/30/colin-eberhardt-reviews-ios-programming-for-net-developers/</link>
		<comments>http://ijoshsmith.com/2012/07/30/colin-eberhardt-reviews-ios-programming-for-net-developers/#comments</comments>
		<pubDate>Mon, 30 Jul 2012 17:27:38 +0000</pubDate>
		<dc:creator>Josh Smith</dc:creator>
				<category><![CDATA[iOS Programming for .NET Developers]]></category>

		<guid isPermaLink="false">http://ijoshsmith.com/?p=438</guid>
		<description><![CDATA[A fellow by the name of Colin Eberhardt in the U.K. has reviewed my book that teaches .NET devs how to write iPhone and iPad apps. Colin&#8217;s review of iOS Programming for .NET Developers is circumspect and has reasonable critiques. &#8230; <a href="http://ijoshsmith.com/2012/07/30/colin-eberhardt-reviews-ios-programming-for-net-developers/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=438&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A fellow by the name of Colin Eberhardt in the U.K. has reviewed my book that teaches .NET devs how to write iPhone and iPad apps. Colin&#8217;s review of <a href="http://iosfordotnetdevs.com">iOS Programming for .NET Developers</a> is circumspect and has reasonable critiques. He summarizes the review with a few sentences that made me sigh with relief, because they confirm that I succeeded in writing a book that .NET developers gain real value by reading. Colin writes&#8230;</p>
<p>&#8220;What makes this book unique is that it helps you leverage your existing skills in a way that you would find very hard to do by yourself. The similarities between the two environments are far from obvious, but I am happy to say that there are a great many! I feel that reading this book has increased my comprehension of iOS application development far quicker than a standard text on learning iOS would have allowed.&#8221;</p>
<p>Visit <a href="http://www.scottlogic.co.uk/blog/colin/2012/07/book-review-ios-programming-for-net-developers/">Book Review: iOS Programming for .NET Developers</a> for the full review.</p>
<p>Thanks for the review, Colin!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ijoshsmith.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ijoshsmith.wordpress.com/438/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ijoshsmith.com&#038;blog=15920042&#038;post=438&#038;subd=ijoshsmith&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ijoshsmith.com/2012/07/30/colin-eberhardt-reviews-ios-programming-for-net-developers/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c118e7be6c761d4575ad543460778524?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Josh Smith</media:title>
		</media:content>
	</item>
	</channel>
</rss>
