<?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>Vokal Interactive</title>
	<atom:link href="http://vokalinteractive.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://vokalinteractive.com</link>
	<description>Vokal is Your Mobile Voice</description>
	<lastBuildDate>Wed, 15 May 2013 22:05:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Jarrett T.K.O.&#8217;s Lunch &amp; Learn: Intro to Knockout</title>
		<link>http://vokalinteractive.com/2013/05/03/jarrett-t-k-o-s-lunch-learn-intro-to-knockout/</link>
		<comments>http://vokalinteractive.com/2013/05/03/jarrett-t-k-o-s-lunch-learn-intro-to-knockout/#comments</comments>
		<pubDate>Fri, 03 May 2013 17:54:39 +0000</pubDate>
		<dc:creator>max.bare</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vokalinteractive.com/?p=2301</guid>
		<description><![CDATA[For May&#8217;s Lunch &#38; Learn, Web Engineer at VOKAL, Jarrett Widman, dropped some knowledge on using Knockout and the MVVM pattern . He introduced the concepts of two-way databinding, how MVVM is different than MVC, and showed a number of&#8230;]]></description>
			<content:encoded><![CDATA[<p>For May&#8217;s Lunch &amp; Learn, Web Engineer at VOKAL, <a href="http://vokalinteractive.com/team-member/jarrett-widman/">Jarrett Widman</a>, dropped some knowledge on using Knockout and the MVVM pattern . He introduced the concepts of two-way databinding, how MVVM is different than MVC, and showed a number of simple examples to demonstrate the features and usage of Knockout.</p>
<p>More information on knockout is available from <a href="http://knockoutjs.com/" target="_blank">http://knockoutjs.com/</a></p>
<p style="text-align: center;"> <a href="http://vokalinteractive.com/wp-content/uploads/2013/05/LnL_Jarret.png"><img class="aligncenter" title="Lunch &amp; Learn Jarrett" src="http://vokalinteractive.com/wp-content/uploads/2013/05/LnL_Jarret.png" alt="" width="365" height="550" /></a></p>
<p style="text-align: center;"><a href="http://vokalinteractive.com/wp-content/uploads/2013/05/LnL_Jarret_2.png"><img class="aligncenter" title="Lunch &amp; Learn Jarrett" src="http://vokalinteractive.com/wp-content/uploads/2013/05/LnL_Jarret_2.png" alt="" width="550" height="365" /></a></p>
<p style="text-align: center;"><a href="http://vokalinteractive.com/wp-content/uploads/2013/05/LnL_Jarret_3.png"><img class="aligncenter" title="Lunch &amp; Learn Jarrett" src="http://vokalinteractive.com/wp-content/uploads/2013/05/LnL_Jarret_3.png" alt="" width="550" height="365" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://vokalinteractive.com/2013/05/03/jarrett-t-k-o-s-lunch-learn-intro-to-knockout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NSCoder Meet-Up Last Night</title>
		<link>http://vokalinteractive.com/2013/05/01/nscoder-meet-up-last-night/</link>
		<comments>http://vokalinteractive.com/2013/05/01/nscoder-meet-up-last-night/#comments</comments>
		<pubDate>Wed, 01 May 2013 18:11:24 +0000</pubDate>
		<dc:creator>max.bare</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vokalinteractive.com/?p=2284</guid>
		<description><![CDATA[For the last couple months, Sean Wolter of VOKAL has been hosting the NSCoder Chicago meet-ups at the VOKAL offices and Mobile Makers campus.  On the last Tuesday of every month, fellow Chicago developers get together to enjoy libations, pizza&#8230;]]></description>
			<content:encoded><![CDATA[<p>For the last couple months, <a href="http://vokalinteractive.com/team-member/sean-wolter/">Sean Wolter</a> of VOKAL has been hosting the NSCoder Chicago meet-ups at the VOKAL offices and Mobile Makers campus.  On the last Tuesday of every month, fellow Chicago developers get together to enjoy libations, pizza pie and great conversation. It&#8217;s an opportunity to share projects, advice and maybe do little coding to boot! The meet-ups are open to all. If interested, stay connected at <a title="www.nscoder-chicago.com" href="http://www.nscoder-chicago.com">www.nscoder-chicago.com</a> and follow on twitter <a href="https://twitter.com/NSCoderChicago">@NSCoderChicago</a></p>
<p><strong>Some Highlights from Last Night</strong></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/05/NSCoderChicago-04-13a.jpg"><img title="NSCoder Chicago fun times" src="http://vokalinteractive.com/wp-content/uploads/2013/05/NSCoderChicago-04-13a.jpg" alt="" width="425" height="425" /></a></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/05/NSCoderChicago-04-13b.jpg"><img title="NSCoder Chicago fun times" src="http://vokalinteractive.com/wp-content/uploads/2013/05/NSCoderChicago-04-13b.jpg" alt="" width="425" height="425" /></a></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/05/NSCoderChicago-04-13b.jpg"><img title="NSCoder Chicago fun times" src="http://vokalinteractive.com/wp-content/uploads/2013/05/NSCoderChicago-04-13c.jpg" alt="" width="425" height="425" /></a></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/05/NSCoderChicago-04-13d.jpg"><img title="NSCoder Chicago fun times" src="http://vokalinteractive.com/wp-content/uploads/2013/05/NSCoderChicago-04-13d.jpg" alt="" width="425" height="425" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://vokalinteractive.com/2013/05/01/nscoder-meet-up-last-night/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Mobile Web Considerations for Native App Designers</title>
		<link>http://vokalinteractive.com/2013/04/05/some-mobile-web-considerations-for-native-app-designers/</link>
		<comments>http://vokalinteractive.com/2013/04/05/some-mobile-web-considerations-for-native-app-designers/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 22:13:27 +0000</pubDate>
		<dc:creator>gene.parcellano</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vokalinteractive.com/?p=2219</guid>
		<description><![CDATA[As web apps increase in popularity in the mobile space, designs traditionally built for native iOS or Android apps have started to find their way into the hands of web developers.  Web development and native app development can pose some&#8230;]]></description>
			<content:encoded><![CDATA[<p>As web apps increase in popularity in the mobile space, designs traditionally built for native iOS or Android apps have started to find their way into the hands of web developers.  Web development and native app development can pose some very different challenges.  If you&#8217;ve designed a lot of native apps, knowledge of the process a web developer goes through can really help your designs hit the ground running.</p>
<p>&nbsp;</p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/04/native-vs-web1.png"><img class="alignnone size-full wp-image-2233" title="native-vs-web" src="http://vokalinteractive.com/wp-content/uploads/2013/04/native-vs-web1.png" alt="" width="333" height="173" /></a></p>
<p><strong>Native apps vs web apps</strong></p>
<p>Many native mobile apps are built the same way websites were built in the 1990s: a patchwork grid of sliced images butted up and layered over one another. Since a native app can load all of its assets on your device via the initial download, it can get away with using a lot of rasterized graphics. A web app will try to minimize the number of images it uses, however, since they&#8217;re downloaded upon the first visits to any of the pages. To minimize the load, and generally provide site flexibility, many assets are built on-the-fly using CSS.</p>
<p>Modern CSS can produce gradients, drop shadows, inner shadows, rounded corners, and all manner of text effects. There are certainly more sophisticated effects you can only get by including an image, but many can be built on the browser end. A web developer will typically only pull the assets he absolutely needs from a PSD, and build the rest from scratch as best as he can. The more CSS is on a page, the more easily a visual can be changed, as it&#8217;s mere keystrokes rather than the production and insertion of a new image asset.</p>
<p>CSS can be interpreted by devices in a variety of ways. It&#8217;s natural for simple things like the darkness of shadows, the way a rounded corner renders, or the line-height of text to vary slightly from device to device. It&#8217;s rare that a user will visit a site across several devices with distinct rendering engines, though, so as long as the site doesn&#8217;t look broken, these little differences are entirely unnoticeable. Effort will be made by the developer to achieve parity, but in some instances the spirit of a design may be targeted in lieu of its exact specification.</p>
<p>The older a device is, however, the less likely it is that it&#8217;ll support the entirety of the CSS spec. Accordingly, certain design patterns don&#8217;t necessarily translate to a web app the same way they translate to a native one. One common issue is the lack of support for fixed-position background images, which when paired with poor support for HTML containers that scroll their internal content (a fixed-position background workaround), results in fixed-position backgrounds just not being possible in web apps. There are device and browser pairings that indeed produce the desired effect, but they regrettably don&#8217;t comprise the vast majority of the devices on the marketplace.</p>
<p>Two important concepts in web development are those of <em>progressive enhancement</em> and <em>graceful degradation</em>. They imply a website that can look progressively nicer in newer web browsers, and one that degrades in older web browsers without ever feeling broken, ugly, or non-functional. While developing a native mobile app, the design is typically always the design, and will appear the same across devices. A web app, however, will often vary from device to device, depending upon the abilities of that device&#8217;s web rendering engine. Accordingly, a design heavy in CSS gradients, shadows, and rounded corners may end up looking much flatter and pointier on, say, an ancient Android (or Windows Mobile) device. Sometimes only visual niceties will need to degrade, but other times the site may actually become less functional, such as pinned headers or footers no longer pinning correctly. These things will need to be understood when the design is being built, so that when certain items need to degrade on older devices, they degrade in a fashion that does not negatively impact the overall experience.</p>
<p>It&#8217;s also important to remember that a web app is just a website. By running in a web browser, it will generally not perform with the kind of smoothness and snappiness you&#8217;d get from a native app. Web code is hugely more maintainable and deployable, but the environment it runs in limits its ability to emulate a native experience exactly. JavaScript can be used judiciously to try and produce certain effects, but it can only go so far. This is especially true on older devices, where hardware acceleration is not an option, and CSS animations offer few benefits.</p>
<p>When building a &#8220;hybrid&#8221; app, which combines web code and native containers, you can get around some of these issues. For example, a native shell can have a fixed-position background image, while a web view can layer on top of it, producing the desired effect. The native shell can also handle all page transitions and layer in some native effects, producing a much smoother and more &#8220;native&#8221; feeling experience, while the actual components of the page are still web views. There are varying degrees of hybrid integration, where the more basic options merely load a website from a live server in a native shell, and more complicated ones integrate web code directly, and serve it up in the initial download package from an app store. Which approach is more appropriate depends ultimately upon the kind of product being produced.</p>
<p>&nbsp;</p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/04/extracting-assets.png"><img class="alignnone size-full wp-image-2222" title="extracting-assets" src="http://vokalinteractive.com/wp-content/uploads/2013/04/extracting-assets.png" alt="" width="305" height="141" /></a></p>
<p><strong>Extracting assets</strong></p>
<p>Whether or not a developer can parse a PSD and pull out assets will vary from person to person. In most cases the developer can grab what they need, but there are some instances where it becomes much more difficult, depending upon how the PSD was built.</p>
<p>Sometimes an image, usually an icon for a button or something similar, will have various background detritus around its edges that gets hidden via layer blending. This makes it nigh-on impossible for a developer to get the image with a proper transparent background. Layer blending to remove backgrounds is fine for elements that will be locked to their backgrounds when they&#8217;re sliced, but if the developer wants only the icon so he can build the background via CSS, make sure that the icon is clean and accessible for slicing by itself.</p>
<p>There are also cases where a PSD has a semi-transparent element, maybe a gradient, that the developer will want to reproduce via CSS. It can be difficult to sample the correct colors, or figure out the level of transparency, if the layer has been rasterized. If the effects are reversible, there&#8217;s no problem. If not, though, it would be helpful to provide a reference for which colors were there before they were made transparent, and what the opacity level is set at. Better yet: don&#8217;t rasterize, so that the developer can reverse-engineer an element to discover its source components.</p>
<p>&nbsp;</p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/04/working-with-fonts1.png"><img class="alignnone size-full wp-image-2228" title="working-with-fonts" src="http://vokalinteractive.com/wp-content/uploads/2013/04/working-with-fonts1.png" alt="" width="280" height="133" /></a></p>
<p><strong>Working with fonts</strong></p>
<p>The latest CSS specifications support the inclusion of actual font files, rather than just relying on what a user already has installed on their machine. If you have a font file in the right format, it can be bundled with all of your web files and will load in the website like any other font. This gives a ton more flexibility in design, where one used to have to use images for any non-standard fonts.</p>
<p>That said, many fonts simply were not made for the web, or aren&#8217;t old enough that the web was built around them. A great example is Helvetica Neue, which is exceedingly common in modern designs built on Apple computers. It&#8217;s a font that isn&#8217;t present on Windows machines or Android devices, so it needs to be included via CSS in order to function. It wasn&#8217;t designed for web use, however, which means if you actually purchase the font and get it included, it may render very differently on non-Apple devices. Line-heights are the main culprit here, where trying to use a non-web-font across a variety of devices and operating systems will result in very different baselines, rendering the font largely useless in tight situations like navigations or buttons. Helvetica/Arial = good. Helvetica Neue = bad. If a font like that is only used in a loose callout location, though, where the exact line heights aren&#8217;t as important, it might still be okay to work with.</p>
<p>When choosing the base font used for the majority of elements on a page, web-safe fonts are highly recommended. There are a set of<a href="http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html"> web-safe font groups</a> that are present on pretty much any machine, and these should form the foundation of a site. If a non-standard look is desired, though, seek out fonts that were actually designed for use on the web. Adobe makes a ton (like Source Sans Pro), but you can also get a huge amount of <em>free</em> fonts via services like<a href="http://www.google.com/webfonts"> Google Web Fonts</a>. When putting together a design from scratch, try to choose your fonts from a service like this (<a href="https://typekit.com/">Typekit</a> is another popular option), or generally stick to those fonts that will definitely work well on the web. CSS fonts don&#8217;t work in some older browsers, though, so a fallback font style should be chosen in those cases.</p>
<p>&nbsp;</p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/04/overlooked-deliverables.png"><img class="alignnone size-full wp-image-2224" title="overlooked-deliverables" src="http://vokalinteractive.com/wp-content/uploads/2013/04/overlooked-deliverables.png" alt="" width="370" height="127" /></a></p>
<p><strong>Overlooked deliverables</strong></p>
<p>Websites are naturally fluid. Consider that your assets may need to stretch or smoothly elongate for different screen sizes or devices. Define rules for whether something should get bigger, get wider, move over, or just stay the same should the screen get larger or smaller.</p>
<p>Wireframes and information schematics are useful for communicating how a responsive design should perform, but they&#8217;re also useful for conveying how the user should be able to interact with the app, and this informs how the developer will build it. Annotated wireframes should accompany all but the most bare-bones designs, and highlight how each part of the design should move and react to input.</p>
<p>It can be helpful to have assets provided to the developer at both LDPI and HDPI resolutions, rather than the developer sizing down HDPI assets when he needs LDPI ones. There are instances where in the process of resizing, an un-rasterized image will resize its source components, but not effects (like shadows/strokes), so the lower res asset will actually end up half small and half big. But when the assets are rasterized together and then resized, the quality of some elements can suffer. The more of this that can be addressed during the design phase, the better. There&#8217;s no need to actually deliver the assets pre-sliced, but H/LDPI source documents where the designer has ensured that the assets have resized correctly would be ideal.</p>
<p>It&#8217;s often helpful to just have a chat with the developer to hash out exactly how the assets should be produced, since the project may allow for certain elements to be built entirely with CSS.</p>
<p>&nbsp;</p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/04/desktop-site.png"><img class="alignnone size-full wp-image-2225" title="desktop-site" src="http://vokalinteractive.com/wp-content/uploads/2013/04/desktop-site.png" alt="" width="321" height="141" /></a></p>
<p><strong>Desktop sites</strong></p>
<p>Sometimes you&#8217;ll work on a traditional desktop web project, and in that case most of these rules still apply. Even a site designed for a larger and mouse-driven screen will be regularly accessed via mobile devices, and should accommodate those devices with a responsive design and touch-friendly elements. This includes not relying too heavily on mouse-exclusive interaction paradigms like mouseovers.</p>
<p>Desktop sites have slightly different challenges in terms of browser support, though, since the question of how to support older versions of Internet Explorer crops up, and while JavaScript is a given on a mobile device, there may be desktop devices that have it disabled. These issues still typically adhere to the concepts of progressive enhancement and graceful degradation, so the overall approach can be similar.</p>
<p><em>post by: <a href="http://vokalinteractive.com/team-member/cory-faller/">Cory Faller</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://vokalinteractive.com/2013/04/05/some-mobile-web-considerations-for-native-app-designers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Month&#8217;s Lunch &amp; Learn: Making Comics?</title>
		<link>http://vokalinteractive.com/2013/04/03/this-months-lunch-learn-making-comics/</link>
		<comments>http://vokalinteractive.com/2013/04/03/this-months-lunch-learn-making-comics/#comments</comments>
		<pubDate>Wed, 03 Apr 2013 20:02:09 +0000</pubDate>
		<dc:creator>max.bare</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vokalinteractive.com/?p=2199</guid>
		<description><![CDATA[Everyone has a pet project that may either devour many an evening here, a weekend there, or perhaps has become a full-time commitment. Max Bare from the VOKAL design team falls into the semi-committed category. For this month&#8217;s Lunch &#38;&#8230;]]></description>
			<content:encoded><![CDATA[<p>Everyone has a pet project that may either devour many an evening here, a weekend there, or perhaps has become a full-time commitment. Max Bare from the VOKAL design team falls into the semi-committed category. For this month&#8217;s Lunch &amp; Learn, Max shared with the VOKAL fleet, his topic: Hope to Create Comics. Referencing his personal project <a href="http://www.mysteryafoot.com">Mystery Afoot</a>, Max sited some high level steps in taking an idea to a full fledge comic, or <a href="http://37signals.com/svn/posts/169-scott-mcclouds-understanding-comics">sequential design</a>, project. With concepts like simplifying characters to an iconic &amp; therefore relatable treatment, or storytelling techniques in panel structure, Max hoped to relate a bit of the medium to our mobile design world on an abstract. Also there was pizza.</p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/04/max1.png"><img title="Max Comix" src="http://vokalinteractive.com/wp-content/uploads/2013/04/max1.png" alt="" width="550" height="365" /></a></p>
<p>&nbsp;</p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/04/max2.png"><img title="Max Comix" src="http://vokalinteractive.com/wp-content/uploads/2013/04/max2.png" alt="" width="550" height="365" /></a></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/04/max3.png"><img title="Max Comix" src="http://vokalinteractive.com/wp-content/uploads/2013/04/max3.png" alt="" width="550" height="365" /></a></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/04/max4.png"><img title="Max Comix" src="http://vokalinteractive.com/wp-content/uploads/2013/04/max4.png" alt="" width="550" height="365" /></a></p>
<p>Captive audience.</p>
<p><em>post by: not <a href="http://vokalinteractive.com/team-member/max-bare/">Max Bare</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://vokalinteractive.com/2013/04/03/this-months-lunch-learn-making-comics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vokal Wall Draw Continues&#8230;</title>
		<link>http://vokalinteractive.com/2013/03/29/vokal-wall-draw-continues/</link>
		<comments>http://vokalinteractive.com/2013/03/29/vokal-wall-draw-continues/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 18:27:11 +0000</pubDate>
		<dc:creator>max.bare</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vokalinteractive.com/?p=2162</guid>
		<description><![CDATA[We tend to immerse ourselves in many of our projects here at VOKAL and the offices themselves are certainly no exception. In the continuance of this effort, the VOKAL design team has been taking a periodic evening or weekend to&#8230;]]></description>
			<content:encoded><![CDATA[<p>We tend to immerse ourselves in many of our projects here at VOKAL and the offices themselves are certainly no exception. In the continuance of this effort, the VOKAL design team has been taking a periodic evening or weekend to work on an ever expanding mural. Last night, VOKAL designers <a href="http://vokalinteractive.com/team-member/joe-call/">Joe Call</a> and Max Bare along with Andrew Thompson (VOKAL friend and member of <a href="http://www.ohnodoom.com">OhNo!Doom</a>) took a couple hours to continue the doodling. Currently the wall has grown into a swirling expanse of icons and characters personifying communication, collaboration and most importantly making. We were joined eventually by students of the <a href="http://mobilemakers.co/">Mobile Maker Academy</a> who engaged in a little celebratory partying on campus.</p>
<p>&nbsp;</p>
<p style="text-align: center;"><a href="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13.jpg"><img class="aligncenter" title="VOKAL Wall Draw" src="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13.jpg" alt="" width="425" height="640" /></a></p>
<p style="text-align: center;"><a href="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13_b.jpg"><img class="aligncenter" title="VOKAL Wall Draw" src="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13_b.jpg" alt="" width="425" height="640" /></a></p>
<p style="text-align: center;"><em>VOKAL Custodial Enforcer, Bowser, monitors the grounds.</em></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13_c.jpg"><img title="VOKAL Wall Draw" src="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13_c.jpg" alt="" width="550" height="365" /></a></p>
<p style="text-align: center;"><a href="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13_d.jpg"><img class="aligncenter" title="VOKAL Wall Draw" src="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13_d.jpg" alt="" width="425" height="640" /></a></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13_e.jpg"><img title="VOKAL Wall Draw" src="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13_e.jpg" alt="" width="550" height="365" /></a></p>
<p><span style="color: #808080;"><em>Some Mobile Makers students socializing.</em></span></p>
<p style="text-align: center;"><a href="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13_f.jpg"><img class="aligncenter" title="VOKAL Wall Draw" src="http://vokalinteractive.com/wp-content/uploads/2013/03/Wall_draw_3-29-13_f.jpg" alt="" width="425" height="640" /></a></p>
<p> <em>Mobile Makers Academy Winter &#8217;13 represent! A nod to &#8220;Volley Pong&#8221; which is apparently something of legend.</em></p>
<p><strong>For more info on Mobile Makers Academy or to apply for this coming semester&#8217;s iOS Immersive or iOS Accelerated Programs</strong> check out: <a href="http://mobilemakers.co/">http://mobilemakers.co/</a></p>
<p><em>post by: <a href="http://vokalinteractive.com/team-member/max-bare/">Max Bare</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://vokalinteractive.com/2013/03/29/vokal-wall-draw-continues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mixer for The Mobile Makers Academy End of Semester</title>
		<link>http://vokalinteractive.com/2012/12/18/mixer-for-the-mobile-makers-academy-end-of-semester/</link>
		<comments>http://vokalinteractive.com/2012/12/18/mixer-for-the-mobile-makers-academy-end-of-semester/#comments</comments>
		<pubDate>Tue, 18 Dec 2012 20:26:02 +0000</pubDate>
		<dc:creator>max.bare</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vokalinteractive.com/?p=1922</guid>
		<description><![CDATA[Last week The Mobile Makers Academy celebrated the End of their Fall 2012 Semester with what else but a night filled with pizza, libations and good times. The mixer was hosted at VOKAL&#8217;s shiny new 4th floor expanded offices. Below&#8230;]]></description>
			<content:encoded><![CDATA[<p>Last week <a href="http://mobilemakers.co/"><strong>The Mobile Makers Academy</strong></a> celebrated the End of their Fall 2012 Semester with what else but a night filled with pizza, libations and good times. The mixer was hosted at VOKAL&#8217;s shiny new 4th floor expanded offices. Below are a few highlight pics.</p>
<p><strong>About Mobile Makers Academy: </strong><br />
Interested in learning Mobile App development like a boss?  The Mobile Makers Academy is an Intensive training program teaching iOS development. They offer an <a href="http://mobilemakers.co/ios-accelerated">Accelerated program</a> for developers, and an <a href="http://mobilemakers.co/ios-immersive">Immersive program</a> for beginners. Located here in Chicago Mobile Makers promises an atypical class structure  that simulates the working environment where students learn from the best in the field: instructors Don Bora, Adam Lupu, Brandon Passley and Adam Haun.</p>
<p><strong>For more info or to apply for this coming semester&#8217;s iOS Immersive or iOS Accelerated Programs</strong> check out: <a href="http://mobilemakers.co/">http://mobilemakers.co/<br />
</a></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2012/12/mobilemakersparty2.jpg"><img title="Mobile Makers Mixer intro" src="http://vokalinteractive.com/wp-content/uploads/2012/12/mobilemakersparty2.jpg" alt="" width="550" height="365" /></a></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2012/12/mobilemakersparty1.jpg"><img title="Mobile Makers Mixer" src="http://vokalinteractive.com/wp-content/uploads/2012/12/mobilemakersparty1.jpg" alt="" width="550" height="365" /></a></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2012/12/mobilemakersparty3.jpg"><img title="Mobile Makers Mixer" src="http://vokalinteractive.com/wp-content/uploads/2012/12/mobilemakersparty3.jpg" alt="" width="550" height="365" /></a></p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2012/12/mobilemakersparty4.jpg"><img title="Mobile Makers Mixer 3" src="http://vokalinteractive.com/wp-content/uploads/2012/12/mobilemakersparty4.jpg" alt="" width="550" height="365" /></a></p>
<p><em>Can&#8217;t leave without some Mobile Makers Merch!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://vokalinteractive.com/2012/12/18/mixer-for-the-mobile-makers-academy-end-of-semester/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ping Pong Tourney and Other Feats of Strength</title>
		<link>http://vokalinteractive.com/2012/11/09/ping-pong-tourney-and-other-feats-of-strength/</link>
		<comments>http://vokalinteractive.com/2012/11/09/ping-pong-tourney-and-other-feats-of-strength/#comments</comments>
		<pubDate>Fri, 09 Nov 2012 16:47:53 +0000</pubDate>
		<dc:creator>max.bare</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vokalinteractive.com/?p=1889</guid>
		<description><![CDATA[Last night was the first (of hopefully many) Building-Wide Ping Pong Tourney, this time hosted at VOKAL offices.  Drinks were consumed, folks were mingling and competition was of course furious (and sportsmanly). Below are some epic highlights of epicness. VOKAL&#8217;s&#8230;]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><span style="color: #000000;">Last night was the first (of hopefully many) Building-Wide Ping Pong Tourney, this time hosted at VOKAL offices.  Drinks were consumed, folks were mingling and competition was of course furious (and sportsmanly). Below are some epic highlights of epicness.</span></p>
<p style="text-align: center;"><a href="http://vokalinteractive.com/wp-content/uploads/2012/11/Ping-Pong-1b.jpg"><img class="aligncenter  wp-image-1890" title="Ping Pong 1b" src="http://vokalinteractive.com/wp-content/uploads/2012/11/Ping-Pong-1b.jpg" alt="" width="550" height="365" /></a></p>
<p style="text-align: center;"><em><span style="color: #999999;">VOKAL&#8217;s own Brian Flavin slingin mad serves.</span></em></p>
<p style="text-align: center;"><a href="http://vokalinteractive.com/wp-content/uploads/2012/11/Ping-Pong-1c1.jpg"><img class="aligncenter  wp-image-1895" title="Ping Pong 1c" src="http://vokalinteractive.com/wp-content/uploads/2012/11/Ping-Pong-1c1.jpg" alt="" width="550" height="365" /></a><a href="http://vokalinteractive.com/wp-content/uploads/2012/11/Ping-Pong-1a1.jpg"><img class="aligncenter  wp-image-1896" title="Ping Pong 1a" src="http://vokalinteractive.com/wp-content/uploads/2012/11/Ping-Pong-1a1.jpg" alt="" width="550" height="365" /></a></p>
<p style="text-align: center;"><em>All the while, secret Bomberman Tourneys raged on in the Bomberdome Bunker.  Courtesy of the <a href="https://github.com/scottferg/Fergulator">Fergulator</a>, the Dev team lined up to dethrone Bomberboy Bracken Spencer as champion. Eventually Cory the Combustion Kid reined victorious in a final triumphant battle.</em></p>
<p style="text-align: center;"><a href="http://vokalinteractive.com/wp-content/uploads/2012/11/Ping-Pong-1d_radio_edit.jpg"><img class="aligncenter  wp-image-1897" title="Ping Pong 1d" src="http://vokalinteractive.com/wp-content/uploads/2012/11/Ping-Pong-1d_radio_edit.jpg" alt="" width="550" height="365" /></a></p>
<p style="text-align: center;"><em>Touching moments in the VOKAL family as our own Andy Mack congratulated as Ping Pong master&#8230;. until next time.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://vokalinteractive.com/2012/11/09/ping-pong-tourney-and-other-feats-of-strength/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Halloween!!!</title>
		<link>http://vokalinteractive.com/2012/10/31/happy-halloween/</link>
		<comments>http://vokalinteractive.com/2012/10/31/happy-halloween/#comments</comments>
		<pubDate>Wed, 31 Oct 2012 15:07:47 +0000</pubDate>
		<dc:creator>max.bare</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vokalinteractive.com/?p=1880</guid>
		<description><![CDATA[Happy Halloween from the VOKAL family!!!  Today was &#8220;Dress Up Like Andy (Don&#8217;t Tell Andy) Day&#8221;, Doppelgängers abounds at the VOKAL office this morning, as we paid homage to director of business development, sales guru and all around swell guy,&#8230;]]></description>
			<content:encoded><![CDATA[<p>Happy Halloween from the VOKAL family!!!  Today was &#8220;Dress Up Like Andy (Don&#8217;t Tell Andy) Day&#8221;, Doppelgängers abounds at the VOKAL office this morning, as we paid homage to director of business development, sales guru and all around swell guy, Andy Mack much to his surprise! Peep the call-out for the real McCoy.</p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2012/10/Dress_Like_Andy_10-31-2012_VOKAL.jpg"><img title="VOKAL Expansion 1" src="http://vokalinteractive.com/wp-content/uploads/2012/10/Dress_Like_Andy_10-31-2012_VOKAL.jpg" alt="" width="550" height="365" /></a></p>
<h5><em>Vest days are the best days.</em></h5>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://vokalinteractive.com/2012/10/31/happy-halloween/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New VOKAL Office Under Way!</title>
		<link>http://vokalinteractive.com/2012/10/12/new-vokal-office-under-way/</link>
		<comments>http://vokalinteractive.com/2012/10/12/new-vokal-office-under-way/#comments</comments>
		<pubDate>Fri, 12 Oct 2012 20:33:46 +0000</pubDate>
		<dc:creator>max.bare</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vokalinteractive.com/?p=1840</guid>
		<description><![CDATA[Exciting developments! The expansion of VOKAL Interactive offices is well underway. A day of drywalling going up and overhead lights customized to VOKAL green. Soon we&#8217;ll have another floor for our ever-expanding ranks of designers and engineers. Soon our wonderful&#8230;]]></description>
			<content:encoded><![CDATA[<p>Exciting developments! The expansion of VOKAL Interactive offices is well underway. A day of drywalling going up and overhead lights customized to VOKAL green. Soon we&#8217;ll have another floor for our ever-expanding ranks of designers and engineers.</p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2012/10/Vokal-Expansion-1L.jpg"><img title="VOKAL Expansion 1" src="http://vokalinteractive.com/wp-content/uploads/2012/10/Vokal-Expansion-1L.jpg" alt="" width="550" height="365" /></a><a href="http://vokalinteractive.com/wp-content/uploads/2012/10/Vokal-Expansion-1L.jpg"><img class="alignnone" title="VOKAL Expansion 2" src="http://vokalinteractive.com/wp-content/uploads/2012/10/Vokal-Expansion-21.jpg" alt="" width="550" height="365" /></a><a href="http://vokalinteractive.com/wp-content/uploads/2012/10/Vokal-Expansion-1L.jpg"><img title="VOKAL Expansion 3" src="http://vokalinteractive.com/wp-content/uploads/2012/10/Vokal-Expansion-4.jpg" alt="" width="550" height="365" /></a></p>
<h5><span style="color: #808080;"><em>Soon our wonderful new offices will evolve from this&#8230;</em></span></h5>
<p>&nbsp;</p>
<p><a href="http://vokalinteractive.com/wp-content/uploads/2012/10/Vokal-Expansion-1L.jpg"><img title="VOKAL Business Lounge" src="http://vokalinteractive.com/wp-content/uploads/2012/10/vokal_business_lounge.jpg" alt="" width="550" height="365" /></a></p>
<h5><em>&#8230;to this!</em></h5>
]]></content:encoded>
			<wfw:commentRss>http://vokalinteractive.com/2012/10/12/new-vokal-office-under-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Functional and Asynchronous Programming in iOS</title>
		<link>http://vokalinteractive.com/2012/01/05/functional-and-asynchronous-programming-in-ios/</link>
		<comments>http://vokalinteractive.com/2012/01/05/functional-and-asynchronous-programming-in-ios/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 16:40:23 +0000</pubDate>
		<dc:creator>anthony.alesia</dc:creator>
				<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://vokalinteractive.com/?p=1148</guid>
		<description><![CDATA[“Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data.” &#8212; Wikipedia A couple of months ago I started working on a simple project using node.js and I wanted&#8230;]]></description>
			<content:encoded><![CDATA[<p><em>“Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data.” &#8212; Wikipedia</em></p>
<p>A couple of months ago I started working on a simple project using node.js and I wanted to write a post about the similarities and differences in functional programming between JavaScript and Objective-C. However, while I was writing that post I realized I did not truly understand functional programming. I could write blocks in Objective-C and I could write functions in JavaScript but the theory behind it was lost to me. That being said, I decided to dig deeper to understand not just what the code was accomplishing but why.</p>
<p><strong>Functional Programming</strong></p>
<p>Considering my background as an iOS developer, I’ll start with blocks. “A block is a section of code which is grouped together” <a href="http://en.wikipedia.org/wiki/Block_(programming)"><em>&#8211; Wikipedia</em></a>. In Objective-C, blocks are used to package up code allowing it to be called in any function on any thread. This is made possible using closures, which saves the state of the variables contained within the block for proper execution elsewhere. “Blocks are particular useful as a callback because the block carries both the code to be executed on callback and the data needed during that execution” <a href="http://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Blocks/Blocks.pdf"><em>&#8211; Apple</em></a>. One example of this would be the new way of animating UIView transitions:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">&#91;</span>UIView animateWithDuration<span style="color: #002200;">:</span><span style="color: #2400d9;">0.5</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; animations<span style="color: #002200;">:^</span><span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.view.transform <span style="color: #002200;">=</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CGAffineTransformMakeTranslation<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">132.0</span>, <span style="color: #2400d9;">0.0</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; completion<span style="color: #002200;">:^</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span> finished<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.view.backgoundColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIColor blackColor<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#125;</span><span style="color: #002200;">&#93;</span>;</div></div>
<p>In this method, two blocks are passed in as parameters to execute at specific times. Doing it this way is much cleaner than the previous way of animating:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>performAnimations <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>UIView beginAnimations<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;animation&quot;</span> context<span style="color: #002200;">:</span><span style="color: #a61390;">NULL</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>UIView setAnimationDuration<span style="color: #002200;">:</span><span style="color: #2400d9;">0.5</span><span style="color: #002200;">&#93;</span>;<br />
<br />
&nbsp; &nbsp; self.view.transform <span style="color: #002200;">=</span> CGAffineTransformMakeTranslation<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">132.0</span>, <span style="color: #2400d9;">0.0</span><span style="color: #002200;">&#41;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>UIView commitAnimations<span style="color: #002200;">&#93;</span>;<br />
<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self performSelector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>performCompletion<span style="color: #002200;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; withObject<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; afterDelay<span style="color: #002200;">:</span><span style="color: #2400d9;">0.5</span><span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>performCompletion <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; self.view.backgoundColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIColor blackColor<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span></div></div>
<p>As you can see, it is much cleaner now using blocks as opposed to needing to set two methods and a delay to accomplish the same thing. Apple made it simple to pass the animation method: a function for the animations to perform, and a function for what to change upon completion. Blocks also do quite a bit for asynchronous programming in Objective-C as well, but we’ll get into that later.</p>
<p>Now moving on to functional programming in JavaScript. “JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions.” <a href="http://en.wikipedia.org/wiki/Javascript#Functional"><em>&#8211; Wikipedia</em></a> It is a language used primarily for web development, both server side and client side. The three key functional components that JavaScript makes use of are first-class functions, nested functions, and closures. First-class functions are treated like variables, they can be passed as arguments, altered, and executed elsewhere in the code. Nested functions are defined inside of a function and are able to retain and use variables from the parent function. Closures, much like in Objective-C, saves the data located within a function so that it can be executed elsewhere while containing the current values of the variables.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:400px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> getValue1 <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>callback<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> value1 <span style="color: #339933;">=</span> <span style="color: #CC0000;">20</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; callback<span style="color: #009900;">&#40;</span>value1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">var</span> getValue2 <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>callback<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> value2 <span style="color: #339933;">=</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; callback<span style="color: #009900;">&#40;</span>value2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">var</span> displayTotal <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> total<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; getValue1<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>value1<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; getValue2<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>value2<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">function</span> getTotal<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; total <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>value1 <span style="color: #339933;">+</span> value2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getTotal<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>total<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div></div>
<p>In this example, the displayTotal function makes use of first-class functions and nested functions, and closures. Within that function, it calls getValue1 uses getValue2 as a callback, which in turn uses getTotal as a closure. This string of functions trickles the necessary information down to the final function that simply displays the total in the console. Nested functions play a big role when doing more complicated work where you need to make a comparison between two objects where you need to first pull down the two objects based on a unique id that is sent to the method.</p>
<p>While both Objective-C and JavaScript use closures and functions as callbacks, they are very different in how they do it. Thanks to first-call functions, JavaScript is able to easily pass a function around from function to function as a variable and execute it at any time. Objective-C, on the other hand, can pass a block to a selector and use that as a callback but is unable to pass a block to a block as a variable.</p>
<p><strong>Asynchronous Programming</strong></p>
<p>As of iOS4, blocks were released into the iPhone world opening up a much cleaner and more efficient way of asynchronously programming. Previously, you needed to use both NSThread and NSOperationQueue in order to queue up and run methods in a background thread:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>callSelectorInBackgroundQueue<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">SEL</span><span style="color: #002200;">&#41;</span>selector <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSOperationQueue_Class/"><span style="color: #400080;">NSOperationQueue</span></a> <span style="color: #002200;">*</span>queue <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSOperationQueue_Class/"><span style="color: #400080;">NSOperationQueue</span></a> new<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSInvocationOperation_Class/"><span style="color: #400080;">NSInvocationOperation</span></a> <span style="color: #002200;">*</span>operation <span style="color: #002200;">=</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSInvocationOperation_Class/"><span style="color: #400080;">NSInvocationOperation</span></a> alloc<span style="color: #002200;">&#93;</span> initWithTarget<span style="color: #002200;">:</span>self<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>getObjects<span style="color: #002200;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; object<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>queue addOperation<span style="color: #002200;">:</span>operation<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>operation release<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>queue release<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>getObjects <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSThread_Class/"><span style="color: #400080;">NSThread</span></a> detachNewThreadSelector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>launchExecution<span style="color: #002200;">&#41;</span> toTarget<span style="color: #002200;">:</span>self withObject<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span><br />
<br />
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>getObjectsFromServer <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// make a call to get objects from the server</span><br />
<span style="color: #002200;">&#125;</span></div></div>
<p>So making an asynchronous call in a queue would require allocating memory to three different objects to be accomplished pre-iOS4. With the introduction of Grand Central Dispatch (GCD) alongside of blocks, Apple brought a better way to manage background threads while queueing up operations:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>makeCallInBackgroundForBlock<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">^</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>block <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; dispatch_async<span style="color: #002200;">&#40;</span>dispatch_get_global_queue<span style="color: #002200;">&#40;</span> DISPATCH_QUEUE_PRIORITY_DEFAULT, <span style="color: #2400d9;">0</span><span style="color: #002200;">&#41;</span>, <span style="color: #002200;">^</span><span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; block<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#125;</span><span style="color: #002200;">&#41;</span>;<br />
<span style="color: #002200;">&#125;</span></div></div>
<p>Simply put, it is much cleaner code and requires very few explicit memory allocations. The use of blocks in Objective-C has added to the codes readability and efficiency. It is clear that blocks primarily for closures. Being an object oriented language, there are limits to what functionality Objective-C can implement from a functional language standpoint. That being said,<br />
it takes advantage of what it can and does a good job of making it work for the developer.</p>
]]></content:encoded>
			<wfw:commentRss>http://vokalinteractive.com/2012/01/05/functional-and-asynchronous-programming-in-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
