<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.darylteo.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Daryl Teo</title>
	
	<link>http://darylteo.com/blog</link>
	<description>Bits and blobs on anything tech</description>
	<lastBuildDate>Sat, 04 Feb 2012 13:16:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.darylteo.com/dteo_blog" /><feedburner:info uri="dteo_blog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>Play!Framework 2.0 – Installation</title>
		<link>http://darylteo.com/blog/2012/02/05/playframework-2-0-installation/</link>
		<comments>http://darylteo.com/blog/2012/02/05/playframework-2-0-installation/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 13:14:52 +0000</pubDate>
		<dc:creator>Daryl</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://darylteo.com/blog/?p=406</guid>
		<description><![CDATA[Turns out, I&#8217;m a little late to the Play!Framework party. They&#8217;re already working on Play 2.0, and it is currently in Beta! So, I don&#8217;t think there is any point in me trying to deal with the problems found in &#8230; <a href="http://darylteo.com/blog/2012/02/05/playframework-2-0-installation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Turns out, I&#8217;m a little late to the Play!Framework party. They&#8217;re already working on <a title="Play 2.0" href="http://www.playframework.org/2.0" target="_blank">Play 2.0</a>, and it is currently in Beta!</p>
<p>So, I don&#8217;t think there is any point in me trying to deal with the problems found in 1.2.4. Instead, I&#8217;d rather be involved with getting under the skin of the new version (which should give me more blogging material), and hopefully contribute back towards its development in any way.</p>
<p>For those of you keeping track of this framework, the early documentation for this can be found <a title="Play!Framework 2.0 Wiki - GitHub" href="https://github.com/playframework/Play20/wiki" target="_blank">here</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://darylteo.com/blog/2012/02/05/playframework-2-0-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Play!Framework – Custom Template Tags and Namespaces</title>
		<link>http://darylteo.com/blog/2012/02/01/playframework-custom-template-tags-and-namespaces/</link>
		<comments>http://darylteo.com/blog/2012/02/01/playframework-custom-template-tags-and-namespaces/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 11:01:38 +0000</pubDate>
		<dc:creator>Daryl</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[play!]]></category>
		<category><![CDATA[play!Framework]]></category>
		<category><![CDATA[tags]]></category>

		<guid isPermaLink="false">http://darylteo.com/blog/?p=392</guid>
		<description><![CDATA[I have been playing with Play!Framework recently (I will hopefully write more about this in the future), but the documentation is horrible! I was interested in seeing if there was a better way to organise custom HTML template tags in &#8230; <a href="http://darylteo.com/blog/2012/02/01/playframework-custom-template-tags-and-namespaces/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been playing with <a title="Play!Framework" href="http://www.playframework.org/" target="_blank">Play!Framework</a> recently (I will hopefully write more about this in the future), but the <a title="Play framework - The template engine" href="http://www.playframework.org/documentation/1.2.4/templates#Tagnamespaces" target="_blank">documentation</a> is horrible!</p>
<p>I was interested in seeing if there was a better way to organise custom HTML template tags in the tags folder, in order to prevent any clashes in my templates. Non of the documentation explicitly explains how to do so; the only references as such only refer to writing custom Tags in Java and annotating with @FastTags.Namespace.</p>
<p>On a hunch, however, I tried creating a child folder in my Tags folder, and treated that as a namespace (as in Java) and it worked! For example:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#{admin.widget /}</div></td></tr></tbody></table></div>
<p>would look for the HTML Template Tag as</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/app/views/tags/admin/section.html</div></td></tr></tbody></table></div>
<p>or</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/app/views/tags/admin/section.tag</div></td></tr></tbody></table></div>
<p>Hopefully this helps someone else who comes across this requirement in their project. Note that this might have side-effects that I am unaware of (other than clashes with existing template tags, or custom Java tags). As far as I&#8217;m aware, this is an unsupported feature of the template engine, so use at your own risk I suppose.</p>
]]></content:encoded>
			<wfw:commentRss>http://darylteo.com/blog/2012/02/01/playframework-custom-template-tags-and-namespaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AppHarbor – Multiple Build Environments</title>
		<link>http://darylteo.com/blog/2011/07/31/appharbor-multiple-build-environments/</link>
		<comments>http://darylteo.com/blog/2011/07/31/appharbor-multiple-build-environments/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 11:23:09 +0000</pubDate>
		<dc:creator>Daryl</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[appharbor]]></category>
		<category><![CDATA[branches]]></category>
		<category><![CDATA[branching]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[environments]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://darylteo.com/blog/?p=379</guid>
		<description><![CDATA[Are you working on a project deployed on AppHarbor? Do you have a need for multiple build environments? Do you have your project repository split into multiple build branches? You&#8217;ve probably run into the same need as I have working &#8230; <a href="http://darylteo.com/blog/2011/07/31/appharbor-multiple-build-environments/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Are you working on a project deployed on AppHarbor? Do you have a need for multiple build environments? Do you have your project repository split into multiple build branches? You&#8217;ve probably run into the same need as I have working with my own project. And I will now tell you how to solve it.</p>
<h2>The Problem</h2>
<p>So you have a project that you deploy on AppHarbor. However, you&#8217;re almost at launch, and you are now just starting to think about multiple environments, and you have separate development branches in your repository.</p>
<p>Unfortunately, AppHarbor does not support this explicitly out of the box, meaning you will have to work around what they provide; the main thing that AppHarbor doesn&#8217;t have at time of writing is the ability to define which branch you want it to build from. This limits what you can do with your repository from the start, meaning that before you are able to build to a &#8220;dev&#8221; environment, you need to merge that branch with your &#8220;master&#8221; branch and push that instead.</p>
<p>Or do you?<span id="more-379"></span></p>
<h2>The Solution</h2>
<p>The first part of the solution is simple: set up different applications for each environment you want. You can then set up <a title="AppHarbor Support - Managing environments" href="http://support.appharbor.com/kb/getting-started/managing-environments" target="_blank">Environment Variables </a>for each one. For any decent project set up you will want <strong>at minimum</strong> 2 (development, and production), but this solution can be scaled to fit your needs (nightly&#8217;s, staging/UAT etc.).</p>
<p>But then you say &#8220;Daryl? You just said that AppHarbor does not support building branches. How is this going to work?&#8221;. Well, the answer is we&#8217;re still going to &#8220;push&#8221; to each application&#8217;s Git repository, but with a little Git trickery.</p>
<p>What we&#8217;re going to do is simply tell our source Repository to push our branch to a different branch on the remote end (in this case, I push my &#8220;dev&#8221; branch to the &#8220;master&#8221; branch on the remote end!)</p>
<p>The Magic Commands (execute them on your source repository):</p>
<pre>&gt; git push &lt;appharbor-dev-url&gt; +dev:master</pre>
<p>What we&#8217;ve done here is simply specified a custom &#8220;refspec&#8221;[<a title="git push reference" href="http://kernel.org/pub/software/scm/git/docs/git-push.html" target="_blank">1</a>] that pushes our local &#8220;dev&#8221; branch to the remote&#8217;s &#8220;master&#8221; branch.</p>
<p>If your &#8220;dev&#8221; branch is not a descendant of the remote&#8217;s &#8220;master&#8221; branch, you may need to force it using the &#8220;-f&#8221; flag.</p>
<p>With this, you can now have multiple branches for each environment, allowing you more powerful control over your project environments.</p>
<p><em>Disclaimer: I&#8217;m no Git Guru, this is simply how I&#8217;ve figured out my way around it. Hopefully a better way comes about when AppHarbor gets to it. Also, I make no guarantees for the safety of your environments, source, and repositories&#8230; be doubly sure before making any drastic actions.</em></p>
<ol>
<li><a title="Git Push Reference" href="http://kernel.org/pub/software/scm/git/docs/git-push.html" target="_blank">git push reference</a></li>
<li><a title="Git Branch Reference" href="http://www.kernel.org/pub/software/scm/git/docs/git-branch.html" target="_blank">git branch reference</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://darylteo.com/blog/2011/07/31/appharbor-multiple-build-environments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google+: Possibilities?</title>
		<link>http://darylteo.com/blog/2011/07/16/google-possibilities/</link>
		<comments>http://darylteo.com/blog/2011/07/16/google-possibilities/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 13:45:59 +0000</pubDate>
		<dc:creator>Daryl</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://darylteo.com/blog/?p=353</guid>
		<description><![CDATA[I have seen many posts in the wild proclaiming the glorious victory of Google+ over the incumbent Facebook, or alternatively, detailing the inadequate challenge of Google&#8217;s newest attempt at supplanting Facebook as the king of social networks. I, however, wanted &#8230; <a href="http://darylteo.com/blog/2011/07/16/google-possibilities/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have seen many posts in the wild proclaiming the glorious victory of Google+ over the incumbent Facebook, or alternatively, detailing the inadequate challenge of Google&#8217;s newest attempt at supplanting Facebook as the king of social networks.</p>
<p>I, however, wanted to look further ahead into the future.</p>
<p>It is increasingly certain that neither Facebook nor Google+ is ready to go away without a serious fight, and users in either camp will benefit greatly. However, there is still an area of interest left that could see great innovation thanks to Google&#8217;s efforts, and that is in the Mobile space.<br />
<span id="more-353"></span></p>
<p>Google+ currently does not have the userbase of Facebook, nor the mature feature set that Facebook has built over its years as one of the internet&#8217;s most frequented site ever. What it <strong>does</strong> have, however, is a platform that is quickly becoming a behemoth in the mobile OS space. Because of this, I definitely expect Google to make strong innovative moves once Google+ goes live, and I also expect to see a symbiotic relationship between the two platforms emerge as part of this effort.</p>
<p>What I imagine is not exactly the same as what we have today; Facebook has apps available for installation on all major mobile platforms, and Google+ has plans to do the same. What I hope to see in the future is Google+ integrated into the Android device and its hardware capabilities, and I will list a few ways I believe Google+ might change the way we use our devices.</p>
<h2>Photos</h2>
<p>Nowadays, it is easy to take a photo and share it with your friends via your preferred social medium. Google+ makes it easy to do so by uploading images you take immediately using Instant Upload.</p>
<p>The problem, though, is that there is only 1 owner of the image, and that is the person who took the image. This owner must then share the image with whoever requests it, which can be a tedious task for many people.</p>
<p>With our Android mobile device, we could possibly detect the mobile devices in the picture, and immediately transfer copies of the image to each individual while the Instant Upload feature also shares the image with them on Google+ in an appropriate circle. No more &#8220;please send me the images from last night thanks!&#8221; messages the day after, and no more need to tag!</p>
<h2>Networking</h2>
<p>There have been examples of networking applications, such as <a title="Bump App" href="http://bu.mp/" target="_blank">Bump</a>, which allows two mobile devices to exchange their contact information just by &#8220;bumping&#8221; their devices together. However, it does not have the power of a strong social network foundation to build on.</p>
<p>With our Android mobile device, we can have contacts shared between devices as a standard tool. Meet someone new at a party? Immediately follow each other on Google+ and include them in a circle just by &#8220;bumping&#8221; each other.</p>
<h2>Circles of Devices</h2>
<p>While Google+ has circles of Friends, Android could have Circles of Devices; a collection of devices between which information can be freely shared. Think of it as a whitelist of paired devices a la Bluetooth.</p>
<p>This opens up many possibilities for App development. Now you could keep track of your friends whereabouts via GPS (of course, subject to Privacy controls), and get notification if one of them happens to be close. This could turn out to be an excellent extension of Google+ Hangouts.</p>
<p>These are just some of the many ways I believe Google+ can revolutionise the Android platform, and provide its App developers with new toys to play with in the future. What other things can you think of? Let me know in the comments below!</p>
]]></content:encoded>
			<wfw:commentRss>http://darylteo.com/blog/2011/07/16/google-possibilities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command Query Responsibility Segregation</title>
		<link>http://darylteo.com/blog/2011/06/17/command-query-responsibility-segregation/</link>
		<comments>http://darylteo.com/blog/2011/06/17/command-query-responsibility-segregation/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 09:54:40 +0000</pubDate>
		<dc:creator>Daryl</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Action]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Command]]></category>
		<category><![CDATA[CQRS]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Intent]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Query]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Software Architecture]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[UML]]></category>
		<category><![CDATA[Use Cases]]></category>

		<guid isPermaLink="false">http://darylteo.com/blog/?p=350</guid>
		<description><![CDATA[I did a MindDump on CQRS for the company I work for, and decided that it deserves a home on my blog. Hope you enjoy, and as always, comments are welcome. What is CQRS CQRS is an Architecture (for reference, &#8230; <a href="http://darylteo.com/blog/2011/06/17/command-query-responsibility-segregation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I did a MindDump on CQRS for the company I work for, and decided that it deserves a home on my blog. Hope you enjoy, and as always, comments are welcome.</p>
<h2>What is CQRS</h2>
<p>CQRS is <del>an Architecture (for reference, see N-Tier Architecture)</del> basically just a simple set of principles when thinking about your system&#8217;s design. As such, any implementation of CQRS is merely a technical detail that should only be considered by the architect after considering the constraints of the environment.<span id="more-350"></span></p>
<p>CQRS is essentially made up of 2 parts:</p>
<ul>
<li>Commands,</li>
<li>and Queries</li>
</ul>
<p>Commands are constructs that model The User&#8217;s Intent. So for example, if the user intended to add a new post, the command could be &#8220;AddPost&#8221;. You will therefore have as many Command definitions as there are Use Cases for your system (see Pros), and each Command encapsulates all the information required to perform that action.</p>
<p>Queries are simple and familiar: they can be anything that retrieves information from your model. Again, this is a mere implementation detail, which I will go into further. To give you an early reference, NHibernate ORM Framework could be an example of a Query implementation.</p>
<p>CQRS simply says these two should be logically separated by their responsibilities. Don&#8217;t build the same code to deal with both.</p>
<h2>CQRS Objectives And Motivations</h2>
<p>The motivation between this logical separation lies with 2 different concepts: collaboration and staleness (<a title="Clarified CQRS - Udi Dahan" href="http://www.udidahan.com/2009/12/09/clarified-cqrs/" target="_blank">http://www.udidahan.com/2009/12/09/clarified-cqrs/</a>, Why CQRS, Udi Dahan). CQRS puts forward the notion that data, by its very nature, is intrinsically stale; when data is pulled from a data source, the source may change at any time. Stale Data makes dealing with collaboration an architecture nightmare. Dealing with Stale Data also reduces the scalability and performance of such a system as it grows, as it introduces bottlenecks at every layer.</p>
<p>CQRS says: <strong><em>let&#8217;s simply accept this as the nature of data.</em></strong></p>
<p>The two parts of CQRS is therefore driven by its single principle, which is to logically separate the retrieval of data from the altering of data. Retrieving data should be simple and fast, with disregard to its freshness. As a result, Commands do not need to Read-Lock the data, making DB performance a lot better.</p>
<p>Implementing any architecture in this fashion forces the it to fall into two distinct subsystems. Furthermore, as each system models different things (Commands/Intent/Action and Queries), there is no code reuse between each subsystem. This makes the two subsystems easily divided and independent.</p>
<h2>Potential evolution of a system using CQRS</h2>
<p>Let&#8217;s see how CQRS can allow an application to <strong>EVOLVE</strong>.</p>
<p>User A requests a View of a specific Movie in a Rental Database. This View queries the database and the View renders the data. User A then clicks the &#8220;Rent&#8221; button, which initiates a new Command &#8220;RentMovie&#8221;, which contains the id of the Movie. Sometime in the future, this Command updates the Database. The User is then redirected to a Confirmation screen.</p>
<p>Meanwhile, User B has also loaded the same View with the same Movie at the same time as User A. However, he clicks the &#8220;Rent&#8221; button after User A. Again, the Command updates the database. However, the selected movie was already rented, and the User is redirected to a Failed screen as a result.</p>
<p>Lets now imagine Admin A has opened up the same Movie, and wishes to make minor edits to the Movie&#8217;s description. He clicks the &#8220;Edit&#8221; button, which initiates the &#8220;EditMovie&#8221; command. Due to the nature of the system, this command is considered to be a low-risk command. Therefore, this Command is processed asynchronously from the Admin&#8217;s response: he simply gets a message telling him to check back later when the Edit command has gone through.</p>
<p>At this point, this is simply your standard CRUD application, except that we&#8217;ve made the distinction between Commands and Queries. Our Commands at this point could simply be methods that are invoked. Now let&#8217;s see what happens when we decide to scale our application.</p>
<p>This Rental Database is growing in popularity. But Users are reporting slow responses due to many people attempting to rent a movie. In order to cope with this, we implement a Command Pattern, together with a CommandQueue. All Commands are now inserted into the Queue, in order to regulate the number of Commands being executed at one time.</p>
<p>Users are still reporting that Renting a Movie takes too long. This is because the Queue gets swamped with Commands. Because our Commands are separate from our Queries, the Command Subsystem can now be separated from the Query Subsystem, and placed in a separate high performance application server(s). Additional tweaks can also include a priority Command system in your CommandQueue.</p>
<p>The Rental Database is increasing its library of Movies since its launch; the time it takes to perform a set of queries is increasingly slow. Since we are not worried about the freshness of data, let&#8217;s create a separate data source only for queries. In fact, we could have any number of query data sources, since we are not concerned about the consistency of the data with other duplicate sources. Our Query Subsystem can be <strong>scaled independently</strong> from our Command Subsystem. Now, we just need to keep our Query Data Sources in sync with our original data source.</p>
<p>However, updating each data source synchronously might be too time-consuming, and there really isn&#8217;t any need for our Query data store to be so up to date. Lets implement a replication job that grabs a snapshot of the original source every few minutes and push them out to our query data sources over time.</p>
<p>Still too time-consuming? Why not store our Commands in a historical database? We can then use this as a means of updating our query data sources; no need for expensive data replication services. And this also becomes a useful backup of actions that can be used to reconstruct the database.</p>
<p>This is a <strong>possible</strong> example of a mature application evolving using CQRS principles. There are many architectural changes that are now an option due to how we have structured the system.</p>
<h2>Pros of CQRS &#8211; or why would you use it</h2>
<p>CQRS allows your system to be infinitely more flexible when growing your application, simply because you no longer have common &#8220;reused&#8221; code for the two distinct set of operations. If you expect your application to have longevity, and want to respond quickly to change, CQRS is a valid option.</p>
<p>From a engineering perspective, Commands map to Use Cases very easily; each Command encapsulates a single use case (Business Analysts rejoice!). This means that Commands and Use Cases have a 1 to 1 relationship that enables people to write Test Cases very easily. This can speed up development of a large scale project.</p>
<h2>Cons of CQRS &#8211; or why would you not use it?</h2>
<p>It could be very difficult to insert into existing architecture. CQRS can be considered a foundation from which to build up on; don&#8217;t rewrite all your domain driven design components to fit.</p>
<p>Response to Users also becomes slightly difficult due to the tendency for Commands to become Asynchronous (you can&#8217;t have them sitting in a queue forever, especially if you implement a priority system). Therefore, the way your application interacts with users has to be evaluated.</p>
<p>Lastly, if your system does not require longevity, and scaling, or does not require high numbers of collaborative operations, your system may not benefits as much from sticking to CQRS principles.</p>
<h2>Closing</h2>
<p>CQRS looks to have some great use cases, especially in the Web Application space. It can work with existing frameworks in most cases, and does not require you to implement all of it at the beginning, making it ideal for startups. And remember: CQRS does not need to be complex;it is simply a different way of architecting a system (just like you have different ways of building a house&#8217;s foundation)</p>
<p>Definitely consider this if you are starting a new project; I definitely am!</p>
<h3>Edits</h3>
<ul>
<li>Redefined CQRS as a principle, not an Architecture. See <a title="CQRS, Task Based UIs, Event Sourcing agh!" href="http://codebetter.com/gregyoung/2010/02/16/cqrs-task-based-uis-event-sourcing-agh/" target="_blank">link</a>.</li>
<li>Added paragraph to &#8220;Cons&#8221; section</li>
<li>Major editorial changes to multiple sections</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://darylteo.com/blog/2011/06/17/command-query-responsibility-segregation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Project: Part 1 – Concept</title>
		<link>http://darylteo.com/blog/2010/09/02/iphone-project-part-1-concept/</link>
		<comments>http://darylteo.com/blog/2010/09/02/iphone-project-part-1-concept/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 00:57:01 +0000</pubDate>
		<dc:creator>Daryl</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Objective-c]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://darylteo.com/blog/?p=338</guid>
		<description><![CDATA[A week in, and I&#8217;ve already run into problems at a conceptual stage of my application. I conceptualised the application I would like to build my assignment, and assessed the feasibility of its implementation and discovered many problems. I may &#8230; <a href="http://darylteo.com/blog/2010/09/02/iphone-project-part-1-concept/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A week in, and I&#8217;ve already run into problems at a conceptual stage of my application. I conceptualised the application I would like to build my assignment, and assessed the feasibility of its implementation and discovered many problems. I may even have to scrap the idea and find a new one. Read more about my idea below the break.</p>
<p><span id="more-338"></span>After some thought, I decided on the following concept for the assignment: a rural fire warning application for people living in potential bushfire zones in Australia, coupled with current social networking trends.</p>
<p>The concept itself raises several issues.</p>
<p>At first I searched through the <a title="Bureau of Meteorology Homepage" href="http://www.bom.gov.au/" target="_blank">Bureau of Meteorology</a>(BOM) for any data that could be consumed for the app&#8217;s purposes. However, most of the BOM&#8217;s data only deals with weather forecasts; any inclement weather warnings are listed as textual press releases, not in any easily consumable data formats.</p>
<p>This then led me to look elsewhere, which eventually landed me at the department of <a title="Geoscience Australia" href="https://ga.gov.au/" target="_blank">Geoscience Australia</a>, which provides maps similar to what I was aiming to accomplish with my application. These maps are constructed from data organised by the <a title="Sentinel" href="http://sentinel.ga.gov.au/acres/sentinel/index.shtml" target="_blank">Sentinel</a> national bushfire monitoring system, which pulls from the latest data generated by NASA&#8217;s satellites, namely the Moderate Resolution Imaging Spectroradiometer (MODIS). Unfortunately, these maps were self-contained; again, no data feeds from which I could pull from. MODIS itself was unhelpful; although I eventually did find some data, I still could not make sense out of all the raw data that was available (I&#8217;m no meteorologist!).</p>
<p>So I turned to the <a title="Country Fire Authority, Victoria Australia" href="http://www.cfa.vic.gov.au/" target="_blank">Country Fire Authority</a>, to see if there were any information I could grab from them. As it turns out, they provide RSS feeds of the latest warnings for public consumption! This was great news; I could use the RSS feed and display them on my application.</p>
<p>As it turns out, it wouldn&#8217;t be that easy:</p>
<ol>
<li>The RSS feeds do not provide any clear information, just street names. This means there will be a margin of error narrowing down exact locations to display on a map.</li>
<li>Since it wasn&#8217;t bushfire season, there was no sample data I could build off. I would have to contact them in order to get a sample.</li>
<li>Some feeds only give images; there would be no way of customizing my own maps from data.</li>
</ol>
<p>Next came a even bigger problem: each state/territory in Australia has its own department for bushfire response (CFA in Victoria, RFS in New South Wales etc.), and each of these departments had their own feeds. This meant it would be nearly impossible to provide a consistent representation for all the data that was available from different states.</p>
<p>There are other resources I have yet to investigate, so I will continue to assess the feasibility of building this application. Stay tuned for Part 2!</p>
]]></content:encoded>
			<wfw:commentRss>http://darylteo.com/blog/2010/09/02/iphone-project-part-1-concept/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iPhone Project: Part 0</title>
		<link>http://darylteo.com/blog/2010/08/25/iphone-project-part-0/</link>
		<comments>http://darylteo.com/blog/2010/08/25/iphone-project-part-0/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 16:31:21 +0000</pubDate>
		<dc:creator>Daryl</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Objective-c]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://darylteo.com/blog/?p=334</guid>
		<description><![CDATA[As part of my final university semester, I enrolled in an iPhone software development course that was offered to students. I don&#8217;t consider myself an extremely proficient Objective-C developer, but I have picked up most of the conceptual iPhone/Cocoa Touch &#8230; <a href="http://darylteo.com/blog/2010/08/25/iphone-project-part-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As part of my final university semester, I enrolled in an iPhone software development course that was offered to students. I don&#8217;t consider myself an extremely proficient Objective-C developer, but I have picked up most of the conceptual iPhone/Cocoa Touch stuff that developing for the iPhone/iPad requires.</p>
<p>At the end of the semester I am required to submit a Major Project. This project is relatively flexible; students are required to develop a iPhone application based on a specific theme (Climate/Weather), however the actual application itself is to be designed by students. It must have at least 3 major features, while utilising a minimum number of advanced iPhone tools(such as MapViews, Multi-View applications, iPad portability etc.).</p>
<p>At the project&#8217;s conclusion, students are also required to give a presentation on the project, describing its concept, features, and development. So, I aim to record my progress on this assignment through to its completion, mainly so I may refer to it again when I do my final presentation!</p>
<p>Here&#8217;s looking forward to a healthy update schedule once more.</p>
]]></content:encoded>
			<wfw:commentRss>http://darylteo.com/blog/2010/08/25/iphone-project-part-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gwisher – Gifts for your Girlfriend</title>
		<link>http://darylteo.com/blog/2010/04/10/gwisher-gifts-for-your-girlfriend/</link>
		<comments>http://darylteo.com/blog/2010/04/10/gwisher-gifts-for-your-girlfriend/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 00:07:46 +0000</pubDate>
		<dc:creator>Daryl</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[australia]]></category>
		<category><![CDATA[boyfriends]]></category>
		<category><![CDATA[camp]]></category>
		<category><![CDATA[dating]]></category>
		<category><![CDATA[entrepreneurship]]></category>
		<category><![CDATA[gifts]]></category>
		<category><![CDATA[girlfriend]]></category>
		<category><![CDATA[girlfriends]]></category>
		<category><![CDATA[gwish]]></category>
		<category><![CDATA[gwisher]]></category>
		<category><![CDATA[melbourne]]></category>
		<category><![CDATA[presents]]></category>
		<category><![CDATA[relationships]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[victoria]]></category>

		<guid isPermaLink="false">http://darylteo.com/blog/?p=332</guid>
		<description><![CDATA[Currently I have the great opportunity to participate in the Melbourne &#8220;StartUp Camp 2010&#8243;. At the time of writing, I have not slept for more than 24 hours. I&#8217;m barely surviving on cans of energy drinks, but nothing is more &#8230; <a href="http://darylteo.com/blog/2010/04/10/gwisher-gifts-for-your-girlfriend/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Currently I have the great opportunity to participate in the Melbourne &#8220;StartUp Camp 2010&#8243;. At the time of writing, I have not slept for more than 24 hours. I&#8217;m barely surviving on cans of energy drinks, but nothing is more exciting than the launch of a brand new project.</p>
<p>It is with great pleasure that I present to you, on behalf of my team,<a title="Gwisher - Gifts for your Girlfriend" href="http://gwisher.com" target="_blank"> Gwisher.com</a>.</p>
<p>The premise is simple; guys who have no idea what to get their girlfriend on an important occasion use Gwisher, inputting various information regarding their girlfriend, and Gwisher returns a list of suggestions that he may get for his girlfriend. Our advanced &#8220;Gwish&#8221; engine processes this information in order to give the best suggestions for the user.</p>
<p>It was definitely a great 12 hours of non-stop frenzy, and I definitely recommend this experience to anyone.</p>
]]></content:encoded>
			<wfw:commentRss>http://darylteo.com/blog/2010/04/10/gwisher-gifts-for-your-girlfriend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New iPhone Developer Agreement – No More CS5 Compiler</title>
		<link>http://darylteo.com/blog/2010/04/09/new-iphone-developer-agreement-no-more-cs5-compiler/</link>
		<comments>http://darylteo.com/blog/2010/04/09/new-iphone-developer-agreement-no-more-cs5-compiler/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 00:33:44 +0000</pubDate>
		<dc:creator>Daryl</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[cs5]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[monotouch]]></category>
		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://darylteo.com/blog/?p=327</guid>
		<description><![CDATA[There have been numerous reports circulating around the internet about how Flash CS5&#8242;s native iPhone Application compiler is, effectively, doomed. There have also been a variety of reactions to this, from the informed (&#8220;I don&#8217;t like it, but Apple has &#8230; <a href="http://darylteo.com/blog/2010/04/09/new-iphone-developer-agreement-no-more-cs5-compiler/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There have been <a title="New iPhone Developer Agreement Bans the Use of Adobe’s Flash-to-iPhone Compiler" href="http://daringfireball.net/2010/04/iphone_agreement_bans_flash_compiler" target="_blank">numerous</a> <a title="Hacker News" href="http://news.ycombinator.com/item?id=1250946" target="_blank">reports</a> <a title="Uh-Oh: iPhone OS 4.0 SDK May Forbid Adobe’s CS5 Flash Compiler" href="http://www.maclife.com/article/news/uhoh_iphone_os_40_sdk_may_forbid_adobe%E2%80%99s_cs5_flash_compiler" target="_blank">circulating</a> <a title=" Apple bans Adobe's Flash-to-iPhone compiler, plus related applications" href="http://www.neowin.net/news/apple-bans-adobe039s-flash-to-iphone-compiler-plus-related-applications?" target="_blank">around</a> <a title="Apple Gets Sneaky In Blocking Flash From iPhone" href="http://www.crn.com/mobile/224202400;jsessionid=V41CGMYB3ALUHQE1GHRSKHWATMY32JVN" target="_blank">the internet</a> about how Flash CS5&#8242;s native iPhone Application compiler is, effectively, doomed.</p>
<p>There have also been a variety of reactions to this, from the informed (&#8220;I don&#8217;t like it, but Apple has every right to do so&#8221;) to the very ill-informed (&#8220;Flash Sucks!&#8221;), so let me state my position in the matter: this whole thing stinks like a dead carcass wrapped in burnt bacon thrown in a washing machine filled with raw sewage.<span id="more-327"></span></p>
<h2>The Matter</h2>
<p>The reports point to a new clause in section 3.3.1 of the iPhone 4.0 SDK, which states</p>
<blockquote><p>Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited</p></blockquote>
<p>and the expectation is that Apple has effectively removed any chance of Apps compiled using Flash CS5&#8242;s compiler (or any other compiler aside from the iPhone SDK) from entry into the App Store.</p>
<p>There are numerous reasons being cited for this new development (via comments), including:</p>
<ol>
<li> performance is impacted (by Flash)</li>
<li>battery life is reduced (by Flash)</li>
<li> Apps produced by other tools for cross-platforms do not take advantage of the iPhone&#8217;s strengths.</li>
<li> This is just to prevent alternative App stores from popping up.</li>
<li> Apple does not want people to create apps for free without going through the App store.</li>
</ol>
<p>However, most of those points are complete and utter troll drivel.</p>
<h2>The Facts</h2>
<p>Lets be clear on all the facts.</p>
<h3>Performance/Battery Life</h3>
<p>This has got absolutely nothing to do with performance, or battery life. In fact, it has nothing to do with Flash at all. Flash CS5 is merely the tool that allows you to compile native iPhone applications. So the result is a <strong>native</strong> iPhone App. <strong>There is still no Flash on the iPhone, neither is Flash running on the iPhone at any time. </strong>So any complaints about Flash sucking away performance or battery life on the iPhone is completely irrelevant. To categorise Apps compiled on anything other than the iPhone SDK as battery and performance sucking vampires is just short of &#8220;Guilty until Proven Innocent&#8221; except in this case, there&#8217;s no chance to prove an App&#8217;s innocence.</p>
<h3>Circumventing the App Store</h3>
<p>There is no way (bar jailbreaking your iPhone) you can get an App onto your iPhone. Plain and simple. Any claims that say otherwise are simply wrong. I say again: these are native applications compiled for the iPhone, and submitted through the App Store. There will not be new App Stores popping up allowing you to sell Flash iPhone Apps.</p>
<h2>The Reason</h2>
<p>Lets think about this carefully.</p>
<p>Apple already have control over the Apps that go on the iPhone via the App Store review process. This allows them to reject any Apps that, as those concerned have mentioned, suck away battery life and performance, or Apps that don&#8217;t conform to some black-box review requirements. Furthermore there is definitely no way Adobe, or anyone else, will be able to set up a new App Store for downloading new Apps. Nor is Flash running on the iPhone at anytime. And if an App doesn&#8217;t take full advantage of the iPhone because of its cross-platform nature, why should this be an impact on the App Store, the store with thousands of Apps that somehow got past Apple&#8217;s quality review process. Why would they do this when they already have full control over the iPhone?</p>
<p>Because the only way you can build Applications for the iPhone is <strong>by buying a Mac</strong>.</p>
<p>Apple doesn&#8217;t want anyone without a Mac to compile applications for their flagship mobile products, increasing in market share by the minute (and even more so with the launch of the iPad). So once they realised that people were writing tools to compile for the iPhone on anything other than an OS X, they take steps to stamp it out. iPhone development is one of the big drivers in iMac and MacBook sales, without them you can&#8217;t build for the iPhone.</p>
<h2>Conclusion</h2>
<p>So there you have it. While Apple has every right to do so, it stinks as hell. And I hope someone with some balls and brains has the ability to see that. And, as John Gruber puts it, &#8220;[Adobe are] pretty much royally fucked&#8221;.</p>
<p>Author&#8217;s Note: Apology for the inflamatory language. While I don&#8217;t even work with Flash anymore, I hate to see these sorts of things happening, and the people doing it getting away with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://darylteo.com/blog/2010/04/09/new-iphone-developer-agreement-no-more-cs5-compiler/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Why can’t HTML5 and Flash co-exist?</title>
		<link>http://darylteo.com/blog/2010/02/28/why-cant-html5-and-flash-co-exist/</link>
		<comments>http://darylteo.com/blog/2010/02/28/why-cant-html5-and-flash-co-exist/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 17:48:01 +0000</pubDate>
		<dc:creator>Daryl</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[WWW]]></category>

		<guid isPermaLink="false">http://darylteo.com/blog/?p=317</guid>
		<description><![CDATA[This post is a comment in reply to user sentiments on a recent Mashable poll titled &#8220;HTML5 Knocks Out Adobe Flash in Reader Vote&#8221;, with some minor changes for clarity. I&#8217;ve mentioned to people before, Adobe is at a critical &#8230; <a href="http://darylteo.com/blog/2010/02/28/why-cant-html5-and-flash-co-exist/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This post is a comment in reply to user sentiments on a recent <a href="http://mashable.com/2010/02/26/html5-flash-poll/">Mashable poll</a> titled &#8220;HTML5 Knocks Out Adobe Flash in Reader Vote&#8221;, with some minor changes for clarity.</p>
<p>I&#8217;ve mentioned to people before, Adobe is at a critical point here. They can choose to sit on their arses and ignore HTML5, which will steamroll Flash when it does come into play. Or they can choose to do something better with it. Adobe&#8217;s strategic advantage will be that they have control over the progress of the Flash platform, and they need to use that to quickly make itself relevant in a HTML5 world. </p>
<p>In the meantime, <span id="more-317"></span>HTML5 is certain to replace everything else Flash is known for. Video, minimal animations and transitions for websites through CSS3 and Javascript, offline storage and rich applications. Flash needs to find a new niche to remain relevant (not surprisingly it will probably need to solidify its position as a browser gaming juggernaut) and they should be able to do that quickly without the need of a new web standard taking years to ratify, and browsers to uptake. They may even manage to do this without HTML5 gaining significant market share.</p>
<p>Pro-Flash campers need to see this as progress in web technologies and use the right tool for the job, not stick to their hammers for screws.</p>
<p>Anti-Flash campers need to see that Flash can still be a crucial technology on the web, and stop trying to mold HTML5 into something so complex that even it itself becomes a crutch on the internet, in the fool&#8217;s hope of crippling Flash with a &#8220;Anything you can do, I can do better&#8221; charade. K.I.S.S.</p>
<p>In essense, stop this senseless Flash hate. Killing Flash will not get rid of ads, or popup videos, or get rid of browser vulnerabilities. Yes Flash Player is shit on non-Windows systems. Yes it has vulnerabilities. But those can be fixed. Focus your energies on getting Adobe to fix shit, not on Flash.</p>
<p>Anyway If you&#8217;re reading this, Adobe, the ball&#8217;s in your court at the moment. Show me what you can do.</p>
]]></content:encoded>
			<wfw:commentRss>http://darylteo.com/blog/2010/02/28/why-cant-html5-and-flash-co-exist/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

