Amaretto Thoughts

image

Matt has some great thoughts on Python for Series 60.

For the past month or two, I have been tinkering with Python for Series 60. I regret that I have not had enough time to pound on it, but what I have played with has been awesome. I can parse HTML, like an adaptation from this page of Dive Into Python. When things like from sgmllib import SGMLParser just work, I'm amazed. Hey, check that out, I'm parsing HTML on my phone. Rock!

Series 60 Python is still a research project at Nokia. There are no guarantees that it will ever see the light of day beyond limited testing. There's only one problem: sockets. It always comes back to sockets. Don't get me wrong, sockets are available in Series 60 Python, but you can't do something like urllib.urlopen(url). That little thing is keeping a lot of people from doing useful things with Series 60 Python. Part of the reason that so many people use and love Python is because it's sort of runnable pseudocode. It's intuitive, it makes sense, and the syntax that you think ought to work often does. Once writing a Python app for a platform becomes much harder than that, you start loosing developers quickly.

Matt's got some great points - Amaretto is still in development, so you can't knock it too hard just yet, but getting the core network libraries to be standard Python are pretty key. It's just like the experience with mobile Java: Regular Java programmers start thinking of all the cool things they'll be able to do with their phone, and then suddenly they have to deal with MIDP and get really frustrated quickly because of all the limitations. Amaretto is close enough to supporting all of Python so this shouldn't happen, but I'm sure there's a lot of work left to get those last little libraries working as expected.

Most people don't have access to the SDK, so let me just say that I think it's well done. I'm under the NDA, but from what I understand I can talk about the project, I just can't get too detailed or release proprietary info (so no code just yet). In general, here's a rundown: You can run Python files that are on your phone in regular .py format (this you've seen from the public demos of the app), or you can wrap up the .py files into a .SIS Symbian installation file with its own icon, so that the user never knows that it's Python. Very cool - I mean, obvious, but cool. In terms of development, the SDK comes with both Windows and phone versions of the application and core libraries, so you can do testing in the emulator before sending to your phone. Again, this is great - as the command line intepreter may not be all that useful with a phone's keypad, on the emulator it's vital.

What I've been looking at doing is creating an RSS news aggregator. Of course! If you think about it, this would take networking and xml parsing, UI integration and also things like browser integration or at least some sort of rich text. (The latter bits aren't supported right now). An aggregator is a great sample app for Amaretto because it mimics real-world enterprise usage: client-server communication via XML with forms and offline storage. Getting a good aggregator working on Python would go a long way to proving it's capabilities in the corporate world, IMHO. So as I explore the language and libraries, this is something I'm concentrating on.

Another cool part of Amaretto that most people won't know just from hearing about the project, is that it supports Python's standard C wrapper interface! This is cool because in theory, you could have heads-down developers crank out the really intense parts of your Symbian application in C++, then they can simply create a wrapper for the Python guys, who use that as a base and then develop UIs and interactivity from there. This could reduce development times substantially. In some respects it does harken back to the bad-old OCX days of VB, but honestly, I think this is a really good model for mobile apps because of the resource constraints. Actually it could inspire an OCX-like tools market, or if not, it'll at least allow the developer community to start quickly adding functionality that may not be in the basic Nokia libraries at launch. Nokia is concentrating on just getting the basics down right now, so there will be lots of gaps that can be filled in by creative developers, I'm sure.

I'm actually curious about the graphics-drawing functionality specifically, because right now there isn't any. In theory, if there were APIs and access to classes for drawing directly onto the screen, you could make cool games in Python as well as other more standard GUI-based apps. But the problem is that this could hit exactly where Java sits now, which could be a political problem for Nokia (if Python isn't already. :-) ). Personally, though it'd be nice to see, I think the most important application of Amaretto is in the enterprise world, so I'm not too worried. As long as Amaretto has easy-to-create forms, networking, xml and some basic security to access secure back-end systems, it'll serve its purpose perfectly.

The reason I'm so concerned about the enterprise market is because that's where I see Microsoft making its play in to mobile world: selling to large corporations with applications developed in .Net Compact, touting their rapid VB-like development and tight integration with Outlook/Exchange. Nokia can pre-empt this move by providing Series 60 with a compelling RAD language which does much of the same, but has the cachet of being from the Open Source world, and fits in great with all those new Linux boxen that more and more companies are installing on their intranet. Nokia could even publish custom libraries itself for integration with it's NokiaOne enterprise products, and expand the functionality and applicability of Amaretto to the enterprise even more.

But really, the coolest thing about Amaretto is that because Python is an easy-to-learn and develop scripting language, there will suddenly be *a lot* more mobile apps out there for people to use than if they stuck with just Java and C++. This will drastically increase the percentages that one of those apps is the proverbial Killer Mobile App (for data services, at least) and that's a good thing.

Anyways, this is a very cool project. It would've been great to have been in Finland to see Guido van Rossum talk and see how the project is moving forward. It's just plain exciting to see Python work on my phone. It's one of those ghee-whiz events when you realize how powerful a smart phone like a 6600 is, and how really what you have in your pocket is actually a full-on connected computer, not just a neat phone with some cool features.

Stay tuned for more info as I continue to develop and learn, I'm sure there's *lots* of stuff waiting for me to discover, both with Amaretto and with Python itself.

-Russ

< Previous         Next >