<?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>Outside the Box()</title>
	<atom:link href="http://www.sporcic.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sporcic.org</link>
	<description>In pursuit of programming bliss through creative curly braces</description>
	<lastBuildDate>Sat, 12 May 2012 14:19:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Missing the Link</title>
		<link>http://www.sporcic.org/2012/05/missing-the-link/</link>
		<comments>http://www.sporcic.org/2012/05/missing-the-link/#comments</comments>
		<pubDate>Sat, 12 May 2012 14:19:38 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[LinkedIn]]></category>

		<guid isPermaLink="false">http://www.sporcic.org/?p=1001</guid>
		<description><![CDATA[One of my favorite magazines for keeping up on the business and entrepreneurial world is Forbes magazine. Between the print edition and Flipbook, there is never a lack of good content to read. One article yesterday caught me attention. The title is Recruiters Say: Avoid LinkedIn At Your Peril. It was about recruiters reinforcing how [...]]]></description>
			<content:encoded><![CDATA[<p>One of my favorite magazines for keeping up on the business and entrepreneurial world is Forbes magazine. Between the print edition and Flipbook, there is never a lack of good content to read. One article yesterday caught me attention.</p>
<p>The title is <a href="http://www.forbes.com/sites/work-in-progress/2012/05/11/recruiters-say-avoid-linkedin-at-your-peril/" target="_blank">Recruiters Say: Avoid LinkedIn At Your Peril</a>. It was about recruiters reinforcing how important a good <a href="http://www.linkedin.com" target="_blank">LinkedIn</a> profile has become for job seekers. I agreed with everything the article said, but they missed an interesting aspect. Job seekers are also using LinkedIn to check out employers and the people who will be interviewing them. </p>
<p>Prior to joining <a href="http://www.credera.com" target="_blank">Credera</a>, while I was resume fishing for interesting jobs, I had an interview with JCPenney. The HR recruiter was extremely sharp, and obviously very passionate about her company, so that passion sparked my interest enough to do a phone screen with the hiring manager. We set a date and she gave me the name of the person I would be interviewing with.</p>
<p>My first stop was LinkedIn, where I searched for the hiring manager. The search came up empty. This was a huge red flag. An IT professional and manager, at at a major corporation, who doesn&#8217;t have a LinkedIn profile, implies that the person is either an idiot or doesn&#8217;t care about their career. When it came time for the interview, the person didn&#8217;t disappoint &#8212; he was a total bonehead who pretty clearly demonstrated how poorly IT is run at JCPenney. I wasn&#8217;t a good match for the job, but this idiot actually made me hate JCPenney.</p>
<p>I could have probably written this guy&#8217;s LinkedIn profile after talking to him for 15 min. &#8220;10+ years at JCPenny. Project manager with zero technical skills or instincts. Promoted through the ranks via a game of political survivor. Always on the lookout for someone new to blame.&#8221; </p>
<p>So LinkedIn is a tool that cuts both ways. In the tech job market, as things heat up, future employees will be using LinkedIn to vette their future prospective employers just as much as recruiters are using it to find future employees. Any company that expects to hire good people needs to ensure their own people put on a good face for the company via LinkedIn, especially the hiring managers. And not having a profile speaks the loudest of all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sporcic.org/2012/05/missing-the-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Limits</title>
		<link>http://www.sporcic.org/2012/04/the-limits/</link>
		<comments>http://www.sporcic.org/2012/04/the-limits/#comments</comments>
		<pubDate>Sat, 21 Apr 2012 13:57:50 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">http://www.sporcic.org/?p=991</guid>
		<description><![CDATA[Erik and I had lunch yesterday with a cool local entrepreneur, Sunny, who has banked his product on Grails. His company also does Grails consulting on the side, so he has several years perspective on using Grails for both his own stuff and for clients. I was interested in talking with Sunny to discuss the [...]]]></description>
			<content:encoded><![CDATA[<p>Erik and I had lunch yesterday with a cool local entrepreneur, Sunny, who has banked his product on Grails. His <a href="http://blusynergy.com" title="BluSynergy" target="_blank">company</a> also does Grails consulting on the side, so he has several years perspective on using Grails for both his own stuff and for clients.</p>
<p>I was interested in talking with Sunny to discuss the limits of Grails and what had been his experience on things to watch out for. My current Grails project is winding down, and I would like to use it more in the future, so it is always interesting to talk with someone further down the path. Here are some of the nuggets of wisdom he gave us about Grails:</p>
<h3>Dynamic Typing</h3>
<p>While Sunny appreciates the dynamic nature of Grails, team size can tip it from a benefit to a liability. With more people on the team, he found he was having to write more tests to compensate for an increase in errors from using dynamic typing. Since the compiler can&#8217;t pick up all the dumb stuff, a lot of a testing was needed to ensure the correct output. Sunny uses a distributed development team, so not all the developers are sitting in the same room sharing knowledge. </p>
<p>My own guess is that the sweat spot for a Grails team is 3-4 developers working on-site together. As soon as you get too many developers, or they are geographically distributed, the increased productivity of Grails starts to get offset by the extra testing required for simple things that wouldn&#8217;t be needed in a statically-typed language. On the plus side, Grails makes it very easy to write tests, but that is still code that needs to be written.</p>
<p>I would imagine this fits in the same sweat spot as Ruby on Rails, so I would be interested to heard from my RoR friends if they see the same issues.</p>
<h3>Hibernate</h3>
<p>While GORM makes things easy, at it&#8217;s roots, it is using Hibernate. That means all the rabbit holes you can go down with Hibernate are just as dangerous in Grails. In Sunny&#8217;s case, he has over 100 domain classes in his product, and managing them becomes a chore. The biggest problem is working with deeply nested object hierarchies and cascading updates.</p>
<p>I&#8217;ve seen this same issue with straight Hibernate, so it&#8217;s not the fault of Grails. One of my prior applications had several eight-to-ten deep persistent object graphs, and it was a total nightmare for doing updates or creating new objects. There was a lot of compensating code around creating the graphs that ended up causing lots of problems when it came time to update an object in the graph. The optimistic locking would get confused and think you were trying to update an outdated version of the master object.</p>
<p>I would apply the same wisdom to Grails as I would to Hibernate: avoid deeply nested domain models.</p>
<h3>Performance</h3>
<p>I haven&#8217;t deployed any Grails applications that handle a high user load, and Sunny&#8217;s application is more batch-oriented. What he saw is that Grails got extremely slow in batch operations, mostly due to how Hibernate handled transactions. </p>
<p>He recommended turning on SQL tracing for your hotspots to really see what is going on, and tune appropriately. In his case, he had what he believed was a simple operation, but it resulted in over 20 SQL operations at the Hibernate layer.</p>
<p>This is a danger zone for ORM in general. I&#8217;ve seen it on about every Hibernate application I&#8217;ve dealt with. Hibernate likes to get chatty, and unless you really pay attention, you can end up with issues that drastically impact your performance under load. If you really care about performance, make sure every SQL operation counts.</p>
<h3>Upgrading</h3>
<p>I haven&#8217;t had to deal with this, but Sunny has worked with applications using about every version of Grails. The big pain is upgrading between Grails versions. Outside the language features that change between versions, plugins are one of the biggest problems. He found that the supported &#8220;core&#8221; plugins tend to play nicely together in upgrades, but he makes use of a lot of third-party plugins. These plugins end up having version conflicts on transitive dependencies that are painful to sort out.</p>
<p>This is another issue that isn&#8217;t specific to Grails, and I&#8217;ve run in to on about every large Java project. Java has a rich community, with a billion open source libraries to solve about any need. Unfortunately, you can too easily go into &#8220;DLL hell&#8221; with your jar files when libraries want to include different versions of the various libraries.</p>
<p>My own preference is to try to stick to the core SDK, be it the JDK, Spring or Grails, and really think hard about what you include. My favorite peeve is including Jakarta Commons just to get a cheap <code>toString()</code> method. You now end up with a frivolous dependency that will end up biting you in the butt later.</p>
<h3>Summary</h3>
<p>Sunny has been really happy with Grails, in spite of the limitations. He&#8217;s looking forward to some of the new Groovy 2.0 features around static typing to eliminate some of the unit testing needs. And it it sounds like Grails is growing. More startups are starting to use it, and it sounds like it is more popular in Europe than here in the states.</p>
<p>Outside the dynamic typing, most the issues he has seen are endemic to any large Java application. Grails still provides a significant productivity boost over any of the other JVM-based options out there. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sporcic.org/2012/04/the-limits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Easy Button</title>
		<link>http://www.sporcic.org/2012/04/the-easy-button/</link>
		<comments>http://www.sporcic.org/2012/04/the-easy-button/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 00:57:47 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[groovy]]></category>

		<guid isPermaLink="false">http://www.sporcic.org/?p=980</guid>
		<description><![CDATA[I&#8217;m about six weeks in to what has turned out to be a medium-sized project, and I&#8217;m hating the thought of my next Java project. Why? Because this project is in Grails and it has been such a joy to work with, it will be downright painful to do a classic Java / Spring MVC [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m about six weeks in to what has turned out to be a medium-sized project, and I&#8217;m hating the thought of my next Java project. Why? Because this project is in <a href="http://grails.org" target="_blank">Grails</a> and it has been such a joy to work with, it will be downright painful to do a classic Java / Spring MVC application again.</p>
<p>This is my third project using Grails. Each project has given me a chance to dig deeper in to the framework. The first project was more as an observer/reviewer and I wasn&#8217;t impressed with the outcome. The second project was me writing the code, and it started to click. Now, on the third project, I&#8217;m really starting to appreciate the framework.</p>
<p>So why does Grails rock? Here&#8217;s a few of the key things I would have a hard time dealing without.</p>
<ol>
<li> GORM makes database access infinitely simpler than any of the Java alternatives out there. It is simple to create new domain classes, and also to map to existing databases.</li>
<li>Validation is dirt simple. I&#8217;m using a few custom flyweight objects for a tricky page, and by adding a simple <code>@Validateable</code> annotation to the class I can make use of a constraints block on my own class. And it ties in with the error messages.</li>
<li>Thanks to the Grails command line, development is super fast. Make changes and they appear immediately. There is no twiddling your fingers waiting on a Maven build script.</li>
<li>The included taglib is actually pretty comprehensive. I still have a fair bit of custom JQuery code, but even it very cleanly ties in to the Grails controllers for AJAX calls. </li>
</ol>
<p>My only pain with Grails has been the same one that has vexed Java developers for a decade: the <code>java.util.Date</code> class. This class remains a steaming pile, even wrapped in Groovy goodness. But the solution to this problem is one plugin away. Every sane Grails developer should be using the Joda Time plugin to handle dates. </p>
<p>So Grails is my new shizzle. I plan on using it at the next hackathon, and hopefully will use it for my next project. Any Java developer that hasn&#8217;t taken a look at Grails 2.0 really needs to give it a glance and see what they&#8217;re missing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sporcic.org/2012/04/the-easy-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Parent&#8217;s Rage</title>
		<link>http://www.sporcic.org/2012/04/a-parents-rage/</link>
		<comments>http://www.sporcic.org/2012/04/a-parents-rage/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 20:59:42 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[PISD]]></category>

		<guid isPermaLink="false">http://www.sporcic.org/?p=965</guid>
		<description><![CDATA[I&#8217;m doing something right now that I never imagined I&#8217;d be doing. I&#8217;m camped out with a dozen other parents in front of Plano ISD Headquarters, waiting for the doors to open tomorrow morning at 7:30am so I can transfer my daughter into a good kindergarden. You see, Plano, in spite of being one of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m doing something right now that I never imagined I&#8217;d be doing. I&#8217;m camped out with a dozen other parents in front of Plano ISD Headquarters, waiting for the doors to open tomorrow morning at 7:30am so I can transfer my daughter into a good kindergarden.</p>
<p>You see, Plano, in spite of being one of the richest cities in the country, has some really bad elementary schools. And my house is about 100 yards on the wrong side of a wrong line. We&#8217;re on the very corner of the district attached to Weatherford Elementary. Here&#8217;s what Weatherford looks like:</p>
<p><img src="http://www.sporcic.org/wp-content/uploads/2012/04/weatherford-overview.jpg" alt="" title="weatherford-overview" width="376" height="199" class="aligncenter size-full wp-image-968" /></p>
<p>Now I&#8217;m sure any family living in Dallas ISD would kill to have a Recognized school for their children, but when you know Plano has so many Exemplary schools that have outstanding education programs, Recognized doesn&#8217;t cut it.</p>
<p>The school right across the street from us is Hightower Elementary:</p>
<p><img src="http://www.sporcic.org/wp-content/uploads/2012/04/hightower-overview1.jpg" alt="" title="hightower-overview" width="494" height="275" class="aligncenter size-full wp-image-970" /></p>
<p>It sits there, taunting us, completely unobtainable. Most the Exemplary schools in Plano are already closed to transfer, so the war for parents is to escape to some of the few remaining Exemplary elementary schools.</p>
<p>The following breakdown shows the challenge Plano ISD is facing:</p>
<h3>Weatherford</h3>
<p><img src="http://www.sporcic.org/wp-content/uploads/2012/04/weatherford-breakdown.jpg" alt="" title="weatherford-breakdown" width="496" height="179" class="aligncenter size-full wp-image-971" /></p>
<h3>Hightower</h3>
<p><img src="http://www.sporcic.org/wp-content/uploads/2012/04/hightower-breakdown.jpg" alt="" title="hightower-breakdown" width="505" height="178" class="aligncenter size-full wp-image-972" /></p>
<p>The troubled Weathford is >50% economically disadvantaged. This is stunning for Plano, Texas. And even at an elementary school level, nearly 50% of the students are &#8220;at-risk&#8221;, meaning there is a high probability the child will drop out of school before completion.</p>
<p>The staff of Weatherford is spending their time encouraging kids from dropping out of school; academics is a hard target to hit. Contrast this with Hightower, where the exemplary rating in so many areas demonstrates their ability to focus on academics instead of the peripheral issues.</p>
<p>So here I sit, one of those crazy parents camping out for the night to try to get my daughter into a good school. Plano is only going to get worse, and this same problem will keep creeping north into Frisco and Allen. </p>
<p>I don&#8217;t know the solution. Every parent wants to do the best for their child, but what happens when the other guy&#8217;s drive to do the best for their child ends up dragging down your child? Dallas&#8217;s solution to this is a vast network of very good private schools. Those with money ensure their children get the best education possible, and those without suffer through with the public schools. </p>
<p>The problem is effectively a two-tier system, with children graduating from public schools in Dallas being woefully underprepared for the future compared to the private school kids. I&#8217;d like to think we could come up with an education system where every child has the opportunity to excel and do their best, but I don&#8217;t know what it is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sporcic.org/2012/04/a-parents-rage/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Small World</title>
		<link>http://www.sporcic.org/2012/04/small-world/</link>
		<comments>http://www.sporcic.org/2012/04/small-world/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 17:50:57 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[dfw]]></category>

		<guid isPermaLink="false">http://www.sporcic.org/?p=960</guid>
		<description><![CDATA[I&#8217;ve been living and working in Plano, Texas, just north of Dallas, for the past 10 years. In spite of Dallas being a pretty large city, the IT world has always felt small. When I meet someone new, the degrees of separation from a common friend is usually only one. As a hiring manager, this [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been living and working in Plano, Texas, just north of Dallas, for the past 10 years. In spite of Dallas being a pretty large city, the IT world has always felt small. When I meet someone new, the degrees of separation from a common friend is usually only one.</p>
<p>As a hiring manager, this was always a big advantage. There was rarely a candidate I couldn&#8217;t get an honest opinion on from a friend I trusted. All the good folks know a lot of other good folks, and there is a great deal of camaraderie among them.</p>
<p>This has always worked out to the advantage of the companies in the area. If they managed to hire a few of the good guys, they could ensure the rest of the IT people they hired were also good. It was a free and easy quality filter.</p>
<p>Now that the local job market has rebounded, this tight network is going to work to the disadvantage of a lot of local companies. With the tight labor market for talented Java developers, the calls and emails that used to be &#8220;tell me about John Doe&#8221; are now &#8220;tell me about Company XYZ&#8221;. </p>
<p>Talented people want to work at companies that don&#8217;t suck, and now that the market is good, they have more choices. I had a recruiter call me today pitching a spot at a company where one of the friends I work with just left. I knew from him the place was a suckfest, and I didn&#8217;t hesitate to tell the recruiter that too. Companies like this, and the one I just left, are going to have a brutal time recruiting and retaining talent based on their word-of-mouth reputation. </p>
<p>Dallas is as small as ever, but after seeing the small world syndrome work to the benefit of a lot of employers, the winds are shifting and a lot of the suck companies in the area are going to have that same syndrome working against them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sporcic.org/2012/04/small-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Opening Up</title>
		<link>http://www.sporcic.org/2012/03/microsoft-opening-up/</link>
		<comments>http://www.sporcic.org/2012/03/microsoft-opening-up/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 11:45:57 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.sporcic.org/?p=953</guid>
		<description><![CDATA[Wow, what a surprising way to start they day! Other than my four-year old getting up at 5:30am, the big surprise was seeing Scott Hanselman&#8217;s blog post on Microsoft taking ASP.NET MVC and Razor open source. They&#8217;re even using the Apache license, so no one-off Microsoft secret-sauce license. And to put a cherry on top, [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, what a surprising way to start they day! Other than my four-year old getting up at 5:30am, the big surprise was seeing Scott Hanselman&#8217;s blog post on Microsoft taking <a href="http://goo.gl/AmE0q" target="_blank">ASP.NET MVC and Razor open source</a>. They&#8217;re even using the Apache license, so no one-off Microsoft secret-sauce license. And to put a cherry on top, they&#8217;re using Git for version control.</p>
<p>While I&#8217;m glad Microsoft is taking these steps, the reality is they don&#8217;t have a choice. I was talking with a couple recruiters in the local area last week. They said .NET was the big language during the Great Recession, but now all the work and openings are for Java. The .NET stuff people are looking for is actually for Sharepoint, so not real .NET. </p>
<p>The .NET ecosystem is losing mindshare and the open sourcing of some key pieces of the stack is a way to try to spark some developer interest. GitHub is the virtual public house for coders today, so Microsoft wants to jump on that bandwagon too. In this case, they&#8217;re supporting Git, but keeping the hosting at Codeplex, so they&#8217;re still trying maintain their alternate universe.</p>
<p>I applaud Microsoft for taking these steps, but I would have been more impressed if they did this two years ago when they were holding a winning hand rather than today where they&#8217;re competing with Adobe in a race to the bottom.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sporcic.org/2012/03/microsoft-opening-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New iPad</title>
		<link>http://www.sporcic.org/2012/03/new-ipad/</link>
		<comments>http://www.sporcic.org/2012/03/new-ipad/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 01:17:02 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[kindle]]></category>

		<guid isPermaLink="false">http://www.sporcic.org/?p=947</guid>
		<description><![CDATA[As the owner of both an original iPad and iPad 2, I was pretty excited about the &#8220;new iPad&#8221;. I wasn&#8217;t willing to stand in line Friday morning, so I waited until Saturday to take a look. I headed down to the flagship Apple store on Knox Henderson and was prepared to be amazed. Much [...]]]></description>
			<content:encoded><![CDATA[<p>As the owner of both an original iPad and iPad 2, I was pretty excited about the &#8220;new iPad&#8221;. I wasn&#8217;t willing to stand in line Friday morning, so I waited until Saturday to take a look.</p>
<p>I headed down to the flagship Apple store on Knox Henderson and was prepared to be amazed. Much to my dismay, I wasn&#8217;t. Yes, the screen is beautiful, and yes, LTE is awesome. But as a happy iPad 2 owner, the device was completely underwhelming. </p>
<p>I still do most my real reading on a Kindle DX, so the iPad 2 is still a device for wasting time. Twitter, Facebook, Flipbook and the rest all look perfectly fine on my iPad 2.</p>
<p>The biggest steal at Apple was the price cut of $100 off an iPad 2. If you don&#8217;t have a tablet today, the device to get is the iPad 2. At the current price, it is a real steal and it is this device which really puts the screws to the Android tablet space.</p>
<p>The device I really want is the one I&#8217;m still waiting for Amazon to build. So dear Mr. Bezos, listen up! I want an updated Kindle DX. Same size, but with a better eInk display, higher contrast, faster page turning, and lose the keyboard and go with a touch sensitive screen. That would be the device to die for. Unfortunately, I think Amazon is too fixated on the Kindle Fire to really build it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sporcic.org/2012/03/new-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Bleeding Edge</title>
		<link>http://www.sporcic.org/2012/03/no-bleeding-edge/</link>
		<comments>http://www.sporcic.org/2012/03/no-bleeding-edge/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 17:12:27 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.sporcic.org/?p=942</guid>
		<description><![CDATA[I was having a conversation with one of my friends this week about an upcoming project. I was looking at using JQuery with KnockoutJS to solve a problem on one of the particularly dynamic pages, but his inclination was to stick with server-side MVC and just use some JQuery to take care of the dynamic [...]]]></description>
			<content:encoded><![CDATA[<p>I was having a conversation with one of my friends this week about an upcoming project. I was looking at using JQuery with KnockoutJS to solve a problem on one of the particularly dynamic pages, but his inclination was to stick with server-side MVC and just use some JQuery to take care of the dynamic part. Since he&#8217;s not a big javascript person, he felt KnockoutJS was too bleeding edge.</p>
<p>This was especially ironic, given in the recent past our roles were swapped and I was the guy tempering his enthusiasm with a conservative eye. The whole conversation though got me thinking about what does &#8220;bleeding edge&#8221; really mean? </p>
<p>I&#8217;m pretty comfortable in both Java and javascript. I like hacking with NodeJS and Express, with JQuery Mobile or Sencha Touch on the front end. I started with ExtJS almost four years ago, so I&#8217;ve embraced client-side MVC as a tool for web development. </p>
<p>Programming languages are tools for solving problems. I&#8217;m a fan of hand tools for woodworking, so I think the tool that best represents a programming language is the wood chisel. A good wood chisel is a beautiful tool. It is able to efficiently carve a block of wood to your vision, similar to how a programming language carves code to meet your technical vision. </p>
<p>Chisels are sharp &#8212; scary sharp. An expertly-sharpened chisel makes your typical razor look like a table knife in comparison. Incorrectly using a chisel can result in a nasty cut, in the best case, or a trip to  the ER, in the worst case. But that&#8217;s the nature of the tool. You need to practice with it a lot to ensure you don&#8217;t hurt yourself, let alone get good results.</p>
<p>Programming languages are very similar. Someone inexperienced with a language can end up in the virtual ER of missed deadlines, cancelled projects and unhappy customers. But a master of the language can produce beautiful, maintainable solutions which solve peoples&#8217; problems.</p>
<p>So is the chisel a bleeding edge tool because of the damage it can do? Obviously not. Woodworkers have been using chisels for a millenium. It is the inexperience of the practitioner that can make it, quite literally, bleeding edge.</p>
<p>Programming languages are the same. Putting me on a Python project could end up causing a lot of project bleeding, given I&#8217;ve never written a line of Python before. But it doesn&#8217;t mean Python is a bleeding edge technology.</p>
<p>There are no bleeding edge technologies &#8212; there are simply people uncomfortable with new tools. Usually, someone calls a language or framework &#8220;bleeding edge&#8221; when they don&#8217;t know enough about it to be productive. It&#8217;s like picking up a chisel for the first time. That mirror-sharp edge  makes it pretty clear you can seriously hurt yourself with it. The master, though, doesn&#8217;t look at the chisel as a way to hurt themselves. They see the chisel as a tool in their box for solving problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sporcic.org/2012/03/no-bleeding-edge/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting Touch-y</title>
		<link>http://www.sporcic.org/2012/02/getting-touch-y/</link>
		<comments>http://www.sporcic.org/2012/02/getting-touch-y/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 03:17:06 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[sencha]]></category>
		<category><![CDATA[senchatouch]]></category>

		<guid isPermaLink="false">http://www.sporcic.org/?p=927</guid>
		<description><![CDATA[At the recent hackathon, I decided to use JQuery Mobile for my application instead of Sencha Touch. I hadn&#8217;t played with Sencha Touch for a while, and it isn&#8217;t a &#8220;casual user&#8221; friendly framework, so I was able to be productive on short notice with JQuery Mobile. Now that Sencha Touch 2 has reached Release [...]]]></description>
			<content:encoded><![CDATA[<p>At the recent hackathon, I decided to use <a href="http://jquerymobile.com/" title="JQuery Mobile" target="_blank">JQuery Mobile</a> for my application instead of <a href="http://www.sencha.com/products/touch/" title="Sencha Touch" target="_blank">Sencha Touch</a>. I hadn&#8217;t played with Sencha Touch for a while, and it isn&#8217;t a &#8220;casual user&#8221; friendly framework, so I was able to be productive on short notice with JQuery Mobile.</p>
<p>Now that Sencha Touch 2 has reached Release Candidate status, I decided to give it a try for another small side project I&#8217;ve wanted to do. I kept the backend the same, using NodeJS and Express, but took the time to dive in and learn Sencha Touch 2 at least enough to be productive.</p>
<p>First off, Sencha Touch 2 has really improved in the documentation area. The docs include a lot more examples, and I found the Jog with Friends sample to be the most useful. The API documentation is also much improved. Each of the classes contains sample code so you can quickly see how to use the features.</p>
<p>On the downside, the documentation isn&#8217;t 100% consist on how applications are created. For example, the Ext.Map sample uses the trimmed-down Ext.setup() versus the preferred Ext.application() syntax.  </p>
<p>One of the best resources for learning the framework is the <a href="https://github.com/senchalearn" title="Sencha Learn" target="_blank">SenchaLearn</a> Github repository. This has a lot of tutorial and sample applications. <a href="https://github.com/nelstrom" title="Drew Neil Github" target="_blank">Drew Neil</a> also has an excellent collection of sample applications on his repository. His <a href="https://github.com/nelstrom/Sencha-Touch-Boilerplate" title="Sencha-Touch-Boilerplate" target="_blank">Sencha-Touch-Boilerplate</a> project gives you a great starting point for an application, making development a lot easier. I used this boilerplate for my application and it works great.</p>
<p>The biggest mental hurdle with Sencha Touch 2 was getting my head around how the MVC components interact. It all came together for me when the notion of <code>refs</code> and <code>controls</code> clicked. In a typical Java / Spring Framework application, URLs are mapped to a controller, which then determines the view to render. In a simple Sencha Touch 2 application, that doesn&#8217;t have to be the case, and that is what kept throwing me off.</p>
<p>In a Sencha Touch 2 application, you can specify routes that map URLs to controller actions, but that isn&#8217;t necessary in a small application. Instead, you load the Viewport with a view, and the controllers are event listeners around the actions in a view.</p>
<p>For example, here&#8217;s my app.js file:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">Ext.<span style="color: #660066;">application</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'Javamug'</span><span style="color: #339933;">,</span>
&nbsp;
    controllers<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'Main'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    views<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'Main'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
&nbsp;
    launch<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>
        Ext.<span style="color: #660066;">Viewport</span>.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
            xclass<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Javamug.view.Main'</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I&#8217;m loading up the Viewport with a specific view and that&#8217;s it. In this case, my Main view is  TabPanel, and it loads up a bunch of tabs. Sencha Touch takes care of rendering the correct view when you click an icon on the tab, which is a nice time saver.</p>
<p>Here&#8217;s what the first page looks like:</p>
<p><img src="http://www.sporcic.org/wp-content/uploads/2012/02/iOS-Simulator-Screen-shot-Feb-28-2012-8.12.13-PM.png" alt="" title="Main Page" width="320" height="480" class="aligncenter size-full wp-image-938" />></p>
<p>In one of my views, I have two buttons which are defined like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>xtype<span style="color: #339933;">:</span> <span style="color: #3366CC;">'button'</span><span style="color: #339933;">,</span> ui<span style="color: #339933;">:</span> <span style="color: #3366CC;">'green-round'</span><span style="color: #339933;">,</span> text<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Yes'</span><span style="color: #339933;">,</span> id<span style="color: #339933;">:</span> <span style="color: #3366CC;">'attendButton'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span>xtype<span style="color: #339933;">:</span> <span style="color: #3366CC;">'button'</span><span style="color: #339933;">,</span> ui<span style="color: #339933;">:</span> <span style="color: #3366CC;">'red-round'</span><span style="color: #339933;">,</span> text<span style="color: #339933;">:</span> <span style="color: #3366CC;">'No'</span><span style="color: #339933;">,</span> id<span style="color: #339933;">:</span> <span style="color: #3366CC;">'declineButton'</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>Note I added an id attribute to them. This is what makes controllers easy to use. In my Controller, I define the refs and control properties to capture the events from these buttons and call some methods when they are tapped:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">config<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
    refs<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        attendButton<span style="color: #339933;">:</span> <span style="color: #3366CC;">'#attendButton'</span><span style="color: #339933;">,</span>
        declineButton<span style="color: #339933;">:</span> <span style="color: #3366CC;">'#declineButton'</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    control<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #3366CC;">'#attendButton'</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
            tap<span style="color: #339933;">:</span> <span style="color: #3366CC;">'attendMeeting'</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">'#declineButton'</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
            tap<span style="color: #339933;">:</span> <span style="color: #3366CC;">'declineMeeting'</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The <code>refs</code> section is create some getters for my two buttons. Since I put an ID on the components, I can use that to map them to the friendly names in my controllers. The result is that inside the controller, I can call <code>getAttendButton()</code> and <code>getDeclineButton()</code> from my code to get access to the button directly without having to navigate some contorted hierarchy.</p>
<p>The <code>control</code> section works in a similar way. I&#8217;m using the ID of the components, which get mapped back to the components via the ComponentQuery class at runtime. Inside the braces for each button, I&#8217;m defining an event listener for the button&#8217;s tap event. In this case, tapping the button with ID of <code>attendButton</code> will call the <code>attendMeeting()</code> method in the controller.</p>
<p>Once I quit trying to forcibly shoehorn the controllers into the process, similar to how I would do in Java, and just let them be event handlers, life got easy. I&#8217;m still learning the ropes, and I know it is possible to specify URL routes inside the controllers, but I didn&#8217;t have a need to do that in my simple application.</p>
<p>The next hurdle was with the <code>Ext.Map</code> component. I wanted a tab which showed the location of our meeting in a Google Map. I beat myself over the head for a whole evening trying get this to work right. It was complicated by the examples not being consistent. The Jog with Friends, Kitchen Sink and Map Demo samples each do things differently. Complexity was compounded by the fact there is a <a href="http://www.sencha.com/forum/showthread.php?182767-RC1-Problem-with-Map-in-TabPanel&#038;p=740738&#038;viewfull=1" title="The Bug" target="_blank">bug with the Release Candidate</a> with rendering maps on TabPanels. </p>
<p>In the end, I finally got it to work by creating the map in the <code>initialize()</code> method of the view and adding it to the Container manually. The code looks like this (after dealing with the bug):</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">Ext.<span style="color: #660066;">define</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Javamug.view.Map'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
    extend<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Ext.Container'</span><span style="color: #339933;">,</span>
    xtype<span style="color: #339933;">:</span> <span style="color: #3366CC;">'mapcard'</span><span style="color: #339933;">,</span>
&nbsp;
    requires<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
    	<span style="color: #3366CC;">'Ext.Map'</span>
    <span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
&nbsp;
    config<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        iconCls<span style="color: #339933;">:</span> <span style="color: #3366CC;">'locate'</span><span style="color: #339933;">,</span>
        title<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Location'</span><span style="color: #339933;">,</span>
        layout<span style="color: #339933;">:</span> <span style="color: #3366CC;">'fit'</span><span style="color: #339933;">,</span>
&nbsp;
        items<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
            <span style="color: #009900;">&#123;</span>
                ui<span style="color: #339933;">:</span> <span style="color: #3366CC;">'light'</span><span style="color: #339933;">,</span>
                docked<span style="color: #339933;">:</span> <span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span>
                xtype<span style="color: #339933;">:</span> <span style="color: #3366CC;">'toolbar'</span><span style="color: #339933;">,</span>
                title<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Location'</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#93;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
    initialize<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>
&nbsp;
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">callParent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> position <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">LatLng</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">32.9770421</span><span style="color: #339933;">,</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">96.8270373</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> infowindow <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">InfoWindow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                content<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Improving Enterprises&lt;br/&gt;Addison, TX 75001'</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> map <span style="color: #339933;">=</span> Ext.<span style="color: #660066;">create</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Ext.Map'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span>
            mapOptions <span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                zoom <span style="color: #339933;">:</span> <span style="color: #CC0000;">14</span><span style="color: #339933;">,</span>
                mapTypeId <span style="color: #339933;">:</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">MapTypeId</span>.<span style="color: #660066;">ROADMAP</span><span style="color: #339933;">,</span>
                navigationControl<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
                navigationControlOptions<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                    style<span style="color: #339933;">:</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">NavigationControlStyle</span>.<span style="color: #003366; font-weight: bold;">DEFAULT</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
            listeners<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
                maprender<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>comp<span style="color: #339933;">,</span> map<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                    <span style="color: #003366; font-weight: bold;">var</span> marker <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">Marker</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                        position<span style="color: #339933;">:</span> position<span style="color: #339933;">,</span>
                        title <span style="color: #339933;">:</span> <span style="color: #3366CC;">'Improving Enterprises'</span><span style="color: #339933;">,</span>
                        map<span style="color: #339933;">:</span> map
                    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    google.<span style="color: #660066;">maps</span>.<span style="color: #660066;">event</span>.<span style="color: #660066;">addListener</span><span style="color: #009900;">&#40;</span>marker<span style="color: #339933;">,</span> <span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        infowindow.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span>map<span style="color: #339933;">,</span> marker<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        map.<span style="color: #660066;">setMapCenter</span><span style="color: #009900;">&#40;</span>position<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>map<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The <code>mapConfig</code> section was a major pain too. Normally, you can specify a <code>center</code> property which contains the LatLong of where you want to center the map. Except it doesn&#8217;t work. My desired center kept popping up just out of view in the top left corner. I finally removed the property from the config and just manually called the <code>setMapCenter()</code> method of the Ext.Map component and that worked.</p>
<p>One thing I don&#8217;t like about Sencha Touch is how it handles pages which are mostly HTML text. Stuffing a bunch of HTML markup into the <code>html</code> config element isn&#8217;t an elegant solution. Fortunately, the Oreilly demo app has a good way of solving this. They create a new panel which takes a URL in the config and uses the <code>initialize()</code> method to load the content for the URL. The code looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">Ext.<span style="color: #660066;">define</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Javamug.view.Meeting'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
    extend<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Ext.Container'</span><span style="color: #339933;">,</span>
    requires<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'Ext.Ajax'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
&nbsp;
    config<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        iconCls<span style="color: #339933;">:</span> <span style="color: #3366CC;">'calendar2'</span><span style="color: #339933;">,</span>
        title<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Meeting'</span><span style="color: #339933;">,</span>
        styleHtmlContent<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
        scrollable<span style="color: #339933;">:</span> <span style="color: #3366CC;">'vertical'</span><span style="color: #339933;">,</span>
        url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'current.html'</span><span style="color: #339933;">,</span>
        items<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span>
            ui<span style="color: #339933;">:</span> <span style="color: #3366CC;">'light'</span><span style="color: #339933;">,</span>
            docked<span style="color: #339933;">:</span> <span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span>
            xtype<span style="color: #339933;">:</span> <span style="color: #3366CC;">'toolbar'</span><span style="color: #339933;">,</span>
            title<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Java MUG'</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
    initialize<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>
&nbsp;
         Ext.<span style="color: #660066;">Ajax</span>.<span style="color: #660066;">request</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
            url<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">config</span>.<span style="color: #660066;">url</span><span style="color: #339933;">,</span>
            success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>rs<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">setHtml</span><span style="color: #009900;">&#40;</span>rs.<span style="color: #660066;">responseText</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
            scope<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">this</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Using this technique, I could use a Jade template in Express to create the &#8220;static&#8221; content rather than pack it all into the JavaScript view file.</p>
<p>Outside the complexity, there are two downsides to using Sencha Touch. First is theming. This <a href="http://www.sencha.com/blog/an-introduction-to-theming-sencha-touch" title="Theming" target="_blank">blog post</a> provided the most help in figuring out how theming works. Using the Bootstrap template above also make life a lot easier because it starts with the app.scss and config.rb in the right place and includes instructions in the README.md file on how to compile them.</p>
<p>The second downside is size: Sencha Touch is not a light-weight framework. My CSS, combined app-all.js and framework files came in around 700K for a simple application. I could trim things down by eliminating some of the includes on the theme, but that is still pretty large. By comparison, in my JQuery Mobile application, the framework files came in around 250K in size. </p>
<p>The tradeoff for the larger size is being able to use a sophisticated client-side MVC framework with great looking, and performing, components. </p>
<p>Sencha Touch 2 is a big win for me. I want to work on the file size, but now that I have a feel for the framework, I&#8217;m expecting my learning to pick up. I&#8217;ll hopefully get a chance to give a whirl on a larger application soon. </p>
<p>The <a href="http://www.sencha.com/" title="Sencha" target="_blank">Sencha</a> guys have really knocked it out of the park with Sencha Touch 2. It is, without a doubt, the most sophisticated and polished mobile JavaScript framework out there right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sporcic.org/2012/02/getting-touch-y/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Lessons from a Hackathon</title>
		<link>http://www.sporcic.org/2012/02/lessons-from-a-hackathon/</link>
		<comments>http://www.sporcic.org/2012/02/lessons-from-a-hackathon/#comments</comments>
		<pubDate>Sun, 19 Feb 2012 17:28:50 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[hackathon]]></category>

		<guid isPermaLink="false">http://www.sporcic.org/?p=913</guid>
		<description><![CDATA[I attended my second Mobile Hackathon at the AT&#038;T Foundry in Plano this weekend. I went to the first one a few months back and it wasn&#8217;t very exciting. Most the folks weren&#8217;t really coders, and I didn&#8217;t have any specific ideas, so I only sat in on the first day. I enjoy the hackathon [...]]]></description>
			<content:encoded><![CDATA[<p>I attended my second Mobile Hackathon at the <a href="http://www.facebook.com/gravitycentredallas" title="Gravity Center" target="_blank">AT&#038;T Foundry</a> in Plano this weekend. I went to the first one a few months back and it wasn&#8217;t very exciting. Most the folks weren&#8217;t really coders, and I didn&#8217;t have any specific ideas, so I only sat in on the first day.</p>
<p>I enjoy the hackathon concept for the chance to meet new people, and also to stay geeky. It&#8217;s fun to see what you can produce in a weekend with some dedicated focus. The hackathons at the AT&#038;T Foundry are more &#8220;bush league&#8221;, being nothing like a <a href="http://bemyapp.com" title="BeMyApp" target="_blank">BeMyApp</a> competition, but it&#8217;s still a lot of fun.</p>
<p>For the hackathon this weekend, I decided to jump in and write some code. I was hoping someone pitched something I could latch on to, but that was not the case. And based on my pre-pitch reconnaissance, I was the only person playing in the mobile web space. So I decided to go the army-of-one route and work on a small idea I had. It was basically around mobile enabling the change management approval process for enterprises. The intent wasn&#8217;t to make a million dollars; it was just to give me a context to really get in to some of the technologies I wanted to play with.</p>
<p>Here&#8217;s what my simple landing page looked like:</p>
<p><img src="http://www.sporcic.org/wp-content/uploads/2012/02/iOS-Simulator-Screen-shot-Feb-19-2012-11.18.44-AM.png" alt="" title="Pocket Change" width="320" height="480" class="aligncenter size-full wp-image-916" /></p>
<p>Since I was starting green field, I had to make some technology choices. For the web layer, it came down to <a href="http://www.sencha.com/products/touch/" title="Sencha Touch" target="_blank">Sencha Touch</a> or <a href="http://jquerymobile.com" title="JQuery Mobile" target="_blank">JQuery Mobile</a>. I haven&#8217;t written any production quality code with either, so the challenge was getting up to speed quickly and being productive.</p>
<p>Sencha Touch is extremely sophisticated, but it is also much more complex. If you&#8217;re willing to invest your soul into it, it can pay great dividends.  Since I was going to be hopping through all the layers, I didn&#8217;t want to have to do the major mental context switching it required. </p>
<p>JQuery Mobile is a bit cruder, but it follows the web paradigms. You still play with pages, using HTML tags, and the framework deals with the rendering on the mobile device. For how short a time I had, it was a much easier framework to work with and get my head around.</p>
<p>Another big advantage to JQuery Mobile is the excellent theming support via <a href="http://jquerymobile.com/themeroller" title="ThemeRoller" target="_blank">ThemeRoller</a>. I needed some different colored elements for my application and was able to quickly generate them via ThemeRoller.</p>
<p>For the backend, I was planning to go with <a href="http://grails.org" title="Grails" target="_blank">Grails</a>, but since I didn&#8217;t really need 90% of the framework, I opted to go with <a href="http://nodejs.org" title="NodeJS" target="_blank">NodeJS</a> and <a href="http://expressjs.com" title="Express" target="_blank">Express</a>. </p>
<p>Like the web tier above, I have never written production NodeJS code either, so this was really a test on how quickly I could embrace it and get productive with it. I&#8217;m happy to say not only was it extremely productive, but I had a blast doing it. The NodeJS/Express combo makes for a blistering fast dev cycle, and I even liked the Jade templates. This will be my go-to combo for future hackathons.</p>
<p>For the storage layer, I wanted to go with MongoDB, but after about 15 minutes I realized the storage didn&#8217;t matter for my pitch, so I cheated and went with simple JSON objects on the server side for my data structures. The ease of using JSON structures server-side is one of the other big advantages of NodeJS.</p>
<p>I completed my simple app and a basic Keynote presentation in time for the pitches. I have no delusions of grandeur in the complexity of my app. It was about playing with some new technology, not making the next Facebook. But I still managed to win 4th place out of around 14 teams, so I was pretty happy.</p>
<p>A couple observations on the hackathon in general:</p>
<ol>
<li>The AT&#038;T Foundry rocks. I may despise AT&#038;T Wireless for their absolute shitty network, but they killed it on creating a great environment for startups and these sort of events.</li>
<li>The majority of the teams were working on native Androids apps. There wasn&#8217;t a single iOS project. I found this really strange, and not indicative of the current market. I&#8217;m suspecting it is because Android breeds more of a hacker mentality with its open source nature, but I don&#8217;t see the market to justify the investment.</li>
<li>There were also a lot more Windows Mobile developers than I expected. I actually expected zero. It might have helped that Microsoft was tossing in some of the prizes and had experts on hand to help. The hackathon winner was a Windows Mobile application. There might be some traction behind Windows Mobile, but Microsoft is so late to the game it will be hard for them to make a dent in iOS. The only advantage to Windows Mobile is it allows mediocre enterprise .NET developers to easily produce mediocre mobile applications. </li>
<li>There weren&#8217;t any other mobile web developers. This floored me. I still see the future is device-independent, mobile web development with JavaScript and I expected others to be playing in that space. I&#8217;ll still keep blazing down this trail.</li>
</ol>
<p>AT&#038;T is planning on holding Mobile Hackathons quarterly at the AT&#038;T Foundry, so I&#8217;ll definitely be doing this again. And next time, I plan on getting much more complicated on the code side.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sporcic.org/2012/02/lessons-from-a-hackathon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

