IronPython

posted Tue, 15 Nov 2005 23:05:00 GMT by Jonas Bengtsson

I just finished watching IronPython: Python on the .NET Framework which is a demo of IronPython. I remember when it first was announced, one or two years ago, and thought it was neat but didn’t see the need when there already are CPython and Jython. But it’s nice to see who well it integrates with the .NET framework as well as the Python libraries (does it support C extended Python libraries as well?). You can use the whole .NET framework and even extend it in your Python script (which shouldn’t come as a surprise since it uses the CLR), and you can embed Python into “normal” .NET applications. You can even debug using Visual Studio, set breakpoints and introspect variables (without there being any IronPython support in Visual Studio, again thanks to the CLR).

IronPython is currently at a pre-alpha stage suitable for experimentation but not for serious development work.

Comments Two comments

Microsoft video galore

posted Thu, 15 Sep 2005 23:28:00 GMT by Jonas Bengtsson

Channel 9 is pumping out some very interesting videos about the PDC.

Anders Hejlsberg – LINQ

LINQ stands for Language INtegrated Query and in a nutshell, it makes query and set operations, like SQL statements first class citizens in .NET languages like C# and VB.

This one is really cool! Searching generic collections of generic objects. Amazing that they are able to this kind of declarative programming in a static programming language. However, there is a line when you’re trying too hard to be a dynamic language, and they are awfully close. The examples provided by Anders could easibly have been done in Ruby, using blocks, where it feels natural and not a paradigm mashup. Still, very cool!

(Did I manage to get a buzzword bingo?)

Julie Larson-Green – Diving into the new Office 12

Julie runs the team that did the research that led to the came up with and designed the new Office 12 user interface. She gives us a great runthrough of what Office 12 does.

The new UI of Office seems to be a lot slicker. It’s incredibly pleasant to see that simplicity is something that Microsoft is embracing even in feature packed applications like the Office suite. Nice new UI concepts, like no standard menubar, live preview of all changes, “floatie” – the shy toolbar, and shortcut overlay (hopefully the only thing they’ve borrowed from the Notes UI).

Shell Team – Exploring and Using Windows Vista

Now, what does the Shell team do? They make the Explorer and do a variety of other things. You will not want to miss this video because you’ll get a good look at Windows Vista from both an end-user perspective as well as a developer perspective. You’ll get to see just how powerful the desktop search feature is that’s built into Windows Vista.

The main interesting thing is that Microsoft seems to have continue on the no more silo route. That’s a Good Thing.

Kam Vedbrat – Looking at Windows Vista’s user interface

Kam Vedbrat is a lead program manager on the AERO team which redesigned the User Interface of Windows Vista (the next version of Windows). We spend half an hour looking at the user interface.

Mostly eye candy.

Manuel Clement and others – Introducing Sparkle

Here we meet the Expression Interactive Designer team last week as they were having a late-night pizza dinner (code-named Sparkle) and then sit down for a lengthy demo.

Tool for creating XAML basically. Cool! And some eye candy.

Adam Nathan – Light up an app with WPF

Adam Nathan is giving a talk at the PDC on Thursday about making an application “light up” on Windows Vista. To prepare for the talk he created WinFXHearts.com. Very cool version of the Internet Hearts game. Here we visit his office to get a good look at his application and what developers can do with Windows Presentation Foundation (formerly known as Avalon).

Eye candy and descibes how to integrate WPF in legacy apps.

Kenneth Spector – Coding without seeing the screen
Kenneth is working as an intern here at Microsoft for the summer on the Office team as a tester. He uses Visual Studio to find bugs (and to code on his own time). He writes emails in Outlook. Does all the usual stuff that most developers or testers at Microsoft do. With one difference.

He can’t see the screen because he’s been blind since he was three years old.

Very interesting!

Comments Zero comments

Expo-C

posted Sat, 04 Jun 2005 16:51:00 GMT by Jonas Bengtsson

This week I attended Expo-C, “a 3-day Software Architecture Conference” of which I went on two days. Software architecture is a dangerous word since it might imply so many things, from “oh so boring” to “a hoot” on the interest scale. Fortunately, this conference managed to place itself closer to “a hoot” than to “oh so boring”.

