<?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>Krotscheck.net &#187; google</title>
	<atom:link href="http://www.krotscheck.net/tag/google/feed" rel="self" type="application/rss+xml" />
	<link>http://www.krotscheck.net</link>
	<description>Michael Krotscheck's insights, ideas, and inspirations about web technology, life, and the kitchen sink.</description>
	<lastBuildDate>Fri, 03 Feb 2012 05:10:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Building a Javascript Compiler for Maven</title>
		<link>http://www.krotscheck.net/2012/01/25/building-a-javascript-compiler-for-maven.html</link>
		<comments>http://www.krotscheck.net/2012/01/25/building-a-javascript-compiler-for-maven.html#comments</comments>
		<pubDate>Wed, 25 Jan 2012 16:25:22 +0000</pubDate>
		<dc:creator>Michael Krotscheck</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[closure]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js-maven-plugin]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://www.krotscheck.net/?p=2317</guid>
		<description><![CDATA[This post is one in a series where I slowly assemble a Maven workflow for large javascript projects. If you came here via google, I recommend starting at the beginning: Designing a Javascript Maven Plugin. Alternatively, you can just go directly to the js-maven-plugin project on github. Since there’s no sense in rebuilding something that [...]]]></description>
			<content:encoded><![CDATA[<div class="callout">
<p>This post is one in a series where I slowly assemble a Maven workflow for large javascript projects. If you came here via google, I recommend starting at the beginning: <a href="http://www.krotscheck.net/2012/01/22/designing-a-javascript-maven-plugin.html" title="Designing a Javascript Maven Plugin">Designing a Javascript Maven Plugin</a>. Alternatively, you can just go directly to the <a href="https://github.com/krotscheck/js-maven-plugin" target="_blank">js-maven-plugin</a> project on github.</p>
</div>
<p>Since there’s no sense in rebuilding something that already exists, I decided to start with <a href="http://code.google.com/closure/compiler/" target="_blank">google’s excellent closure compiler</a> as a baseline, and simply write a maven wrapper around it. There’s nothing inherently wrong with the <a href="http://developer.yahoo.com/yui/compressor/" target="_blank">YUI Compressor</a>; It’s quite a nice compressor. In the light of supporting more use cases, however, I feel that a compiler with more optimization options would be a better choice, especially since all of those options are individually configurable.</p>
<p>However before I wrote the plugin, there are a few things I had to take into consideration:</p>
<ol>
<li>Developers should be able to debug while developing. This means that the compiled code needs to be human readable.</li>
<li>Optimization may impact code function, so the compiled code should be optimized.</li>
<li>Once packaged, the code should be minified.</li>
</ol>
<p>In practice, this means two compiler passes over the source code. The first is to perform code optimizations, yet provide a human readable source file for debugging (in jetty, for instance). The second is to minify, but not optimize, shortly before the asset is packaged. This suggests the following steps for my Javascript Library lifecycle.</p>
<dl>
<dt><b>compile</b></dt>
<dd>net.krotscheck:js-maven-plugin:optimize-js-lib</dd>
<dt><b>prepare-package</b></dt>
<dd>net.krotscheck:js-maven-plugin:minify-js-lib</dd>
</dl>
<p>Given that with Google Closure two steps are practically identical, most of the functionality will be abstracted. This means I&#8217;ll effectively be running the compiler twice, not a problem unless a browser decides to throw errors on whitespace usage.</p>
<h3>The Compiler Plugin</h3>
<p>There are three steps to compiling using Closure. First we need to gather all of our source files, then we need to configure the compiler, and then we’ll run the compiler and output our source. There is a fourth step- gathering dependencies, which I’ll cover in a subsequent post. None of these steps are especially difficult. Here’s step one, finding all of our source code.</p>
<div class="code">
<p>Full source available on github: <a href="https://github.com/krotscheck/js-maven-plugin/blob/master/src/main/java/net/krotscheck/maven/js/mojo/AbstractClosureMojo.java" target="_blank">JSLibraryCompilerMojo.java</a></p>
<pre>
/**
 * Location of the source directory.
 *
 * @parameter expression="${project.build.sourceDirectory}"
 * @required
 */
protected File sourceDirectory;

/**
 * This method scans the configured source directory of the Mojo and returns all
 * javascript documents, filtering by extension.
 */
protected List&lt;JSSourceFile&gt; generateJavascriptSourceList() {
    ArrayList&lt;JSSourceFile&gt; sourceList = new ArrayList&lt;JSSourceFile&gt;();

    String[] extensions = { "js" };
    getLog().debug("Discovering Source Files");

    Collection&lt;File&gt; sourceFiles = FileUtils.listFiles(sourceDirectory, extensions, true);

    for (Iterator&lt;File&gt; iterator = sourceFiles.iterator(); iterator.hasNext();) {
         File file = (File) iterator.next();

        sourceList.add(JSSourceFile.fromFile(file));

        getLog().debug(" + " + file.getAbsolutePath());
    }

    return sourceList;
}
</pre>
</div>
<p>Here’s step two, writing our compiler configuration. Note that I consciously made the choice to reduce the complexity of what my users can alter for the sake of illustration; This is primarily done out of lazyiness- If I allow complete individual configuration of all properties, this would have taken me a lot longer (and this post would be long, too).</p>
<p>You’ll notice that I’ve parameterized the method- this is to make its reuse easier once we move on to the minify step.</p>
<div class="code">
<p>Full source available on github: <a href="https://github.com/krotscheck/js-maven-plugin/blob/master/src/main/java/net/krotscheck/maven/js/mojo/AbstractClosureMojo.java" target="_blank">AbstractClosureMojo.java</a></p>
<pre>
/**
 * The input language to validate with. Valid options are ec5, ec5-strict,
 * and ec3.
 *
 * @parameter default-value="ec3"
 */
private String inputLanguage;

/**
 * Parse the parameters that have been configured for this mojo and generate
 * the appropriate compiler options object.
 *
 * @return
 */
protected CompilerOptions buildCompilerOptions(String level,
                Boolean prettyPrint) {

        // Create a new options construct.
        CompilerOptions options = new CompilerOptions();

        // Determine the input language switch: EC5, EC5-Strict, or EC3. Note
        // that most browsers don't support EC5.
        switch (inputLanguage) {
        case "ec5-strict":
                getLog().debug("Compiling for ECMAScript5 - Strict Mode");
                options.setLanguageIn(LanguageMode.ECMASCRIPT5_STRICT);
                break;
        case "ec3":
                getLog().debug("Compiling for ECMAScript3");
                options.setLanguageIn(LanguageMode.ECMASCRIPT3);
                break;
        case "ec5":
        default:
                getLog().debug("Compiling for ECMAScript5");
                options.setLanguageIn(LanguageMode.ECMASCRIPT5);
                break;
        }

        /**
         * Determine the compiler level.
         */
        switch (level) {
        case "simple":
                getLog().debug("Optimization Level: Simple");
                CompilationLevel.SIMPLE_OPTIMIZATIONS
                                .setOptionsForCompilationLevel(options);
                break;
        case "advanced":
                getLog().debug("Optimization Level: Advanced");
                CompilationLevel.ADVANCED_OPTIMIZATIONS
                                .setOptionsForCompilationLevel(options);
                break;
        case "whitespace":
        default:
                getLog().debug("Optimization Level: Whitespace");
                CompilationLevel.WHITESPACE_ONLY
                                .setOptionsForCompilationLevel(options);
                break;
        }

        if (prettyPrint) {
                options.inputDelimiter = "// [%num%] %name%";
                options.printInputDelimiter = true;
                options.prettyPrint = true;
        }

        return options;
}
</pre>
</div>
<p>Our last step then is to invoke the closure compiler, which is also verbose but pretty straightforward. I’ve omitted some of my logging statements for simplicity.</p>
<div class="code">
<p>Full source available on github: <a href="https://github.com/krotscheck/js-maven-plugin/blob/master/src/main/java/net/krotscheck/maven/js/mojo/JSLibraryCompilerMojo.java" target="_blank">JSLibraryCompilerMojo.java</a></p>
<pre>
/**
 * The compile level for google closure. Valid options are
 * "whitespace", "simple" and "advanced".
 *
 * @parameter default-value="whitespace"
 */
private String compilationLevel;

/**
 * This configures, resolves, and compiles the source for this project.
 */
public void execute() throws MojoExecutionException {

        // Generate compiler options
        CompilerOptions options = buildCompilerOptions(compilationLevel, true);

        // Compiler option, not yet used.
        List&lt;JSSourceFile&gt; externs = new ArrayList&lt;JSSourceFile&gt;();

        // Generate the list of source files to include.
        List&lt;JSSourceFile&gt; source = new ArrayList&lt;JSSourceFile&gt;();
        source.addAll(generateJavascriptSourceList());

        getLog().info("Compiling Javascript Library...");

        // Generate the compiler instance and compile.

        Compiler.setLoggingLevel(Level.OFF);
        Compiler compiler = new Compiler();
        compiler.compile(externs, source, options);

        // Output the compiled code.
        try {
                // Helper method to make sure the output file exists first.
                File newArtifactFile = getOutputFile();

                getLog().info(" -&gt; " + newArtifactFile.getAbsolutePath());
                FileUtils.writeStringToFile(newArtifactFile, compiler.toSource());

        } catch (IOException e) {
                getLog().error("Unable to create artifact file: " + e.toString());
        }
}
</pre>
</div>
<p>Done! Now all we have to do is compile our mojo and use the pom reference from my post about <a href="http://www.krotscheck.net/2012/01/22/designing-a-javascript-maven-plugin.html" target="_blank">designing a javascript maven plugin</a>, and then invoke maven.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krotscheck.net/2012/01/25/building-a-javascript-compiler-for-maven.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So What&#8217;s Up with Chrome?</title>
		<link>http://www.krotscheck.net/2008/10/01/so-whats-up-with-chrome.html</link>
		<comments>http://www.krotscheck.net/2008/10/01/so-whats-up-with-chrome.html#comments</comments>
		<pubDate>Wed, 01 Oct 2008 18:37:24 +0000</pubDate>
		<dc:creator>Michael Krotscheck</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[gears]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[ria]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://www.krotscheck.net/?p=2143</guid>
		<description><![CDATA[<div class="image">
  <p>This post <a href="http://ritechnology.typepad.com/technology/2008/09/so-whats-up-wit.html">originally written</a> for Resource Interactive's <a href="http://technology.resource.com/">Technology Blog</a>, time shifted by 1 month to preserve originality.</p>
</div>
<p>With the release of <a target="_blank" href="http://www.google.com/chrome">Google Chrome</a> last week many of our (and&#160; your) clients are starting to wonder exactly what Google's entry into the&#160; browser market means. The release of any new software package, especially by a powerhouse&#160; like Google, can often have broad and far reaching impact, and everyone wants&#160; to be forewarned about what's coming down the pike.</p>]]></description>
			<content:encoded><![CDATA[<p>With the release of <a target="_blank" href="http://www.google.com/chrome">Google Chrome</a> last week many of our (and&nbsp; your) clients are starting to wonder exactly what Google&#8217;s entry into the&nbsp; browser market means. The release of any new software package, especially by a powerhouse&nbsp; like Google, can often have broad and far reaching impact, and everyone wants&nbsp; to be forewarned about what&#8217;s coming down the pike.</p>
<h3>How will this impact Web Development?</h3>
<p>This largely depends on what kind of web development you do. In most<br />
cases you and your enterprise won’t be affected in the slightest.<br />
Chrome has a very fast and robust rendering and JavaScript engine, and<br />
much like any newly released browser (remember Firefox 1.0?) loads up<br />
in no time flat. The rule of thumb is that if you’re already supporting<br />
Safari, you can safely assume you’re supporting Chrome.</p>
<p>Why is this? What you may not know is that the underlying&nbsp; engine that Safari runs on is a package called <a target="_blank" href="http://webkit.org/">WebKit</a>,<br />
which is the same engine which powers Google Chrome. There are some<br />
revision based incompatibilities (Since Safari’s already a few versions<br />
ahead), but practically speaking they’re identical. The downside of<br />
this is that if your agency is one of the rare islands left that only<br />
support the “Two Major Browsers” (Firefox and Internet Explorer), you<br />
no longer have an excuse to not support them. </p>
<p>If you’re doing Rich Internet Application development, you’ve just<br />
been presented with a very interesting way of taking your application<br />
to the desktop. You might not have heard of <a target="_blank" href="http://gears.google.com/">Google Gears</a><br />
before now, or might not have considered it to be a viable option.<br />
Gears is a browser extension framework that allows desktop-application<br />
like interaction between your RIA and the client’s computer. Sounds<br />
neat, right? It is, and it&#8217;s directly integrated into Chrome and is<br />
available as a plugin for both IE and Firefox. Unfortunately, the major<br />
restriction of Gears up to this point was that you were still<br />
restricted to the browser’s UI, but as I point out later in this<br />
article this is no longer entirely the case.</p>
<h3>What about Mobile?</h3>
<p>If you’re doing Mobile Web Development, you may be able to target<br />
WebKit directly from this point forward. See, Safari is the exclusive<br />
browser on the <a target="_blank" href="http://www.apple.com/iphone/">iPhone</a>, and with the upcoming release of the T-Mobile <a target="_blank" href="http://htcdream.com/">HTC Dream</a>,<br />
you can bet that Chrome will be the default browser for Android. What<br />
this means is that WebKit will become the de-facto web development<br />
standard for mobile devices. While mobile UI patterns and application<br />
frameworks will shake themselves out over the next few years, the<br />
writing&#8217;s on the wall: If you want to take RIA&#8217;s to mobile devices<br />
without bothering with a native application, WebKit is the platform to<br />
build for.</p>
<h3>So What&#8217;s The Big Deal™?</h3>
<p>At this point you&#8217;re probably asking yourself: &quot;What&#8217;s the big<br />
deal&quot;? If Chrome behaves much like the other major browsers out there,<br />
why is there so much buzz about it? Is this just Google Hype?</p>
<p>Without going into a lot of gritty detail&nbsp; about it (The <a target="_blank" href="http://www.google.com/googlebooks/chrome/index.html">Comic Book</a><br />
published by Google does that really well), the major big deal is that<br />
Chrome is not just a Browser: Chrome is an Application Platform.</p>
<p>Much like AIR, Chrome attempts to blur the lines between the desktop<br />
and the web by creating a wrapper for previously developed content.<br />
They even do it in very similar ways: AIR allows the execution of<br />
JavaScript RIA&#8217;s in an integrated WebKit Browser running within the<br />
ActionScript Virtual Machine, while Chrome allows the execution of<br />
Flash RIA&#8217;s running in the Flash Player. The difference is simply the<br />
technology stack used- Chrome is based around JavaScript and HTML,<br />
while AIR is based on ActionScript and MXML. </p>
<p>The Google Engineers are quite explicit about this. The Comic Book<br />
talks about it, and one of the primary features is &quot;Create Application<br />
Shortcut&quot;. While functionally this really just creates a direct link to<br />
a specific website, the integration of Google Gears allows some<br />
websites to move almost entirely to your desktop. It even goes so far<br />
as to use the favicon for your application icon, giving you a Desktop<br />
Application experience for any website you choose (try it with Google<br />
Calendar or Gmail).</p>
<p>So what&#8217;s the Big Deal? It&#8217;s a concept change, a different way of<br />
looking at the Web. It&#8217;s not particularly new- Microsoft tried to do<br />
this with the close Windows/Internet Explorer integration in the late<br />
90&#8242;s and .chm/.hta applications, but it is the first time that the<br />
browser&#8217;s been turned into a (soon to be) platform agnostic application<br />
wrapper.</p>
<h3>A Future Vision</h3>
<p>Not to be a crazy futurist or anything, but consider the following<br />
possibility: Both Google and Adobe have now firmly cast their lot in<br />
with an ECMAScript/DOM-like technology stack, and we already know that<br />
there is a close relationship between the two companies both from<br />
YouTube and from the indexable headless player. Personally, I think<br />
it&#8217;d be pretty interesting if the future held a technological<br />
convergence of all ECMAScript languages. Compiling HTML to a desktop<br />
application? Converging JavaScript and ActionScript into a single<br />
ECMAScript language? It&#8217;s all possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krotscheck.net/2008/10/01/so-whats-up-with-chrome.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s the Experience, Stupid [Advice to Mobile Providers]</title>
		<link>http://www.krotscheck.net/2008/08/04/its-the-experience-stupid-advice-to-mobile-providers.html</link>
		<comments>http://www.krotscheck.net/2008/08/04/its-the-experience-stupid-advice-to-mobile-providers.html#comments</comments>
		<pubDate>Tue, 05 Aug 2008 00:17:48 +0000</pubDate>
		<dc:creator>Michael Krotscheck</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[strategy]]></category>

		<guid isPermaLink="false">http://www.krotscheck.net/2008/08/04/its-the-experience-stupid-advice-to-mobile-providers.html</guid>
		<description><![CDATA[<p>Two years ago, my colleague Isaac went to SXSW, and came back with a presentation on Mobile Development. In it he said that one of the greatest challenges is getting a mobile application "on deck". "On Deck" is the term used for an application that's available on a provider's mobile platform, that place you goto online when you browse applications, ringtones and such, and to get something on there used to take an Act of God. Why? Because all billing had to be handled through the provider, all sales had to be done though your phone bill, and payments to third party companies had to be set up through their system (and usually required a hefty premium). In short- more trouble than it's worth. Fact is, this is largely still the case. Yes, with greater adoption of mobile web browsers these things are becoming a lot easier, yet getting an application onto a phone remains problematic, especially if the consumer isn't aware that you have it. The best option these days seems to be building a Mobile website, which is a far cry from a good user experience.<br /></p>
]]></description>
			<content:encoded><![CDATA[<p>Two years ago, my colleague Isaac went to SXSW, and came back with a presentation on Mobile Development. In it he said that one of the greatest challenges is getting a mobile application &#8220;on deck&#8221;. &#8220;On Deck&#8221; is the term used for an application that&#8217;s available on a provider&#8217;s mobile platform, that place you goto online when you browse applications, ringtones and such, and to get something on there used to take an Act of God. Why? Because all billing had to be handled through the provider, all sales had to be done though your phone bill, and payments to third party companies had to be set up through their system (and usually required a hefty premium). In short- more trouble than it&#8217;s worth. Fact is, this is largely still the case. Yes, with greater adoption of mobile web browsers these things are becoming a lot easier, yet getting an application onto a phone remains problematic, especially if the consumer isn&#8217;t aware that you have it. The best option these days seems to be building a Mobile website, which is a far cry from a good user experience.</p>
<p>So lets talk about the consumer for a bit, in particular the consumer described in <a href="http://www.amazon.com/Long-Tail-Future-Business-Selling/dp/1401302378" target="blank">The Long Tail</a>. Here is an individual who knows his/her own lifestyle and needs, who like particular applications over others, whose preferred experience with one service might be different from his/her neighbor&#8217;s experience for the same. This is an individual who, when presented with a Smart Phone, wants to have features and applications behaving a particular way, and will only put up with the provided options of the telco because there&#8217;s no other choice. In short, they have a craving for personalization, and will gladly move to any platform that has applications that meet their needs.</p>
<p>Deploying a mobile application to meet these needs is, in its simplest form, the following: First, you must have a developer able to access your SDK, platform and testbed with minimal fuss. Then, that developer must be able to deploy his application to a location where a potential user may download it onto their device. Lastly, the device must be able to run said application. These three tenets of Develop, Deploy, Consume can be easily seen on the regular web. Developers have their SDK&#8217;s, Deployment happens on a web server, and browsers allow consumption of the offered services.</p>
<div class="image">
  <img src="http://www.krotscheck.net/wp-content/uploads/2008/08/mobile-1.jpg" width="470" height="150" alt="Mobile-1.png" />
</div>
<p>In the mobile world this isn&#8217;t quite as simple. Yes, there are many websites now that have mobile components, yet lets face it: The form factor and memory constraints of mobile computing devices make it so that few applications can offer full functionality and experience while constrained by regular browser controls. Additionally, we are back to (for the time being) the computing world of the early 90&#8242;s, where applications are restricted by processing and memory constraints. Back then, however, we could load applications from Floppy disks, something that&#8217;s not so easy on a mobile device. The development platforms exist, but deployment (as noted above) is extremely difficult, and the broad diversity of devices makes your target installable base problematic at best.</p>
<p>So let us take a look at the various players in the mobile market right now. First of all, let us look at the telecommunication companies, those that have the aforementioned problem with getting something On Deck. From their perspective, they have control over their delivery platform, and getting something from their platform to a mobile device is simple enough, however their process is such that they have completely lost their developer base. There are too many devices, too many different platforms and form factors, and deploying an application is simply too difficult for any developer to bother building something. Imagine the computing world in the mid-80&#8242;s, and you&#8217;ll understand what I mean.</p>
<div class="image">
  <img src="http://www.krotscheck.net/wp-content/uploads/2008/08/mobile-5.jpg" width="470" height="150" alt="Mobile-5.png" />
</div>
<p>Next let&#8217;s take a look at <a href="http://www.microsoft.com/windowsmobile/en-us/business/developers.mspx" target="blank">Microsoft</a>, which in our case will also double as any company that has a mobile application which they want to deploy. Microsoft has historically been brilliant in its developer support tools, so much so that it&#8217;s stupidly easy to develop an application for their operating system. Similarly, the fact that they are in the software and not the hardware business lets them sell a platform rather than a device, which allows mobile manufacturers to create devices that can run any application built for it. The place where they have failed, however, is in securing and simplifying the delivery platform, which remains under the control of the telco&#8217;s.</p>
<div class="image">
  <img src="http://www.krotscheck.net/wp-content/uploads/2008/08/mobile-4.jpg" width="470" height="150" alt="Mobile-4.png" />
</div>
<p>Third, let us look at Google and <a href="http://code.google.com/android/" target="blank">Android</a>. Here, the development platform is easy to access and has some brilliant development tools. And&#8230; then what? Well, frankly, we don&#8217;t know a whole lot about how Android will be delivered, because while many manufacturers and providers have jumped on the bandwagon, we as of yet have no idea whether Android will use an open application deployment platform, or even whether phones built by their manufacturing partners will come with Android pre-installed. The suggested promise of Android is Build Once, Deploy To Any Phone, but if it means that a developer still has to get something On Deck with a Telco, you will once again be in the same boat as Microsoft- a common platform, but no control over application distribution.</p>
<p>I should note here that I doubt Google will <em>not</em> have some central application service, it simply hasn&#8217;t been announced yet.</p>
<div class="image">
  <img src="http://www.krotscheck.net/wp-content/uploads/2008/08/mobile-3.jpg" width="470" height="150" alt="Mobile-3.png" />
</div>
<p>Lastly, let us come to <a href="http://www.apple.com/">Apple</a>. In this case I have to make a special note, in that while I recognize the <a href="http://developer.apple.com/iphone/">SDK</a> is publicly available, it is unfortunately not available for Windows (No, <a href="http://www.aptana.com/">Aptana</a> junkies, that&#8217;s just a web browser). Thus while they have alienated a good percentage of computer users overall, the additional cost of an OSX development platform is comparatively minor, and won&#8217;t detract a company interested in building an iPhone application. Taking that into consideration, they have everything buttoned up. Developers can access the SDK, they have an established and largely ubiquitous deployment platform not tied to the telco, and they have a device that will run any software built. This end-to-end solution is exactly the same thing that made the iPod so successful, because it got a user from Purchase to Play in one smooth experience.</p>
<div class="image">
  <img src="http://www.krotscheck.net/wp-content/uploads/2008/08/mobile-2.jpg" width="470" height="150" alt="Mobile-2.png" />
</div>
<p>And no, I don&#8217;t own an iPhone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krotscheck.net/2008/08/04/its-the-experience-stupid-advice-to-mobile-providers.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Judo Economics: Bringing Down Microsoft</title>
		<link>http://www.krotscheck.net/2008/04/24/judo-economics-bringing-down-microsoft.html</link>
		<comments>http://www.krotscheck.net/2008/04/24/judo-economics-bringing-down-microsoft.html#comments</comments>
		<pubDate>Thu, 24 Apr 2008 22:30:49 +0000</pubDate>
		<dc:creator>Michael Krotscheck</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[corporate strategy]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[judo economics]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[nintendo]]></category>

		<guid isPermaLink="false">http://www.practicalflash.com/articles/judo-economics-bringing-down-microsoft/</guid>
		<description><![CDATA[<p>A few years ago I took what must have been one of the most entertaining courses of my graduate career: Business Game Theory. It was run using the Harvard Case method, but with no supporting textbook and no explanatory lectures before a case was assigned- we simply received a problem and were expected to solve it by the next lecture. The problems themselves were simple: we were given a situation and asked a fairly straightforward question. Should Company B enter a particular market, how will a competition play out, can you predict the next step in a competition given certain parameters, things like that. Most of us got the first problems blatantly wrong- the tacit requirement to do our own research didn't sink in until after the first discussion- yet after that reality check it became one of the most engaging classes ever: The problems were challenging but not beyond rational analysis, and though I spent hours at a time bending my brain around decision making in a risky environment and other situations, I can still name the topics and methodologies for every case.</p>
<p>As a result I was practically giddy when I recognized a real world example of Judo Economics, a situation where a player uses the strength of their opponent against them. Consider a simple case: There exist two markets for a single product and two companies that can produce said product. The first market is large, however serving it comes with a high cost and therefore a low margin. The second market is small, but serving it is cheap and therefore comes with a high margin. The first of the companies must serve both markets, has deep pockets, while the second is considering market entry, but can only serve one of the two. Each company can only set one price against both markets. The question posed is: What will happen?</p>]]></description>
			<content:encoded><![CDATA[<p>A few years ago I took what must have been one of the most entertaining courses of my graduate career: Business Game Theory. It was run using the Harvard Case method, but with no supporting textbook and no explanatory lectures before a case was assigned- we simply received a problem and were expected to solve it by the next lecture. The problems themselves were simple: we were given a situation and asked a fairly straightforward question. Should Company B enter a particular market, how will a competition play out, can you predict the next step in a competition given certain parameters, things like that. Most of us got the first problems blatantly wrong- the tacit requirement to do our own research didn&#8217;t sink in until after the first discussion- yet after that reality check it became one of the most engaging classes ever: The problems were challenging but not beyond rational analysis, and though I spent hours at a time bending my brain around decision making in a risky environment and other situations, I can still name the topics and methodologies for every case.</p>
<p>As a result I was practically giddy when I recognized a real world example of Judo Economics, a situation where a player uses the strength of their opponent against them. Consider a simple case: There exist two markets for a single product and two companies that can produce said product. The first market is large, however serving it comes with a high cost and therefore a low margin. The second market is small, but serving it is cheap and therefore comes with a high margin. The first of the companies must serve both markets, has deep pockets, while the second is considering market entry, but can only serve one of the two. Each company can only set one price against both markets. The question posed is: What will happen?</p>
<p>The answer is as follows: The entrant will enter the smaller, more profitable market and undercut the larger company to the point where the larger company would suffer a net loss by matching their price. Why? Well, without drawing the decision tree it turns out that net profit for the system will be larger for the big company because the entrant can continue to undercut it until the margin in the smaller market disappears entirely. Quite simply, they cannot match the entrant because they are forced to serve the both markets. Ergo: Their strength is used against them.</p>
<h3>The Real World</h3>
<p>Now lets take this example to the real world: Microsoft is currently serving the vast majority of the desktop market. In fact, it&#8217;s difficult to imagine a desktop computer that doesn&#8217;t run Windows, and even in the laptop market they command a substantial segment. Microsoft has gone to great lengths to solidify their position within that market, releasing their own languages, developer toolkits, IDE&#8217;s and whatnot. Buy Microsoft, by Microsoft, for Microsoft, anything you want to do on a computer you can do with Microsoft.</p>
<p>Unfortunately, by winning the war for the desktop market they&#8217;ve now locked themselves into serving it, and as any marketer knows you can&#8217;t really segment a market that size perfectly, at least not without severely diluting your brand. At most we&#8217;ve seen three versions of Windows, usually targeted at the Office User, the Power User, and the Home User. From both a product management perspective and from a branding perspective they&#8217;re pushing the limit of how many versions of windows they can support, especially if you take into account all the legacy versions still in circulation.</p>
<p>The number of versions actually doesn&#8217;t really matter- what matters is that Microsoft has to charge a price that the majority of said segment is willing to pay while at the same time accommodating for the development cost of meeting the needs of the entire market. Some consumers might be willing to pay more than they&#8217;re charging, others less, and the end result is that the margins average out to something marginally profitable.</p>
<h3>The Competition</h3>
<p>This is where the case for Judo Economics begins to take shape. Microsoft in the late 90&#8242;s and early 00&#8242;s could serve the entire market and did so, winning a dominant position. Since then the competition has identified users&#8217; specialized needs and focused on them, effectively fragmenting the formerly homogenous user base of computer users into smaller segments: gamers, office workers, mobile computing, social networking, online productivity and so forth. They&#8217;ve each chosen their target market segment, have specialized their product offering for that particular segment, and are reaping the benefits of customers who are willing to pay more for a more specialized offering.</p>
<p>In the meantime, Mr. Gates still has to serve everyone else. The long and short is all the geeks who were angry about Microsoft&#8217;s antitrust practices vis-a-vis netscape and IE/browser integration/exclusion should have been cheering them on. A monolithic operating system and environment cannot be truly customized to the individual anymore, and they incur the massive cost of having to develop not only all the functionality they&#8217;ve supported up until now, but any new features that are identified in the market. In the world of the Long Tail their ability to meet all of a users <span style="font-style: italic;">general</span> needs rather than all of a users&#8217; <span style="font-style: italic;">specialized</span> needs puts them at a significant disadvantage which their competition is busily exploiting.</p>
<p>So who are the competition?</p>
<p><strong>Adobe</strong>: You might not think of Adobe as much of a competitor to Microsoft, however the recent introduction of Silverlight shows this is an area that Microsoft has identified as profitable (they&#8217;re good at identifying opportunity, I&#8217;ll give them that). Unfortunately Adobe has a lock on the real driving force behind the online experience: Designers. As long as they continue to focus on supporting them, the decisions of what technology to use will remain firmly in their court. Yes, purely technically designed websites and RIA&#8217;s will likely fall to Microsoft, but quite frankly I don&#8217;t think Adobe cares about serving the online accountant.</p>
<p><strong>Apple</strong>: In 1999, the book on this fight seemed to have been written. Apple soundly lost the battle for the desktop, and was classified even lower than Linux, a computing platform for rabid advocates that would eventually follow the Amiga into obscurity. And now where are they? Apple is sexy. Apple is hip. Apple is targeted at a consumer segment that is affluent and to some extent image conscious, taking those users away from Microsoft. All those fat margins that could have been earned by Bill are now wandering off to the upmarket offerings provided by Apple, who doesn&#8217;t ever want to be in the position of having to serve everyone&#8230; or do they? (more on this in another post).</p>
<p><strong>Nintendo</strong>: The XBox 360 is everywhere, Halo was a huge deal. We know that Microsoft was succesful here, and will continue to be so for the forseeable future. Yet this market shows some of the same signs as Apple&#8217;s position in the Desktop and Laptop market, because the XBox has become a commodity- everybody has one. Everyone does not have a Wii, and the speed at which they fly off the shelves shows a level of demand much like that of the iPod. The Wii is cool, while the XBox has become the console equivalent of a beige box. How this will play out in the long run is hard to say at this time, however given Redmond&#8217;s recent strategic moves into community gaming I feel they won&#8217;t give up their share so readily.</p>
<p><strong>Google</strong>: It&#8217;s hard not to mention Google here, and even though I think they&#8217;ve jumped the shark and will lose their innovative edge in the very near future, their dominance in the search market is too big to ignore (just look at the Yahoo hostile takeover- Microsoft&#8217;s not ignoring them). Here we once again have a company that has to do everything: browser, search, ads, etc, competing with a company that&#8217;s just really, really good at one or two of those. Guess which one is dominant? I thought so.</p>
<p>So that&#8217;s the argument in a nutshell: Microsoft has to serve the entire market, and as a result is too crippled to actually compete for the plumb market shares. Looking forward we can already see them becoming more aware of their situation though: The next version of windows is supposedly modular and thus more customizable to individuals&#8217; needs. They are attempting to acquire Yahoo, and opening up the XBox for community developers is a dangerously <a href="http://theopenbrand.resource.com/">O.P.E.N.</a> tactic. I&#8217;m calling the score tied, lets see what happens in round three.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krotscheck.net/2008/04/24/judo-economics-bringing-down-microsoft.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the Metrics Package to record Flash Application Analytics</title>
		<link>http://www.krotscheck.net/2008/02/14/using-the-metrics-package-to-record-flash-application-analytics.html</link>
		<comments>http://www.krotscheck.net/2008/02/14/using-the-metrics-package-to-record-flash-application-analytics.html#comments</comments>
		<pubDate>Thu, 14 Feb 2008 18:11:09 +0000</pubDate>
		<dc:creator>Michael Krotscheck</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[metrics]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[urchin]]></category>

		<guid isPermaLink="false">http://www.practicalflash.com/articles/using-the-metrics-package-to-record-flash-application-analytics/</guid>
		<description><![CDATA[<p>Web analytics is a way in which individual visitor action can be easily tracked within a site, and the aggregate statistical data derived from this can often lend remarkable insights into the effectiveness of your design, how 'sticky' your content is, and what your users are actually looking for. Unfortunately, extending this paradigm into flash has always been tricky, because it doesn't adhere to the page-based paradigm on which most Analytics packages are built. Once a flash application or widget is loaded, the server loses most knowledge about what the user is actually doing within it.</p>
<p>Usually this isn't really a problem- flash applications have not been too complex and not many people care where on the banner you clicked, just that you left the site as a result. Yet now with the strong growth of Flex and Ajax our web applications are becoming more and more complex, and marketers and usability experts are now demanding this tracking data in spite of the paradigm limitations.</p>
<p>If you really think about it, what we really are interested in tracking is a user action, rather than the page loads we are collecting right now, which means that the largest part of an analysts job is turning these page events into meaningful user actions, rather than interpreting those users. There's been some attempt to set metrics to individual places within a page flow, yet nobody has yet thought to rethink the paradigm. But I digress...</p>
<p>Most Metrics providers have since opened their API's enough to allow a developer to pretend like a new page refresh has occurred. While this is hardly optimal, it does allow us to track user events from inside of flash, but the fact that each provider has implemented their API a different way means that implementing metrics for each is still a string of unique problems to solve.</p>
<p>To that end I've written the Metrics package, which is intended to provide a common metrics proxy that any developer may use, which relies on a common library of connectors that can be swapped out as needed. In this article I go over the details of how to use it, and touch on how individual connectors might be written.</p>]]></description>
			<content:encoded><![CDATA[<p>Web analytics is a way in which individual visitor action can be easily tracked within a site, and the aggregate statistical data derived from this can often lend remarkable insights into the effectiveness of your design, how &#8216;sticky&#8217; your content is, and what your users are actually looking for. Unfortunately, extending this paradigm into flash has always been tricky, because it doesn&#8217;t adhere to the page-based paradigm on which most Analytics packages are built. Once a flash application or widget is loaded, the server loses most knowledge about what the user is actually doing within it.</p>
<p>Usually this isn&#8217;t really a problem- flash applications have not been too complex and not many people care where on the banner you clicked, just that you left the site as a result. Yet now with the strong growth of Flex and Ajax our web applications are becoming more and more complex, and marketers and usability experts are now demanding this tracking data in spite of the paradigm limitations.</p>
<p>If you really think about it, what we really are interested in tracking is a user action, rather than the page loads we are collecting right now, which means that the largest part of an analysts job is turning these page events into meaningful user actions, rather than interpreting those users. There&#8217;s been some attempt to set metrics to individual places within a page flow, yet nobody has yet thought to rethink the paradigm. But I digress&#8230;</p>
<p>Most Metrics providers have since opened their API&#8217;s enough to allow a developer to pretend like a new page refresh has occurred. While this is hardly optimal, it does allow us to track user events from inside of flash, but the fact that each provider has implemented their API a different way means that implementing metrics for each is still a string of unique problems to solve.</p>
<p>To that end I&#8217;ve written the Metrics package, which is intended to provide a common metrics proxy that any developer may use, which relies on a common library of connectors that can be swapped out as needed. In this article I go over the details of how to use it, and touch on how individual connectors might be written. You can access and <a href="http://www.krotscheck.net/libraries/package-metrics/">download the actual library here</a>.</p>
<h3>Step 1: Initialize the Metrics Engine</h3>
<p>The first step is to initialize the metrics controller with the connectors you&#8217;d like it to use.</p>
<pre>
import com.practicalflash.metrics.connectors.GoogleConnector;
import com.practicalflash.metrics.connectors.UrchinConnector;
import com.practicalflash.metrics.Metrics;

// Add the connectors
Metrics.addConnector( com.practicalflash.metrics.connectors.GoogleConnector);
Metrics.addConnector( com.practicalflash.metrics.connectors.UrchinConnector);
</pre>
<p>Note that the package can take an arbitrary number of connectors, yet will only instantiate those which successfully autodetect their environment. Should you want to deploy an application and don&#8217;t know in advance what environment you&#8217;ll be reporting to, you can hedge your bets and add several, as I have above. The only caveat is that any provided class must implement the IMetrics interface.</p>
<h3>Step 2: Dispatch a Metrics Event</h3>
<p>Once you&#8217;ve initialized your connector, you may dispatch metric events from any point in the application by creating a MetricsEvent object. The following example demonstrates a case where you might have an event listener waiting for a particular user action.</p>
<pre>
import com.practicalflash.metrics.MetricsEvent;

function someEventHandler( event : Event ) : void
{
        var metricEvent : MetricsEvent = new MetricsEvent("/this/is/a/test.html?foo=bar");
        metricEvent.dispatch();
}
</pre>
<p>Additional options include setting the event type, the dispatching target, or adding an arbitrary number of parameters to be parsed and passed along. Exact behavior for these parameters is described in the documentation, and may be dependent on their level of support within the various connectors.</p>
<pre>
metricEvent.target = event.target;
metricEvent.type = MetricsEvent.RECORD;
metricEvent.addParameter( "bar" , "foo" );
</pre>
<h3>Further Customization</h3>
<p><span style="font-size: 12px; font-weight: normal;">If any of the provided connectors don&#8217;t suit your purpose, the task of writing your own is actually fairly simple. The only requirement for the connector is that it implements the IMetrics interface, which prescribes two functions: detect(), which runs any autodetection script you&#8217;d care for, and send(), which should process and deliver any received information appropriately.</span></p>
<p>Additionally, the AbstractConnector class is provided with a few useful utility features, including a singleton instance of the JavascriptConnector (accessible via the jsBridge parameter) as well as getDOMBounds(), which returns an objects&#8217; rectangular bounds with respect to the HTML DOM (just in case your metrics package supports the reporting of a page&#8217;s click area).</p>
<p>A sample connector might be as simple as the following:</p>
<pre>
package com.practicalflash.metrics.connectors
{
        import com.practicalflash.metrics.MetricsEvent;
        import com.practicalflash.metrics.interfaces.IMetrics;

        public class UrchinConnector extends AbstractConnector implements IMetrics
        {
                public function detect() : Boolean
                {
                        if( available )
                                return jsBridge.hasParameter( "urchinTracker" );
                        else
                                return false;
                }

                public function send( event : MetricsEvent ) : void
                {
                        jsBridge.urchinTracker( event.page + "?" + event.getURLString() );
                }
        }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.krotscheck.net/2008/02/14/using-the-metrics-package-to-record-flash-application-analytics.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Package: Metrics</title>
		<link>http://www.krotscheck.net/2008/02/14/package-metrics.html</link>
		<comments>http://www.krotscheck.net/2008/02/14/package-metrics.html#comments</comments>
		<pubDate>Thu, 14 Feb 2008 16:26:57 +0000</pubDate>
		<dc:creator>Michael Krotscheck</dc:creator>
				<category><![CDATA[Libraries]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[metrics]]></category>
		<category><![CDATA[omniture]]></category>
		<category><![CDATA[urchin]]></category>

		<guid isPermaLink="false">http://www.practicalflash.com/libraries/package-metrics/</guid>
		<description><![CDATA[<p>The Metrics package was designed to provide a simple, reusable, extensible and flexible interface to any web metrics package, including Google Analytics, Urchin, Omniture, WebTrends and more. It supports multiple connector management, instantiating only those registered connecters that are successful at autodetecting their environment. If a developer does not know in advance which metrics package his client is using (or whether his client might change his mind at a later time), he may safely add several connectors secure in the knowledge that the package will do the heavy lifting. Additional functionality allows you to "hot-swap" connectors should that become necessary, though I myself don't exactly know why you'd want to do that.</p>
<p>At this point in time, the only connector published with this library is the UrchinConnector. Google Analytics and WebTrends will follow shortly, however due to my employers' client agreements I find it prudent to not release connectors for API's that are considered proprietary (such as Omniture) unless I have a formal letter granting me legal permission to do so.</p>]]></description>
			<content:encoded><![CDATA[<table class="package">
<tbody>
<tr>
<th>Package</th>
<td>com.practicalflash.metrics.*</td>
</tr>
<tr>
<th>Download</th>
<td>[<a href="http://www.krotscheck.net/libraries/Metrics.tar.gz">tar</a>] [<a href="http://www.krotscheck.net/libraries/Metrics.zip">zip</a>]</td>
</tr>
<tr>
<th>Source</th>
<td><a href="http://code.google.com/p/practicalflash/">Google Code Repository</a></td>
</tr>
</tbody>
</table>
<p>The Metrics package was designed to provide a simple, reusable, extensible and flexible interface to any web metrics package, including Google Analytics, Urchin, Omniture, WebTrends and more. It supports multiple connector management, instantiating only those registered connecters that are successful at autodetecting their environment. If a developer does not know in advance which metrics package his client is using (or whether his client might change his mind at a later time), he may safely add several connectors secure in the knowledge that the package will do the heavy lifting. Additional functionality allows you to &#8220;hot-swap&#8221; connectors should that become necessary, though I myself don&#8217;t exactly know why you&#8217;d want to do that.</p>
<p>At this point in time, the only connector published with this library is the UrchinConnector. Google Analytics and WebTrends will follow shortly, however due to my employers&#8217; client agreements I find it prudent to not release connectors for API&#8217;s that are considered proprietary (such as Omniture) unless I have a formal letter granting me legal permission to do so.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krotscheck.net/2008/02/14/package-metrics.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

