<?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>mFabrik - mobile sites, apps, HTML5 and CMS software development &#187; symbian</title>
	<atom:link href="http://blog.mfabrik.com/tag/symbian/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mfabrik.com</link>
	<description>Freedom delivered.</description>
	<lastBuildDate>Wed, 03 Aug 2011 09:47:41 +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>Native mobile application development with Plone, WordPress and Python</title>
		<link>http://blog.mfabrik.com/2011/02/09/native-mobile-application-development-with-plone-wordpress-and-python/</link>
		<comments>http://blog.mfabrik.com/2011/02/09/native-mobile-application-development-with-plone-wordpress-and-python/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 13:59:32 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[android scripting environment]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[meego]]></category>
		<category><![CDATA[mobile apps]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[push notification]]></category>
		<category><![CDATA[pyobjc]]></category>
		<category><![CDATA[pypy]]></category>
		<category><![CDATA[pyside]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[series 60]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[webkit]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wurfl]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=937</guid>
		<description><![CDATA[We have just released two mobile applications backed by Plone, WordPress and Python middleware code. In this blog post I&#8217;ll tell some background information what we have learnt with mobile applicationand Python development. mFabrik News &#8211; download now for iPhone and Android Why create a mobile application? The first question is why one rather create [...]]]></description>
			<content:encoded><![CDATA[<p>We have just released two mobile applications backed by Plone, WordPress and Python middleware code. In this blog post I&#8217;ll tell some background information what we have learnt with mobile applicationand Python development.</p>
<p style="text-align: center;"><strong>mFabrik News &#8211; download now for iPhone and Android</strong></p>
<p style="text-align: center;"><a href="http://bit.ly/mfabriknewsitunesblog"><img class="aligncenter" title="iPhoneFooter" src="http://blog.mfabrik.com/wp-content/uploads/2011/01/iPhoneFooter.png" alt="" width="88" height="31" /></a></p>
<p style="text-align: center;"><a href="http://bit.ly/mfabriknewsappbrainblog"><img class="aligncenter" title="AndroidFooter" src="http://blog.mfabrik.com/wp-content/uploads/2011/01/AndroidFooter.png" alt="" width="88" height="31" /></a></p>
<h2>Why create a mobile application?</h2>
<p>The first question is why one rather create a mobile application when the same task can be accomplished with a mobile site? Most people even <a href="http://www.wirelessweek.com/News/2010/10/Mobile-Content-Report-Mobile-Browsers-Trump-Mobile-Applications/">prefer mobile sites over applications</a>. From a pure engineering viewpoint, mobile applications are usually just glorified RSS readers that embed Webkit and add some native user interface bling bling over it. With an app, you are limiting your target audience, because an application is limited to one platform. Maintaining application(s) and application developers is more expensive compared to a mobile site which few (cheap) PHP junkies can throw together.</p>
<p>But is not always technology or price which matters. Mobile applications have prestige value &#8211; <em>having or showing success, rank, wealth, etc.</em> If you have a high quality brand, you probably want to have a mobile application too. When you see the brand logo swinging forth and back in an iPhone application with smooth animation running 60 frames per second, you see that it is a proper placement for the brand logo. The output is more luxury, more carefully planned, and does not look like it was thrown together by few cheap web developers.</p>
<p>There are even rationale reason for going after applications. First, you are in a business of making money. It is a lot of easier when the platform itself is offering you a payment solution without a monthly fees (iTunes payment). Other good reason is that there exists interaction between the application and your content beyond the browser window.  You can push messages or do things even if the user is not on your site (see more information about the push solution we implemented below).</p>
<h2>Mobile application development and Python</h2>
<p>As most of this post readers are probably fellow Python developers, here are some thoughts specifically aimed for them. Python itself is not a very good alternative what comes to mobile application development. Though, the application itself may not contain Python code, Python still shines on the backend side of the things. For example, we&#8217;ll hope to publish an example application using Google App Engine in the near future.</p>
<p>The only future proof platform where Python is 1st class citizen for building applications, is Nokia&#8217;s Meego with its Pyside and Qt bindings. Unfortunately Meego doesn&#8217;t have any shipped handsets and looks like it never will.</p>
<p>Android has script bindings, but they are not good enough for real application development, as interaction with the native platform happens over TCP/IP sockets. However, <a href="http://morepypy.blogspot.com/2011/01/jit-backend-for-arm-processors.html">Android has seen some recent exciting development from PyPy project</a>, possibly enabling native Android development for Python in the future.</p>
<p>iOS with Python could be a go, now when Apple has lift ban on interpreted languages. I haven&#8217;t heard anybody doing it yet, though. <a href="http://www.telesphoreo.org/pipermail/iphone-python/2008-October/000203.html">CTypes had some problems long time ago regarding run-time generated code for Python bindings</a>.</p>
<p>Python has also a port for Series 60 (Symbian) &#8211; don&#8217;t go there if you are not prototyping. It is good platform for students for  playing around, but unfortunately it has never been considered as serious development environment by the handset manufacturer. You have tons of headaches if you actually want to release a product version of your application.  Nokia N900, soon supported. is better prototyping platform for Python than Series 60 as you get full Debian userland.</p>
<h2>Mobile application development and wrappers</h2>
<p><a href="http://blog.mfabrik.com/2009/09/30/cross-platform-mobile-application-development-and-payment/">There exist various wrapper technologies which help you to wrap your HTML5 application to a native application shell</a>. With simplistic APIs provided through Javascript bindings, you can access a limited subset of native platform APIs. Wrapper technologies are mostly aimed for web developers, who do not have any experience on application development and they might want to skip the learn experience of native development.</p>
<p>Wrapper technologies do their job and produce decent apps. But if you are a Python developer I recommend you skip the wrapper step and build your own native user interface and embed Webkit yourself. Designing an user interface is much is easier with Apple&#8217;s Interface Builder or Google&#8217;s  Android tools than with half-baked Javascript bindings. The fact that you are actually able to insert a real breakpoint into your code is itself worth of skipping wrappers. If you already are a Python developer you already know at least one real programming language and mastering Objective-C or Java should be an easy task for you.</p>
<p>Webkit itself has bugs. You will regularly hit obscrure bugs when the amount of  Javascript and CSS code grows. In the worst cases Webkit just dies under your application without a way to debug the problem &#8211; sometimes without a workaround available for the problem. This means dead end for your lovely application. You don&#8217;t want to end up to this situation. So, just to have more low level control, using native tools is good.</p>
<h2>mFabrik News application</h2>
<p><a href="http://blog.mfabrik.com/wp-content/uploads/2011/02/news-both.png"><img class="alignnone size-full wp-image-954" title="news both" src="http://blog.mfabrik.com/wp-content/uploads/2011/02/news-both.png" alt="" width="700" height="500" /></a></p>
<p>mFabrik News mobile application allows you to follow the latest news of mobile and web development, produced by our hacking team. The applications source the news from our Plone based web site and WordPress blog (which you are currently reading). It uses special RSS streams prepared with our <a href="http://webandmobile.mfabrik.com">Web and Mobile multichannel publishing solution</a>: news images are optimized for mobile device screens using a handset database (Wurfl) and some other HTML preproessing is done to make the posts look better in embedded WebKit. Processing is done using <a href="http://pypi.python.org/pypi/mobile.sniffer">mobile.sniffer</a> and <a href="http://pypi.python.org/pypi/mobile.htmlprocessing">mobile.htmlprocessing</a> Python packages which are generic Python packages and should be usable in various environments, including App Engine.</p>
<p>iOS mFabrik News application has push notification support. Android doesn&#8217;t yet implement push solution, <a href="http://android-developers.blogspot.com/2010/05/android-cloud-to-device-messaging.html">but it is coming for Android 2.2 handsets</a>.  Please <a href="http://blog.mfabrik.com/2011/01/29/apple-push-notifications-apn-with-python/">see the earlier blog post how we use Apple Push Notifications with Python</a>.</p>
<p>Download, give the apps a spin and report any feedback! (direct links at the beginning of the post)</p>
<p>We may or may not release the source code of the applications, depending if anybody thinks they actually would find it useful.
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/02/09/native-mobile-application-development-with-plone-wordpress-and-python/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>pygame goes mobile</title>
		<link>http://blog.mfabrik.com/2008/12/17/pygame-goes-mobile/</link>
		<comments>http://blog.mfabrik.com/2008/12/17/pygame-goes-mobile/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 09:50:25 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[pygame]]></category>
		<category><![CDATA[series 60]]></category>
		<category><![CDATA[symbian]]></category>

		<guid isPermaLink="false">http://blog.redinnovation.com/?p=161</guid>
		<description><![CDATA[Pygame, the easiest way to make computer games in the world, has just reached your pocket. Check our announcement at http://discussion.forum.nokia.com/forum/showthread.php?t=152969]]></description>
			<content:encoded><![CDATA[<p>Pygame, the easiest way to make computer games in the world, has just reached your pocket.</p>
<p>Check our announcement at</p>
<p><a href="http://discussion.forum.nokia.com/forum/showthread.php?t=152969">http://discussion.forum.nokia.com/forum/showthread.php?t=152969</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2008/12/17/pygame-goes-mobile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Planetmobile.us updates</title>
		<link>http://blog.mfabrik.com/2008/12/17/planetmobileus-updates/</link>
		<comments>http://blog.mfabrik.com/2008/12/17/planetmobileus-updates/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 09:48:45 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[planetmobile]]></category>
		<category><![CDATA[symbian]]></category>

		<guid isPermaLink="false">http://blog.redinnovation.com/?p=159</guid>
		<description><![CDATA[Removed Forum Nokia announcements, since there are too many of them nowadays and they were flooding the blog making it useless. Added few more blogs David Wood Andrew Grill Androinica Mobile Internet As It Is Mobispray Symbian Freak Now our planet starts to feel useful. I&#8217;d hope to see more non-Symbian content. Please suggest some!]]></description>
			<content:encoded><![CDATA[<p>Removed Forum Nokia announcements, since there are too many of them nowadays and they were flooding the blog making it useless.</p>
<p>Added few more blogs</p>
<ul>
<li>David Wood</li>
<li>Andrew Grill</li>
<li>Androinica</li>
<li>Mobile Internet As It Is</li>
<li>Mobispray</li>
<li>Symbian Freak</li>
</ul>
<p>Now our planet starts to feel useful. I&#8217;d hope to see more non-Symbian content. Please suggest some!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2008/12/17/planetmobileus-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>planetmobile.us up and running</title>
		<link>http://blog.mfabrik.com/2008/09/25/planetmobileus-up-and-running/</link>
		<comments>http://blog.mfabrik.com/2008/09/25/planetmobileus-up-and-running/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 11:26:23 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[aggregator]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[planetmobile]]></category>
		<category><![CDATA[series 60]]></category>
		<category><![CDATA[symbian]]></category>

		<guid isPermaLink="false">http://blog.redinnovation.com/?p=126</guid>
		<description><![CDATA[planetmobile.us is a blog aggregator focused on mobile software development.The purpose of the aggregator is to give all good blogs in one packet, without the need to hunt them individually. planetmobile.us was managed by Christopher Schmidt until I resurrected it few weeks ago. Please feel free to subscribe your feed to the planet!]]></description>
			<content:encoded><![CDATA[<p><a href="http://planetmobile.us">planetmobile.us</a> is a blog aggregator focused on mobile software development.The purpose of the aggregator is to give all good blogs in one packet, without the need to hunt them individually.</p>
<p>planetmobile.us was managed by <a href="http://crschmidt.net/">Christopher Schmidt</a> until I resurrected it few weeks ago.</p>
<p>Please feel free to subscribe your feed to the planet!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2008/09/25/planetmobileus-up-and-running/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Python for Series 60 Community Edition</title>
		<link>http://blog.mfabrik.com/2008/09/01/introducing-python-for-series-60-community-edition/</link>
		<comments>http://blog.mfabrik.com/2008/09/01/introducing-python-for-series-60-community-edition/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 09:58:00 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[series 60]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[bazaar]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[hybrid development]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[pys60community]]></category>
		<category><![CDATA[python for series 60]]></category>

		<guid isPermaLink="false">http://blog.redinnovation.com/?p=75</guid>
		<description><![CDATA[This blog post will introduce Python for Series 60 Community Edition. Pythor for Series 60 Community Edition is a new open source effort to push Python for high quality mobile phone development. It aims to provide a maintained software stack for creating real mobile applications. The codebase is derived from the original Nokia&#8217;s Python for Series 60 [...]]]></description>
			<content:encoded><![CDATA[<p class="western">This blog post will introduce <a href="https://launchpad.net/pys60community">Python for Series 60 Community Edition</a>.</p>
<p>Pythor for Series 60 Community Edition is a new open source effort to push Python for high quality mobile phone development. It aims to provide a maintained software stack for creating real mobile applications. The codebase is derived from the original Nokia&#8217;s Python for Series 60 codebase, but has been refactored for better integration with third party extensions and patches and commercial grade application deployment.</p>
<h2 class="western">Motivation</h2>
<h3 class="western">Building and distribution</h3>
<p style="margin-bottom: 0cm;">It is difficult to distribute Python for Series 60 applications to the end user with the current Nokia&#8217;s PyS60 distribution. You probably want to modify or extend PyS60 in some way. Since the build chain and deployment model is not designed for changes this would collide with the other PyS60 installations. Symbian Platform security prevents installing conflicting binaries. Thus, one can effectively have one Nokia PyS60 application in the phone once.</p>
<p style="margin-bottom: 0cm;">There are other problems: Nokia PyS60 distribution has UIDs in Nokia protected range. Embedded SIS file cause extra installation dialog and an application manager uninstall entry. Trimming down Nokia PyS60 distribution is a little bit difficult.</p>
<p style="margin-bottom: 0cm;">To overcome all these issues we created a build chain which spits out monolithic PyS60 distributions. We build only one DLL whose name and UID can be decided. Also the build chain is <a href="http://code.google.com/p/scons-for-symbian/">Scons for Symbian</a>, scrapping the obscure, inflexible and difficult to understand Symbian ABLD once for all.</p>
<h3 class="western">Evolution towards higher quality</h3>
<p>Currently there is no centralized authority to co-ordinate PyS60 open source developers and maintain the repository of all the extension and patches. This effectively prevents the biggest benefit of open source: open innovation and gradual evolution of the product. It would be very nice having all those third party extensions, now scattered around the internet, under one maintained source &#8211; making PyS60 more functional out of the box.</p>
<p>The community maintained repositories do not have the same restrictions as ones managed by a big public corporations. It is not a probable target of a trigger happy lawyer action and ungentlemanly competition: the discussion and plans can be public and due dilugence check of the code more relax.</p>
<p>We started the project in the Launchpad. Launchpad provide a distributed version control system (Bazaar) which streamlines the process of integrating third party commits and patches. This should encourage contribution. The standard build system makes it easy to roll out applications and extensions from bare  C++ source up to the end user distributable SIS files.</p>
<p>It is yet to see what kind of co-operation possibilities between the community and Nokia exists. In the future, it should be possible to cherry pick patches from PyS60 community edition to Nokia&#8217;s own version.</p>
<h3 class="western">Showing the commercial potential of PyS60 in the mobile application development</h3>
<p>On Python you can write native Series 60 applications with very little effort compared to hardcore C++ banging, lowering the barries to enter the mobile application development.</p>
<p>We do not deny that we have an extrinct motivation called money. Of course we have also instrict motivations like thinking Python is the best programming language in the world and we all want to be most respectable gurus in it. Gurus need to eat still, though. We hope that our effort does not go unnoticed in the mobile application development world and good subcontract offers fill our inboxes.</p>
<p>Also, there is the John McClane effect. Unless we had done it, no one had. Somebody has to save the world, despite the hangover.</p>
<h3 class="western">It runs on Linux</h3>
<p>Since we are no longer dependend on .BAT/Perl/Windows hindered ABLD buildchain, we can (almost) crosscompile and build native Symbian binaries in Linux and  Python applications. All good hackers use Linux &#8211; but currently there are still kinks and you need to use WINE for some parts &#8211; all sane Symbian developers are tied to Windows based tools for now and so are these instructions.</p>
<h2 class="western">Prerequisitements</h2>
<p>You need all this stuff to get things running.</p>
<h3 class="western">Install Bazaar</h3>
<p style="margin-bottom: 0cm;">You need Bazaar distributed version control client. We are not planning to have fixed releases for Python for Series 60 community edition any time soon. This is because 1) the most magic happens at a compiler level and we are providing a buildchain 2) we hope this fosters incoming patches.</p>
<ul>
<li>
<p style="margin-bottom: 0cm;">Go to 	<a href="http://bazaar-vcs.org/Download">http://bazaar-vcs.org/Download</a></p>
</li>
</ul>
<p style="margin-bottom: 0cm;">Why Bazaar?</p>
<ul>
<li>Distributed (patching made easy)</li>
<li>Works in Windows</li>
<li>User friendly</li>
<li>Integrates with Launcpad.</li>
</ul>
<h3 class="western">Install ActiveState Perl</h3>
<p style="margin-bottom: 0cm;">Series 60 SDK has ActiveState as a prerequisitement for running its installer.</p>
<p style="margin-bottom: 0cm;"><a href="http://www.activestate.com/Products/activeperl/index.mhtml">http://www.activestate.com/Products/activeperl/index.mhtml</a></p>
<h3 class="western">Install Series 60 SDK</h3>
<p style="margin-bottom: 0cm;"><strong>Use only Series 60 3.0 maintenance release</strong>. Other releases have SDK bugs preventing correct Python compilation.</p>
<p style="margin-bottom: 0cm;">Get the Windows installer from <a href="http://forum.nokia.com/">http://forum.nokia.com</a>. Forum Nokia Registration is required.</p>
<p style="margin-bottom: 0cm;">Please use the default installation location C:\Symbian\9.1\S603rd_MR.</p>
<h3 class="western">Install Carbide.c++ express</h3>
<p>Carbide.c++ comes with a Windows compiler to compile the emulator binaries. You need this only if you indend to develop and test your applications on Series 60 emulator.</p>
<p><a href="http://www.forum.nokia.com/info/sw.nokia.com/id/dbb8841d-832c-43a6-be13-f78119a2b4cb.html">http://www.forum.nokia.com/info/sw.nokia.com/id/dbb8841d-832c-43a6-be13-f78119a2b4cb.html</a></p>
<p style="margin-bottom: 0cm;">Forum Nokia Registration is required.</p>
<p style="margin-bottom: 0cm;">Use Software updater in Carbide.c++ to install PyDev, Python developer extensions for Eclipse.</p>
<p style="margin-bottom: 0cm;"><a href="http://pydev.sourceforge.net/">http://pydev.sourceforge.net/</a></p>
<h3 class="western">Install Python 2.5</h3>
<p style="margin-bottom: 0cm;">Scons build chain and our utility scripts use Python.</p>
<p style="margin-bottom: 0cm;"><a href="http://www.python.org/download/releases/2.5.2/">http://www.python.org/download/releases/2.5.2/</a></p>
<p style="margin-bottom: 0cm;">Use the installer EXE and the default installation location <a href="file:///C:/Python25">C:\Python25</a>. If you want to use advanced Bluetooth shell (PUTools) you also need <a href="http://wxpython.org/download.php#binaries">wxPython </a>and <a href="http://sourceforge.net/project/showfiles.php?group_id=46487&amp;package_id=39324">pyserial </a>packages.</p>
<h3 class="western">Install SCons</h3>
<p>Python for Series 60 build script are based on SCons. It is a build system using Python as a recipe langauge.</p>
<p style="margin-bottom: 0cm;"><a href="http://sourceforge.net/project/showfiles.php?group_id=30337">http://sourceforge.net/project/showfiles.php?group_id=30337</a></p>
<h3 style="margin-bottom: 0cm;">Install Subversion</h3>
<p>Install Subversion client for Windows. This is needed for checking out Scons for Series 60.</p>
<p><a href="http://www.collab.net/downloads/subversion/">http://www.collab.net/downloads/subversion/</a></p>
<p>Registration to CollabNet is needed to download Windows binaries.</p>
<h3 style="margin-bottom: 0cm;">Scons for Series 60</h3>
<p>SCons for Series 60 is available as a separate project. <a id="Introduction">SCons for Symbian is a build toolchain intended as a replacement for Perl and MMP files used on regular Symbian projects. SCons for Symbian is not limited to build Python &#8211; You can use it to build any Series 60 C++ application.<br />
</a></p>
<p style="margin-bottom: 0cm;"><a href="http://code.google.com/p/scons-for-symbian/">http://code.google.com/p/scons-for-symbian/</a></p>
<p style="margin-bottom: 0cm;">This is later checked out during to the environment construction, so you do not need to install it now.</p>
<p style="margin-bottom: 0cm;">We have included a workaround for <a href="http://www.scons.org/wiki/LongCmdLinesOnWin32">a problem with limited command line length on Windows</a>.</p>
<h3 style="margin-bottom: 0cm;">Included tools</h3>
<p>The following tools are included in the trunk tools folder:</p>
<ul>
<li><a href="http://www.stunnel.org/download/binaries.html">OpenSSL</a></li>
<li><a href="http://www.nbl.fi/~nbl928/ensymble.html">Ensymble</a></li>
<li><a href="http://www.newlc.com/SIS-Info-tool-for-Symbian-9-1-SIS.html">SISInfo</a></li>
<li><a href="http://nedbatchelder.com/code/cog/">COG</a></li>
</ul>
<p>These tools are not licensed under Apache license. Some of them are under GPL license. However, we believe that distribution them is ok, since this falls under GPL&#8217;s <a href="http://www.gnu.org/licenses/gpl-faq.html#MereAggregation">mere aggregation</a> clause. However if you indent to distribute commercial applications built from PyS60 Community codebase, make sure that you understand the set of different licenses involved.</p>
<h2 class="western">Set up build environment</h2>
<p>Ensure that Bazaar is properly in your Windows path.</p>
<h3 class="western">Create a workspace folder</h3>
<p>First you need to subst (make a folder appear as a driver letter) in Windows. Open command line. Go to SDK folder.</p>
<pre>C:\Symbian\9.1&gt;subst t: S60_3rd_MR</pre>
<pre>T:</pre>
<pre>mkdir workspace</pre>
<p>Now choose this folder as a workspace folder in Carbide C++ and create an Empty Symbian C++ project called ”pys60” there.</p>
<p><a href="http://blog.redinnovation.com/wp-content/uploads/2008/09/shot8.png"><img class="alignnone size-medium wp-image-98" title="shot8" src="http://blog.redinnovation.com/wp-content/uploads/2008/09/shot8-300x166.png" alt="" width="300" height="166" /></a></p>
<h3 class="western">Checkout PyS60 community edition</h3>
<p>The go to this folder</p>
<pre>T:
cd workspace\pys60
<tt>bzr branch lp:pys60community</tt>
cd <tt>pys60community\</tt>src</pre>
<h3 class="western">Preparing the build</h3>
<p><strong>This needs to be done only once.</strong></p>
<p>We need to pacth the existing Series 60 SDK headers which have some bugs.</p>
<pre>T:
cd \epoc32\include
\workspace\pys60\pys60community\src\tools\patch.exe -p1 &lt; \workspace\pys60\pys60community\src\pys60-fix-3rded-sdk.diff</pre>
<p>EPOCROOT must be set for some Series 60 SDK tools to work. We point to T: drive root.</p>
<pre>T:
cd workspace\pys60\src
set EPOCROOT=\</pre>
<p>As we still have some dependencies to the legacy system, one needs to configure the build system using PyS60 setup. This will generate some files and defines for Series 60 versio 3.0. <strong></strong></p>
<pre>c:\Python25\python.exe setup.py configure 30</pre>
<p>Do <strong>not </strong>run bldmake bldfiles.</p>
<p>You need to convert legacy MMP build files to SCons based. First we need to possibly fix up PATH, since Carbide C++ might break it.</p>
<pre>set PATH=c:\program files\bazaar;c:\program files\CSL Arm Toolchain\arm-none-symbian elf\bin;c:\program files\CSL Arm Toolchain\libexec\gcc\arm-none-symbianelf\3.4.3;C:\program files\CSL Arm Toolchain\bin;t:\epoc32\gcc\bin;t:\epoc32\tools;t:\epo c32\tools;C:\program files\CSL Arm Toolchain\bin;C:\Program Files\Common Files\Symbian\Tools;C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem

c:\Python25\python tools\mmp2scons.py
ext\\calendar\\calendar.mmp:60:7: warning: no newline at end of file
Creating recipe ext\miso\build.py
Creating recipe ext\socket\build.py
...
Done!</pre>
<p>Checkout SCons for Symbian. We assume it lives in src tree.</p>
<pre>"c:\Program Files\CollabNet Subversion"\svn checkout http://scons-for-symbian.googlecode.com/svn/trunk/ scons_symbian</pre>
<h2>Running the build</h2>
<p>Now we can execute the actual Python build script. This will create one monolithic emulator DLL which has almost all the PyS60 extensions built in &#8211; some extensions need manual building, since they rely on headers not found from standard Series 60 SDK.  You might need to reset PATH to default to Carbide C++ after the previous mmp2cons step by reopening the console window.</p>
<pre>c:\Python25\Scripts\scons</pre>
<p>You should see the following output. As you can see, UIDs are being allocated dynamically as instructed in Scontruct UID_BASE argument.</p>
<pre>scons: Reading SConscript files ...
EPOCROOT=\
Info: SIS creation disabled
Building winscw udeb
Defines []
Getting dependencies for e32socket.pyd
Getting dependencies for _topwindow.pyd
Getting dependencies for zlib.pyd
Getting dependencies for _locationacq.pyd
Getting dependencies for _location.pyd
Getting dependencies for _graphics.pyd
Getting dependencies for _sysinfo.pyd
Getting dependencies for Python222Config.lib
Getting dependencies for Python222.dll
Getting dependencies for Python_appui.dll
Allocated UID:0xE1000000
Getting dependencies for Python.exe
Allocated UID:0xE1000001
Getting dependencies for Python_launcher.exe
Allocated UID:0xE1000002
scons: done reading SConscript files.
scons: Building targets ...

...

scons: done building targets.</pre>
<p>Now you should be able to start a custom built Python shell in the emulator. You should see the following applications in Installation menu: helloworld, btconsole and filebrowser. Try launch helloworld and if it opens a pop up dialog the build has been succesful.</p>
<h3 class="western">Building a SIS file for mobile phones</h3>
<p>To build a target distribution type:</p>
<pre>scons release=urel compiler=gcce dosis=true</pre>
<p>This should yield to the result:</p>
<pre>scons: Building targets ...
ensymble(["MyPythonForSymbian.sis"], [])
scons: warning: no package version given, using 1.0.0
scons: warning: no certificate given, using insecure built-in one
scons: done building targets.</pre>
<p>If you want to build a SIS file signed with your developer certificate:</p>
<pre>c:\python25\scripts\scons compiler=gcce release=urel dosis=true simplesis={'--privkey':'C:\\Certificates\\PrivateKeyNoPassphrase.pem','--cert':'C:\\Certificates\\MyApp.cer','--passphrase':''}</pre>
<p><strong>For now, installing the SIS file works only for C drive  &#8211; we&#8217;ll fix this little issue soon. </strong></p>
<p>If you do not have a symbiansigned.com developer certificate you can sign the SIS file online for one phone (one IMEI code).</p>
<ol>
<li>Go to symbiansigned.com</li>
<li>Register</li>
<li>Enter your IMEI and upload the SIS file to OpenSigned Beta</li>
</ol>
<h3 class="western">Building your own application</h3>
<p>The purpose of this project is to make rolling out your PyS60 applications possible &#8211; so here we go. Currently we make a quite bad assumption that all the application live in the same source tree with PyS60 community edition due to problems with absolute file paths with Symbian build tools &#8211; we will figure out a long term solution for this later.</p>
<p>PyS60 applications are stub Symbian executables which boostrap Python virtual machine and start the Python code execution. Executables are linked against a custom PyS60 DLL and they are <a href="http://www.forum.nokia.com/main/platforms/s60/capability_solutions.html">restricted by capabilities given to the EXE file</a>.</p>
<p>PyS60 applications live in <a href="http://bazaar.launchpad.net/~pys60communityteam/pys60community/trunk/files/43?file_id=applications-20080822175746-epuletnyxaku7748-1">applications source tree</a>. The source tree comes with Bluetooth console, Hello world and File browser sample applications.</p>
<p>Scons build scripts takes as <em>applications</em> parameter a comma separated list which applications are included in the build.</p>
<pre>scons builtin=all applications=helloworld,filebrowser</pre>
<p>Applications consist of</p>
<ul>
<li><em>default.py</em> boostrapper module</li>
<li><em>icon.svg</em> SVGT icon</li>
<li>Any number of Python modules (.py) files</li>
</ul>
<p>See applications\helloworld folder to examine what files are needed to build an application. All application Python modules go to the private application folder (<em>/private/myapplicationuid</em>). Default.py must boostrap PYTHONPATH (sys.path) for this folder &#8211; PYTHONPATH defines where Python interpreter looks for the code. Application UIDs can be chosen manually or they are picked automatically by Scons for the unprotected test range.</p>
<p>Note that Python Script Shell application is handled out of this flow due to its legacy heritage.</p>
<h3 class="western">Adding in your own extension</h3>
<p>If you have development an PyS60 extension you can drop in into the buildchain easily. Each extension is defined in <a href="http://bazaar.launchpad.net/~pys60communityteam/pys60community/trunk/files/43?file_id=ext-20080419133958-052d36l74a4r8z3r-25">ext</a><em> </em>subfolder. It consists of necessary CPP, H and Python files. The building structure is defined in <em>build.py </em>using SConstruct command <em>PyS60Extension</em>().</p>
<p>Build.py files can be automatically generated from legacy code using mmp2scons.py converter.</p>
<ul>
<li>Drop files to <em>ext/yourmodule</em> folder.</li>
</ul>
<ul>
<li>Run MMP -&gt; build.py. This needs GCC or valid C compiler for preprocssing MMP files.</li>
</ul>
<pre>c:\Python25\python.exe tools\mmp2scons.py

ext\calendar\calendar.mmp:60:7: warning: no newline at end of file
ext\progressnotes\progressnotes.mmp:38:7: warning: no newline at end of file
ext\uikludges\uikludges.mmp:37:7: warning: no newline at end of file
Creating recipe ext\\socket\build.py
Creating recipe ext\\glcanvas\build.py
Creating recipe ext\\graphics\build.py
...
...Done!</pre>
<ul>
<li>Recompile. New ext modules are automatically picked as built in modules.</li>
</ul>
<pre>c:\Python25\scripts\scons</pre>
<ul>
<li>Now test importing your module in the script shell in emulator</li>
</ul>
<pre>&gt;&gt; import applicationmanager</pre>
<p>If your extension is using thread local storage (Dll::Tls()) you might need to figure out how to workaround with it. See socket  module for example. You may also need to play around with the init function of the Python extension &#8211; it must be init + module name.</p>
<h2>Developing on target</h2>
<p>If you want to develop your application on a mobile phone, you do not need to go through the full development cycle for every little change. It is possible to update Python files on a phone without SIS installation. You can either automatically synchronize changed files from your PC to Phone (the example below) or you can edit files in-place on the Phone either using PCSuite or <a href="http://telexy.com/Products/Products.aspx">Series 60 SMB server.</a></p>
<p>Here are short instructions how to update files using <a href="http://people.csail.mit.edu/kapu/symbian/python.html">PUTools</a> console (btconsole). PUTools is wxPython based remote Python shell which allows you to run Python console commands over a Bluetooth connection from your PC. PUTools also has a file syncrhonization feature &#8211; after editing source code on the PC changes are reflected automatically to the phone.</p>
<ol>
<li>Put application Python files to a shared folder on the phone e.g. the memory card root (E:\). Add startup.py to E:\ which will modify sys.path to include your files. <a href="http://blog.redinnovation.com/wp-content/uploads/2008/08/shot1.png"><img class="alignnone size-medium wp-image-88" title="shot1" src="http://blog.redinnovation.com/wp-content/uploads/2008/08/shot1-300x165.png" alt="" width="300" height="165" /></a></li>
<li>Add incoming Bluetooth serial port on windows (Control panel -&gt; Bluetooth -&gt; COM ports)<a href="http://blog.redinnovation.com/wp-content/uploads/2008/08/shot2.png"><img class="alignnone size-medium wp-image-89" title="shot2" src="http://blog.redinnovation.com/wp-content/uploads/2008/08/shot2-233x300.png" alt="" width="233" height="300" /></a></li>
<li>Start Bluetooth shell on the computer (tools\putools\pcfiles\console.bat)</li>
<pre>T:\workspace\pys60\pys60community\src\tools\putools\pcfiles&gt;c:\python25\python.exe putools.py com5</pre>
<li>Start Bluetooth shell on the phone (btconsole icon)<br />
<a href="http://blog.redinnovation.com/wp-content/uploads/2008/08/screenshot00022.jpg"><img class="alignnone size-medium wp-image-93" title="screenshot00022" src="http://blog.redinnovation.com/wp-content/uploads/2008/08/screenshot00022-225x300.jpg" alt="" width="225" height="300" /></a></li>
<li>Edit PUTools <a href="http://bazaar.launchpad.net/~pys60communityteam/pys60community/trunk/annotate/43?file_id=sync.config-20080824162707-luu4dnx2ap3ntxyd-28">sync.config file</a> on PC and run sync command on Bluetooth terminal to update changes made on PC to phone<br />
<a href="http://blog.redinnovation.com/wp-content/uploads/2008/08/shot3.png"><img class="alignnone size-medium wp-image-94" title="shot3" src="http://blog.redinnovation.com/wp-content/uploads/2008/08/shot3-300x210.png" alt="" width="300" height="210" /></a></li>
<li>Run application launcher in the console (depends on the application structure how it is best to bootstrap in the shell):</li>
</ol>
<pre>&gt;&gt; import filebrowser
&gt;&gt; filebrowser.FileBrowser.run()</pre>
<h2>Release notes</h2>
<p>Here is the short summary of differences with the current PyS60 community edition and one available from Nokia. This information is also available in divergence.txt file in the source folder.</p>
<pre>2008-08-29 Mikko Ohtamaa &lt;mikko@redinnovation.com&gt;

    * PyS60 general

        New build chain and static config generation

        Migration tool for MMP -&gt; Scons based extensions

        Added several tools included in the core distribution: sisinfo, ensymble, cog, patch

        Patched py2sis tool

        Contains extension: applicationmanager

        Contains extension: uikludges

        Contains extension: progressnotes

        Contains extension: miso

        Contains application: Bluetooth shell

        Contains example applications: filebrowser, helloworld

        Changed Bluetooth console bootstrap to e:\startup.py         

2008-08-15 Antti Haapala &lt;antti@redinnovation.com&gt;

    * e32socketmodule.cpp:

        socket.access_points has more information, two new
        fields is given per access point: isptype and bearertype,
        whose values are integers corresponding to values returned
        by CApSelect::Type and CApSelect::BearerType respectively.
        No symbolic constants are yet exported.

    * appuifwmodule.cpp:

        multi_select_list has a new argument, selected, which defaults
        to None. Given a list of integers, the items with the given indices
        are initially selected.</pre>
<h2 class="western">Conclusion</h2>
<p>We hope this helps you to get started with PyS60 community edition. It&#8217;s still a bit complicated, since setting up the build environment on Windows is a such a pain. In the future, when the Linux based build system is reading settings up the development environment should be easier &#8211; all those boring steps happen automatically.</p>
<p>This might be still too difficult for some of the readers, since a lot of prerequirement work must be done before anything useful can be done. Feel free to comment the article in this blog, but we hope that you use <a href="https://answers.launchpad.net/pys60community">Answers section in Launchpad </a>to ask help and technical questions related to PyS60 community edition.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2008/09/01/introducing-python-for-series-60-community-edition/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Logging with LogMan</title>
		<link>http://blog.mfabrik.com/2008/06/23/logging-with-logman/</link>
		<comments>http://blog.mfabrik.com/2008/06/23/logging-with-logman/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 14:55:58 +0000</pubDate>
		<dc:creator>Jussi Toivola</dc:creator>
				<category><![CDATA[development tools]]></category>
		<category><![CDATA[pys60]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[logman]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rdebug]]></category>
		<category><![CDATA[s60]]></category>
		<category><![CDATA[serial]]></category>
		<category><![CDATA[series 60]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://blog.redinnovation.com/?p=48</guid>
		<description><![CDATA[This is my first post on our company blog and I thought I&#8217;d tell you something about LogMan, which is developer&#8217;s utility for getting logging messages from Symbian device over a USB cable. It is written by me and mostly on my own time. I started the project because I had to do a Symbian [...]]]></description>
			<content:encoded><![CDATA[<p>This is my first post on our company blog and I thought I&#8217;d tell you something about <a href="http://code.google.com/p/logman-for-symbian/">LogMan</a>, which is developer&#8217;s utility for getting logging messages from Symbian device over a USB cable. It is written by me and mostly on my own time. I started the project because I had to do a Symbian excercise for university course and I thought I&#8217;d do something useful instead of quickly tinkering something small and easy.</p>
<p>LogMan supports both C++ and Python. With LogMan, you can send data to the same location from Python and C++ in real-time instead of using log file(s). Browsing through multiple log files can be tedious and you can&#8217;t see the debug output while using your application, because on Symbian you must read the file after the debugging session &#8211; Symbian cannot share opened files between applications. It is also possible that you create too much log and you run out of Phone internal memory. LogMan helps by removing the use of log files and you never run out of disk space because messages can be stored directly to PC. On simulator, the messages are also sent to <a href="http://wiki.forum.nokia.com/index.php/How_to_use_RDebug">RDebug</a> (%TEMP%\epocwind.out). Surprisingly I have not seen a Python module, which would enable use of RDebug. Even though it is very easy to implement. With RDebug, there is no need to open a serial port on simulator for reading the logging messages.</p>
<p>Of course, I tried to use RDebug on device first, but I never got it working. I also tried <a href="http://www.forum.nokia.com/document/CDL_Extension_S60_3rd_Ed_FP2/GUID-C89505CF-D5FE-4C89-95D4-692443563021/html/classREcmt.html">REcmt</a>, which is supported on S60 only and the service just kept on crashing on my phone. This is why I decided to write LogMan. Plus both are closed software, which effectively prevented me from fixing the problems.</p>
<p>Just wondering what kind of benefit Symbian or Nokia gets from keeping development tools such as these closed? What is there so secret about them? It didn&#8217;t take me very long to write the first working version. *sigh*</p>
<p>The use of LogMan is similar to RDebug. There are static class methods, which are a bit slower but easier, and instance methods. Check the project&#8217;s <a href="http://code.google.com/p/logman-for-symbian/">homepage </a> for more examples.</p>
<p><code><br />
#include "LogMan.h" //RLogMan<br />
RLogMan::Log( _L("Hello world ") );<br />
</code></p>
<p>I recently added a new feature for LogMan, which allows you to log stack and heap usage of the current thread with one function. When you are unsure about your heap or stack usage, these might come handy. Of course there is some memory used when calling these so take that into consideration. Python can access MemoryInfo only, which logs both stack and heap (Well, I got a bit lazy at that point). There are equivalent macros for these, so check them out from &#8220;logmanutils.h&#8221;.</p>
<p><code><br />
// Store this as a member of your class, for example<br />
RLogMan logman;</code></p>
<p>logman.HeapInfo();<br />
logman.StackInfo();<br />
logman.MemoryInfo(); // Both stack and heap<br />
logman.Close();</p>
<p>The output from MemoryInfo is something like this:<br />
<code><br />
StackInfo<br />
Free:1039000, Used:9576, Size:1048576<br />
HeapInfo<br />
Free:25856, Used:101004, Size:126860<br />
</code></p>
<h2>Browser for PyS60</h2>
<p>I have been trying, unsuccessfully, to get Browser Control working on PyS60. In a nutshell, <a href="http://www.forum.nokia.com/document/Cpp_Developers_Library/GUID-96C272CA-2BED-4352-AE7C-E692B193EC06/html/classCBrCtlInterface.html">CBrCtlInterface</a> wrapper for Python. I have developed it against <a href="https://code.launchpad.net/~jussi-toivola/pys60community/browserbranch">PyS60Community</a> version in Launchpad. See /src/appui/appuifw/. I have used LogMan extensively to debug the extension so if you want a real example, check out &#8220;browsercontrol.cpp&#8221;.</p>
<p>Browser Control would allow one to embed a browser into his PyS60 application, which would be quite cool. No need to do user interfaces with &#8220;appuifw&#8221;, which is not very portable. With Browser Control, one could create his user interface with html and javascript, which are a lot more portable indeed. Less work leads to more time. And what is time?&#8230; it&#8217;s money. Or so I have heard. And being able to handle events with Python instead of C++ is another bonus.</p>
<p>Unfortunately, the API is not very stable as you can see by searching for &#8220;CBrCtlInterface&#8221; at Forum Nokia. The browser worked fine on the simulator with small pages such as &#8220;www.google.com&#8221;, but it crashed miserably with larger pages. The crash happens in browsercontrol.dll when calling e32.Ao_sleep() in Python. On device it was unable to open any page and crashed instantly when trying to load one. With LogMan, I was able to verify that the crash happened in e32.Ao_sleep() on device also. This reminds me to test on device all the time, which I didn&#8217;t do for the first versions. But this is why I added the memory logging feature to LogMan, but it only revealed that I was not out of stack or heap. At least not before the browser started to mess around.</p>
<p>I tried to compile the WebKit myself to see what is going on, but the build instructions didn&#8217;t work and the build scripts are written in Perl(my eyes started to hurt). What a mess. I don&#8217;t wonder anymore if there are bugs in browsercontrol.dll. I finally gave up because my idea pool dried up. Any help getting the wrapper working would be very much appreciated.</p>
<h2>Plans for LogMan</h2>
<p>I&#8217;m planning to add remote shell interface so that you could control your phone from PC. I want access to the file system first. Transfer files, list folders and such. If you have TCB rights ( or hacked phone ) you can speed up development remarkably by simply replacing your binaries in \sys\bin or your Python files with new versions. No need to install sis files and fiddle with certificates and play with memory cards. It would be so nice&#8230; I can use 1 day in a week for a personal project so this may happen in near future <img src='http://blog.mfabrik.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2008/06/23/logging-with-logman/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PyS60 application release build toolchain</title>
		<link>http://blog.mfabrik.com/2008/04/19/pys60-application-release-build-toolchain/</link>
		<comments>http://blog.mfabrik.com/2008/04/19/pys60-application-release-build-toolchain/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 23:08:35 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[pys60]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[series 60]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[build process]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[native]]></category>
		<category><![CDATA[pkg]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[sis]]></category>
		<category><![CDATA[sisx]]></category>
		<category><![CDATA[toolchain]]></category>

		<guid isPermaLink="false">http://blog.redinnovation.com/2008/04/19/pys60-application-release-build-toolchain/</guid>
		<description><![CDATA[A common question for Python for Series 60 newcomers is how to build standalone Symbian applications from Python source code. We have been using Makefile based toolchain internally. I describe it in this picture, I didn&#8217;t bother to add thumbnail for the image, since it&#8217;s a 3400 pixels wide diagram. The diagram describes building a [...]]]></description>
			<content:encoded><![CDATA[<p>A common question for Python for Series 60 newcomers is how to build standalone Symbian applications from Python source code. We have been using Makefile based toolchain internally. I describe it in <a title="Python for Series 60 standalone application toolchain" href="http://blog.redinnovation.com/wp-content/uploads/2008/04/pys60-tool-chain.png">this picture,</a> I didn&#8217;t bother to add thumbnail for the image, since it&#8217;s a 3400 pixels wide diagram.</p>
<p>The diagram describes building a PyS60 application with some Python extensions (Symbian native C++) mixed in and bundling it all to one downloadable SIS file. The application will appear as any first class S60 application in the menu and the user does not know it&#8217;s running Python internally, besides bad installation experience (it challenges Microsoft installers with all those unnecessary yes/no questions), extra uninstaller entries and slow start-up time.</p>
<p>The biggest problems are caused by embedded SISs (SIS inside other SIS files) which are not treaded very wel by several Symbian parties.  In theory, it could be build one monolithic SIS, but you&#8217;d need to recompile PyS60 from scratch and patch UIDs inside it for your own UIDs received from symbiansigned.com. We are planning to explore SCons based build solution to address this problem, since Makefiles are a bit unflexible with tasks like PKG file and UID range generation.</p>
<p><a title="example-pkg.txt" href="http://blog.redinnovation.com/wp-content/uploads/2008/04/example-pkg.txt">Here is a PKG file example for final user distributable SIS file</a>.</p>
<p>Also, see <a href="http://code.google.com/p/uikludges">UIKludges project</a> for additional details for PKG files of Python extensions.</p>
<p>You need to have</p>
<ul>
<li>Ensymble tool</li>
<li>Series 60 SDK (contains some old GNU make)</li>
</ul>
<p>You need to master</p>
<ul>
<li>A build tool (make)</li>
<li>Symbian PKG file structure</li>
<li>Lots of different command line tools</li>
</ul>
<p>Pros</p>
<ul>
<li>It&#8217;s the best one we have for now</li>
</ul>
<p>Cons</p>
<ul>
<li>Symbian signing and certification companies don&#8217;t understand embedded SIS files (all SIS files must be signed prior embedding) and may have hard time signing SIS files containing only an extension DLL for Pyton. Symbian Signed test criteria has been built only UI application based SIS files in the mind.</li>
<li>You cannot cook your own patched PyS60 distribution without revamping some hardcoded UIDs and paths, since otherwise there are UID conflicts (EXE and DLL file UIDs are in Nokia&#8217;s protected range)</li>
<li>S60 installers askes extra confirmation for every embedded SIS file, even in the middle of the progress bar, so the user experience of installation is screwed up</li>
<li>There will extra uninstallation entry for every embedded SIS file in S60 application manager confusing the user</li>
<li><em>As you can see, most cons come from Symbian and Symbian signing limitations and have nothing to do with Python</em></li>
</ul>
<p>Ps. I would have put this thing to wiki.opensource.nokia.com, but their webmaster email address is non-functional and one cannot upload images to their Wiki.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2008/04/19/pys60-application-release-build-toolchain/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Symbian digging its own grave with symbiansigned.com</title>
		<link>http://blog.mfabrik.com/2008/03/14/symbian-digging-its-own-grave-with-symbiansignedcom/</link>
		<comments>http://blog.mfabrik.com/2008/03/14/symbian-digging-its-own-grave-with-symbiansignedcom/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 14:41:23 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[signing]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[feedback]]></category>
		<category><![CDATA[series 60]]></category>
		<category><![CDATA[symbiansiged]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://blog.redinnovation.com/2008/03/14/symbian-digging-its-own-grave-with-symbiansignedcom/</guid>
		<description><![CDATA[Edit: Made correction to iPhone SDK price/added self-signed option I have been recently involved in Symbian development. Unfortunately, I could say. Symbian has made the life of Symbian developers headacheful. The main problem is that the application signing is made unnecessary cumbersome. Getting a required developer certificate to just to run your one liner test [...]]]></description>
			<content:encoded><![CDATA[<p>Edit: Made correction to iPhone SDK price/added self-signed option</p>
<p>I have been recently involved in Symbian development. Unfortunately, I could say. Symbian has made the life of Symbian developers headacheful. The main problem is that the application signing is made unnecessary cumbersome. Getting a required developer certificate to just to run your one liner test code is a long road paved with curses, stress and ponder how a world class company can screw up things so badly.</p>
<p>I write this post to vent out the frustration. Hopefully someone picks up the feedback presented here. Personally, I don&#8217;t care anymore really. After explaining to the customer once &#8220;I am afraid that we cannot have the demo in this meeting, since we were unable to get the developer certificates in time. It was nice you did summon all of your executes, though.&#8221;  my sympathy towards Symbian has fallen to zero.</p>
<p>In the long run, I believe, this will hurt Symbian when developers leave the platform. When this happens Symbian will miss 1) developer base 2) the wow value of all new cool things when hackers move to happier platforms &#8211; after all you don&#8217;t want to work with things causing a headache even if you are paid generously. Professional Symbian capable developers are already rare and scaring away the potential candidates (students, open source developers, freeware developers) won&#8217;t really help the matter. Of course, for us, who are already in the business, it&#8217;s good since we can raise our hourly fee and die as rich dinosaurs (remember COBOL).</p>
<p>Looks like the root problem is the cocky attitude: &#8220;We are the biggest mobile operating system in the world. You are not our customer, the biggest mobile phone brands are. Thus, you are an insignicant fly and we don&#8217;t need to listen to you. Please go away.&#8221;  The big boys tell that this very same reason lead to Motorola&#8217;s fall from the number one mobile phone vendor position &#8211; so let&#8217;s see if the history is repeating itself.</p>
<p>The problems of Symbian development process, especially signing, are well known. <a href="http://developer.symbian.com/forum/category.jspa?categoryID=2">Symbian Signed forum category has 120 000 views</a>. Symbian signed support requests <a href="http://developer.symbian.com/forum/category.jspa?categoryID=2">has 57 000 views and 2000 messages</a>, since November 2007. Over a thousand support requests in four months. Symbian has money. It could fix the problem if it has will. If there is will in the organization and the work just does not progress, the corporate world has a simple solution: fire the management and hire capable responsible persons.</p>
<p>I won&#8217;t go the details of the problems in this post. I have prepared a post containing over 50 bulletins with detailed steps to get the developer certification process done and it lists every little mistake in Symbian Signed process. Unsurprisingly, the post mentions fuck and hell over twenty times, so I am reluctant to post it on our company site. So I sketched a manager comprehensible overview of the state of the process in this post. To justify my criticism, I compare Symbian to Apple iPhone and make some suggestion how to fix things.</p>
<h1>Certificate costs</h1>
<p><strong>Symbian</strong>: 200$/1.5 years (you need a publisher id to get a developer certificate) + 20$ per signing round</p>
<p>Update: <a href="http://www.symbian.com/developer/techlib/v9.1docs/doc_source/N10356/Installing/HowToMakekeys.guide.html">You can still make self-signing certificates</a> yourself with limited capabilities (no GPS), but symbiansigned.com doesn&#8217;t bother to mention it.</p>
<p><strong>Apple</strong>: 99$/year (for testing and distribution applications)</p>
<p>Suggestion: Make the developer certificate free. It used to be free, but based <a href="http://developer.symbian.com/forum/ann.jspa?annID=36">on this post</a>, Symbian signed claims that they do not have enough CPU power, because of all kind of nasties are knocking their server. Come on! it&#8217;s Internet. You are hosted by Cidercone and by knowing how much they charge for the hosting I believe you can get every possible server power in the world to generate your keys.</p>
<p>This development start up cost automatically excludes third world people, freeware makers and students i.e. the future Symbian professionals. It&#8217;s hard to maintain a platform if there is not enough skilled people to work with it. There won&#8217;t be meat into Nokia&#8217;s and Sony-Ericsson&#8217;s innovation machines.</p>
<h1>Development start lead time</h1>
<p>How long it takes to get &#8220;Hello World&#8221; code to the phone.</p>
<p><strong>Symbian</strong>: 8 workdays</p>
<p><strong>Apple</strong>: 6 hours</p>
<p>Complete Guide to Symbian Signed guide (manual) is 20 pages PDF. How often you need a user manual to use a web site? Even with this page amount, the manual lacks crucial pieces of information which you need to hunt and ask help from the Symbian Signed support forums. I had to make 3 support request for Symbian Signed and 1 for TrustCenter.</p>
<h1>Set-up process</h1>
<p><strong>Symbian</strong>: Create 3 user accounts (symbiansigned.com, developers.symbian.com, TrustCenter). Fax your passport and some signed papers to TrustCenter Germany. Wait when your request is manually processed. Ask TrustCenter what I do with the link they send me (hint: the only working web browser for their site is the very same browser you orignally submitted your application from). Convert TrustCenter key to Symbian specific format using obscure BAT tool. Use half-baked Windows EXE to generate files. Ask at the support forums permission <strong>to be allowed </strong>to create the Publisher id.</p>
<p><strong>Apple: </strong>Download SDK. Click &#8220;I Agree.&#8221;</p>
<p>Symbiansigned management team must be either incomplete or inexistent, or they just hate their users. Looks like no one didn&#8217;t bother model or test this process, since the flaws are so apparent. Why do we need three user accounts? Why do we need a user account at all, isn&#8217;t my credit card payment enough? Why there can&#8217;t be a single web page on symbiansigned.com where I could do these all things without? Also, Symbian could do these things without third parties (TrustCenter) who are badly integrated to the process.</p>
<h1>Web site and information reachability</h1>
<p><strong>Symbian</strong>: Two sites with different user accounts. Information is spread around and hidden behind various for registred users only pages. Often Symbian PDFs (yes they seem to prefer zipped PDFs) and web pages cross-link to other sites and these links are broken. Their internal site search engine does not give meaningful results. Google cannot search pages, since they are hidden behind the registration. Web forms don&#8217;t work. Navigation paths are unclear and you often need to guess where a certain piece of information could be.</p>
<p><strong>Apple</strong>: One site &#8211; and it just works.</p>
<p><a href="http://developer.symbian.com/forum/thread.jspa?messageID=71782ᡦ">Why Symbian hides a crucial BAT tool</a> in the page labyrinth of developers.symbian.com and behind login? Does the 100 lines of BAT code contains a very hidden trade secret? I doubt. (I also doubt that a BAT tool is a good way to solve a problem which could be fixed with a web form or Javascript, but that&#8217;s another matter.)</p>
<p>I think this is the part of the attidude problem. SymbianSigned.com mission is not to &#8220;secure&#8221; the development and control the developers of the platform. It&#8217;s mission should be easily enable developers to start development and release their software for Symbian. The meaning of &#8220;easily&#8221; includes that the web site is working and up to the standards. Please hire a usability expert (we are here) and get it fixed. This problem is <em>not </em>solvable by writing yet-another user manual PDF.</p>
<h1>Giving feedback</h1>
<p><strong>Symbian:</strong> Support like goes to the Symbian developer forum. A bulleting board with unorganized, angry, posts. They don&#8217;t give a feedback form to report the problems on Symbian Signed.</p>
<p><strong>Apple:</strong> &#8220;There are three great ways to get answers to your questions about ADC membership, products, and services: visit our <a href="http://developer.apple.com/faq/">Frequently Asked Questions</a> web pages, submit your questions or feedback using the form below, or <a href="http://developer.apple.com/contact/phone.html">call us</a> to speak directly to a worldwide support agent. We look forward to assisting you.&#8221;</p>
<p>I&#8217;d help symbiansigned.com to get its site better if I could. When there is a broken link, I can hit feedback and ask them to fix it. But looks like they want to be ignorant about the matter &#8211; if I report a problem on their forum I bet no one will ever fix it. There won&#8217;t be even &#8220;thank you.&#8221; Probably no one ever reads my post. On the other hand, when having such non-functional service, this feedback channel would be flooded in overnight.</p>
<h1>Conclusion</h1>
<p>Symbian has unforgiveable screwed up with its signing process and doesn&#8217;t seem to get the feedback from the developers who suffer from it. <a href="http://www.youtube.com/watch?v=KMU0tzLwhbE">Steve Ballmer&#8217;s famous quote &#8220;developers, developers, developers&#8221;</a> refer to what&#8217;s the important factor making the platform succesfully in long term.  This is especially crude when you know that things <em>used to be </em>good.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2008/03/14/symbian-digging-its-own-grave-with-symbiansignedcom/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Building commercial grade mobile applications with Python for Series 60</title>
		<link>http://blog.mfabrik.com/2008/02/21/building-commercial-grade-mobile-applications-with-python-for-series-60/</link>
		<comments>http://blog.mfabrik.com/2008/02/21/building-commercial-grade-mobile-applications-with-python-for-series-60/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 12:13:26 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[pys60]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[j2me]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java me]]></category>
		<category><![CDATA[mobile phone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[s60]]></category>
		<category><![CDATA[series 60]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[symbian]]></category>

		<guid isPermaLink="false">http://blog.redinnovation.com/2008/02/21/building-commercial-grade-mobile-applications-with-python-for-series-60/</guid>
		<description><![CDATA[Python programming language, created in 1991 by Guido van Rossum, is the sixth most popular programming language and &#8220;the programming language of year 2007&#8220;. Nokia Series 60 is a Symbian-based mobile phone platform for high end smart phones which is the most widespread smart phone platform. Python for Series 60 is Python ported to S60. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.python.org"><img src="http://blog.redinnovation.com/wp-content/themes/redinnovation/images/naama4.jpg" alt="" hspace="10" vspace="10" width="128" height="154" align="left" />Python</a> programming language, created in 1991 by Guido van Rossum, is the sixth most popular programming language and &#8220;<a href="http://python.about.com/b/2008/02/01/python-is-tiobes-language-of-the-year.htm">the programming language of year 2007</a>&#8220;. Nokia <a href="http://www.forum.nokia.com/main/platforms/s60/">Series 60</a> is a <a href="http://www.symbian.com/symbianos/index.html">Symbian</a>-based mobile phone platform for high end smart phones which is <a href="http://www.engadget.com/2008/02/12/give-up-77-3m-symbian-phones-shipped-in-2007/">the most widespread smart phone platform</a>.  <a href="http://opensource.nokia.com/projects/pythonfors60/">Python for Series 60</a> is Python ported to S60. PyS60 is open source and there already exists <a href="http://discussion.forum.nokia.com/forum/forumdisplay.php?f=102">a notable community</a> around it &#8211; a sign of a successful software platform.</p>
<p>This essay is a post-mortem for creating a commercial grade PyS60 application. By &#8220;commercial&#8221; I mean something which is publicly available for end users and meets the criteria of <a href="http://developer.symbian.com/main/downloads/files/TheCompleteGuideToSymbianSigned.zip">Symbian Signed certification</a>. I hope this essay will shed light on the real world challenges, thus aiding Nokia, mobile application vendors and PyS60 community to know when to use PyS60, to strengthen PyS60 as a platform and to guide people make most of it.</p>
<p><strong>Description of the project</strong><br />
I was given a task to create a mobile phone client for a web service. The client runs on the the background, posting information from the phone (files, location) to the web site. Two developers were assigned for the job. In the end of the project, almost 100 Python modules and classes had been written (just for the mobile side of the things). I believe this is the most complex PyS60 development effort this far.</p>
<p>The application is divided in two parts:  user interface process and background process. The background process is running all the time, monitoring the phone state and posting changes to the server. The UI process can be launched from the phone menu and it commands the background process. Two processes communicate over localhost TCP/IP sockets. The application communicates with the Internet server by <a href="http://discussion.forum.nokia.com/forum/showpost.php?p=371667&amp;postcount=2">HTTP multipart posts.</a> The background daemon had four threads running: main thread, server communication thread, interprocess communication thread and GPS thread.</p>
<p>The core modules of the application were written portability in mind. In fact, one can run the core as standalone Python application on a normal PC. This makes unit testing and debugging much easier. Some supporting libraries and files were ported from the normal Python 2.2.2 distritbution to PyS60.</p>
<p><strong>Python for Series 60 and the alternative platforms<br />
</strong></p>
<p>When we started the project, I was not aware of commercial applications built on PyS60, besides Nokia&#8217;s own <a href="http://mymobilesite.net/">Mobile Web Server</a>. I knew it was used as in-house in few large software companies. Python has traditionally had strong foothold in the academic world. So it does not come with a surprise that Finnish universities use PyS60 on mobile application software development courses due to Python&#8217;s low learning curve.</p>
<p>Python itself has been around longer than the most popular programming language, Java. Python&#8217;s  suitability for the complex development jobs was largely untested until the rise of modern web. The dynamic, agile, nature of Python does not come for free. So called abstraction penalty (interpreting) slows down Python execution speed. It was not until the 00s when processor were fast enough to make this irrelevant matter: software development costs outrun hardware costs and more agile development tools had to be found.</p>
<p>When building S60 applications, you need to chose the progamming language between three candidates: Good old fashioned C++, Java Micro Edition (Java ME) and Python for Series 60.</p>
<p>Currently, most of Series 60, and Symbian,  platform specific applications are written in C++, with a twist. One cannot consider this as  &#8220;normal&#8221;  C++ code, but the bastard child of this language. In their quest for the ultimate embedded efficiency (read: the smallest memory footprint) Symbian architectures placed an enormous mental burden on the poor Symbian developers.  For example, Symbian C++ has custom pointer schemes, manual error handling, wicked threading and a weird build process.  Or to put it bluntly: writing C++ for Symbian is far more difficult than writing C++ for platform X. You cannot really use any standard libraries on Symbian (this is <a href="http://www.forum.nokia.com/main/resources/technologies/open_c/index.html">changing</a>, however). Thus, building  S60 applications based on C++ technologies is costly, and painful. I have not yet met a happy Symbian C++ developer  and I have met hundreds of them.</p>
<p>Then, we have Java ME. Sun made a good move by creating a unified mobile application run-time environment. Java ME is the only way to get your mobile application running regardless of the mobile phone vendor. But Java&#8217;s infamous slogan &#8220;write once, run everywhere&#8221; doesn&#8217;t hold a candle.Java ME implementations have internal differences and they are buggy as two weeks dead squirrel  (seen one squirrel once and followed Sun&#8217;s Java ME mailing list long enough).  Java ME gets the new features last due to standardization process. Java ME applications are heavily sandboxed and they cannot access half of the phone features.</p>
<p>And as the last option is Python for Series 60. Started as <a href="http://opensource.nokia.com/projects/pythonfors60/">a Nokia&#8217;s research effort</a>, Nokia brings this agile environment to mobile software development. Python for Series 60 has also a sister project, <a href="http://sourceforge.net/projects/pyuiq/">PyUIQ</a>, which targets Sony-Ericsson phones.</p>
<p>PyS60 has had the reputation to be &#8220;prototype only&#8221; technology and it&#8217;s use has been counter-argumeted by &#8220;serious development needs C++&#8221;. This is slowly changing. Nokia has shown serious commitment to Python. With the launch of Mobile Web Server, Nokia proved that Python is feasible in commercial grade applications.</p>
<p>This is how my brain worked when I chose PyS60: Symbian C++ is notorious difficult and no sane person wants to ever touch it. Java ME might have not enough access to the phone features to fulfill the application requirements My client already used Python on embedded Linux and web servers. Why not give PyS60 a shot?</p>
<p><strong>Arguments for Python for Series 60</strong></p>
<p><em>Python is agile</em></p>
<blockquote><p>This is maybe the most important argument to pick PyS60.  Python tends to reduce development time compared to C++ or Java. The language itself is very easy to learn. Syntax is expressive and developers can achieve much more functionality in less lines of codes: You can focus on getting the task itself done.  With higher level concepts and less hassle with lower level things, changes to introduce bugs radically decreases.</p></blockquote>
<blockquote><p>Python development does not have traditional compiling phase, though byte code files can be built for the final release to obfuscate the code and optimize loading times. Changes made into Python code are immediately (in seconds) visible in the running application.  Even if the application runs on the target device, since code changes can be automatically synchronized over a Bluetooth connection. No wonder Python enjoys legendary fast prototyping language fame  &#8211; the developers have less time to surf in web when they don&#8217;t need to wait compilers to bake yet another test build.</p></blockquote>
<p><em>PyS60 is open source</em></p>
<blockquote><p>I assume you are familiar with the benefits of open source already: vendor freedom, no licensing cost, not being  mercy on others and so on. This all holds true for PyS60 as well.</p></blockquote>
<blockquote><p>PyS60 license (Python license) does not place restrictions for creating closed source software. You can have very good development tools for free: <a href="http://www.forum.nokia.com/info/sw.nokia.com/id/4a7149a5-95a5-4726-913a-3c6f21eb65a5/S60-SDK-0616-3.0-mr.html">Series 60 SDK</a>, <a href="http://ww.eclipse.org">Eclipse IDE</a> with <a href="http://pydev.sourceforge.net">PyDev</a> plug-in and <a href="http://people.csail.mit.edu/kapu/symbian/python.html">PUTools</a> bluetooth synchronization kit for free. This makes the barrier to enter PyS60 development very low.</p></blockquote>
<blockquote><p>Since PyS60 is fully available in the source code form, you can customize and fix it for your needs. The traditional horror story from Java ME development is that your application won&#8217;t run in the mobile phone model X, since there is a bug in the vendor&#8217;s Java Virtual Machine implementation. Unless you are A Very Big Player, don&#8217;t ever think about going to talk with the vendor and ask it to fix its bug &#8211; hitting one of these issues might prevent you to release product at all.  With PyS60 you can control all aspects of the software execution up to the closed parts of the device. No more being mercy on others!</p></blockquote>
<blockquote><p>Being open is pop now. Embracing open source gives much for your company: good citizen reputation, hiring pool and free marketing.</p></blockquote>
<p><em>Python is portable</em></p>
<blockquote><p>Python runs on Linux, Windows mobile and Symbian &#8211; Python runs on almost every smart phone known to man. And not just the phones, it runs on every computer as well: Windows, OSX and Linux server and desktops. Moving your code between these environments is easy. Maybe there isn&#8217;t yet &#8220;cross-platform Python SDK for mobile phones&#8221;, but it might be just a matter of time when something leveraging the idea comes out.</p></blockquote>
<blockquote><p>In our project, core files, independent from graphical user interface, were built and unit tested on Linux desktop environment. No emulator was needed. It was not until the late development stages when they had to be moved to Symbian environment. Since you can develop and debug your code in such &#8220;easy&#8221; environment, you can work more effectively.</p></blockquote>
<blockquote><p>Because the full Python is available in the phone and it can run the exactly same modules as your servers, sharing code between these two environments opens possibility for  making &#8220;smart&#8221; clients. Think about the situation where your phone is offline. It can have a subset of the full database loaded on a memory card. Since moving Python code from the server to the mobile is easy, the mobile application can have the same database functions and application logic modules loaded with it. Without the extra duplication of the logic code, one can operate on the small subset of the data and later synchronize it with the main database.</p></blockquote>
<p><em>Python is extendable</em></p>
<blockquote><p>You can mix C++ and Python. When you run out of ready components or you need unleash all available CPU cycles for CPU sensitive calculation tasks, you can write your own native extensions (DLL files) for PyS60 in Symbian C++. They enjoy all the same privileges as any native built code or application. Actually standalone PyS60 applications are just normal Symbian executables which just happen to have Python interpreter started inside them.</p></blockquote>
<blockquote><p>If you are working with phone features which are not yet very common and lack working Java ME implementations, say acceleration sensors, instead of creating a native C++ application you can create a Python application. You need to mix-in low level C++ only for the the critical part of the applications which operate with the native platform API.</p></blockquote>
<p><em>PyS60 community is vivid</em></p>
<blockquote><p>Surf to <a href="http://discussion.forum.nokia.com/forum/forumdisplay.php?f=102">forum.nokia.com Python discussion boards</a> and you can witness  the activity around PyS60. A lot of folks are answering the beginners&#8217; questions and guiding them. If your case is not totally unique, you can expect help to be found. As a matter of fact, you, reading this text, is a sole proof of powerful community. I was not directly paid to write this and I am not affiliated with Nokia any way &#8211; this writing flows from the bottom of my heart to promote PyS60 and open some window for the (hireable) talents of our company.</p></blockquote>
<p><em>You love it</em></p>
<blockquote><p>For some things, we just feel impulsive attachment. They are beautiful, aesthetic, sexy. When you see it, you need to have it. PyS60 is one of these things.</p></blockquote>
<p><strong>Arguments against Python for Series 60</strong></p>
<p><em>PyS60 has not been around for long</em></p>
<blockquote><p>PyS60 is a young project. It still has some maturity issues. If you don&#8217;t do preparations well and test that all needed modules work as you want them to work, you might need to do some extra work to get around the issues.</p></blockquote>
<blockquote><p>Especially PyS60 user interface lacks some crucial components and polish which may force you to create UI components yourself.</p></blockquote>
<blockquote><p>By &#8220;getting around&#8221; the issues I mean leaping to the native Symbian code world and writing embedded C++.  Since this leap is all but a little step, in the terms of development skills and complexity, I recommend preparing for the worst before the roof is falling on your head. I have seen too much &#8220;plz reply me asap urgent my boss kills me this afternoon&#8221; PyS60 discussion board messages from persons who haven&#8217;t done their homework. For example, you could make sure that you have some hired Symbian guns available in the case your own effort was not enough.</p></blockquote>
<p><em>Python is for high-end phones only</em></p>
<blockquote><p>PyS60 and PyUIQ are available for the high end smart phones only. Nokia&#8217;s Series 40 devices, and other devices built around in-house operating systems, cannot run Python. If you are targetting to e.g. consumers markets and Java ME has all the required capabilities to implement the application, it is the only real way to go.</p></blockquote>
<p><em>Symbian is dreadful platform</em></p>
<blockquote><p>Symbian, as a software development platform, is very challenging. Due to its history, the feeling of developing for Symbian differs greatly from other mobile, desktop and server platforms. Things simple elsewhere, like installing an application, might become a development nightmare on Symbian where one has to fight his/her way through capability limitations, artificial device restrictions and signing process just to get the application to the phone.</p></blockquote>
<blockquote><p>PyS60 naturally inherits all these challenges. Java ME goes around the issue by having its own custom installation, signing, etc. schemes. On Symbian, even accessing some of the device features &#8211; a device you own and hold in your hand &#8211; requires you to throw in few hundred bucks cash to get the <a href="http://symbiansigned.com">publisher id</a> &#8211; to get the developer certificate &#8211; to sign the application &#8211; to have all required capabilities &#8211; to access the specific features (read: GPS). <a href="http://symbiansigned.com">More cash and third party testing</a> is needed to publish the application. This is the price of virus free DRM&#8217;ed platform.</p></blockquote>
<p><em>Lack of entrepreneurship spirit</em></p>
<blockquote><p>If your company states &#8220;we are a Java house&#8221; or &#8220;we are a C++ house&#8221; and you miss courage to look for alternatives, then maybe you shouldn&#8217;t. Sailing into the brave new world takes more resources than staying near your home harbor. On the other hand, if you are a technology company, it&#8217;s quite important follow technologies outside your mainstream, unless you want to suffer the extinction when the new kids on the block gain power (remember the day when COBOL died).</p></blockquote>
<p><strong>Conclusion</strong></p>
<p>Nokia has done a great deed and effort by creating PyS60 and then giving it out for us to play. Now its own turn to act as a community to give back something we can.</p>
<p>Building commercial grade PyS60 applications might not be straightforward yet, but it is possible. Working with PyS60 is definitely more productive than using complex  Symbian C++. It is not always straightforward as Java ME, but eventually it will be. Not only that, but PyS60 can surpass Java ME development with all the Python&#8217;s agility.</p>
<p>If you consider PyS60 for your commercial grade product, it all boils down to the feature set of the application, your existing team skill set and the hacker spirit.  And now there exists at least one commercial vendor, besides mighty Nokia, who advertises commercial PyS60 services (hint: our company), so you won&#8217;t be alone.</p>
<p>We could look things in a larger perspective. In the mobile world, PyS60 is the pack leader of Python-in-your-pocket solutions. <a href="http://sourceforge.net/projects/pythonce">Windows CE has Python support available</a>, but it is not officially backed up by Microsoft.  This may change quickly when mobile .NET virtual machine gets <a href="http://blogs.msdn.com/hugunin/archive/2007/04/30/a-dynamic-language-runtime-dlr.aspx">DLR</a> support making it possible to run <a href="http://www.codeplex.com/IronPython">IronPython</a>. On Linux platforms, Python is a natural part of the platforms (<a href="http://wiki.laptop.org/go/OLPC_Python_Environment">OLPC</a>, <a href="http://wiki.openmoko.org/wiki/Python">OpenMoko</a>).  Google Android and Apple iPhone will roll out their own  software development platforms soon.</p>
<p>In the dream world, we could have a common mobile Python platform akin to Java ME of today. Java is not the only way to provide vendor neutral mobile applications: there already exists effort to get mobile cross-platform  .NET implementation (<a href="http://tirania.org/blog/archive/2007/Oct-04.html">Mono on embedded Linux</a>, <a href="http://www.redfivelabs.com/content/dotnet.aspx">Red Five Labs .NET on Symbian</a>). The future popularity of Linux phones, iPhone and Android might decide the faith of mobile Python. Could we have Python as a batteries-included feature in the future phones?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2008/02/21/building-commercial-grade-mobile-applications-with-python-for-series-60/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