Rickard Öberg’s presentation of Aspect oriented programming, AOP, was truly interesting. I can only find one reference to AOP back in 2002 on this blog, so I think it’s safe to say that this was my basic opinion of AOP before the conference: nice ideas, but complex and will it work in larger projects? I have looked at AOP once in a while but never fully grokked it, and never used it for anything larger than testing that it works. And languages like Ruby and Python have made more impression on me.

Rickard’s presentation opened up my eyes for that AOP is really interesting. But then again, anyone who put this quote on the fourth slide has my full attention: “Inheritence sucks as a means of reuse”. That is a statement I can wholeheartedly agree with. The standard AOP example, the trace example, is nice and that kind of AOP (advice in AOP-lingo) is probably very useful (transaction management, caching, security and so forth are other similar functionality). But introductions, that is methods and data introduced to an object or class, is what really got me thinking. Rickard’s product, a slick CMS called SiteVision, used AOP (a home-brewn version) religiously, and it seemed to be a successful approach.

Another thing that Rickard stressed was tool support, and I do agree that tool support is crucial for the success of AOP. Back in 2002 AJDT was new, but now it seems to be a mature product, and it have some nice visualization features (I’ve just tried to create a simple aspect so far, due to lack of time).

The other main attraction of the conference for me was Rod Johnson who had one presentation during Tuesday, and a full-day tutorial of Spring during Wednesday. Web development frameworks is something that has interested me for quite a while, for some peculiar reason. I have only done two web projects, an e-learning system in PHP and a community in Java, and those were done during my university studies. Nowadays, my main interest, which I share with many in the blogosphere (at least the parts I follow), is in Ruby on Rails.

The conference was quite directed towards mainly Java/J2EE and somewhat towards .NET. I’ve been out of the Javaverse for a while so it was due time to get reintroduced. J2EE seems quite overcomplex and painful so I understand where the need for lightweight frameworks, such as Spring, spring from (bad pun intended). There is a lot of great ideas in Spring and it put a lot of emphasis on testability, to be non-invasive and to promote good design. The main tool to achieve this is, from my viewpoint, IoC/DI.

Inversion of Control (IoC), or Hollywood Principle (“Don’t call us we’ll call you”), is a pattern to loosen the coupling in a system. Instead of objects creating all the objects it needs, setters and constructor arguments are used to give an object the objects it needs. And (don’t know if it’s required or just recommended by the pattern) interfaces are used in preference of classes in order to further reduce the coupling. I think this is great in terms of testability: all external dependencies of an object is possible to configure/mock so you can test objects in isolation. Another great gain is that highly coupled designs become evident—classes with many external dependencies are easy to hide if the only way to notice the dependencies is to look at the source.

Dependency Injection (DI) is a technique to manage all the dependencies that IoC makes apparent. E.g. Spring figures out, aided by XML configuration and introspection, which objects that needs to be created for a certian class, create those objects and uses constructors and setters in order to inject the dependencies. Pretty neat to see Rod’s demonstrations of Spring and IoC/DI.

Singelton begone!

Spring also has its own support for AOP (working in a similar way as Rickard’s using dynamic proxies), and Rod pointed out that it’s a good idea to unit test classes without aspects since you want to test classes in isolation. Let’s say you have a security aspect, then it probably needs some setup in order to run, and that seems like a lot of work for a unit test and many thing that might go wrong and interfere with the tests, it’s more of integration test issue. That’s no problem in Spring since objects are just POJOs (plain old java objects), aspects are added by the Spring container so when you don’t use the Spring container you have no aspects. But how do you do that in e.g. AspectJ where the aspects become part of the bytecode? There is an infant project called aUnit, but that seems to just unit test aspects themselves in isolation. Or do you just use a different, non-AOP aware, compiler? Does anyone out there have any suggestions?

There were also a lot of other things in Spring that were very appealing. More metadata and code than Ruby on Rails, but if I’ll do anything server related in Java, I will certainly look at Spring.

One thing that I thought of while listening to all the interesting stuff about AOP, IoC/DI was how this would translate into the Ruby/Python world. The concepts apply even there, but the programming languages are more hackable than Java, thus it ought to be eaiser to achieve. There are probably many different approaches in the Ruby/Python world that I will have to look into.

Great conference! Would gladly come back if they manage to get as good, or even better, speakers!

Comments Two comments