<?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>Wikid Blog: by Wikid Labs &#187; ActionScript</title>
	<atom:link href="http://www.wikidlabs.com/tag/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wikidlabs.com</link>
	<description></description>
	<lastBuildDate>Mon, 15 Nov 2010 20:24:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Anatomy of a Syntax Highlighting Engine &#8211; Part 1</title>
		<link>http://www.wikidlabs.com/syntax-highlighting-engine-part-1/</link>
		<comments>http://www.wikidlabs.com/syntax-highlighting-engine-part-1/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 21:10:18 +0000</pubDate>
		<dc:creator>DL</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[Syntax Highlighting]]></category>

		<guid isPermaLink="false">http://blog.wikidsoft.com/?p=3</guid>
		<description><![CDATA[This is the first of a series of posts where I&#8217;m going to discuss some of the, um&#8230; fun that we&#8217;ve had while writing Wikid Editor, the text editor that we built for our flagship product Haven (which is still being developed). In this post I&#8217;m going to focus solely on the choice in technology. [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first of a series of posts where I&#8217;m going to discuss some of the, um&#8230; fun that we&#8217;ve had while writing Wikid Editor, the text editor that we built for our flagship product <a href="http://www.wikidlabs.com/products/haven/" target="_self">Haven</a> (which is still being developed). In this post I&#8217;m going to focus solely on the choice in technology.</p>
<p>Here are a few high level requirements for Wikid Editor.</p>
<ol>
<li>It had to run inside the browser and it needed to work in all browsers or at least the main ones, Firefox, IE, Safari and Chrome.</li>
<li>It needed to be able to color text any way we wanted.</li>
<li>It should be able to color the background of rows.</li>
<li>It needed to be able to communicate with our servers without reloading the page and preferably be able to receive pushed data from our servers.</li>
<li>It needed to perform well.</li>
</ol>
<p><span id="more-3"></span></p>
<p>We pretty much had it narrowed down to JavaScript, Flex or Silverlight. There may well have been other choices but we either didn&#8217;t find them or they didn&#8217;t seem practical or feasible to us. Any one of the three would technically work so for us it came down to these areas of concert.</p>
<ol>
<li>Cross browser compatibility (Winners: Flex, Silverlight)
<ol>
<li>JavaScript &#8211; While there are several frameworks that have done a great job of dealing with this issue it&#8217;s still something that has to be dealt with or be concerned about, especially when new or updated browsers are released.</li>
<li>Flex &#8211; The crew at Adobe are not flawless but they are tasked with keeping up with browser compatibility not us and not an open source community.</li>
<li>Silverlight &#8211; Kinda in the same boat as Flex, Microsoft is tasked with keeping up with the Jones&#8217; so we don&#8217;t have to.</li>
</ol>
</li>
<li>Maturity of the framework (Winners: JavaScript, Flex)
<ol>
<li>JavaScript &#8211; No questions there, as far as I know it&#8217;s the oldest of the bunch</li>
<li>Flex &#8211; While the Flex framework is only a few years old the Flash player has been around for quite a while.</li>
<li>Silverlight &#8211; Silverlight is pretty new. Microsoft has put a ton of work into it so I&#8217;m sure that it would work out but it&#8217;s the baby of the bunch.</li>
</ol>
</li>
<li>How does our skill set match up (Winners: Flex, JavaScript)
<ol>
<li>JavaScript &#8211; Neither of us were JavaScript ninjas but it wouldn&#8217;t be to hard to get up to speed fast.</li>
<li>Flex &#8211; We had just finished up a project in Flex so it was fresh on our minds.</li>
<li>Silverlight &#8211; Other than having some C# and ASP.Net under my our belt this Silverlight is not something that we know real well.</li>
</ol>
</li>
<li>In browser performance
<ol>
<li>We didn&#8217;t do any testing just some studying up on architecture</li>
</ol>
</li>
</ol>
<p>So we chose to write the editor in Flex. It was pretty fun and we learned a ton. It took me about 6 weeks of spare time coding to get the highlighting to work but it was slow. Over the course of 6 months I finally learned enough about lexers, regexp and real-time highlighting design that I got a working version that was pretty speedy.</p>
<p>Was Flex the right choice? I can say that it wasn&#8217;t the wrong choice. I can also say that there are a few JavaScript text editors that boast highlighting capabilities. I&#8217;d say that there may not be a right or wrong choice but that you shoud stick with what you know best. If it works, great, if not, sweet, you get to learn something new.</p>
<p>Stay tuned for a more techinical dive next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wikidlabs.com/syntax-highlighting-engine-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

