Python Programming, news on the Voidspace Python Projects and all things techie.
Silverlight and Resolver PyCon Presentations
My talk and resources on Silverlight and IronPython is online, as are the two PyCon UK presentations by my Resolver colleagues:
- IronPython & Silverlight: Presentation and Resources
- The New Age of the Amateur: End-user computing without tears using Resolver and IronPython - by Giles Thomas
- Test-Driven Development: Brooks’ Silver Bullet - by Jonathan Hartley
The Silverlight presentation that is up at the moment is the version I gave at PyCon - but it is largely the same as the talk I gave at Mix UK. All the examples are available to download if you want to experiment yourself. Over the next few days I will turn the talk into a few articles, which will be a bit easier to read.
By the way, I'd also like to write an article for a magazine on IronPython. Possibly on Silverlight and IronPython (but it doesn't have to be) - but not on a subject area that I've already covered. I'm considering possible titles, but if you have any ideas then leave a comment (thanks!).
Daily Python Builds as Windows Installers
Martin Lowis and David Bolen have configured the Python Buildbots to create daily builds of the Windows installers for Python 2.5, 2.6 and 3.0 (from SVN head).
Very useful for all you Windows bleeding edge junkies out there.
Windows Live ID and OpenID
One of the things I forgot to mention in my report from Mix UK was the presentation on Windows Live ID authentication. This is conceptually very similar to Open ID (except without the open bit...).
Websites can provide user sign-up via a link to Windows Live. This takes the user to the Microsoft site, and then bounces them back to the original when the sign-in is complete. (There is a .NET API for this of course.)
Unlike Open ID, Windows Live will refuse to share any information (including email address) with sites that you sign in to. With Open ID you can specify that you are happy for certain details to be passed on, meaning that you don't have to fill in these details manually the first time you sign in to a site. I spoke to Angus Logan, one of the MS developer who gave the talk. He thought that it sucked that they couldn't do this, but because of privacy concerns it probably won't happen. You can however, use your Windows Live login to manage several identities, which is cool, and you can also use it with cardspace which Simon Willison had good things to say about.
Because of the redirection, it suffers from the same security concerns that Open ID does: we are teaching users to be redirected to a site and enter their credentials - which is an invitation to phishing. Angus said that the Microsoft Live site has 'extra secure certificates', which on IE will cause a vivid green bar to show at the top of the page, and they will 'train users to look for it'. This sounds highly optimistic. (Usability studies show that users don't look, so how will Microsoft train them?)
There is also a client API for authentication with desktop apps. You need to use their client API, which includes a custom dialog. This will probably be just as easy to 'copy' as the website, but without the added protection of being able to see the URL - as you can in a browser.
When I asked Angus about Open ID, he had heard of it. He says that Microsoft is actively considering how they can work with Open ID. He says that whilst Open ID is still currently 'small', they are definitely thinking about it.
Oh, and in the sneak peak section we saw some very cool stuff being done with Silverlight and graphics. Including live 'zooming' small images into big ones (a project called 'SeaDragon' I believe). It works by only sending the portion of the image that can actually be seen on screen, so you can have a set of images and zoom into a close up on any of them - very nice.
In case you missed it from my previous entry, Silverlight can automatically take advantage of multi-core processors when working with streaming media / graphics processing.
There was also an example of a 'browserless' Silverlight app, being used for peer to peer TV streaming. The user interface was virtually identical to Joost!
Oh, minor news: the next version of Microsoft's Expression Web (web design tool) will support PHP.
Oh, and I also spoke to a nice woman from Microsoft (whose name I forget - sorry), who does the 'community stuff' in the UK. It turns out that she was really hoping to send someone to PyCon UK (which they sponsored), but all the dynamic languages folk are in the US and she couldn't find anyone free to come.
Report from Mix UK
I'm now on my way home after a two day Microsoft conference called Mix UK. This was a conference 'in-the-style-of' the Mix event held that has been held in Vegas for the last couple of years, and is the first time it has been held in the UK. At the centre of the conference talks were Silverlight, the Expression set of design tools, and new Windows Live services. It was a thinly veiled excuse for Microsoft to evangelise their new technologies - but this is what the 500 strong audience came for. There were a lot of suits, but some great people amongst them.
At the close of the conference we all left with a shiny new copy of Vista Ultimate, plus the Expression set of tools. As I may be writing an article on using IronPython on Silverlight with Expression blend, this could come in very handy.
Onto the interesting stuff. Scott Guthrie (big important Microsoft developer type person) did the keynote, plus a very interesting talk on Silverlight.
An overview of some Silverlight stuff:
- Silverlight can use multi-core processors to offload graphics onto (streaming video and audio), where they are available.
- Layout is currently all done with absolute locations, which is just about acceptable for writing games but not much else. The rest of us will have to wait a bit until the 'proper' layout managers are available.
- The 'per-application' limit of 1mb local storage will be raised in the final version.
- Lots more prebuilt controls will be added.
- Silverlight 1.1 outperforms flash.
- Microsoft are making a big deal of the fact that Silverlight will run on Linux (mentioned several times - with a vague mention of Novell, no mention of Mono and no mentioning the Moonlight project by name!)
- There will be a version of Silverlight for mobile devices (which should run IronPython - which is better than the Compact .NET framework can manage).
A demo application that accompanied the conference was a 'Mix Reader' application created by Conchango with WPF. It reads Mix articles, RSS feeds, and integrates facebook and twitter. It feels like a web app - except better.
This is muddying the water between web apps and rich client apps, which is water that desperately needs muddying in my opinion. XAML used for laying out desktop apps with WPF can be used with minor modifications for Silverlight apps.
At the end of the first day I was on a developer panel discussing the 'cloud versus client' problem, along with various vastly more qualified geeks - including Scott Guthrie! A kind of surreal experience, but it will look good on my CV.
A maniac blogger blogged the developer panel live, I was speaker number seven (and I'm sure he missed out some of my more intelligent comments).
I attended a talk on IronRuby by Dave of Shiny Development. He didn't talk much about IronRuby, but instead gave a high level overview of Ruby. At last I understand blocks! (plus various other minor aspects of Ruby syntax - so many thanks to Dave.)
This afternoon I did my talk, which seemed to go ok. I was asked to talk about dynamic languages on Silverlight, but silverlight got quite a lot of coverage elsewhere so I could have focussed more on IronPython and the Dynamic Language Runtime. I was on the main track, and had around 200 in the audience (which I think is the biggest crowd I've talked to on a techie subject). The jokes about static typing didn't seem to go down too well! Apparently a video of the talk will go up at some point, which I will duly point you to.
In preparation for the talk I added a few more demos to the Silverlight Web IDE. The new version, and other talk materials, will go online shortly.
I also managed to sit in on part of a demo Scott was doing of the next version of ASP.NET. It uses an MVC structure that is very reminiscent of certain other modern frameworks (which Scott freely acknowledged and made no apologies for). It was very RESTful (no more .aspx extensions and you can use regex matching for the routing), LINQ for the database access and has better AJAX support (plus good IronPython support I was assured!). Scott went through creating a new web app against the Northwind database in about ten minutes. The architecture looked very good, and this style of web application fits my brain much better than the current ASP model. I'm not convinced that LINQ is as expressive as the ORM layers used in dynamic web app frameworks - but possibly because I don't understand LINQ yet. (Although one big restriction is that it only works out of the box with SQL Server, a fact that MS don't advertise a great deal.)
I also got interviewed for a podcast by Craig Murphy, which will doubtless go online some time.
In the closing 'sneak peeks' section, Simon Peyton Jones from Microsoft's Cambridge research lab gave us a high level overview of a plausible sounding solution to concurrency without locks using transactional memory. He even has software transactional memory working in a Haskell Implementation. The basic approach is similar to transactions in a database, and wraps operations 'atomically'. Writes to memory are actually written to a transaction log and not committed until the whole transaction is completed. Manic blogger gives a slightly longer explanation.
I'm now done for conferences until November, which is good as I'm knackered.
Does Django Have Rails Envy?
A good natured swipe at Django from those cheeky young Rails upstarts:
Via Rails Envy.
First Blog Entry from the Mac
Well, I'm ensconsed in a slightly chilly but otherwise plush hotel room in London waiting for the Mix UK conference to start. I'm not speaking until Wednesday, but the talk went well enough at PyCon that I'm feeling confident.
I've finally got round to setting up my 'usual' Python development environment on the Mac, and am typing my first blog entry on it!
I'm not going to do a long report on PyCon UK by the way. I've just thought of something fun to try with Silverlight instead. But... it is incredible that things went so smoothly for a first event. It seemed very professional, of course behind the scenes might have been a bit different...
IronPython and Kamaelia (plus a new web framework...)
One of the memorable talks from PyCon UK (which was great - I met loads of cool people ) was about Kamaelia. Kamaelia is a new form of concurrency (the classic use is for media streaming) using Python generators. I don't have a use for it yet, but the interface looks particularly clean.
It would be nice to see more frameworks like this up and running with IronPython, but last time a few folk tried there was a blocking bug (with yield statements inside nested try except blocks). That bug is now fixed (and uhm... possibly was a few releases ago of IronPython 2), so it's time to try again.
Oh... Tim Parkin of Pollenation used the lightning talks to announce the release of a new Python web framework! This is one built on Twisted that they have been using in production for a while and are finally getting round to open sourcing it. It's about time a good web framework built on Twisted emerged, expect more news soon I guess.
|||See the Blogs Page for blog entries about the event.|
Quick News from PyCon UK
It's now break time at PyCon UK, so I'm taking the chance to update my blog.
Over two hundred delegates registered in the end, which is great. My boss and I (Giles Thomas talking about the 'New Age of the Amateur') have both done our talks, and no major disasters so we are free to enjoy the rest of the conference.
I've particularly enjoyed the talks on PyPy, Stackless and Kamaelia. PyPy is still mindblowing and there are encouraging signs that development is picking up again. The Stackless talk was very clear and understandable. Christian Tismer (talking about Stackless) still believes that PyPy is the way forward which is good news. The new 'sandboxed' feature of PyPy could be very useful for us to run a public facing Resolver Server with. As well as restricting access to system calls and the file system, you can also limit CPU and memory usage.
Kamaelia also looks very interesting. I am extremely impressed with the quality and simplicity of the interface they expose.
IronPython in Action Available
IronPython in Action has now gone live on the Manning site!
The first chapter is available for free download. The first four chapters (fifth chapter to come online in the next few days) are available via the Manning Early Access Program. This means that you get access to the book as it is being written (and get the chance to point out our mistakes!).
The first five chapters are an introduction to .NET, a Python tutorial, and then a walkthrough creating an example structured Python application. This uses aspects of both the Python language and the .NET framework.
The rest of the book is going to be much more 'recipe style'. It will cover working with various parts of the .NET framework (ASP, databases, web services, working with Windows and so on), getting deeper into Python (testing, protocols, metaclasses and so on) and also embedding and extending IronPython.
Silverlight Talk: Quick Links
I've now done my talk on Silverlight at PyCon UK, and to my great relief it went OK. (In fact I was much more nervous doing a practise run to the Resolver developers yesterday).
I've put the talks and the examples online. I'd like to split the talk into a series of pages, but here are some quick links to the presentation and examples:
- Python in Your Browser with Silverlight
- WebIDE 0.3.0
- Spreadsheet in the Browser Example
- Minimal Silverlight IronPython Project
- Scriptable Objects C# Project
- Compiling C# for Silverlight without Visual Studio Example
The main talk is an S5 slideshow. If you view the talk as a single page (go to the bottom left of the page and click on the '0' link) then there are a lot of notes embedded explaining the code examples.
The Web IDE has been updated to include some Silverlight examples built into it. These illustrate using different parts of the Silverlight APIs.
This work is licensed under a Creative Commons Attribution-Share Alike 2.0 License.