<?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>Programming &#8211; Software, Fitness, and Gaming &#8211; Jesse Warden</title>
	<atom:link href="https://jessewarden.com/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>https://jessewarden.com</link>
	<description>Software &#124; Fitness &#124; Gaming</description>
	<lastBuildDate>Wed, 29 Jun 2016 01:54:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://jessewarden.com/wp-content/uploads/2016/08/cropped-Lambda2-32x32.png</url>
	<title>Programming &#8211; Software, Fitness, and Gaming &#8211; Jesse Warden</title>
	<link>https://jessewarden.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Breaking the $100 Per Hour Barrier</title>
		<link>https://jessewarden.com/2013/09/breaking-the-100-per-hour-barrier.html</link>
					<comments>https://jessewarden.com/2013/09/breaking-the-100-per-hour-barrier.html#comments</comments>
		
		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Sun, 15 Sep 2013 15:01:29 +0000</pubDate>
				<category><![CDATA[Branding]]></category>
		<category><![CDATA[Business Process]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[1099]]></category>
		<category><![CDATA[consulting]]></category>
		<category><![CDATA[corptocorp]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[freelance]]></category>
		<category><![CDATA[money]]></category>
		<category><![CDATA[personalbranding]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[proposition]]></category>
		<category><![CDATA[rate]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[value]]></category>
		<category><![CDATA[w2]]></category>
		<category><![CDATA[w9]]></category>
		<guid isPermaLink="false">http://jessewarden.com/?p=4382</guid>

					<description><![CDATA[I get this question at least once a year so thought I would write a blog post on it to help others. &#8220;How do I make more than $100 per hour?&#8221;. I&#8217;ve learned a few ways and wanted to share them below. If you want to save time, simply do something other than programming such [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I get this question at least once a year so thought I would write a blog post on it to help others. &#8220;How do I make more than $100 per hour?&#8221;. I&#8217;ve learned a few ways and wanted to share them below. If you want to save time, simply do something other than programming such as flipping houses, investment banking, or being the boss of a mid size company. They make way more money than we do. If you still love programming, but just want to know your options for making more money, read on.</p>
<p>I won&#8217;t cover whether money can buy you happiness or not. All I&#8217;ll say is that for some people it does, and others it does not.</p>
<p>Many of the financial and tax nomenclature below applies to the USA, but the types of work are the same regardless of country.</p>
<p><span id="more-4382"></span><strong>Introduction</strong></p>
<p>Early on my consulting career, I found the maximum amount of money I could charge per hour was $100/hr. I had just assumed it was a simple linear graph: the more time that goes, the more experienced &amp; marketable I get, thus the more money I can make per hour. This wasn&#8217;t the main metric I used to measure my success, but it&#8217;s certainly how a lot of people, at least in America, do. &#8220;How much money do you make?&#8221;</p>
<p>As time went on, and I actually did get more experienced, I learned it&#8217;s not a linear line. A variety of things can happen, or not, to affect it&#8217;s elevation. Examples include not working for a couple months, whether intentionally or not. There are a variety of stages you can possibly go through, at least in software development, and I&#8217;m still learning all the possible vs. desirable ones.</p>
<p>The basics are starting out in an internship or job, then breaking away to do freelance, and finally starting a company.</p>
<p>Below are the 3 things that don&#8217;t work.</p>
<p><strong>W2 &#8211; Salaried Employee</strong></p>
<p>Salaried employees are those who work for a company, called a &#8220;job&#8221;, and that company takes out your State and Federal taxes for you. They pay a salary, a flat amount of money per 1 days worth of work, whether you actually work 1 hour or 12 doesn&#8217;t matter. They also offer &#8220;compensation packages&#8221; such as 401k matching, 20 or more vacation days, and 5 or more sick days. People put their own arbitrary dollar amounts on these which helps companies offset their lowered salaries.</p>
<p>The problem with W2 is that you eventually max out. I&#8217;ve yet to see a salaried programmer make more than $175,000, although most are $120,000. That&#8217;s gross, not net. That&#8217;s still only about $90 an hour if you take out vacation days and holidays. You&#8217;re replaceable, and there is only so much code you can produce in a given time on your own. Although there are <a href="http://www.dungeonsanddevelopers.com/">skill trees for development</a>, getting better doesn&#8217;t lead to making more money. You basically have to go into management, leadership, or sales to sometimes fully utilize all those software skills you know. There are SOME options for hybrid roles such as Enterprise Architects, people who dictate how to build things but don&#8217;t actually build the things. Sales Engineers are another. You travel with a Sales person and get their back when the clients ask highly technical questions. Sometimes you get to code, but they&#8217;re often just simple prototypes, not real projects.</p>
<p>Finally, W2 is perceived as a form of &#8220;stability&#8221;; something long term, something earned and deserved. Unfortunately, that&#8217;s how things were back in the 1940&#8217;s, not anymore. Regardless, the prophecy is self-fulfilling for some people, so they believe it to be true, and thus it is true even if it&#8217;s not.</p>
<p>Unless you actually want to get out of programming, W2 isn&#8217;t an option.</p>
<p><strong>1099 &#8211; Freelance</strong></p>
<p>Freelancers usually charge by the hour or project (obviously they like the former). They are synonymous with contractors: someone who works for the company but is their own business. Your own business can just be 1 person: you. You are ultimately responsible for all of your finances and taxes, thus you file a form for the IRS called a 1099. The common rule is when you get a paycheck, you immediately take 33%, round up, and shove into savings so you can pay once a month, 4 times a year, or once if you&#8217;re a slacker the taxes you owe the State you live in and the IRS. None of that includes your operating expenses like buying your own computer, contributing to your retirement, and paying your own medical insurance.</p>
<p>The key here, though, is you can pay those first, THEN get taxed on what you have left over using &#8220;pre-tax&#8221; money whereas in W2, you&#8217;re taxed twice: first on your paycheck and then whatever you buy with it, the IRS still assumes you made X per year. For example, lets say you make $100,000 per year. You then buy $50,000 worth of hardware, software, and office space. You then only owe $16,500 in taxes vs. $33,000 like you would as a W2. This desire to spend your pre-tax money, whether on stuff, services, or even contributing to retirement accounts like SEP IRA&#8217;s is yet another to balance in your time that has nothing to do with programming. W2&#8217;s don&#8217;t have to worry about any of this crap.</p>
<p>This amount of work is not to be understated. This is how many companies go out of business. It&#8217;s also a lot of work for 1 person to handle just 1 persons business finances, let alone all the time spent hustling to get clients. More importantly, though, companies bear this &#8220;burden&#8221; when hiring W2&#8217;s. This is why a lot more companies are going the 1099 route or hiring contractors for set projects, not providing benefits, nor the &#8220;free&#8221; tax services like <a href="http://www.bbc.co.uk/news/uk-24017011">Amazon and others are doing in the UK</a>Â and in the states.</p>
<p>There are a variety of reasons programmers go freelance. There is no growth potential at their W2 job. They don&#8217;t like the clients they&#8217;re working with and want to choose their own. They have short attention spans and want smaller projects. They hate the large code base they&#8217;re working on that&#8217;s messed up and they didn&#8217;t create, and want the opportunity to create their own. They want to utilize a completely different technology stack and there is no opportunity to do so at their current job.</p>
<p>Whatever the reason, the POTENTIAL exists for making more money than W2. Sometimes, you&#8217;ll make less. The reasons for those are also numerous. While you may get many high paying gigs, you may actually have many weeks or months with no work. While W2 has a steady paycheck, 1099 does not. Additionally, there is a cost of doing business that you now incur. Time spent on the phone, writing emails, going to meetings and conferences, writing books, blog entries, curating relationships with your content and others on social media; all of that takes a lot of time that no one is paying you for. Some of that could lead to getting a client to hire you to build something. Sometimes that client just wants free consulting, or is asking you and 9 other contractors to bid on a project and they just want you to do the quote for them with zero intention of actually hiring you.</p>
<p>The reasons are vast. The theory, though, is that you&#8217;re using a technology with either a local market (where you live) that has a need for your skills, a remote market (meaning you telecommute with clients you&#8217;ll never meet face to face), or both. Sometimes you&#8217;ll get many concurrent projects. While one project has slow communication and is long term, and other is more clear, and shorter. While you&#8217;d prefer to have both side by side, the companies hiring you, and their clients, usually dictate the schedule, and they don&#8217;t care that you haven&#8217;t had any work all June and July, and now 3 companies want to start work immediately in August all at the same time. Sometimes that can work; other times it can sacrifice your code quality so you can only get one.</p>
<p>Bottom line, this is where most programmers get stuck. If they do manage to break the $100/hr barrier, it&#8217;s because they got a fixed bid contract and just did it in a shorter time. Meaning you produce the work for this amount of money, no more. If you work 4 hours or 40, you still get paid the lump sum. So, if you can do 40 hours worth of work for less than 40, then great, you just made more than $100/hr. Sadly, this is just 1 week out of the year. It also doesn&#8217;t factor in the cost of doing business to actually get that contract signed.</p>
<p>1099 is a mindset. You either like the freedom, the &#8220;harder I work, the more I get paid&#8221;, or just the lifestyle of having your clients&#8230; even if those clients are just like a W2, only with none of the benefits. Worse, many large companies cannot do work directly with 1099&#8217;s, and want to do W9. While that&#8217;s fine, it&#8217;s usually assumed those W9&#8217;s are a preferred vendor, or have workman&#8217;s comp and a lot of other bs that isn&#8217;t needed and doesn&#8217;t matter. If you get the W9, great, but if you&#8217;re not a preferred vendor and you haven&#8217;t convinced the company to go through the process, you&#8217;ll simply have some company you&#8217;ve never heard of take $10 to $30 an hour off your paycheck. Horrible.</p>
<p>Independent Contractor programmers, someone who owns a company strictly as a tax shelter and is a single person, aren&#8217;t usually paid more than $100/hr outside of California, New York, or Boston. So 1099 is usually a no go (exceptions below).</p>
<p><strong>Recruiters</strong></p>
<p>Recruiters are a waste of your time, and theirs.</p>
<p>Many companies lack the resources to &#8220;find you&#8221;. Even if you make yourself easy to find on the internets, they often won&#8217;t look. Swimming through mountains of programmer social media is less savory than paying a fee to someone to &#8220;find me someone with these skills&#8221;. While smaller companies who recognize the value of good talent DO use Github, LinkedIn, and Google to search for people such as yourself, they aren&#8217;t going to dump bling into your lap.</p>
<p>Thus, recruiters are often the gateway to jobs nowadays. Many in large companies like recruiters because it&#8217;s not their money being spent, and a litany of resumes arrive in their email with them not having to do anything but ask HR to send a list of requirements of what they need. As such, most job sites nowadays such as Monster, Dice, LinkedIn, etc. are owned by recruiters. I say owned because finding a job posting that ISN&#8217;T a recruiter is rare. If it&#8217;s not, the likelihood of someone with your skills getting past the often horrible interview web applications or HR wall (&#8220;Yes, mam, as I&#8217;ve told you, MVP is just like MVC, and Ember and Backbone share many characteristics, so if you know one, you can easily learn the other and be prod&#8230; mam? Hello?&#8221;)&#8230; all for W2 position we&#8217;ve already talked about is a no go.</p>
<p>They&#8217;ve seen their business explode since the information age started back in the 80&#8217;s and 90&#8217;s. We have some of the worst unemployment, underemployment, and those giving up and leaving the workforce since 1979. This means a few things.</p>
<p>First, it&#8217;s just &#8220;normal&#8221; nowadays that mid-size and large companies use them. You may not like the game, so you can either get played by it, play it, or make your own rules.</p>
<p>Second, a lot of them are NOT there by choice. We have a swath of college educated youngsters with degrees not in the Art disciplines who just can&#8217;t find jobs that their degrees implied. Many went to recruiting because they had no other choice.</p>
<p>Therefore, you shoulder never be rude to them for the above reasons. Yes, I troll them every chance I get, but that&#8217;s in good fun. You should never be rude; you never know when you have zero choice but to go through a recruiter for a job. We&#8217;re extremely lucky in software, and history shows it will not last.</p>
<p>Keep in mind larger consulting firms like Accenture, Deloitte, IBM, Randstad, etc. are hybrid. They sometimes act like staffing companies, but often have internal divisions that do consulting. Meaning, although they recruit you, can you get above $100/hr rates with them which often includes lots of travel, but is still longer term projects. Still, better to err on the side of caution; bring up money first to save yourself time.</p>
<p>That said, again, recruiters are a waste of your time, and theirs. I made $80,000 at one large company, and another $140,000. We went through the same recruiting firm for the same position. When I once was hiring for my client, the recruiting firm was charging $200/hr and paying him $80/hr. Finally, recruiter rates are beholden to the location in which they are hiring. You won&#8217;t get New York city rates in Nashville even if the recruiting firm is national; companies, even for telecommuters, often pay the local rate.</p>
<p><strong>5 Solutions</strong></p>
<p>So if &#8220;a job&#8221; caps out at or below $100/hr, freelance has no growth potential with maintenance pain, and recruiters are worthless, what to do? You have 5 options that I&#8217;ve seen work. I&#8217;m sure there are more, I&#8217;m just basing the below on what&#8217;s worked for me, others I know, and what I&#8217;ve seen work from past clients who&#8217;ve done it.</p>
<ol>
<li>Build a Personal Brand</li>
<li>Score a large client</li>
<li>Find a Closer</li>
<li>Find a network and form a firm</li>
<li>Start a business</li>
</ol>
<p><strong>Build a Personal Brand</strong></p>
<p>I&#8217;ve written about <a href="http://jessewarden.com/2006/10/personal-branding-checklist.html">Personal Branding</a>Â 7 years ago. I even <a href="http://www.youtube.com/watch?v=R4HP08mlefk&amp;list=PLZEZPz6HkCZl7gJELOkwz5WF4pTahlUB7">talked in depth about Personal Branding in my video series</a> about becoming a successful freelancer. Make no mistake; the level of effort is inversely proportional to how bad ass you are. This includes either your talent &amp; technical prowess at programming, your charisma, or both. The less awesome you are, the harder you have to work. That&#8217;s called life.</p>
<p>Worse, if you cultivate a rock star status, whether on purpose or by accident, fame is fleeting. Trends in software occur just like they do in the music industry. A library you wrote, a blog post that became popular, or an app that scored you money and fame&#8230; is only temporary and you can only milk it so long. A personal brand is something that is cultivated often, like a garden. The decisions you make in the beginning help guide it and create expectations amongst those in the industry.</p>
<p>Writing blog posts, contributing to open source, releasing helpful code, speaking at conferences, and writing books are all staples of building a personal brand for yourself. Additionally, networking and PARTICIPATING in the industry, even if it&#8217;s just your small niche, are important. You want people to like you, you want them to want to work with you, and most importantly, THEY should be selling the client on you, not you selling the client on you. <a href="http://sethgodin.typepad.com/seths_blog/2008/03/why-bother-havi.html">You don&#8217;t have a resume</a>.</p>
<p>Those who have cultivated their epics skills/personality/brand are rife. Martha Stewart, Rachel Ray, Dr. Oz, Oprah, Craig Ferguson, Conan O&#8217;Brien, etc. In our industry, <a href="http://gskinner.com/blog">Grant Skinner</a>, <a href="http://en.wikipedia.org/wiki/Bruce_Eckel">Bruce Eckel</a>, <a href="http://en.wikipedia.org/wiki/Linus_Torvalds">Linus Torvalds</a>, <a href="http://ejohn.org/">John Resig</a>, <a href="http://www.paulirish.com/">Paul Irish</a>, <a href="http://joelhooks.com/">Joel Hooks</a>, <a href="http://infrequently.org/">Alex Russell</a>, <a href="http://www.joshuadavis.com/">Joshua Davis</a>, <a href="http://www.joa-ebert.com/">Joa Ebert</a>, and <a href="http://ricardocabello.com/blog">Ricardo Cabello</a> (<a href="http://www.mrdoob.com/">Mr Doob</a>).</p>
<p>You may not know some of them, which is fine, but also potentially brings up a good point. Some of them spend more time using their talents, and the fame is just a byproduct of that, whilst others get the marketing angle, and help accentuate their work. People like me are 90% big mouth, 10% contribution. Any combination works. The point is, it&#8217;s hard work, but less so if you&#8217;re talented. And you can&#8217;t stop, you have to keep marketing yourself, either through continually producing awesome, or continually producing just enough awesome, and marketing like crazy.</p>
<p>If you&#8217;re famous, you can easily charge more than $100/hr for freelance work even for work that&#8217;d normally go for $80/hr. Just depends on the clientele.</p>
<p>Con? It&#8217;s a lot of work. All the time. Sometimes you have to start at square one if the tech changes. It can be done and repeated and is easier in a objective discipline like programming vs. the entertainment industry.</p>
<p><strong>Score A Large Client</strong></p>
<p>I&#8217;ve seen many large agencies and software firms sprout up like this. You&#8217;re 1 dudette/dude, 2 friends, or maybe you just know a lot of people you could sub-contract for design and other back-end/front end development if you could only get a large client. What happens is, the contractor gets a large client, can&#8217;t handle the size of the project alone, hires people, and voila: a company.</p>
<p>The money comes into play from 2 places. First, the job is obviously larger, thus requires more money to pay more people for more time working.</p>
<p>Second, those more people do not get the same amount you do. There are a variety of factors that dictate how much a designer gets, a front end developer gets, a back-end developer, manager, project manager, qa, etc. The more you make is inversely proportional to how much you pay your sub-contractors/employees. The less you pay, the more you make. Except it&#8217;s not you, it&#8217;s the company&#8230; or are you just paying yourself? That gets into running a business which I won&#8217;t cover here. Obviously if they&#8217;re an idiot contractor who&#8217;s good at coding but sucks at math, you can&#8217;t pay them less than living expenses, else they&#8217;ll lose their house/apartment/flat in the middle of the project, and that&#8217;s no good. Yes, you&#8217;ll get people like this.</p>
<p>You then bill those people out at a higher rate. This is how it works with big clients. Large company hires large firm. Large firm hires smaller firm. Smaller firm hires you as a 1099 contractor. The pay goes like this: Large company pays Large firm $300/hr. Large firm pays Smaller firm $150/hr. Smaller firm pays you $80/hr. Now that you&#8217;re the Small firm, you now get the $150/hr&#8230; and you&#8217;re sub-contractors get the $80/hr. Make sense?</p>
<p>The more sub-contractors you get, the longer the project is, or both results in more money in your pocket; well over $100/hr.</p>
<p>How does one score such a Large client? One way, you can become a preferred vendor/consultant/provider of your favorite technology stack. Whether it&#8217;s the company that makes it, or those who have a vested interest in it, one things for sure: those who make technology are not consulting firms. They focus on making tech, not forcing a bunch of people to travel to some random location to build something for random business for a bunch of dough. YOU and yours are the ones who actually represent that company and do the actual work. Obviously they have small arms in the sales team that do this, but they usually don&#8217;t scale that side of the business.</p>
<p>Another way is networking with past clients. One way to utilize a network you&#8217;ve created is to contact past clients&#8217; clients directly if your non-compete is up. For example, lets say you worked for a company as a 1099 that worked on a project for Nike. You did a great job, and had a good relationship with the company, and even had the opportunity to work with some people at Nike directly. Most smart companies will ensure you never talk to them for this very reason. 1 year+ later (or whatever your non-compete states), you reach out to them and ask if they have any work. If you kicked ass, they&#8217;ll remember you. Suddenly, that cut in pay is gone since you can form a direct relationship with them either as W9 (corp to corp), and possibly become a preferred vendor for that company: 1 of many companies who gets first dibs on projects they outsource.</p>
<p>Other times, you just get lucky as a Freelancer, and you portray yourself as a &#8220;company&#8221; with 6 people (who are really part time sub-contractors). Thus, larger companies will come asking you to deliver something quite large. It&#8217;s not dishonest at all if you truly can deliver. I&#8217;m making the assumption here you&#8217;ve worked on multi-person projects and can actually do what you say you can do. It&#8217;s all about how sell yourself. Example: <a href="http://jessewarden.com">jessewarden.com</a> vs. <a href="http://webappsolution.com">webappsolution.com</a>.</p>
<p>Don&#8217;t be afraid to write contracts that are too large for you to handle. If they were, you wouldn&#8217;t have the cajones to actually move forward with it, and finding resources for a project that&#8217;s too big for you is a good problem to have. It&#8217;s already assumed at this point that you know a bunch of freelancers, and might have even put them in a spreadsheet to list their name, contact info, last known rate, and area of speciality. BUILD UP THAT NETWORK and then USE IT.</p>
<p><strong>Find A Closer</strong></p>
<p><iframe src="//www.youtube.com/embed/8kZg_ALxEz0" width="640" height="480" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>All closers are salesman, but not all salesman are <a href="http://www.youtube.com/watch?v=8kZg_ALxEz0">closers</a>. Many companies spring out from a talented closer who scores that big client, whether from a cold call or networking. It&#8217;s like the previous &#8220;Score A Large Client&#8221;, except there&#8217;s no work on your part: you just unleash the closer and wait for her/him to catch you a big fish.</p>
<p>I&#8217;ve seen some successful firms/companies who are basically run by these closers. Many are partnerships where a talented programmer partnered with a talented closer and together they built a company.</p>
<p>Actually FINDING one is where I can&#8217;t help you. Most either formed the company on their own or the technical person had a childhood/college/previous company relationship beforehand.</p>
<p>Commissions don&#8217;t help, either. &#8220;Dude, I know 9% is the norm, but I&#8217;ll give you 20%.&#8221;</p>
<p>&#8220;Oh yeah? How much y&#8217;all pulling in a year?&#8221;</p>
<p>&#8220;Uh&#8230; I guess $1 million.&#8221;</p>
<p>&#8220;My current company gives me 9%, but they rake in 30 million. Thanks for the free beer, though!&#8221;</p>
<p><strong>Find a Network and Form a Firm</strong></p>
<p>You can form a firm in 2 ways. Basically, you do #1 where you&#8217;ve either established a name for yourself, and find like minded people who want to do the type of work you want to do with the types of clients you like to work with.</p>
<p>The other option is just like her majesty&#8217;s life advice: surround yourself with those better than you. You basically find a group of people, at least 1 but hopefully more, who think like you do. You all agree to find work, share work if you&#8217;re too busy, or help each other out on projects WITHOUT a premium; meaning you don&#8217;t take a cut of the rate from each other. This makes some freelance gigs a lot easier because you can borrow people for helping you out on some projects. Since they make you a priority, and there is no worry about rate negotiations, it&#8217;s a no brainer. THAT has some serious value to clients that you should up-sell. Most clients who know what they are doing recognize that already when dealing with companies that have more than 1 person vs. an independent contractor&#8230; sometimes.</p>
<p>More importantly, though, is the hope that they already have the preexisting network contacts described above. Even better, you can combine networks. It actually goes over quite well when you describe to the client that you&#8217;ve left the previous firm to found your own since that client wants you anyway. They&#8217;ll often assume you formed it to work with like minded individuals and you&#8217;re still in the idealistic and prove yourself/your company phase.</p>
<p>This is basically what I did when one of the firms I was working with exploded on itself. Preferred vendor, existing client base to get opportunities from, and 3 guys who all have different strengths that compensate my weaknesses, specifically 2 of them doing back-end Java (I&#8217;m 100% front end). The bigger clients want <a href="http://webappsolution.com">Web App Solution</a>, not <a href="http://jessewarden.com">Jesse Warden</a>.</p>
<p>This is the opposite if your brand is really powerful, though. For example, some strong personal brands form a company, and larger companies will hire them strictly because they want that one person&#8217;s expertise/clout/reputation.</p>
<p>$101-$119/hr is no mans land. Once you have a company that consists of individuals, not just a bunch of subs, $120 on up gets tons more likely&#8230; because the sum is greater than its individual parts. That has a lot of value to companies who need you to scale, be used to scaling quickly, and have a network of your own to acquire certain resources for certain types of projects (UX, design, business analysts, etc). That and it&#8217;s easier for the CPA and lawyers to swallow since you&#8217;re a more legit entity to do W9 work with for tax and legal purposes.</p>
<p>Keep in mind, while it&#8217;s obviously nice to have a track record that you can show to existing clients of your firm helping companies build awesome, often it&#8217;s just as accurate to use past clients as that track record. For example, all of your past freelancing clients you can include in your company&#8217;s repertoire of past clientele.</p>
<p>If your partners, or even just sub-contractors don&#8217;t have a network, you better have one&#8230; else you&#8217;re just fishing for the big client with extra lines in the water.</p>
<p><strong>Start A Business</strong></p>
<p>Everything I&#8217;ve talked about up to this point has been B2B: Business to Business. Some company hires your company. However, that&#8217;s not where the real money is for software development. The real money is in products. Now, granted, you can create products for a certain set of businesses, thus making you a B2B, vs. targeting consumers as a B2C, but the point here is you are NOT a services company: You&#8217;re a product company.</p>
<p>If a clients software project fails, your company doesn&#8217;t fail. If your a product company, and your product fails, your company fails. Huge difference.</p>
<p>Products also have the nice ability to sometimes make passive income. That means, while you sleep they make money. Some products require companies around them to build and support them, hence the current state of Silicon Valley. The amount of effort gets less every day, as does the cost of entry.</p>
<p>While there is more risk, having hundreds or even thousands of people pay $10/a month for your software is a lot more appealing then hustling multiple times a year to get a client to pay for the next few months. You can flip that around, too; a few dozen customers paying you $250 a month.</p>
<p>While there are a bunch of great <a href="http://en.wikipedia.org/wiki/Minimum_viable_product">articles</a> and <a href="http://www.amazon.com/Rework-Jason-Fried/dp/0307463745/ref=sr_1_1?ie=UTF8&amp;qid=1379010456&amp;sr=8-1&amp;keywords=37signals">books</a> on the subject, here&#8217;s the general idea:</p>
<ol>
<li>Find a problem you think you can solve with software, and if it has competition, you think you can solve it better.</li>
<li>Build a prototype in less than a week.</li>
<li>Show it a potential customer and ask them if they&#8217;d pay for it.</li>
<li>Iterate weekly/bi-weekly until they do.</li>
<li>Get more customers.</li>
</ol>
<p>Eventually you&#8217;ll reach what Paul Graham calls <a href="http://paulgraham.com/ramenprofitable.html">Ramen Profitable</a>. It&#8217;s a way longer ramp up time, but has a potentially greater reward. It&#8217;s also assumed you&#8217;ll fail multiple times getting there which is hard for some people to swallow in a culture that&#8217;s all about winning and &#8220;the thought of losing&#8230; is HATEFUL to Americans.&#8221; &#8212; Patton.</p>
<p>If you ain&#8217;t failin&#8217;, you ain&#8217;t trying hard enough, sucka!</p>
<p><strong>Dangers</strong></p>
<p>There are a few potential dangers you need to be aware of going the above route.</p>
<p>First, you need to be flexible. Are you willing to accept work at or below $120/hr? If not, can you survive on savings until you find a client? The &#8220;I deserve&#8221; or entitlement mentality is dangerous. You don&#8217;t get what you deserve, you get what you negotiate. Some companies just don&#8217;t have that kind of money.</p>
<p>Second, it&#8217;s hard to go back to salaried positions once you&#8217;ve gone the Firm or Freelance route. The startup route is a lot easier, and the freelance somewhat easier. Often, if the company doesn&#8217;t know your brand, it doesn&#8217;t matter.Â You need to be careful how you pitch your &#8220;long term consulting&#8221; or &#8220;short term freelance&#8221;.</p>
<p>If you ran a company, you suddenly know a lot about the game, and companies get nervous when you want to quit that and go back to W2. Sometimes that&#8217;s uber valuable to them, but as a front line software developer, it&#8217;s sometimes hard for them to see that value. Others get nervous if they see a lot of short term gigs on your LinkedIn and/or resume and you suddenly apply for a long term position. If you talk to a business owner, it&#8217;s an easier conversation; they get it. Other times this can backfire; &#8220;If you&#8217;re running a business, why come work for me? What about your competing interests?&#8221;. If you talk to an HR, manager, or senior developer, they might not understand at all. Remember, the truth of your history is written by you; modify your social media and resume to match the position you&#8217;re going for.</p>
<p>Also, be aware it&#8217;s a new world. Going back to the old one can be hard. You can sometimes forget what it&#8217;s like to NOT speak about business and software in the same sentence&#8230; vs. just software. This is reflected in your resume, social media, and conversations with people.</p>
<p><strong>Conclusions</strong></p>
<p>If you want to break the $100/hr barrier, getting a salaried position, being a single freelancer, or wasting your time with recruiters won&#8217;t get you there. There are a few exceptions with freelancing, especially on the back-end. Many Ruby/Python/Scala etc. guys can charge $200/hr to $300/hr in the Bay Area. The key, though, isn&#8217;t getting a project for that much money, it&#8217;s getting a career where that&#8217;s the norm.</p>
<p>Whether building a strongly recognizable personal brand, scoring a large client which is a catalyst for creation and growth, finding a closer, forming your own firm, or even creating a product that itself validates the company around are just 5 ways in which you can break that barrier. I&#8217;m sure there are more.</p>
<p>Even not being successful, you still learn a ton, and if you&#8217;re a long time software developer, constantly learning and re-learning is probably something you already do anyway. So it&#8217;s ok to try some of the things above and fail, especially the last one. I&#8217;ve had a lot of failures. I even once refused work for 6 months in an attempt to learn how to double my rate. I failed but I <a href="http://jessewarden.com/2010/08/what-i-learned-about-trying-to-double-my-rate.html">learned a ton</a>.</p>
<p>I also posted a companion video to this post, embedded below, that <a href="http://youtu.be/KfXLSj2xWUE">you can watch</a>.</p>
<p><iframe src="//www.youtube.com/embed/KfXLSj2xWUE" width="640" height="480" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessewarden.com/2013/09/breaking-the-100-per-hour-barrier.html/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Backbone.js for Flash and Flex Developers</title>
		<link>https://jessewarden.com/2012/08/backbone-js-for-flash-and-flex-developers.html</link>
					<comments>https://jessewarden.com/2012/08/backbone-js-for-flash-and-flex-developers.html#comments</comments>
		
		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Tue, 07 Aug 2012 16:42:47 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[backbone]]></category>
		<category><![CDATA[cairngorm]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[dependencyinjection]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[parsley]]></category>
		<category><![CDATA[require]]></category>
		<category><![CDATA[robotlegs]]></category>
		<category><![CDATA[swiz]]></category>
		<category><![CDATA[underscore]]></category>
		<category><![CDATA[wire]]></category>
		<guid isPermaLink="false">http://jessewarden.com/?p=3268</guid>

					<description><![CDATA[Introduction The JavaScript web development community has a significant amount of application development frameworks, specifically around creating scalable applications using MVC/MVP/MVVM/MVPM/MVPV/MVSC, etc. Flash &#38; Flex have the same, although not as many, nor as many library dependencies. Backbone in particular has some longevity amongst the many frameworks available and has been used in some high [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://jessewarden.com/2012/08/backbone-js-for-flash-and-flex-developers.html"><img fetchpriority="high" decoding="async" style="padding-right: 8px; padding-bottom: 8px;" src="http://jessewarden.com/archives/blogentryimages/backboneforas/backbone-for-as-logo.png" alt="" width="320" height="247" align="left" /></a></p>
<h3 style="clear: none;">Introduction</h3>
<p>The JavaScript web development community has a significant amount of application development frameworks, specifically around creating scalable applications using <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">MVC</a>/<a href="http://martinfowler.com/eaaDev/ModelViewPresenter.html">MVP</a>/<a href="http://en.wikipedia.org/wiki/Model_View_ViewModel">MVVM</a>/<a href="http://martinfowler.com/eaaDev/PresentationModel.html">MVPM</a>/<a href="http://martinfowler.com/eaaDev/PassiveScreen.html">MVPV</a>/<a href="http://martinfowler.com/eaaDev/SupervisingPresenter.html">MVSC</a>, etc. <a href="http://www.adobe.com/products/flash">Flash</a> &amp; <a href="http://www.adobe.com/products/flex">Flex</a> have the same, although not as many, nor as many library dependencies.</p>
<p>Backbone in particular has some longevity amongst the many frameworks available and has been used in some high profile applications (notably <a href="http://pivotaltracker.com">Pivotal Tracker</a>). Since I&#8217;ve recently been fixing a web application project with a varied history, I&#8217;m diving head first into Backbone, and taking a break from diving into <a href="http://angularjs.org/">Angular</a>.</p>
<p>In this article, I&#8217;ll go over what Backbone is, how its features compare to frameworks Flash &amp; Flex Developers are used to, and some implementation details that will help you compare how JavaScript MVC apps compare to Flash and Flex ones.</p>
<p><span id="more-3268"></span>Also, while I&#8217;ll have a lot of future articles on web development, rather than reading 20 billion novels, if you&#8217;re just looking to get immersed in as much web dev as possible to get a 30,000ft view of where things stand, this is a better post to read even if dated. I&#8217;m still learning the web stack, so I&#8217;ll update this post with any inaccuracies pointed out. Just comment or send me an email/tweet.</p>
<h3>What Is Backbone?</h3>
<p>Backbone is basically an MVC framework for writing JavaScript web applications. If you&#8217;ve ever messed with <a href="http://en.wikipedia.org/wiki/Cairngorm_(Flex_framework)">Cairngorm</a>, <a href="http://puremvc.org/">PureMVC</a>, <a href="http://www.robotlegs.org/">Robotlegs</a>, <a href="http://swizframework.org/">Swiz</a>, or <a href="http://www.spicefactory.org/parsley/">Parsley</a>, you&#8217;ll instantly see a lot you recognize. Like a lot of JavaScript MVC frameworks, it is a collection of JavaScript libraries.</p>
<p>Also, it like others has the intentional ability to easily integrate with other toolsets and libraries.Â Examples include UI component frameworks like <a href="http://jquery.com/">jQuery</a> or <a href="http://www.sencha.com/products/touch/">Sencha Touch</a>, HTML template engines like <a href="http://handlebarsjs.com/">Handlebars</a>, and it assumes you&#8217;ll either hand code your CSS or use something like <a href="http://sass-lang.com/">SASS</a>/<a href="http://lesscss.org/">LESS</a> if you need to make your CSS more manageable on larger projects.</p>
<p>While Cairngorm and PureMVC were self contained, Robotlegs depended on <a href="https://github.com/tschneidereit/SwiftSuspenders/">SwiftSuspenders</a> for the <a href="http://martinfowler.com/articles/injection.html">Dependency Injection</a> functionality&#8230; however it is known that you just used Robotlegs without really caring, nor knowing buried in the robotlegs.swc file, there was a Swift Suspenders dependency.</p>
<p>Dependency management is tons harder in JavaScript, but I&#8217;ll briefly cover that plus more on Underscore in a bit. The same holds true for Backbone. It utilizes a library called <a href="http://underscorejs.org/">Underscore</a> to basically fix JavaScript to a certain standard of usability, add many OOP and Array features functional server-side devs love, and to abstract away the browserÂ incompatibilitiesÂ for the 1st and 2nd.</p>
<p>It also utilizes Douglas Crockford&#8217;s <a href="https://github.com/douglascrockford/JSON-js">json.js</a>, the man behind the book &#8220;<a href="http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742">JavaScript: The Good Parts</a>&#8221; and a promoter of using <a href="https://www.google.com/#hl=en&amp;safe=off&amp;sclient=psy-ab&amp;q=closure+vs+prototype&amp;oq=closure+vs+prototype&amp;gs_l=hp.3..0j0i5j0i5i30j0i8i30.3434.5654.2.5772.20.15.0.2.2.0.134.1355.7j7.14.0...0.0...1c.JHUmsVPluXQ&amp;pbx=1&amp;bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&amp;fp=89dccf89cf1c3a70&amp;biw=1052&amp;bih=723">closure based OOP vs. Object.prototype.</a>Â His json library does the same, allowing the JSON format to workÂ seamlesslyÂ in JavaScript regardless of browser; for older browsers it parses, for newer ones it uses the built in parser. You should be using json2 since it doesn&#8217;t mess with the prototype (omg, purism). You&#8217;ll notice, too, just about every article on JavaScript nowadays assumes this part is &#8220;handled&#8221;; you&#8217;ll see a magic &#8220;JSON&#8221; in the code. It&#8217;s implied it comes form this library, is native, or both. In a development environment, you just include all the libraries mentioned at the bottom if your index.html body tag (so all the GUI and CSS dependencies load first) in script tags.</p>
<h3>Why Backbone?</h3>
<p>If you&#8217;re a Flex Developer, you already know why: it&#8217;s an MVC framework. Sold. Feel free to <a href="#backboneevents">skip this section</a> or just skim 4 &amp; 5.</p>
<p>I was thinking of deleting this section, but then read Smashing Magazine&#8217;s <a href="http://coding.smashingmagazine.com/2012/07/27/journey-through-the-javascript-mvc-jungle/">Journey Through The JavaScript MVC Jungle</a>, and decided more details were needed for those who are questioning why they even need an MVC framework.</p>
<p>For those that don&#8217;t, MVC frameworks helpÂ separateÂ out your visual, data, application, and business logic in distinct areas in your code. This allows you to have multiple developers work on the code, the code to more easily scale for larger applications, and to make it more testable. Putting logic in your DOM, aka your JavaScript mashed into your HTML and CSS on a &#8220;page&#8221;, makes things unmaintable, hard to find bugs, and unreadable. &#8230;for larger applications. Just like Flash, there is fine line that&#8217;s blurred as all get out. Whether you use an MVC framework or not depends on:</p>
<ol>
<li>your business</li>
<li>your team</li>
<li>size of your application</li>
<li>multi-device</li>
<li>server-side vs. client side</li>
<li>website vs. app</li>
</ol>
<p><strong>Your Business</strong></p>
<p><strong></strong>For those who have non-negotiable deadlines, any OOP, design patterns, and frameworks usually get in the way. Paying off technical debt never happens much, so spit and duct tape applications are fine. On the other hand if your business is creating code that will have to live for years and/or is a product for consumers or other businesses, using OOP, design patterns, and a framework is a good idea. Usually. Sometimes you need to just launch and get funding. Also, there is always the risk that a &#8220;Prototype&#8221; suddenly becomes &#8220;The Product&#8221;. Starting out with even a few parts in a framework will prevent a lot of pain down the line.</p>
<p><strong>Your Team</strong></p>
<p><strong></strong>If you&#8217;re a 1 woman show, and management has done the estimates to show that all design, development, testing, and bug fixing can be done just by you, great; architect as you see fit.</p>
<p>However, if you&#8217;re on a team environment because your project is of the size that can in fact utilizeÂ multipleÂ designers and developers to create value in tandem, an MVC framework can allow your team to work with each other, in different files, being productive using modern source control systems. Additionally, Backbone like many frameworks has enough industry traction that documentation &amp; answers to common questions/problems are all online. This makes hiring &amp; training both new &amp; existing team resources much cheaper and faster. The code has SOME semblance of structure, even if the original developer(s) didn&#8217;t follow Backbone conventions to a T.</p>
<p><strong>Application Size/Scope</strong></p>
<p><strong></strong>If you&#8217;re application is just a few screens/pages/widgets, use jQuery, shove you&#8217;re services and data into a dozen files and call it a day. You could still even write it where your service and application logic layer was testable to get unit tests, all without the need of a framework. I&#8217;ve seen a lot of Flash Developers take to this route just fine over the past year for both desktop and mobile. Some even threw everything on the sever and just did HTML/CSS on the client.</p>
<p>If, however, you&#8217;re creating a large application with many screens, a lot of client side logic/data caching, and maybe even iterating on a design, then separating things out cleanly via Backbone, or some other framework, is the way to go. Again, this assumes you&#8217;re not using the server for much beyond services. This&#8217;ll ensure when you create new functionality, you know where it goes. WhenÂ revisitingÂ already created functionality, you know where to look for what.</p>
<p><strong>Multi Device</strong></p>
<p><strong></strong>One thing that isn&#8217;t mentioned much is MVC frameworks can help with mutli-device strategies. People attribute that to HTML5 and make the assumption you&#8217;re coding things in a DRY manner and they can be easily reused. Taking your application logic, data/validation, and services OUT of the presentation layer (what the user see&#8217;s) allows you to test &amp; scale each in isolation.</p>
<p>What usually doesn&#8217;t change is you need all/most/some of the same exact code on a phone as you do the tablet and desktop. While the GUI can change, whether a different HTML and CSS template used for different screen sizes, your core application &amp; business logic does not. BackboneÂ especiallyÂ with it&#8217;s use of the PassiveView pattern makes it (mostly) easy to change the underlying html or templates you&#8217;re using. Even if that code isn&#8217;t DRY because of a hard deadline or a challenging design, all your models and services stay the same helping to somewhat mitigate the problem. There are a variety of responsive design techniques you can use to not really change anything.</p>
<p><strong>Server-Side vs. Client Side</strong></p>
<p><strong></strong>This one is easy. If you&#8217;re development shopÂ primarilyÂ does their websites and/or applications server-side, there are a lot of wonderful frameworks out there that are already &#8220;Backbone on the Server&#8221; as it were. Additionally, they have the library support just like JavaScript does to fill in the gaps.Â These include Ruby on Rails, Django for Python, Java&#8217;s Play Framework or GWT, and good ole&#8217; .NET.</p>
<p>In these instances, 90% of the code and design is done on the server, and a tincy bit of client side code or design is done. In these cases, you don&#8217;t need Backbone because you&#8217;re already doing MVC on the server and treating the entire client as the View. The criticism by some is that, even with delivery or raw HTML/CSS/JS that&#8217;s minified and gzipped by the server, you still utilize a lot more bandwidth and http requests onÂ theÂ client. This is not what you want to be doing with mobile. There are a variety of frameworks and design strategies to mitigate this, though.</p>
<p>If you don&#8217;t do server-side development, then you need something. There is a reason Rails, Django, Play, .NET, GTW, etc. all utilize some form of MVC.</p>
<p><strong>Website vs. Application</strong></p>
<p><strong></strong>Finally, what exactly are you building? To me, even though I&#8217;m still learning JavaScript/HTML/CSS stack, theÂ delineationÂ is pretty clear to me. Why anyone can argue, and be correct, that the same Backbone application with large amount of JavaScript and a complicated build process could be made using simple HTML/CSS, and a tincy bit of jQuery&#8230; I just use the first 5 items to make the decision.</p>
<p>If you have a bunch of web designers on your team, they&#8217;re more apt to inherit something and be successful maintaing it if it&#8217;s in a context they&#8217;re used to. Conversely, if you have a lot of software client developers, they&#8217;ll be more apt to maintain something doneÂ primarilyÂ in code.</p>
<p>If they&#8217;re server-side devs, they&#8217;ll typically have larger expectations of a technology stack even compared to client side developers&#8230; hence rather developing on the server instead.</p>
<p>Bottom line, if you&#8217;re just building a website with some progressively enhanced interactivity, you don&#8217;t need a framework. If you&#8217;re doing a lot of service calls, have &#8220;state&#8221; on the client, and have a lot of user interaction &amp; things they need to input, you&#8217;re probably building an application and probably should use a framework.<br />
<a name="backboneevents"></a></p>
<h3>Events</h3>
<p>Many frameworks have a messaging system that&#8217;s independent of the stack it&#8217;s on. This is also sometimes called the &#8220;event bus&#8221;. Cairngorm has CairngormEventDispatcher on top of Flash Player Events. PureMVC has Notifications. Robotlegs injects a special base class with a unique EventDispatcher instance. Backbone, much like ActionScript 2&#8217;s <a href="http://www.adobe.com/support/documentation/en/flex/1/asdocs/mx/events/EventDispatcher.html">EventDispatcher</a>Â or <a href="http://help.adobe.com/en_US/flashlite/dev/2x3x/WS006f4c657bd0baee1e63e3d11cddf884e3-7ffb.html">ASBroadcaster</a> in ActionScript 1, uses the <a href="http://en.wikipedia.org/wiki/Decorator_pattern">Decorator pattern</a>Â to add event listening and broadcasting to any JavaScript object. It relies on the Underscore library to do this. Underscore does in fact use the _ as it&#8217;s class name. Yes, there are basic ECMA level event dispatching capabilities in JavaScript, but they don&#8217;t have good cross browser support, and are harder to modify. AS1:</p>
<pre lang="actionscript">var obj = {};
var listener = {};
ASBroadcaster.initialize(obj);
obj.addEventListener(listener);
listener.alert = function()
{
	trace("Alert!");	
};
obj.broadcastMessage("alert", "Sup.");</pre>
<p>AS2:</p>
<pre lang="actionscript">import mx.events.EventDispatcher;
import mx.utils.Delegate;
var obj = {};
var listener = {};
EventDispatcher.initialize(obj);
obj.addEventListener("alert", Delegate.create(listener, onAlert));
listener.onAlert = function(event)
{
	trace("Alert!");	
};
obj.dispatchEvent({type:"alert", target: obj});</pre>
<p>AS3:</p>
<pre lang="actionscript3">import flash.events.EventDispatcher;
import flash.events.Event;

var dispatcher:EventDispatcher = new EventDispatcher();
var listener:Object = {};
listener.alert = function(event:Event):void
{
	trace("Alert!");	
};
listener.addEventListener("alert", listener.alert);
dispatcher.dispatchEvent(new Event("alert"));</pre>
<p>Backbone via Underscore:</p>
<pre lang="javascript">var object = {};

_.extend(object, Backbone.Events);

object.on("alert", function(msg) {
  alert("Triggered " + msg);
});

object.trigger("alert", "an event");</pre>
<p>Notice this uses a callback as an anonymous function. If you&#8217;d prefer a proper function attached to a class or a closure or some other object, you can do that too.</p>
<p>In ActionScript 3, if your events grow, you start utilizing packages to organize Event classes to their domain of interest.</p>
<p><img loading="lazy" decoding="async" src="http://jessewarden.com/archives/blogentryimages/backboneforas/package-events.png" alt="" width="309" height="248" /></p>
<p>In Backbone, they want you to utilize namespaces (a colon toÂ separateÂ noun:verb) to delineate them.</p>
<pre lang="javascript">myCollection.trigger("selection:changed", myIndex);
socketWatcher.trigger("user:join", userModel);</pre>
<p>While JavaScript doesn&#8217;t support constants, many IDE&#8217;s can infer them through code hinting / intellisense like <a href="http://www.jetbrains.com/idea/">IntelliJ/Webstorm</a>, <a href="http://www.sublimetext.com/">Sublime</a>, and <a href="http://www.aptana.com/">Aptana</a>. Although magic strings don&#8217;t go away in JavaScript, this is how you can mitigate the growth, make them easier to test, and prevent misspelling bugs.</p>
<p>You can also trigger many events in 1 call by adding a space.</p>
<pre lang="javascript">book.on("change:title change:author", someCallbackFunction);</pre>
<p>Since JavaScript has the same stupid scope challenges that ActionScript 1/pre-Delegate, you can optionally provide a scope (called a context) as the 3rd parameter.</p>
<pre lang="javascript">model.on('change', this.render, this)</pre>
<p>Unlike ActionScript, the Underscore event system allows you to hear about all events via &#8220;all&#8221; which is basically a reserved word/event name.</p>
<pre lang="javascript">var logger = {};
logger.on("all", function(eventName)
{
	console.log("Event: " + eventName);
});</pre>
<p>Notice here I&#8217;m using console which is basically JavaScript&#8217;s trace. This breaks IE. Don&#8217;t do it. Use <a href="http://log4javascript.org/">log4javascript</a> unless you&#8217;re a WebKit Only Kid.</p>
<p>To remove events, in Flash you just use removeEventListener:</p>
<pre lang="actionscript3">myListener.removeEventListener("alert", onAlert);</pre>
<p>Using Underscore, they have a lot more options here.</p>
<pre lang="javascript">// Removes just the `onChange` callback.
object.off("change", onChange);

// Removes all "change" callbacks.
object.off("change");

// Removes the `onChange` callback for all events.
object.off(null, onChange);

// Removes all callbacks for `context` for all events.
object.off(null, null, context);

// Removes all callbacks on `object`.
object.off();</pre>
<p>Finally, dispatchEvent is to trigger. ActionScript:</p>
<pre lang="actionscript3">object.dispatchEvent(new Event("myEvent"));</pre>
<p>Underscore:</p>
<pre lang="javascript">object.trigger("myEvent", arg1, arg2, etc);</pre>
<p>You can pass as many arguments as you want, and they&#8217;ll get passed in.</p>
<p>Take a hint from a guy who survived AS1 and AS2: pass an object as the first and only parameters; it&#8217;ll make your API more flexible and is an easier convention to follow vs. being forced to use event order from 2 disparate places in code.</p>
<p>Let&#8217;s review.</p>
<p>ActionScript: EventDispatcher<br />
Backbone: Underscore.js</p>
<p>ActionScript: addEventListener<br />
Backbone: on</p>
<p>ActionScript: removeEventListener<br />
Backbone: off</p>
<p>ActionScript: dispatchEvent<br />
Backbone: trigger</p>
<p>ActionScript: MyClass extends EventDispatcher<br />
Backbone: _.extend(MyClass, Backbone.Events);</p>
<h3>Backbone.Model</h3>
<p>A Backbone Model is basically a PureMVC Proxy. That is, a Model that handles both access control to your data, change events via the Observer pattern, and it wraps a service layer to some web service that the Model&#8217;s data maps to on the back-end.</p>
<p>In Cairngorm it&#8217;d be basically the same thing. In Robotlegs it&#8217;d be a Model that has a Service injected into it. In Swiz, Parsley, and even in Robotlegs, the Model doesn&#8217;t usually contain validation, nor a service(s) with error handling. Sencha&#8217;s ExtJS and Touch do this as well with their Models, and it&#8217;s a common theme you&#8217;ll see with a lot of JavaScript frameworks. Doesn&#8217;t make it right, just something you&#8217;ll have to wrap your head around. Think a Rails ActiveRecord on the client with the ability to be mapped to various services; like localStorage vs. an actual Ajax call to some web service.</p>
<p>Additionally, it&#8217;s implied they are a single entity. Usually the whole point of Models or ValueObjects in ActionScript was to create a combination of data from both what the middle tier provided, but also things the client needed as well. There wasn&#8217;t always such a tight coupling between a database table and the Model you&#8217;re viewing. This is how Backbone Model&#8217;s are viewed.</p>
<p>Assuming you&#8217;re creating a framework-less Model in ActionScript, you&#8217;d go:</p>
<pre lang="actionscript">package
{
	import flash.events.EventDispatcher;

	class Person extends EventDispatcher
	{
		private var _firstName:String = "Jesse"

		public function get firstName():String
		{
			reutrn _firstName;
		}

		public function set firstName(value:String):void
		{
			if(value !== _firstName)
			{
				_firstName = value;
				dispatchEvent(new Event("firstNameChanged"));
			}
		}

		function Person()
		{
			super();
		}
	}
}</pre>
<p>If you&#8217;re using Flex:</p>
<pre lang="actionscript3">package
{
	import flash.events.EventDispatcher;

	class Person extends EventDispatcher
	{
		[Bindable]
		public var firstName:String = "Jesse";

		function Person()
		{
			super();
		}
	}
}</pre>
<p>Or PureMVC:</p>
<pre lang="actionscript3">package
{
	import flash.events.EventDispatcher;

	class PersonProxy extends Proxy
	{

		public static const NAME:String = "Person";

		private var _firstName:String = "Jesse";

		public function get firstName():String
		{
			return _firstName;
		}

		public function set firstName(value:String):void
		{
			if(value !== _firstName)
			{
				_firstName = value;
				sendNotification("firstNameChanged", _firstName);
			}
		}

		function Person()
		{
			super(NAME);
		}
	}
}</pre>
<p>In Backbone it&#8217;d be:</p>
<pre lang="javascript">Person = Backbone.Model.extend({

	firstName: "Jesse"
});</pre>
<p>Notice how you&#8217;re &#8220;extending&#8221; a Backbone.Model. Classes &amp; inheritance in JavaScript are a rabbit hole (all the things ActionScript 1 fixed in ECMA are still not fixed in JavaScript&#8230; not even in Chrome nightly builds), so for now let&#8217;s just pretend it&#8217;s what you think it is.</p>
<p>For working with Backbone Model&#8217;s, you use the get and set function convention. Sencha&#8217;s ExtJS and Touch do this as well. Meaning, you do not set things like this:</p>
<pre lang="javascript">// Wrong
var person = new Person;
person.firstName = "Cow";</pre>
<p>Instead, you set it:</p>
<pre lang="javascript">// Correct
var person = new Person;
person.set("firstName", "Cow");
// or object syntax
person.set({"firstName": "Cow"});</pre>
<p>The set method will trigger a &#8220;change&#8221; event automatically dispatched (triggered) from your Model. If you pass a</p>
<pre lang="javascript">{silent: true}</pre>
<p>as the 2nd parameter, it won&#8217;t trigger the event.</p>
<p>These events are automatically name spaced to the properties that changed. For example, in Flex, the convention was &#8220;propertyName&#8221; + &#8220;Changed&#8221;, like so:</p>
<pre lang="actionscript3">[Bindable(event="firstNameChanged")]
public var firstName:String = "Jesse";</pre>
<p>In Backbone, while the change will fire for anything, if you&#8217;re just interested in a specific property, you can do the same thing:</p>
<pre lang="javascript">person.on("change:firstName", function(model, firstName)
{
	log("Person's change firstName, model: ", model, ", firstName: ", firstName);
});</pre>
<p>You do NOT have to define these yourself like you do in Flash/Flex, it&#8217;s done &amp; triggered for you automatically based on the property names on your model.</p>
<p>Like Sencha&#8217;s ExtJS, the Models have a validate method that can be applied on a per property basis. If the validate method is there, it&#8217;s run. If it doesn&#8217;t validate your change, the property isn&#8217;t set, and the change event isn&#8217;t triggered, and an error event is triggered instead. You can either listen for these, or pass an error callback into the set method itself.</p>
<p>A Model has a lot of other methods only server-side people care about. The only ones you&#8217;ll care about are fetch, parse, toJSON, and isValid.</p>
<p>Now for the scary things:</p>
<ul>
<li>Model&#8217;s have a fetch function that creates a <a href="http://api.jquery.com/jQuery.ajax/#jqXHR">jQuery XMLHttpRequest</a> instance to populate your model from some url. Basically a lighter weight HTTPService (or nice wrapper for URLRequest).</li>
<li>A built in parse method which defaults to smartly reading JSON responses. In Flash/Flex, we&#8217;re used to either using a Factory class, or a ValueObject that knows how to &#8220;build itself&#8221;.</li>
<li>A save method that does the same, asking jQuery to serialize and save your updated Model.</li>
</ul>
<p>One last thing to note that is mentioned in the 2nd bullet. ALL parsing is basically done in the Model. It&#8217;s assumed your middle tier is giving you JSON (bad assumption for larger companies who areÂ infatuatedÂ withÂ XML. Yes, I know it&#8217;s 2012, they don&#8217;t). You have the option to override the parse function and parse it however you want, like in the case of using XML.</p>
<p>This, as opposed to using Factories inside of your Service class, or using self-building ValueObjects. Then placing the results in your Model&#8230; vs. your Model class doing everything.</p>
<p>Individually these are strange, but ok. Together, they&#8217;re whack. A mash of functionality, at least in Flex projects, I&#8217;m used to separating out&#8230; even without unit tests. You don&#8217;t have to use these functions they provide for you, but it&#8217;s very clear they did a lot of work making it easy as pie to use Backbone with someone like Ruby on Rails without the client doing a lot of work.</p>
<p>Either way, the jQuery ajax calls wrap HTTP requests really well, so it&#8217;s not like you can&#8217;t introspect what&#8217;s going on. Callbacks work and Safari/Chrome/Firefox have better-than-Flash/Flex networking debugging tools as well.</p>
<h3>Backbone Collections</h3>
<p>Some brief notes about Backbone Collections. Like Sencha&#8217;s Ext JS, Model&#8217;s have an implied one to one relationship with some back-end service that populates your Model class. Collections are basically a bunch of Models. So if you get a &#8220;list of Contacts&#8221;, in Backbone it&#8217;d be a &#8220;Collection of Models&#8221;.</p>
<p>Backbone uses Underscore to add 50 billion useful array methods to it so working and filtering your Model lists is easier. The &#8220;nice&#8221; feature of Collections is you can set the Model that it contains, and all our add methods will automatically convert the JSON you pass to it. :: shrugs :: I&#8217;d rather have unit tests verify these access points, or even&#8230; you know&#8230; strong typing. Still, there&#8217;s tons of value if you&#8217;re using formalized JSON; I&#8217;ll show you in a second.</p>
<p>Collections have a lot of the same methods as a Model for interacting with the server, parsing, etc. This is where setting the Model of the Collection handles the parsing/populating for you.</p>
<pre lang="javascript">Backbone.sync = function(method, model) {
  alert(method + ": " + model.url);
};

var Accounts = new Backbone.Collection;
Accounts.url = '/accounts';

Accounts.fetch();</pre>
<p>The fetch method is a Model &amp; Collection method for &#8220;go get data from the server at my url&#8221;. It&#8217;s like HTTPService&#8217;s send method or URLRequest&#8217;s load. It creates a jQuery XMLHTTPRequest internally. For those interested, I believe it&#8217;s using the multiple concurrency option (as opposed to first/last which you could configure for Flex HTTPService).</p>
<p>Notice if the Accounts model property is &#8220;Account&#8221;, then whatever comes back from the server will automatically be parsed to an Account Model. The url is the web service URL.</p>
<p>Also rad is the sync method. There&#8217;s a cool infrastructure here that you can read more about on Backbone&#8217;s site. Suffice to say they&#8217;ve abstracted serialization of your Models, whether you&#8217;re saving to a database or LocaleStorage (the string key value store you get in browsers that has more space the Flash&#8217;s SharedObject). This makes caching, mocking, and testing a lot easier.</p>
<p>One thing I found curious is your Model&#8217;s have a validate function but Collections do not. My guess is it&#8217;s trivial to use a forEach with a validate call, so they saw no need to add. Most Flash/Flex developers don&#8217;t really write these as much as they should. You usually either let the server guys code tell your data is bad, you use unit tests, or hope strong-typing finds problems when creating ValueObjects from UI controls. Sencha follows this validate mentality as well.</p>
<h3>Router</h3>
<p>Web applications are unique in that they have an address. Some even have an address that represents a state they can exist in. There is often a symbiotic relationship between the URL and the application. A different URL can put the application in a different state. Conversely, the application state is reflected in the URL.</p>
<p>The format, however, varies. The short of it is, everyone likes slashes, but # are used for backwardsÂ compatibilityÂ for those browsers that don&#8217;t support the History API (basically IE 9 and below). Backbone&#8217;s Router abstracts this for you.</p>
<p>If you&#8217;ve ever utilized <a href="http://www.gaiaflashframework.com/">Gaia</a> to build a Flash website, you&#8217;ll know exactly what to use Backbone Router for. Sort of. Instead of mapping your web site&#8217;s pages, you&#8217;re mapping both page URL&#8217;s as well as URL query parameters to run functions. Yes, you could have those functions change a page, or just draw a new one. Gaia handled all of this internally including branching, hijacking, and URL modification. Backbone Router does a lot of the same but is a little lower level so you to do a little more work.</p>
<p>There are basically 2 features you can utilize. The first is when you go to a different section or state in your application, you can update the URL in the web browser.</p>
<p>The second is when the URL changes. Whether the user modifies the URL in the url bar, they press the back or forward button, or even if the user comes to the URL via a book mark or copy pasta. All can trigger a callback function for each type of URL so your application can get itself into the proper state, get the data it needs, or whatever else to correctly represent the URL.</p>
<p>Notice the routes hash below:</p>
<pre lang="javascript">var Workspace = Backbone.Router.extend({

  routes: {
    "help":                 "help",    // #help
    "search/:query":        "search",  // #search/kiwis
    "search/:query/p:page": "search"   // #search/kiwis/p7
  },

  help: function() {
    ...
  },

  search: function(query, page) {
    ...
  }

});</pre>
<p>You extend the Router class, and then define the routes in the URL, and what callback function to call. While straightforward, you can use all kinds of string matching for more dynamic URL&#8217;s. Internally, those routes will call addCallback to initialize it. When you want to update the URL, just call navigate.</p>
<p>Using the Backbone.history class, you can monitor change events, support the back button in your app, etc.</p>
<h3>View</h3>
<p>A Backbone.View isn&#8217;t a View that a Flash or Flex Developer would call a View. It&#8217;s actually a Controller class on top of aÂ <a href="http://martinfowler.com/eaaDev/PassiveScreen.html">Passive View</a>Â that allows your GUI to have a less coupled integration into Backbone. All your HTML and CSS, whether made by hand or using a templating library like <a href="http://mustache.github.com/">Mustache</a> or <a href="http://handlebarsjs.com/">Handlebars</a>, has no code in it.</p>
<p>All the code that updates via the Models is done in the View.</p>
<p>All the code that listens for user gestures is done in the View.</p>
<p>So it&#8217;s the Controller in the Passive View pattern. Make sense?</p>
<p>I&#8217;ve seen 2 people utilize Robotlegs Mediators like this. One was a colleague who&#8217;d create MXML with zero ActionScript in it. Just like you do in HTML, he&#8217;d assign click handlers to MXML component id&#8217;s (or Sprite/MovieClip names) all in the Mediator. When his Model Actors would send out change events, he&#8217;d use the injected Models to update the View&#8217;s data usually with intimate knowledge of the view&#8217;s structure since it didn&#8217;t have any getter/setters, nor binding, to help with the drawing.</p>
<p>PureMVC could be done in the same way.Â There was a sect of people in the early Cairngorm days who used a ViewModel in aÂ similarÂ fashion.</p>
<p>A Backbone View was specifically created to handle HTML and CSS, and as such, has a LOT more references than just the passive view reference. Those are:</p>
<ul>
<li>el</li>
<li>id</li>
<li>className</li>
<li>tagName</li>
<li>attributes</li>
</ul>
<div><span style="font-size: medium;"><span style="line-height: 24px;">Just stick to id, and it&#8217;ll act just like a member variable in ActionScript, or an ID in MXML.</span></span></div>
<p>Here&#8217;s a tiny Robotlegs Mediator:</p>
<pre lang="actionscript">package
{
public class AvatarViewMediator extends Mediator
{
	[Inject]
	public var view:AvatarView;

	[Inject]
	public var model:PersonModel;

	public override function onRegister():void
	{
		addContextListener("onPersonModelChanged", updateImage);
		addViewListener("onImageClicked", onImageClicked);
		updateImage();
	}

	private function updateImage(event:Event=null):void
	{
		view.image = model.userImageURL;
	}

	private function onImageClicked(event:MouseEvent):void
	{
		dispatch(new Event("onAvatarImageClicked"));
	}
}
}</pre>
<p>When the ActionScript GUI class is created, it&#8217;s Mediator is created. It immediately updates the Avatar GUI with the latest user image. If the Model ever changes thereafter, the image is immediately updated. Finally if the user clicks on the image, it&#8217;ll dispatch an event on the frameworks event bus to let someone else handle it; maybe a Command, maybe another Mediator&#8230; etc.</p>
<p>Here&#8217;s the equivalent in JavaScript:</p>
<pre lang="javascript">// make a global event bus like Robotlegs, or PureMVC's Notifications
eventBus = _.extend({}, Backbone.Events);
Backbone.Model.prototype.eventBus = Backbone.Collection.prototype.eventBus = Backbone.View.prototype.eventBus = eventBus;

var personModel = new PersonModel;

var AvatarView = Backbone.View.extend({
	id: "avatar-div",

	initialize: function()
	{
		this.model.on("change", this.render, this);
	},

	events:
	{
		"click .avatarImage":	"onImageClick"
	},

	render: function()
	{
		var imageURL = this.model.get("imageURL");
		$(this.el).html(this.template('
&lt;img src="&lt;%= imageURL %&gt;" alt="" /&gt;'));
		return this;
	},

	onImageClick: function()
	{
		this.eventBus.trigger("onAvatarImageClicked");
	}
});

var aView = new AvatarView({model: personModel});</pre>
<p>Using Underscore, we listen for change events from our Model. Also notice View&#8217;s are assumed to have 1 Model. If you&#8217;ve seen any reasonably sized Robotlegs/PureMVC app, you know this isn&#8217;t often the case, heh. It&#8217;s assumed this is not null when the View is created.</p>
<p>The click handler listens for a click event from our HTML div. Our render function, run when the View is shown and when our Model updates, draws itself.</p>
<p>Notice the id is just a string; I actually use the el, or &#8220;HTML element&#8221; to set its html. The template method is an Underscore method to do cool stuff; suffice to say it refreshes the div with a newly updated Image tag with our correct URL from the model. The purists will decry this, saying that HTML should never be put into View&#8217;s and instead you should use a template library like I mentioned above.</p>
<p>Ignore the return this in the render function. That&#8217;s for chaining support, a method for getting functional programmers off, making code unreadable, and helping the browser swallow exceptions.</p>
<p>And now for the hack. You&#8217;ll notice if I want a global event system like Robotlegs, you just create your own eventBus, and shove the mofo on Backbone&#8217;s prototype. Here&#8217;s a <a href="http://lostechies.com/derickbailey/2011/07/19/references-routing-and-the-event-aggregator-coordinating-views-in-backbone-js/">longer explanation</a> if you care about why. That allows you to then send the application level event in the onImageClick callback.</p>
<p>One thing for those of you who remember ActionScript 2: notice the 3rd parameter of of the model.on. This ensures the callback is executed in the correct scope. It&#8217;s basically ensuring you don&#8217;t have to use <a href="http://www.adobe.com/support/documentation/en/flex/1/asdocs/mx/utils/Delegate.html">Delegate.create</a>. These are pretty hard to debug, too, since you&#8217;ll sometimes get &#8220;method is undefined&#8221; methods which aren&#8217;t true; it&#8217;s actually a null pointer exception since this refers to the function vs. the class. Just be sure to always set it.</p>
<h3>Dependency Injection</h3>
<p>Notice that all the dependencies, in this case the PersonModel, is already created and passed into the View&#8217;s constructor. In larger applications, this isn&#8217;t always the case, or gets unwieldy. There are various Dependency Injection frameworks out there to help with this, such as <a href="https://github.com/cujojs/wire">Wire</a>.</p>
<p>Robotlegs handled this via Dependency Injection as well as through Command startup conventions. Basically, as your application grew, you&#8217;d offload a lot of the startup to wiring up your dependencies, or instantiating them yourself if they required something more than a &#8220;new Thing&#8221;. Things such as &#8220;MainContext&#8221; would become &#8220;StartupCommand&#8221; which then broke off into &#8220;InitializeModels&#8221;, &#8220;InitializeMediators&#8221;, which even later broke off into &#8220;InitializeProductModels&#8221;, etc. You had a refactoring path.</p>
<p>You&#8217;ll eventually want to do the same with Backbone as your applications grow,Â especiallyÂ if your Collections get kind of large. The browsers have a lot better libraries &amp; functionality to serialize &amp; read your data back compared to Flash Player in the browser, so it&#8217;s not always a huge deal to save your data to disk. They also destroy easier too.</p>
<p>Here&#8217;s how you configure a <a href="http://en.wikipedia.org/wiki/Singleton_pattern">Singleton</a> OmnitureModel in Robotlegs:</p>
<pre lang="actionscript">// ApplicationContext.as
injector.mapSingleton(OmnitureModel);</pre>
<p>Here&#8217;s how you do it using Wire:</p>
<pre lang="javascript">// ApplicationContext.js
omniModel: {
   create: {
      module: "models/OmnitureModel'
   }
}</pre>
<p>Wire also supports a modicum of binding expressions so if you need some extra data initialized in your created class, whether constructor arguments or not, you can do so. This is invaluable for Backbone View&#8217;s who often need at least 1 Model reference when they boot up.</p>
<p>Although I&#8217;m still learning DI in JavaScript, I found Wire helpful in configuring Backbone Models to work with local data sources instead hardcoded service URL&#8217;s. You just create a locale application context js file (like a new Robotlegs Context file) to configure the application to use locale data sources instead. So far I&#8217;ve been only able to get this to work in a few browsers as you&#8217;ll see below.</p>
<h3>Local File Access</h3>
<p>Flash was nice in that it had a <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Security.html#sandboxType">localTrusted</a>Â <a href="http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7e3f.html">security sandbox</a> later with a unique per system file for <a href="http://blogs.adobe.com/penguinswf/2008/08/secrets_of_the_mmscfg_file_1.html">mms.cfg</a> configuration to allow secure sandboxes. Browsers aren&#8217;t like this.</p>
<p>Firefox requires <a href="http://stackoverflow.com/questions/3481977/is-there-a-way-to-bypass-javascript-jquerys-same-origin-policy-for-local-acce">some config</a> changed to allow this.</p>
<p><a href="http://stackoverflow.com/questions/4556429/disabling-same-origin-policy-in-safari">Safari</a> and <a href="http://stackoverflow.com/questions/3102819/chrome-disable-same-origin-policy">Chrome</a> still want you to launch it in a certain mode.</p>
<p>I still haven&#8217;t figured out IE.</p>
<p>I&#8217;ve been using <a href="http://www.charlesproxy.com/">Charles</a> for mapping to local directories on my machine. This is used to fool the browser into working, even for production URL&#8217;s, so should work in IE when I have more coffee.</p>
<p><a href="http://www.johnkpaul.com/">John Paul</a> suggested I use Underscore&#8217;s <a href="http://underscorejs.org/#wrap">wrap</a> function as another alternative which I haven&#8217;t tried yet.</p>
<h3>Modules / Packages / Dependencies</h3>
<p>As your application grows, you&#8217;ll quickly outgrow initializing everything in your index.html; ie you&#8217;ll start to get a lot of classes. While Backbone comes with Underscore to give you basic inheritance beyond Object.prototype, you still have no package solution like ActionScript 2/3/Java/Ruby/Python/PHP/Corona/C#&#8230; (hell, everyone but JavaScript) give you.</p>
<p>Additionally, you don&#8217;t have a dependency management solution; you have to manually control who&#8217;s loaded, and when. That is simply not feasible in a reasonably sized JavaScript application, even with 1 developer vs. 4.</p>
<p>This is where <a href="http://requirejs.org/">RequireJS</a> comes in.</p>
<p>Considering Require has to account for how you create &#8220;classes&#8221; in a language that provides basically (lol, basic&#8230; yeah&#8230; heh&#8230; sigh&#8230; :: takes a shot ::) 3 ways to do so (<a href="http://www.adobe.com/devnet/html5/articles/javascript-object-creation.html">Object.new</a>, Object.prototype, and closures), various libraries that have their own dependencies, as well as how all libraries handle putting themselves on the global objects (ie window, document, etc.) differently&#8230; Require has a lot of work to do on just cleaning up the language.</p>
<p>ActionScript 1 solved part of this via the <a href="http://livedocs.adobe.com/flashlite/3.0/docs/help.html?content=00004837.html">#initclip</a> / #endinitclip pragmas. You&#8217;d put those at the top of your class with a number, like #initclip 3, and you could then control the load order of classes.</p>
<p>ActionScript 2 solved the packages part by building packages that compiled down to object dot notation, and abstracted both that as well as the #initclip stuff away from developers.</p>
<p>ActionScript 3 gave you namespaces with traits to speed up prototype chain lookup speed.</p>
<p>JavaScript has none of that.</p>
<p>Require tries to do all of that. And then some, such as optimization. Just read the <a href="http://requirejs.org/docs/why.html">why</a>Â and you&#8217;ll get it. Backbone apps work just fine with Require, and I encourage you to do so to ensure your application can reasonably scale on a multi-person team right out of the gate.</p>
<p>Here&#8217;s how you use Robotlegs in a class within a package (set of nested folders):</p>
<pre lang="actionscript">// MainContext.as
package com.jxl.minecraftrecipes.rl
{
	import com.jxl.minecraftrecipes.rl.mediators.FavoritesRecipeViewMediator;
	import com.jxl.minecraftrecipes.rl.mediators.RecipeViewMediator;

	import flash.display.DisplayObjectContainer;

	import org.robotlegs.mvcs.Context;

	import views.FavoritesRecipeView;
	import views.RecipeView;

	public class MainContext extends Context
	{
		public function MainContext(contextView:DisplayObjectContainer=null, autoStartup:Boolean=true)
		{
			super(contextView, autoStartup);
		}

		public override function startup():void
		{
			this.injector.mapSingleton(FavoritesModel);

			mediatorMap.mapView(RecipeView, RecipeViewMediator);
			mediatorMap.mapView(FavoritesRecipeView, FavoritesRecipeViewMediator);

			super.startup();
		}
	}
}</pre>
<p>Here&#8217;s how you do the something similiar in Require:</p>
<pre lang="javascript">// config.js
(function() {
   require.config({
      baseUrl: "./js",
      optimize: "none",
      paths: {
         "../../libs",
         handlebars: "../../libs/handlebars/hbs"
      },
      packages: [
         {
            name: "underscore",
            location: "../../libs/underscore_132",
            main: "underscore",
         },
         {
            name: "backbone",
            location: "../../libs/underscore_132",
            main: "underscore",
         }
   });
}).call(this);</pre>
<p>Basically configure the root directory (&#8220;js&#8221;), set some paths so you can use them either as additional source paths, or short cut names (like I did with handlebars), and finally determine your packages: where they are and what their names are. Keep in mind Require has a strict coding convention for what packages are.</p>
<h3>Optimization</h3>
<p>When you compile a Flex or ActionScript application, here&#8217;s basically what happens:</p>
<ol>
<li>all MXML is converted to ActionScript</li>
<li>all ActionScript is converted to ABC byte code (small, procedural)</li>
<li>ABC is converted to MIR (a language JUST above machine code; easier to target different chipsets &amp; optimizations in MIR)</li>
<li>some MIR is converted to native code, some is compiled natively via JIT, and some just chills out</li>
<li>all of that is compressed via gzip with additional optimizations to shrink it to a small file size (remember, it was made this way when modems ruled t3h interwebz and bandwidth was tincy and faulty)</li>
<li>images are compressed, whether using PNG or JPEG</li>
<li>audio files are compressed (ADPCM, MP3, Speex, etc)</li>
<li>fonts are converted to 1 of the 3 font engines, sometimes decreasing file size as only certain glyphs are converted to specific vector graphics)</li>
<li>any other file is embedded and gzipped</li>
<li>all this is put into a single SWF file, usually on frame 2, with a class on frame 1 to show a preloader and &#8220;new&#8221; frame 2.</li>
</ol>
<p>Why is this good? You get an ultra compressed, self-contained, single HTTP request file with all dependencies delivered to the client in a streaming fashion. And it works. This is why we Flash Devs never got JavaScript&#8217;s eval, because our code is actually compiled. JavaScript in the browser has none of that.</p>
<ul>
<li>All files are un-optimized text. Seems trivial, but for large applications, this can add up. For smart phones and tablets, while sometimes fast, this costs people money.</li>
<li>Since there are multiple files, this is multiple HTTP requests. These take both time to create/destroy, and elongate how long it takes for your application to start and/or transition to a new section. This is really bad on some mobile devices, not just desktop. It&#8217;s REALLY fun to use these apps on slow VPN.</li>
<li>If a class isn&#8217;t loaded let and you try to use it, things break.</li>
<li>Browsers love to swallow null pointer exceptions making the above really challenging to debug.</li>
<li>While you could theoretically remember to load certain files in certain orders, God help you if you ever have to, heck, WANT to refactor. On a multi-person team, even with Git, you&#8217;re eff&#8217;d.</li>
</ul>
<p>Require has a variety of optimization tools that basically combine all your files into a single JS file, strip out all whitespace, convert all your variables to 1 letter variables, amongst other things. Basically makes your code unreadable, too;Â obfuscationÂ isn&#8217;t the goal here, though. There are many others too like <a href="http://www.crockford.com/javascript/jsmin.html">JSMIN</a> and Yahoo&#8217;s <a href="http://developer.yahoo.com/yui/compressor/">YUI</a>, many of which you can <a href="http://refresh-sf.com/yui/">use in a browser</a>.</p>
<p>Conclusions</p>
<p>As you can see, Backbone has a lot of the core features you need to build applications in JavaScript. It has Models that follow the typical Observer pattern of holding your data and broadcasting messages for those who care to know about changes. It has View&#8217;s (which act as Robotlegs Mediators or the Controller on top of PassiveView HTML) allowing you to handle the traditional race condition of &#8220;my data is ready, but my view is not&#8221; vs &#8220;my view is ready but my data is not&#8221; by both accessing Models directly and listening for messages via Underscore&#8217;s messaging system which you can make a global event bus if you wish. Finally, it&#8217;s Router allows you to marry your application as a <a href="http://jessewarden.com/2012/07/finite-state-machines-in-game-development.html">state machine</a> against the browsers&#8217; URL bar to support both deep linking, back/forward navigation, and history.</p>
<p>Riding on top of Underscore, it ensures you have all the basicÂ necessitiesÂ you need for making JavaScript easier to use. Although, I still think if you&#8217;re going to utilize JavaScript swapping out dynamic HTML for Views, then you really need a good templating engine such as Handlebars or Mustache.</p>
<p>The current pain point I&#8217;m still working on and haven&#8217;t figured out yet is unit testing Backbone models. On reasonable sized Flex projects that have issues, my first order of business is to break out the parsing logic and the service logic into separate classes so I can create them as units to be easily tested. This copious <a href="http://jessewarden.com/2012/04/consulting-chronicles-6-refactoring.html">refactoring</a> continues until &#8220;a Model&#8221; consists of a variety fo classes.Â Backbone puts all of them together into 1 class and with browsers having really strict local file access rules + the fact services are actually inside of it via jQuery Ajax calls, it has made it challenging to fake their service calls to fixtures/mocks&#8230; and test only 1 thing. Anyway, I&#8217;m still learning.</p>
<p>Hope this helps!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessewarden.com/2012/08/backbone-js-for-flash-and-flex-developers.html/feed</wfw:commentRss>
			<slash:comments>14</slash:comments>
		
		
			</item>
		<item>
		<title>Adobe, Please Bring Flash Builder Up To Par</title>
		<link>https://jessewarden.com/2010/09/adobe-please-bring-flash-builder-up-to-par.html</link>
					<comments>https://jessewarden.com/2010/09/adobe-please-bring-flash-builder-up-to-par.html#comments</comments>
		
		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Wed, 08 Sep 2010 17:42:49 +0000</pubDate>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[fdt]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[intellij]]></category>
		<category><![CDATA[visualstudio]]></category>
		<guid isPermaLink="false">http://jessewarden.com/?p=2442</guid>

					<description><![CDATA[This post is long overdue, and I want to personally apologize to Adobe for taking so long to post it. Adobe (Macromedia?) thrives on customer feedback, early, and makes a serious effort to prioritize on it whilst comparing to their own market research data they do by proactively reaching out. I haven&#8217;t done this in [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This post is long overdue, and I want to personally apologize to Adobe for taking so long to post it.  Adobe (Macromedia?) thrives on customer feedback, early, and makes a serious effort to prioritize on it whilst comparing to their own market research data they do by proactively reaching out.  I haven&#8217;t done this in a long while, focusing on business vs. the actual tools &amp; runtimes.</p>
<p>It&#8217;s long overdue.  <a href="http://www.adobe.com/products/flashbuilder/">Flash Builder 4</a> is a mess, and hopefully fixing/improving the following items will bring it up to par. Â If you are a product engineer, <a href="http://jessewarden.com/2010/09/adobe-please-bring-flash-builder-up-to-par.html#problems">skip the intro</a>.</p>
<p><span id="more-2442"></span><strong>Problem</strong></p>
<p>Flash Builder 4 is a great leap forward from Flex Builder 3. Â It&#8217;s not any large features, but rather a bunch of little, consistent things that lead to a pleasant experience.</p>
<p>Years of neglecting other areas, as well as blatant missing features that open source alternatives &amp;Â competingÂ IDE&#8217;s have makes me question if there is any serious money behind Flash Builder. Â I know the effort and will are there; even after distancing myself from the Adobe product teams the last 3 years, when I do return via email/Twitter, they still have great attitudes, and want to continually improve their tools/runtimes.</p>
<p>Bottom line, I and many others are more productive using open sourceÂ alternativesÂ to Flash Builder, and usually only keep Flash Builder around for 3 key features (Library project linking, Design View, and superior MXML handling, specially with states). Â There are a lot of common workflows that seem to be ignored, and even after 4 years of the community bringing them up, they still aren&#8217;t remedied.</p>
<p>I outline the problems below with potential solutions. Â Some solutions are actually easy; you just copy open source implementations.</p>
<p><strong>Call To Action</strong></p>
<p>I cannot promote Flash Builder 4 to my clients, nor will I spend another dime on Flash Builder 4/5 licenses until Adobe takes Flash Builder seriously by making 5 on par with open source alternatives. Â While I respect that some of the blame lies on the <a href="http://eclipse.org">Eclipse</a> foundation, Adobe clearly thinks there is value there if they base a Designer specific tool&#8217;s future, <a href="http://adobe.com/products/catalyst/">Catalyst</a>, on top of Eclipse&#8217;s architecture.</p>
<p>I, and millions of others sent a message to Adobe with CS4. Â We were sick and tired of incomplete features, bugs, and crashes. Â Adobe then laid of 10% of their staff due to poor CS3 sales&#8230; even though 1 month prior their CEO was on stage at the Adobe MAX conference saying sales were doing well. Â They did this again the following year. Â You can blame it on theÂ recession. Â You can blame it on a public company doing what most do in down times; laying off staff to boost their stock value when dividends are nowhere to be seen because there is no forthcoming company revenue.</p>
<p>&#8230;or you can take responsibility for your bad software, and fix it. Â I was a devoted customer until CS3; we fought with our wallets, and our wallets won. Â  Which sucks. Â My career and life are based on Adobe&#8217;s product line. Â When you, Adobe, suck, life sucks. Â Not just for me, for the world. Â You&#8217;re doing important work.</p>
<p>The following are problems with potential solutions.</p>
<p><a name="problems"></a><strong>1. Code Hints</strong></p>
<p><a href="http://www.flashdevelop.org/wikidocs/index.php?title=Main_Page">Flash Develop</a>, <a href="http://www.fdt.powerflasher.com/">FDT</a>, <a href="http://www.jetbrains.com/idea/">IntelliJ</a>, and <a href="http://www.microsoft.com/visualstudio/en-us/visual-studio-2010-launch?WT.mc_id=SEARCH&amp;WT.srch=1">Visual Studio</a> all give code hints for your classes, methods, and variables WHILE YOU TYPE. Â No period needs to be post-reached, not keyboard command; it just shows you a drop down WHILE YOU TYPE.</p>
<p>Worse, if youÂ misspellÂ something and back up, most of the time the drop down will go away, forcing you to spend more time to get the code hint to come back up&#8230; or just say eff it and code like your in AS1 (or Python).</p>
<p>This should be top priority; I understand if you&#8217;re waiting on Eclipse to add this.</p>
<p><strong>2. Automatic Class Importing</strong></p>
<p>Flash Develop and FDT both auto-import for you while you type and hit enter. Â IntelliJ gives you the option to hit Alt+Enter to import a class of your choice, or perhaps define it which is even cooler. Â Know what Flash Builder does? Â Doesn&#8217;t compile, and blames it on you. Â Gee, thanks $500 IDE. Â I paid you $500 bucks to bitch at me and not auto-import my class you know full well where it is.</p>
<p>My code is littered with var a:SomeClass. Â If you go on a blank line, and type var a, it&#8217;s the quickest way to get the class drop down. Â From there, you can hit enter which&#8217;ll auto import the class. Â You then delete the line.</p>
<p>Half of the problem is that the drop down is just flaky; miss it, and it won&#8217;t import your class. Â Just start typing in a non-start line place, and Flash Builder won&#8217;t even give you a code hint. Â Import yourself.</p>
<p>Please do a better job of auto-importing. Â Level 1 is to get what Flash Develop/FDT do, Level 2 is to match IntelliJ&#8217;s intelligent options.</p>
<p><strong>3. Slow Code Hinting Response &amp; Mispellings</strong></p>
<p>Part<span style="color: #000000;"> of the problem is the code hinting is just slow. Â IntelliJ, which is slower than Eclipse, still seems to consistently work. Â While Flash Builder 4 has significant improvements forÂ misspellingsÂ over Flex Builder 3,Â ESPECIALLYÂ in the class creation dialogue, for the code hints, 9 times outta 10, if you mispell &#8220;Graa&#8221; instead of &#8220;Grap&#8221; for Graphics, good bye dialogue, please start again.</span></p>
<p><span style="color: #000000;">If you can&#8217;t increase the responsiveness, then just be more forgiving with spelling, or just fix #1, and you should be good.</span></p>
<p><span style="color: #000000;"><strong>4. Stop Being ActionScript Racist: ActionScript vs. Flex</strong></span></p>
<p><span style="color: #000000;">You all have been doing this crap since Flash 8. Â Back then, you&#8217;d show AS3 code hints for AS2; even help would show AS3 when I specifically set AS2 in the publish settings. Â Back then, QA wasÂ sincerelyÂ concerned, but it still shipped. Â &#8220;We don&#8217;t want you to use AS2 anyway&#8221;.</span></p>
<p><span style="color: #000000;">When people like <a href="http://www.bit-101.com/blog/">Keith Peters</a>, <a href="http://stevensacks.net">Steven Sacks</a>, <a href="http://gskinner.com/blog">Grant Skinner</a>, and <a href="http://darronschall.com">Darron Schall</a> bitch about it, and you do nothing, that&#8217;s a serious communication problem&#8230; and makes me question if the assholes who used to run Flash Media Server 1 &amp; Flex 1 teams are now running Flash Builder team. Â Aka, &#8220;Screw you, your ideas make us and our shareholders no money, please DIAF.&#8221;</span></p>
<p><span style="color: #000000;">When I create an ActionScript 3 project, and go to import flash.display.Graphics, but you give me a code hint spark.primitives.Graphic, I want to throw a nuke at San Fran. Â It&#8217;s a waste a time, confusing, and causes compilation problems. Â It also leads to subtle, yet horrible problems where <a href="http://www.gskinner.com/blog/archives/2010/03/building_framew.html">FlexÂ dependencies</a> get leaked into potentially awesome AS3 only libraries. Â <a href="http://github.com/mikechambers/as3corelib">as3corelib</a> is a perfect example. Â Was pimp&#8230; then someone accidentally imported mx.formatters.DateFormatter&#8230; AND YOU&#8217;RE FUCKED!</span></p>
<p>If I create an AS3 project, get your damn Flex outta my code. Â I&#8217;m Jesse Warden, you know I love Flex,Â especiallyÂ 4 now that I&#8217;ve drunken the Kool-Aid. Â But when I&#8217;m coding an AS3 only AIR project for Android to help promote your technology, and your own IDE starts getting all AS3 racist on me, it makes me RAAAGGGEEE!!!</p>
<p><strong>5. Linking Projects: Unit &amp; Visual/Functional Testing</strong></p>
<p>Linking projects is just garbage and does not work. Â One of the greatest features you all implemented in Flex 2 was Library Projects. Â Using Library projects, you can also make Design View quite useful in Flex 3. Â You just build all your GUI in the Lib, and implement with application logic in your main project. Â Since it&#8217;s a Library project that&#8217;s pre-compiled, all your graphics show up nicely in Design View.</p>
<p>&#8230;if you want to unit test or do visual tests, however, it&#8217;s a nightmare. Â In this case, I have 3 options (3rd is make your own command line build script for mxmlc).</p>
<p>I can either integrate all my unit testing code &amp; framework libraries into the project itself, or setup a new Flex/ActionScript project specifically for just testing the code. Â If you&#8217;ve ever worked with a large team, you know that the 1st doesn&#8217;t work. Â All someone has to do is get out of sync and/or break the build, and poof, productivity grinds to a halt. Â Broken builds, source control/SubClipse can get out of whack, or strange conflicts can result. Â Things happen, no big deal.</p>
<p>The big deal is you can lessen the impact by creating new projects so developers can work on their projects and do integration testing with their new code on their own terms when they are ready to lessen the impact on the team. Â It&#8217;s a very simple thing to do.</p>
<p>The problem is, this sucks. Â Linking to Library projects is magic; it&#8217;s why people still keep Flash Builder around when theyÂ primarilyÂ use FDT. Â You just click the &#8220;Add Project&#8221; button for Library paths, and BOOM, you&#8217;re linked. Â It automatically recompiles your SWC, and copies the fresh mofo over. Â No manual refreshing, no Project Clean n&#8217; Pray&#8230; it just works. Â THIS is where I&#8217;m glad some of my $5oo bucks went.</p>
<p>For projects? Â No such love. Â I have to manually point the source to the other project&#8217;s source. Â While in the same Workspace, apparently Eclipse doesn&#8217;t think that&#8217;s useful and makes me manually navigate there via Finder/Explorer. Â Worse, you have to do it AGAIN for your libs folder since it&#8217;s a source path link and not a real project reference.</p>
<p>&#8230;and it gets worse. Â Because it&#8217;s a source path to an open project, Eclipse gets confused sometimes. Â  You&#8217;ll run into situations where you can have to &#8220;MyCustomButton.as&#8221; files open. Â Which tab is which? Â Why is one &#8220;out of sync&#8221;? Â How come sometimes I compile and run and the code hasn&#8217;t changed?</p>
<p>This is even more important for components you&#8217;re testing in AIR projects. Â Most AIR projects have complicated bootstrapping, so it&#8217;s not very straightforward to just test a new AIR application (which creates yet another AIR config xml file). Â It&#8217;s easier just to create a quick ActionScript/Flex project, and test the components in isolation. Â Quicker to solve bugs too.</p>
<p>Please fix linking projects (Library projects work just fine).</p>
<p><strong>6. Design View</strong></p>
<p>What the hell did you do!? Â This worked fine in 3. Â In 4, sometimes my drops are ignored. Â My pixel perfect placements take 3 drags to get right. Â Sometimes it just gets locked up, and I have to manually hit the refresh button. Â Based on Twitter, there are only 3 other people in the world who use Design View; the rest are crayon pushers who use Catalyst, so maybe that&#8217;s why. Â Still, if you don&#8217;t want us to use it, then make it like the Behaviors Panel in Flash, and REMOVE IT.</p>
<p><strong>7. Proactive Error Checking</strong></p>
<p>mxmlc&#8217;s incremental compilation is rad. Â I know those coming from <a href="http://www.sybase.com/products/modelingdevelopment/powerbuilder">PowerBuilder</a>, Java, and other large Enterprise systems which have tools that are pretty smart at only re-compiling what is needed are somewhat critical of mxmlc&#8217;s speed. Â Whatever, if you worked on projects in Flex Builder 2, and then did projects in Flex Builder 3, it was light years better. Â If you did work in Flash IDE, then went to <a href="http://mtasc.org/">MTASC</a>, then went &#8220;back&#8221; to Flex Builder 2, then 3&#8230; it was UBER-light years better.</p>
<p>That said, the background compilation for errors doesn&#8217;t really do much. Â IntelliJ really wins here in making use of the full IDE to HELP you, vs. just inform you&#8217;re screwed, noÂ compilationÂ for you. Â Right now, most messages in Flash Builder&#8217;s mxmlc errors are good enough, and clicking on the error to go to the line is great.</p>
<p>However, IntelliJ makes the word/area red, puts red tick marks on the right side to indicate where in the class the error is, and even underlines the tab&#8217;s class name itself to imply &#8220;this class has an error&#8221;. Â That&#8217;s 3 visual indicators each covering a different spacial area all to be proactive to help you FIND problems. Â Even cooler, IntelliJ has some helpful options to import a class you forgot, show a possible mispelling, or allow you to create a class that doesn&#8217;t exist yet.</p>
<p>These common problems are old. Â IntelliJ has found ways to help you solve these common problems. Â I fail to see why at version 4 we&#8217;re still ways away from this. Â All we get a list of red dots plus reasons away from the code itself and everyone I know ignores all of them except for the 1st. Â Context is key, and in-code errors plus helpful solutions would be great.</p>
<p><strong>8. Copy Paste</strong></p>
<p>How come I can&#8217;t copy paste from Flash Builder to Flash? Â Some programs just seem to ignore the clipboard from Flash Builder. Â Others on Twitter have reported the clipboard in Eclipse is reclusive for them as well.</p>
<p><strong>9. Pasting Multiple Files</strong></p>
<p>I have flexunit4.swc, hamcrest.swc, mockolate.swc, greensock.swc. Â I copy them from my Finder. Â I paste them into my libs folder inside of Flash Builder&#8217;s project panel. Â Only flexunit4.swc makes it. God dammit.</p>
<p>Please fix this.</p>
<p><strong>Conclusions</strong></p>
<p><span style="color: #000000;">If you fix the above, you&#8217;ll start to become on par with Flash Develop/Intellij/FDT. Â Once you do that, I can justify spending $500 again for an IDE. Â Right now, beyond MXML handling, states preview, and consistent Library Project linking, I&#8217;m not sure why I paid for in my upgrade from 3 to 4. Â Whatever I can do to NOT use Flash Builder 4, I&#8217;ll do. Â Either you all were rushed, you don&#8217;t have enough money behind the project, or y&#8217;all have never used another IDE beyond Flex Builder to code ActionScript.</span></p>
<p><span style="color: #000000;">If you didn&#8217;t listen to anything I said, then for Flash Builder 5, please:<br />
</span></p>
<ol>
<li>copy Flash Develop&#8217;s code hinting</li>
<li>copy FDT&#8217;s code gen</li>
<li>copy IntelliJ&#8217;s proactive error handling &amp; auto-importing</li>
<li>copy FDT&#8217;s class re-factoring</li>
<li>fix Design View</li>
</ol>
<p><span style="color: #000000;"> </span></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessewarden.com/2010/09/adobe-please-bring-flash-builder-up-to-par.html/feed</wfw:commentRss>
			<slash:comments>129</slash:comments>
		
		
			</item>
		<item>
		<title>What I Learned From Microsoft MIX 2010</title>
		<link>https://jessewarden.com/2010/03/what-i-learned-from-microsoft-mix-2010.html</link>
					<comments>https://jessewarden.com/2010/03/what-i-learned-from-microsoft-mix-2010.html#comments</comments>
		
		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Thu, 18 Mar 2010 00:33:48 +0000</pubDate>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">http://jessewarden.com/?p=2106</guid>

					<description><![CDATA[*** I apologize for the &#8220;&#8230;&#8221;; this is a stream of conscious post about my experiences. Â Some of it is cohesive, some not. *** I attended Microsoft&#8217;s MIX 2010 conference in Las Vegas the week after 360Flex. Â I had previously attended I think the 2007 or 2008 one. Â I had actually recorded a lot of [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>*** I apologize for the &#8220;&#8230;&#8221;; this is a stream of conscious post about my experiences. Â Some of it is cohesive, some not. ***</p>
<p>I attended Microsoft&#8217;s MIX 2010 conference in Las Vegas the week after 360Flex. Â I had previously attended I think the 2007 or 2008 one. Â I had actually recorded a lot of video from the first one and trashed all of it. Â The 200x one was an EXTREMELY weird conference. Â It occured in the Venetian, the same hotel that Adobe&#8217;s MAX was at. Â So, I had the opportunity to see the vibe differences between the 2 communities, and whoa man&#8230; what a difference.</p>
<p><span id="more-2106"></span>Adobe has more chicks, more of a party vibe, and &#8220;appears&#8221; more diverse in terms of backgrounds. Â In talking to some of the individuals at after parties, the majority at MIX were involved in the Microsoft technology stack in some shape or fashion whereas at Adobe, you had no clue what those people did. Â There were patterns, yes, but design, back-end, Flash, Flex, Python&#8230;. all over the map.</p>
<p>At the 200x one, when they showed Silverlight 3 new features, I nearly lost my shit. Â The audience was really excited about features that I perceived as things the Flash community had done 5 years ago. Â Yet, if you looked at the audience, they were eating it up, excited, and you could tell they couldn&#8217;t wait to start coding. Â After taking some time to reflect, I realized that Microsoft developers use Microsoft technologies. Â They don&#8217;t &#8220;branch out&#8221; like Adobe ones do. Â That&#8217;s why it&#8217;s rare as heck to see a .NET dev who uses Flash/Flex for their front-end. Â Most use AJAX&#8230; generated from Microsoft tools.</p>
<p>This year was different. Â I was armed with the understanding that Silverlight really isn&#8217;t just about competing with Flash/Flex/AIR in the video arena, but rather providing a missing piece that .NET devs didn&#8217;t have in the past. Â The features added into Silverlight 1 through 4 match a lot of what us Flash/Flex Developers have. Â They also validate our work.  It&#8217;s also about building on Microsoft&#8217;s platform, which is great.  You need a great web runtime + a phat browser + device to kick some tail.  Apple does it, Google&#8217;s doing it&#8230; Adobe?  Well, no device or browser, but Flash Player rocks, so&#8230;.</p>
<p>However, no matter how on parity those features get, or even surpass, the Microsoft community clearly is missing the design aspect in terms of designers working with .NET devs. Â There are some, yes, but it&#8217;s a night and day difference compared to your average Flex consulting firm, or Flash agency, or small software shop that uses Flex. Â I even talked to one small .NET shop manager who hired a Flash Designer specifically to get his UX/Design help with their Silverlight/WPF endeavors.</p>
<p>What many predicted finally came true: Microsoft forewent fighting Adobe on the design front, and embraced it. Â It&#8217;s actually scary vs. cool. Â I mean, it&#8217;s cool, but damn they did it well. Â I haven&#8217;t used the tools in production, thus this entire paragraph is suspect, but wow. Â They are now supporting PSD (Photoshop) and AI (Illustrator) native import as well as FXG. Â Holy. Â Shit. Â I was on my 2nd cup of coffee, and I still did a triple take when <a href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a> mentioned &#8220;So, we&#8217;re going to import some FXG&#8230;&#8221;. Â Say what? Â Where&#8217;s Design!?</p>
<blockquote><p>&#8220;Designers don&#8217;t use Design, they use Photoshop &amp; Illustrator.&#8221;</p></blockquote>
<p> said Mike Downey when I confronted him about it. Â His tone was very matter of fact, confident&#8230; almost like, &#8220;Yeah man&#8230; exactly&#8221;. Â What that means, though, is that they are on the RIGHT path. Â Very cool stuff to embrace the design tools we all use. Â Also lowers the barrier of entry for the design agencies to work with these Microsoft shops as partners. Â Wow.</p>
<p>Yet again, it was great to see Sketchflow in action. Â Rapid prototyping is HUGE in helping sales snag gigs, and now that the .NET world has a way to do this WITH valid design tools, man.</p>
<p>The common theme of the conference was &#8220;mobile, mobile, mobile&#8221;. Â They were pushing their Windows Mobile 7, or whatever the heck it&#8217;s called, HARD. Â I body checked &#8217;em on the 3 buttons, and they had some valid use cases. Â Everyone codes a back button in iPhone apps&#8230; why not remove that step and put it natively on the phone? Â Also, making search a first class citizen. Â Well&#8230; can&#8217;t argue with that.</p>
<p>Like I drunkenly yelled at <a href="http://www.flashstreamworks.com/">Jens</a>, this was the most amazing keynote I&#8217;ve seen in terms of flow and momentum. Â Microsoft this year clearly had it down pat. Â They had a consistent message, it was effectively communicated, and it inspired the audience into action. Â Well&#8230; mostly. Â While the developer story was picturesque with all the tools working together with a device &amp; marketplace just waiting on you to start coding, the phone doesn&#8217;t exist yet. Â iPhone does. Â When it arrives, though, holy fish. Â I believe Adobe can definately have just as a compelling story&#8230; but there was just something really professional, confident, and effective at this MIX keynote. Â Maybe it was the speakers&#8217; experience level. Â Maybe it was good rehearsal. Â Maybe it was good content. Â Every speaker was certainly very positive and didn&#8217;t come across as better-than-thou like in times past. Â Maybe it was all it. Â Bottom line, it was great, and set a high bar.</p>
<p>&#8230;.but like I said, the audience is just not a Adobe audience. Â If it was, it would of been a lot louder, with random screams and yells, perhaps some heckling. Â .NET devs need more Redbull&#8230; that&#8217;s all I can say. Â Maybe some Picasso too. Â I don&#8217;t know. Â Maybe that&#8217;s why all the Flex &amp; Flash devs were there. *ahem*</p>
<p>I hopped around sessions to &#8220;see what people were working on&#8221;. Â They were doing the same things we&#8217;re doing. CMS systems that have rich front-ends to manage &amp; deploy media. Â Video players. Â Mobile development for phones that don&#8217;t exist (see what I did thar?). Â Dealing with scaleable client-side software via modules. Â Bottom line, they are a lot like us, doing very similar work. Â Sadly, most of the Silverlight specific stuff is still funded-by-Microsoft vs. a client hiring someone/some firm/company. Â While the technology seems to be ready, the market isn&#8217;t.</p>
<p>And that leads me to my conclusion. Â Once they get to 60%, we&#8217;re in trouble. Â Not big trouble, but we WILL start losing work. Â At that point, you have 2 choices. Â You can take the Cynergy approach of a few years ago, and go, &#8220;Dude, we do both &#8217;cause they both rock!&#8221;, or you can just deal with the reduced amount of gigs. Â I don&#8217;t know to what degree this will affect the Flash/Flex world, but I know a lot of the big clients I&#8217;ve had in the past 2 years will no longer exist&#8230; unless I code Silverlight. Â I, like others, still get a lot of work, so it&#8217;s not like we&#8217;ll just become unemployed, not in the least. Â It&#8217;s just that the &#8220;MLB&#8217;s&#8221; and the &#8220;Olympics&#8221; style gigs will start to flow towards the Microsoft realm vs. the Flash realm. Â And no, just because Flash has a higher install base won&#8217;t matter. Â I can&#8217;t compete with free, regardless if my plugin of choice is at 99% and theirs is at 60%. Â That said, Java/Python/Ruby etc. still exist in large quantities. Â They target specific markets &amp; verticals. Â A lot of those is where Flash &amp; Flex still shine, and will continue to do so. Â Not everyone on the planet uses Microsoft technology stacks.</p>
<p>ESPECIALLY in the consumer sphere.</p>
<p>That&#8217;s what was interesting about the way Microsoft pitched their phone. Â To consumers. Â They hired all the right people, said all the right things, integrated all the right tools. Â While I&#8217;m sure the manufacturers will make pimp devices, it&#8217;s challenging not to be cynical about Operators. Â I guess if Apple can do it with glib, perhaps Microsoft can do it with dough?</p>
<p>Finally, Microsoft is definitely hiring the right people. Â They are positioning key individuals in certain parts of the company, removing the old guard who just don&#8217;t get the web, nor younger consumers.</p>
<p>Will I be doing anything different after my 2nd MIX? Â No. Â Yes, I&#8217;ll be keeping in touch with my new found Microsoft friends&#8230; but until the Silverlight work flows to me vs. me having to form Microsoft consulting/partner relationships, nothing changes in my world. Â It&#8217;s all about the money. Â If people pay, I&#8217;ll do it. Â Right now, Microsoft pays. Â I don&#8217;t mind working as a partner for Microsoft, but right now the world knows me as a Flash &amp; Flex Dev who likes to kick ass with Flash Player, not Silverlight. Â It&#8217;s up to the greenbacks flow to change that.  I know it comes off as reactive, but the Microsoft market is large enough that if I did dive in, I&#8217;d have zero problem finding clients even if am &#8220;late to the game&#8221;.</p>
<p>Oh yeah, and lastly, all the &#8220;free&#8221; software Microsoft is releasing to get you on board is a smart f&#8217;ing move. Â And Visual Studio still looks awesome&#8230; so does C#. Â Maybe I&#8217;ll go learn <a href="http://unity3d.com/">Unity</a> this weekend to get taste without having to dust off my PC or install VMWare or whatever it&#8217;s called. Â Anything I can do to avoid Objective C&#8230;.</p>
<p>Anyway, thanks a ton to Microsoft for inviting me, I really appreciate it and all the events, they were fun, and I love meeting new people. Â It was the best MIX yet, I learned a lot, and I look forward to speaking at the next one!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessewarden.com/2010/03/what-i-learned-from-microsoft-mix-2010.html/feed</wfw:commentRss>
			<slash:comments>14</slash:comments>
		
		
			</item>
		<item>
		<title>What I Learned From 360Flex 2010</title>
		<link>https://jessewarden.com/2010/03/what-i-learned-from-360flex-2010.html</link>
					<comments>https://jessewarden.com/2010/03/what-i-learned-from-360flex-2010.html#comments</comments>
		
		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Wed, 17 Mar 2010 23:43:06 +0000</pubDate>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">http://jessewarden.com/?p=2102</guid>

					<description><![CDATA[Preface I attended and spoke at the 360 Flex conference in San Jose this year. Before the high fades away, I wanted to post what I learned last week for a few reasons. First, to share with others. Second, to share for those who didn&#8217;t attend, but might if they feel they&#8217;d gain something from [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Preface</strong></p>
<p>I attended and spoke at the 360 Flex conference in San Jose this year.  Before the high fades away, I wanted to post what I learned last week for a few reasons.  First, to share with others.  Second, to share for those who didn&#8217;t attend, but might if they feel they&#8217;d gain something from it.  Third, a growing number of Flex devs, albeit really small, feel they don&#8217;t gain much from conferences.  I wanted to show a potential counterpoint to this in hopes it&#8217;ll convert them back.</p>
<p><span id="more-2102"></span>360 Flex was in San Jose, California this year, so it&#8217;s a long hike.  That said, people from all over the USA and world converged to meet &amp; greet.  360 Flex is THE premiere Flex conference.  As a speaker, it&#8217;s always been the place, next to Boston, where I KNOW people in the audience will get what I&#8217;m talking about.  As I&#8217;ve progressed in my career, I&#8217;ve struggled to present topics that weren&#8217;t too advanced for the general Flex community, yet would interest those who are advanced as well.  Her majesty constantly reminds me that the things I&#8217;ve spoke about 2 years are still very relevant to Flex &amp; Flash devs today, and I should find some way to get passionate enough about those topics so I can speak on them.  Regardless, I don&#8217;t have that problem in San Jose and Boston, so it was a nice reprieve.</p>
<p>This attitude is based on my perceptions of the body language of the audience as well as twitter &amp; in person responses afterwards (or lack thereof).  It&#8217;s not 100% accurate, but I can usually read an audience, knowing if they are getting it, and recognizing what things in my talks need to change material wise.  I also find that I speak better when I&#8217;m jet lagged and/or hung over.  This mellows my normal spazz-tastic nature, and helps me find a really good pace, especially if her majesty reminds me to have fun before hand.  Timing these sorts of things is hard, hehe.</p>
<p>I&#8217;m usually just so excited to speak about something I love that I forget the basic tenets of giving speeches, and that is &#8220;effective pausing&#8221;, pace, and stopping to re-assess the audience&#8217; engagement.  That&#8217;s one of the reasons I continue to speak.  I feel like I rock at Flex, but still have a long way to go at speaking.  Regardless, what &#8220;job&#8221; allows you to spread knowledge, gives you the opportunity to have dialogues with geniuses, and act like a crackhead in front of an audience causing them to <a href="http://andrewteman.org/blog/wp-content/uploads/lolcano.gif">lolcano</a>?</p>
<p>I may not come away from conferences &amp; user groups with gallons of insight like I did in the past, but I&#8217;ve found other angles of knowledge, and EVERYTHING is right with making new friends, and re-connecting in person with existing ones.  I love this shit.</p>
<p><strong>Goal: Flex 4 and Catalyst Workflows, &amp; Meeting Different, New People</strong></p>
<p>My goals for Flex/Flash specific conferences nowadays are to hit the sessions that are gaping holes in my knowledge. Â I&#8217;m probably the last Flex dev on the planet who doesn&#8217;t use Flex 4. Â This is a combination of my consulting work on existing Flex 3 projects, tight deadlines, and the need for dependability. Â Thus, anything Flex 4 specific I&#8217;m interested in, not really from the technical side (Adobe&#8217;s got great docs), but more from piercing the marketing bs. Â Asking top tier to regular devs &#8220;how do you REALLY work with the tools?&#8221; and striking up a dialogue.</p>
<p>Another passion of mine is people. Â I love people. Â I love working at Starbucks, and even more so, Manhattan, because I&#8217;m surrounded by people. By energy. Â By life. Â It&#8217;s an exciting feeling, and helps motivate to create cool shiz. Â I&#8217;m fascinated by what makes people tick. Â I like to see how some people have certain causes that lead them to certain effects. Â If you challenge some commonly held beliefs, you can really get a good dialogue going with developers. Â If you make vaporous statements about commonly held agreements, you&#8217;ll nodding confirmations, but not much more. Â From groups to individuals, you can cause a lot of interesting things to happen.  IF you know what buttons to push.</p>
<p>I&#8217;m not just fascinated by crowds and groups, but by individuals. Â If you&#8217;ve ever been to a Microsoft conference, one thing that differentiates the Flash/Flex world from them is our diversity. Â We don&#8217;t have every application angle handled by Adobe, thus we must reach out to others for help in certain areas. Â While we do technically have a client side and middle tier, we don&#8217;t have a database solution. Â We must use MySQL, SQL Server, Oracle, etc. Â This requires us to integrate with other communities. Â In turn, they are exposed to us. Â We&#8217;re different, from different backgrounds. Â Some of the culture these clashes are bad, most are good.</p>
<p>Because our tech works with a common goal, we have a &#8220;managed diversity&#8221;. Â  Studies have proven that companies who have diversity that&#8217;s managed are more successful than those who don&#8217;t have diversity. Â In turn, those who are so diverse, but aren&#8217;t managed are worse. Â Flash hitting Rails, Flex hitting Django, AIR conjoining with C++. Â Design agency punks mingling with executive, khaki wearing Enterprise Java J2EE devs. Â It&#8217;s wonderful, crazy.</p>
<p>In short, the opportunity at these conferences, both large and small, to meet someone totally not like me is high. Â Yes, we have a common thread; we love t3h SWF. Â Yet we all have different backgrounds, different goals, desires&#8230; and once you dig into someone&#8217;s background, and get them talkin, I eat that shit up. Â I love hearing about where people come from, how they arrived where they are, and why they decided to come this way, if at all.</p>
<p>It&#8217;s said that the best things about tech conferences are the discussions between/after sessions. For me, it IS the conference. Â I&#8217;ve always tried to surround myself with people that are better than me. Â They rise you up. Â Debating with computer scientists, and genius artists&#8230; how can you NOT walk away a better person?</p>
<p><strong>What Did I Learn?</strong></p>
<p>A ton.</p>
<ol>
<li>A lot of developers don&#8217;t mind the lack of career path. Â You rise to architect/consultant level, and instead of hitting the glass ceiling and breaking into management, many just saturate Flex/Flash avenues as far as they can, or go learn another technology and do the whole thing over&#8230; only a lot quicker than it took them the first time.</li>
<li>A lot of developers read technical manuals &amp; programming books vs. marketing &amp; sales ones. Â There are exceptions, but most drink from the tech knowledge fountain and can&#8217;t get enough. Â I feel like I have a responsibility to help fill the gaps to help them so they either (A) don&#8217;t have to worry about this gap or (B) have a desire to get out of their comfort zone.</li>
<li>Adobe doesn&#8217;t like me much anymore. Â There are some great people there whom I still interact with, but it&#8217;s been pretty clear over the past 3 years that as I&#8217;ve moved into a more architect/sales role with my professional consulting, I&#8217;ve had zero time to evangelize software I don&#8217;t even fully believe in. Â You can get away with not filing bugs for Adobe as long as you evangelize and help the community, but even that value perception has fallen out of favor apparently. Â Given the fact that I&#8217;m focused on higher level problems like software workflows, marketing, sales, and products, this is time NOT spent talking about how dope Flex 4 states are, or how wonderful Flash Builder 4 handles certain coding challenges. Â I&#8217;m not alone in this career transition, it just sucks that I can&#8217;t really devote the time I need to get respected again. Â Additionally, Adobe&#8217;s focus, at least in the Flash Player sphere, has been exposing boilerplate API&#8217;s and functionality to allow them + 3rd parties to build powerful extensions on top fo the Flash Player. Â I totally agree with the approach, but I&#8217;m not technically saavy enough to really help them in this area. Â I know what my clients need and want, but translating that to a use case &#8220;please expose sound data via sound sample data so I can build <a href="http://www.hobnox.com/sidbr662tm3hnppndd05hjj9tgdo5/index.en.html">Hobnox</a>&#8221; is just not a jump I can technically make. To be fair, only 10% of it is CS3/CS4 related. Â I screamed and bitched at Macromedia and Adobe for years, and saw the fruits of my suggestions along with the communities become a reality. Â While some of their software is old, and it&#8217;s challenging for them to add pimp, new revenue generating features without alienating old markets or breaking old workflows, they still have people with mad skillz working for them, with a long successful track record (except for Flash CS3 and CS4; even though Fireworks CS3/4 crashes, we ALL love that prog). Â I&#8217;m still in good with the Flash Media team, though, and that&#8217;s been helpful since I&#8217;ve been 100% focused on video for the past 3 years. Â They are a pretty thick skinned bunch, so maybe that&#8217;s why&#8230; Anyway, given the amount of responsibility I have with running my own consulting firm + having 2 kids, I just don&#8217;t see how I can return to the days of old where I&#8217;d take 4 hours one night, create some kick ass shit, blog it, and thank Macromedia/Adobe for the cool toys&#8230;. and then suggest new things. Â Maybe someday.</li>
<li>The latest fad with our industry is Dependency Injection, and <a href="http://flexblog.faratasystems.com/">Yakov Fain</a> won&#8217;t tell me what the next fad will be&#8230; if you figure that out, you&#8217;ll be the shiz. Â Historically this has been what another programming community has had for years, and the Flash/Flex devs just suddenly get and freak out. Â While cool, it was apparently obvious to others.</li>
<li>If a mentoring program existed for the Flex community whose sole goal was to make 1 product/project complete and &#8220;live&#8221; from 1 of the 30 &#8220;side projects&#8221; each Flash/Flex dev has on their computer, the world would be an AMAZINGLY better place. Â All these 20% to 80% done apps/libraries/products that these developers have, some are really damn cool and NEED TO BE RELEASED. Â Those like me who know this have a moral responsibility to help/empower these individuals to &#8220;do the last 10%&#8221;. Â I don&#8217;t know how to do that, but it needs to be done somehow.</li>
<li>People who create kick ass open source projects don&#8217;t get enough feedback. Â The only solution I can think of is people need more evangelists to not only promote their projects if they aren&#8217;t capable of being evangelists themselves, but also utilizing those envangelists to forcibly extract/publicly recognize via Twitter &amp; Blog streams successful projects that have utilized their software. Â Meaning, like Joel Hooks will re-tweet Robotlegs endeavors done by the community to help give it a wider recognition. Â Additionally, he&#8217;ll interact with those who&#8217;ve done projects, and take &#8220;back to the Robotlegs community&#8221; the problems/concerns/commendations those who use the software. Â Steven Sacks getting public, community member quotes on the Gaia site is another example. Â Projects like PyAMF and Hamcrest need this role, and I&#8217;m not really sure how to help them recruit for it beyond citing simple tasks they can do to help themselves.</li>
<li><a href="http://polygeek.com/">Dan Florio</a> was right in ignoring my advice. Â I told him not to do <a href="http://runpee.com">RunPee.com</a>. Â I didn&#8217;t think it&#8217;d be profitable. Â I was wrong.</li>
<li>A lot of people in our industry are happy to make bling working on consistent Flex work with a consulting firm. Â I am not like this.</li>
<li>There&#8217;s a growing desire for many developers to learn &amp; teach UX concepts. Â This is a direct result from the lack of qualified UX talent. Â Since this discipline most affects our client&#8217;s bottom line as well as project costs &amp; risk&#8230; we don&#8217;t have time to wait for UX people to just magically popup out of colleges.</li>
<li>I&#8217;ve gone 10 years without having a contract of my own, and signing any contract a client/company/consulting firm throws at me. Â As long as the correct rate/price is on there, I didn&#8217;t care what the rest said. Â After seeing Ellie Khabazian&#8217;s presentation, while I won&#8217;t create a contract of my own (since the clients work with would never sign it) I will most definitely ALWAYS be reading contracts I sign, and adjusting wording as necessary. Â I&#8217;m one lucky mofo.</li>
<li>There seems to be more animosity towards Silverlight, and more fear towards HTML5. Â Those in the know don&#8217;t care about HTML5, and don&#8217;t seem to fear Silverlight.</li>
<li>A lot of the old Flash devs don&#8217;t seem to see a lot of rapid innovation in produced content, whereas the new devs seem to have that feeling of daily finding wonder that the old ones had back in 2002.</li>
<li>Twitter makes blogging hard. Â We all already knew this, I just got more corroboration.</li>
<li>Writing large scale examples for frameworks is a constant problem in &#8220;finding the time&#8221;.</li>
<li>I have a lot to learn about sales.</li>
<li>Getting developers on camera is freaking hard. Â For a podcast? Â Simple.</li>
<li>Getting <a href="http://kevinsuttle.com/">Kevin Suttle</a> to break character is freaking hard.</li>
</ol>
<p>Hope to see y&#8217;all another conference soon! Â Thanks <a href="http://twitter.com/jwilker">John</a> &amp; <a href="http://twitter.com/lordbron">Tom</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessewarden.com/2010/03/what-i-learned-from-360flex-2010.html/feed</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
	</channel>
</rss>
