<?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>Songbird Creations &#187; Development</title>
	<atom:link href="http://www.songbird-creations.com/archives/category/development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.songbird-creations.com</link>
	<description>Software Creation and Consultancy</description>
	<lastBuildDate>Mon, 16 May 2011 22:24:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Business Application Development and Android.</title>
		<link>http://www.songbird-creations.com/archives/76</link>
		<comments>http://www.songbird-creations.com/archives/76#comments</comments>
		<pubDate>Mon, 16 May 2011 22:22:36 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.songbird-creations.com/?p=76</guid>
		<description><![CDATA[Why the little green robot is going to take the ruggedized device market by storm.]]></description>
			<content:encoded><![CDATA[<p>Songbird Creations has been looking into Android as a potential viable operating system for use in the business arena.</p>
<p>There are several reasons why we feel that the Android platform is going to win over the competition &#8211; and as long as Google don&#8217;t mess it up, it will clean house.</p>
<p>Now, before anyone starts thinking that this is a fanboy gush post with a heavy bias or that this is a bash against Windows or Apple, be aware that we&#8217;ve been evaluating many different devices, including the iPhone and iPad as well as the Android offerings. They are all great products &#8211; but we&#8217;ve found that there are a few things which hold them back.</p>
<p>Note that We already develop for windows and can see no future in it in its current state. (It&#8217;s WinMo 6.5 for a while folks &#8211; <a href="http://blogs.technet.com/b/microsoft_blog/archive/2010/04/07/windows-embedded-business-aligning-handheld-terminals-and-ruggedized-devices.aspx">from the horses mouth</a>)</p>
<p><strong>Against the iPad and the iPhone.</strong></p>
<p><strong>No 1. The App Store. </strong></p>
<p>Everything has to go through the app store. In most cases, this is fine. It keeps the platform safe and free from malicious applications because everything is vetted. For a personal application developer, there are good and bad aspects to this. We could spend many hours arguing the finer points of having a single entity being the market and the police and the potential for corruption which comes with this absolute power&#8230; but we won&#8217;t</p>
<p>We could also spend many hours arguing about how the openness of the Google Market place could result in a glut of poor quality or malicious apps trying to take your stuff&#8230;  we&#8217;re not going to do that either.</p>
<p>For a business application user, there are important issues which neither the Apple App Store or the Google Market address and that is the commercial advantage that can be gained by using bespoke or niche tools.</p>
<p>By placing an application in the App store or the Market place, anyone can download it. It sits in amongst the chaff of the countless other apps and has to be searched for &#8211; opening up the chance that the user will install the wrong app or an imposter. This is not what you want.</p>
<p>The solution is to allow a user to download the application from an additional source &#8211; say, a vendor&#8217;s web-site.</p>
<p>This is only possible with Android or Windows as Apple wants to (and does) control the whole process. Like I said, great for the private user but bad for the business application user.</p>
<p><strong>No 2. Device Range and suitibility</strong></p>
<p>Unfortunately, as beautiful as Apple&#8217;s devices are, they are really only intended for the personal user. They are the cool gadget, the executive toy. They offer plenty of features, but they wouldn&#8217;t last 5 minutes on a shop floor, in a mail room or a warehouse. They&#8217;re just not robust enough. If you could guarantee that the person issued with the iPhone or iPad was going to treat it with kid gloves then maybe it would be viable. But everyone knows that Murphy&#8217;s law dictates that this won&#8217;t happen and the device Will become damaged. Apple devices are expensive so the business owner really needs to weigh up the pros and cons of using such a device in such a dangerous environment.</p>
<p>Android devices are not subject to the Apple blueprint. Sure, the Android Cell phones and Tablets are generally as vulnerable to dropping and scratching as their Apple counterparts &#8211; but there is a big difference between the 2 platforms. Openness; and it&#8217;s this Openness that makes Android such a powerful potential business tool. Rugged Android devices are already in the market place with capabilities far beyond what Apple can offer.</p>
<p>Devices like the Bluebird Pidion and the Casio G&#8217;zOne Commando are just the vanguard which will be followed by many more ruggedized devices as the business world catches on.</p>
<p><strong>No 3. Developer Support</strong></p>
<p>Unfortunately, Apple chose to leverage their Objective-C language &#8211; a great language to be sure but as it&#8217;s only used within the Apple family of products, it has limited appeal. Apple also actively excluded any other means of development. This effectively killed any chance of third parties developing platforms to cross the platform divide. So there are no Adobe Air applications running on Apple devices, No Flash and no Java means that developers are back in the bad old days. Writing for multiple platforms using different languages with no possibility of shared code libraries. On top of this, to write in Objective-C, you need X-Code &#8211; Apple&#8217;s own IDE.</p>
<p>Business Application developers are generally not going to waste time learning a new IDE and a new flavor of C just to write software which will be usable by a small section of their customer base.</p>
<p>The same point could be argued against Android in a way. The vast majority of business developers use C# on the .net framework. For mobile devices, this means the Compact Framework and Windows Mobile 6.x (or 7 for phone app developers). These developers have an investment in time and tools on the .net framework. Windows Mobile 7 is not going to be released for rugged business devices however &#8211; so it&#8217;s 6.5 or nothing at the moment for .net.</p>
<p>However, Windows Mobile is old. It&#8217;s not pretty to look at and has been left behind in terms of providing a rich user experience.</p>
<p>If Apple has done anything in this last few years, it&#8217;s that it&#8217;s kick-started a revolution for the better in application user interface design. Something that Google really took to heart with Android. Both iOS and Android offer silky smooth experiences which leave their poor cousin looking old and haggard in comparison. Because of this, users have now come to expect their apps to look crisp, nice and feel responsive.</p>
<p>The change is as significant as that from DOS to Windows.</p>
<p>There&#8217;s also the matter of the tools. To develop for Windows, you need to purchase a flavor of Visual Studio &#8211; you can get away with using Sharp Develop sure, but in our experience, it leaves a lot to be desired for mobile app development. To develop for iOS, there&#8217;s the aforementioned X-Code requirement &#8211; Which is free but needs a Mac to run.</p>
<p>Android Applications can be developed using Eclipse or Netbeans. The SDK is free and available to anyone. It has a rich set of tools including a device emulator. Java is very similar to C# in many ways and the internet is filled to the brim with Java coding examples.</p>
<p><strong>Finally</strong></p>
<p>The mobile development world is crying out for decent cross platform tools. It seem inconceivable to me that after all these years, we&#8217;re still sitting in different camps. We should instead be leveraging these new great tools and shaping the business world by offering tools that employees actually want to use. But that&#8217;s not the fault of the application developers. You can blame political wrangling at various companies for that.</p>
<p>So to write applications for every device, we would have three code-bases&#8230; that&#8217;s not going to happen now is it?</p>
<p>So when you strip out all of the vanity,  hype, the marketing and boil things down to the actual facts &#8211; the points that really matter, there is a platform which ticks more boxes than the others.</p>
<p>It&#8217;s not iOS and it&#8217;s not Windows.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.songbird-creations.com/archives/76/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Wonderful Thing About Java</title>
		<link>http://www.songbird-creations.com/archives/33</link>
		<comments>http://www.songbird-creations.com/archives/33#comments</comments>
		<pubDate>Thu, 19 Feb 2009 16:24:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Applet]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Printing]]></category>

		<guid isPermaLink="false">http://www.songbird-creations.com/?p=33</guid>
		<description><![CDATA[Fun and games developing Java Applets to print PDFs without user intervention.]]></description>
			<content:encoded><![CDATA[<p><strong>is Java&#8217;s a wonderful thing..</strong></p>
<p><em>Well, mostly anyway.</em></p>
<p>The wonderful world of Java applets is a funny old world. One of pitfalls and woe on one side and unparalleled power on the other. </p>
<p>Java has been around for a while and has a very substantial support base, which comes in handy when trying to get around some of the more annoying problems associated with Java development, well Applet development anyway. It runs on pretty much anything, part of it&#8217;s charm is that you don&#8217;t need to run on a Microsoft platform unlike .net</p>
<p>One of the best things is that as a language, it&#8217;s free and there are many free IDEs out there to help you to develop. One of the best I&#8217;ve seen so far is NetBeans v6.5 &#8211; An IDE originally written by Sun Micro systems, made open source whilst being heavily sponsored by Sun. It&#8217;s completely free, Cross platform and downloadable from the their site <a href="http://www.netbeans.org">www.netbeans.org </a><br />
Without wanting to spend too much time singing the praises of NetBeans, I have to mention that it&#8217;s PHP editing tools are pretty fine too and when coupled with the correct version of <a href="http://www.xdebug.org">xdebug </a>for your PHP runtime, make for a very powerful PHP development platform indeed.</p>
<p>We found a couple of minor issues which were noteworthy when developing Java Applets.</p>
<p>One of them being that the HTML standard has kind-of left Applets behind, deprecating the Applet tag for the more generic Object tag. Not a big problem, but slightly annoying and important if your web site is to be XHTML compliant. </p>
<p><strong>We had a simple task to solve for our client:</strong></p>
<p><em>Print PDF documents on a cross browser web page, without user intervention</em>. </p>
<p>The task in itself doesn&#8217;t sound too bad. PDFs are a well known standard for documents and there are numerous browser plug-ins we can use. The tricky part is the &#8220;<em>Without user intervention</em>&#8221; bit. </p>
<p>That suddenly throws all of the spanners into the machine, leaving a poor engineer with the task of putting it all back together again.. only this time making it spanner proof.<br />
Browsers are very protective of the printer. You can&#8217;t access it directly. Sure, you can print a web page,  but you can&#8217;t bypass the all-seeing eye of the Printer Dialog. </p>
<p>Because of this, numerous ActiveX components have been developed and are sold to get around this issue for web applications. The thing is, ActiveX is a Microsoft Only technology, for Windows and Internet Explorer. That goes against the Cross Platform, Cross Browser requirement.</p>
<p><strong>Java to the Rescue&#8230; mostly</strong></p>
<p>So we had to set about printing from the browser. Thankfully, Java does have the capability to talk to the printer directly. The only downside being that it keeps asking for permission to do so, rather like an over-polite child constantly asking to use the bathroom.. The temptation to lose all patience and say &#8220;Yes, for the 1000th time, just use the bathroom if you need it OK?&#8221; &#8211; which would be bad.</p>
<p>There is a way to instruct the Java runtime that it&#8217;s OK for it to use the bathroom.. I mean, Printer. You can modify the java.policy file in your runtime directory/lib/security folder to grant permissions to use the printer. A cheap and nasty solution in more than one way. </p>
<p>First of all, it meant having to modify the file on the machines of each user using the web application to grant access to the printer and secondly (and possibly more importantly) Every time you upgrade your Java runtime, it keeps a copy of the old one and installs the new one in a fresh directory.<br />
This means that you have to re-apply your cheap hack to the new runtime, whenever your users upgrade their Java.. Support Nightmare!</p>
<p><strong>Thankfully, there was a solution.</strong><br />
First of all.. Sign the Applet. You can self sign your applets but we chose to buy a certificate and sign it that way. It looks much better with a certificate from a trusted Certificate Authority, and they&#8217;re not expensive.</p>
<p>A signed applet is a trusted applet (assuming the user says &#8216;Yes&#8217;, they trust your applet) and has access to things like Printing and Files etc. Things a normal applet just doesn&#8217;t have (without above hack).</p>
<p>But we were still running into problems. The over-polite child.. I mean, Java.. was still asking to use the printer, each and every time we  initialized the applet and tried to print. Even though we&#8217;d checked the little box which was supposed to remember our selection. I&#8217;m not sure if this is a bug in the runtime or not, but that&#8217;s another thing entirely.</p>
<p><strong>Odd permissions issue &#8211; The day Logic took the day off</strong><br />
It turns out that the reason it kept asking, even with a signed applet was that the code being called to talk to the printer was being accessed from Javascript on the web page, and was therefore un-trusted. I&#8217;m unsure of the logic here, what was going through the minds of the Java Runtime developers.. a trusted applet should be a trusted applet irrespective of what is calling it, but it is what it is.</p>
<p>The way around that was to make sure that the Javascript was not directly accessing the printing method. </p>
<p>This was done using a separate thread, sitting waiting for a variable to be set.<br />
The public method accessed by the Javascript then only set a variable along with the printing details.<br />
The printing thread then picks this information up and prints the document. No problems.</p>
<p><strong>Are we nearly there yet?</strong><br />
Another issue was telling when the applet was loaded so that we could call it&#8217;s methods from the site. This turned out to be more problematic than we originally thought. The isActive method didn&#8217;t always work and we had to resort to getting the Applet to call a Javascript method on the page (if it existed) to inform the page that it was ready.</p>
<p><strong>..and Finally</strong></p>
<p>Now, figuring that all out took more time than writing the entire applet and if this was a few years ago, If google didn&#8217;t have access to forum threads where other people had solved these same problems, it would have taken a lot longer. In some ways, I can see why the .net framework has overtaken Java as the development platform of choice for business. It&#8217;s certainly easier to get up and running faster with .net but .net can&#8217;t do everything and Java shouldn&#8217;t be dismissed as old hat.</p>
<p>It&#8217;s very powerful, fast, cross-platform, cross-browser and free. These factors alone make it a language worth using.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.songbird-creations.com/archives/33/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

