May 04

Python has a leg up in the dynamic language race

Java, Microsoft, Tech 7 Comments »

I have had an absolute ‘duh’ moment. I am a Ruby fan, and keep pinging JRuby to see if it is ready for prime time, and it never is (YET!). I have also talked with Microsoft about Ruby.NET.

I have written Python code in my past, but it was sandwiched between Perl and Java, and was used at first due to the very nice embedable API (embedding Perl was a nightmare for example). And, then I have moved on to Ruby/Groovy for my scripting needs. So, partly due to timing, partly due to FEEL, Python has been overlooked (as has PHP).

However, it turns out that Python is an obvious choice for a dynamic language that is fairly ubiquitous:

Not only can you get it on unixen, Windows, etc… but it runs on the JVM and CLR!

JPython

JPython has always been out there, but it seems to have picked up more steam recently (anecdotaly). We do have the strange combining of the worlds, and deciding whether to use python APIs vs. Java APIs, which depends on whether you are looking to run on the Java platform and just use a scripting approach here and there, of if you want a scripting language on a whole set of platforms (e.g. reusing your .py all over the shop).

IronPython

It seems that the Python community hasn’t been happy with how Microsoft has gone quiet until a recent IronPython release. Jim Hugunin is a great bloke, and I have no doubt that things will change and he will be able to break through the MSFT beauracracy.

With a solid IronPython, JPython, and CPython, you now have a very compelling dynamic language!

If you can put up with self ;)

And, there is also word that a new web framework named spyce is going to try to do what Rails has done for Ruby.

Apr 29

Karsten on Avalon and XAML

Microsoft, Tech 508 Comments »

Karsten Januszewski, platform evangelist, spoke at the Flash Forward conference, and shows off Microsoft’s Avalon UI framework.

The bulk of the talk is demo’s and they really give a glimpse of the power of the platform:

13:11 XAML file presentation app.

21:50 3D composition app

24:00 skinning your app

25:50 Avalon notepad

27:30 Media Mania (you’ve seen this app on Channel 9 before, but here you get to see more)

32:50 Electric Rain’s ZAM 3D (amazing 3D to Avalon app)

44:00 Video in Avalon (a preview of a future version of Avalon)

47:30 Video on a 3D sphere

48:20 video on multiple 3D spheres

49:30 A “Halo strip” (multiple photos on 3D surfaces)

It is going to be very interesting to see how the boundary of the browser and the client side app blend together.

Apr 13

Value types in Java: Striving for the stack

Java, Microsoft, Tech 6 Comments »

I have recently had some .NETers claiming that they do now know how we live on our side of the fence in Java-land, without value types. They laugh in our general direction as they add structs to the stack.

I do understand that value types can be useful. I do understand that it will take longer to dereference an object each time vs. not having to do that bypassing the heap entirely. There are lots of good things there.

However, I am actually quite glad that we don’t have value types. Simple put: Have you missed them? I haven’t! I haven’t run into a performance or scalability issue that was profiled, and the result was “man if we could just put this String on a stack we would be fine”. It just hasn’t been a problem.

On the other side, if you flip through Effective C#, you see items dedicated to value vs. reference types. Sneaky methods like EqualsReferences vs. EqualsValues. Subtle differences. Common mistakes.

So, give me partial classes, and true delegates, but keep your value types :)

Apr 11

COmega and Ted :)

Microsoft, Tech No Comments »

I had one slot in which I wasn’t speaking at the No Fluff Just Stuff in Boston, so I snuck into Ted’s talk on COmega.

In typical Ted style, a tangent occured, and an hour later we had only gone through a few slides ;)

This isn’t a bad thing though, as we got to play with some interesting pieces of COmega. I had been looking mostly at the XML/SQL features, which are a step up from Groovy for example, as they are first class citizens (Groovy SQL / XML is a large step up from Java though!).

What I hadn’t spent much time looking at was the Polyphonic C# side of the house. It really was interesting to see the chord based concurrency constructs.

For example, here is how you can implement Reader/Writer Locks:

class ReaderWriter {
ReaderWriter() { idle(); }

public void Shared() & async idle() { s(1); }
public void Shared() & async s(int n) { s(n+1); }

public void ReleaseShared() & async s(int n) {
if (n == 1) idle(); else s(n-1);
}

public void Exclusive() & async idle() {}
public void ReleaseExclusive() { idle(); }

}

Very, very cool stuff. I hope much of it gets into C# 3.0, and hence Java 7.0 ;)

P.s. it is good to have Ted in town this week. Hopefully we can show him a good time in the Mad-town!

Apr 07

sendMultiRefs with Axis 1.1 for .NET interop

Java, Microsoft, Tech 3 Comments »

I mentioned in the past that we were having some problems talking to a third party service implemented in .NET.

We didn’t have control over anything on their side, and in fact were using their Java proxies (which were gen’d via Axis 1.1).

This meant that we were stuck in their RPC mode, instead of using the currently blessed document/message style.

One item that just breaks, is that .NET can’t handle multiRef’s, so to make sure you are being a good client do the following:

YourNameWebServiceLocator locator = new YourNameWebServiceLocator();

locator.getEngine().setOption(”sendMultiRefs”, Boolean.FALSE);

No more multiRefs. .NET is happy.

Apr 07

Lingo: Indigo for Java without WS-*

Java, Lightweight Containers, Microsoft, Open Source, Tech 1 Comment »

Lingo is a new lightweight remoting / messaging library that smells a lot like Indigo in simple ways. The main difference is that the model isn’t baked in with WS-* XML blah.

It is cool that you have control over the messaging exchange patterns, and can do things like JMX over JMS very easily.

About Lingo

Lingo is a lightweight POJO based remoting and messaging library based on Spring’s Remoting which extends it to support JMS and support a wide range of message exchange patterns including both synchronous and asynchronous message exchange.

Current supported message exchange patterns include:

  • synchronous request-response (like RMI)
  • one way messaging (asynchronous invocation - like a JMS publish)
  • asynchronous consumption (like a JMS subscribe)
  • asynchronous request-reply (allowing the server side to asynchronously send one or more replies as the data becomes available).

You can think of Lingo as being conceptually similar to both Microsoft Indigo and JSR 181 in that it allows asynchrnous method execution, remoting and asynchronous messaging to be bound to existing POJOs (classes or interfaces) though it has no particular dependency on Web
Services infrastructure.

Lingo supports pluggable messaging bindings; the first binding is an efficient JMS implementation. Over time we’ll be adding other bindings to web services frameworks and other transports.

For more details of how Lingo works and what features it offers, see the Overview or try out the Example

Read more about the new: Lingo

Mar 22

Microsoft could use AOP to help enforce their Security

AOP, Microsoft, Tech No Comments »

Michael Howard is on a security team at Microsoft. He is the author of Writing Secure Code, and he spoke to us about the security scene at Microsoft.

The #1 agenda at MSFT used to be “app compat” (NOTE: There seems to be a sub-culture at MSFT that uses different terms :), but now security has taken over the top spot.

To enforce this, Michael and his team came up with a new software development process. He detailed this in front of us all.

I asked him about AOP, and he said that he hasn’t thought about it.

To me, enforcing security policies is a perfect example of AOP. A lot of the AOP work that you can get into places, starts off with this style. You write some nice aspects which modularize your policy, and then developers aren’t able to trip up.

This should be the same way in MSFT. If I develop something which doesn’t meant the secure code guidelines, when I do a build, I should get a warning.

This is a much better idea than going through code at the end of the process.

Of course, these policies may not be able to 100% capture the cross-cutting security concern, but they can surely do some of it!

Come on Michael, take it to the next level ;)

Mar 17

Microsoft is about Windows. Better Java on Windows would be good for them.

Java, Microsoft, Tech 3 Comments »

This morning, one of the Microsoft head honchos had a high level conversation with the crowd, where he explained that:

Microsoft is a software company.

Microsoft lives to make Windows the most compelling platform.

A lot of the crowd didn’t get this. There was a lot of talk about open sourcing Windows (huh?), and porting the CLR to other platforms. They aren’t in that business. It isn’t going to happen. Mono is out there, and MSFT are watching it, and they think that it is cool the Miguel and company think .NET is cool, but that is it for now.

Since MSFT is all about Windows, they are very interested in making Java more compelling on the Windows platform. I think they are hoping that the check to Sun will help them in this regard.

I would love to see a windows.* or com.microsoft.* package which allows me to do the cool low level things that I can do in the CLR. What about Indigo from Java? Avalon with Java? etc etc.

Who knows what will be allowed here, but I would be happy to see this support, from a pragmatic perspective.

Obviously, there is an interesting tension between Microsoft wanting you to run Java on Windows, and Sun wanting to have Java as a platform to allow you to work on other areas.

Mar 17

What we learned from the Microsoft Technology Summit

Microsoft, Tech 10 Comments »

Read Matt Raible’s blog for the details, but in a nutshell what we learned from the technology summit today was:

  • “If I could wave a magic wand we would all just use Ruby”, Don Box.
  • Schema Sucks. RelaxNG is the way to go, Don Box.
  • We are “sucking less”, Everyone.
  • security, security, security. It is the #1 priority now. Honest.

In all seriousness, it was a very interesting day.

Mar 08

Are we mature enough for TheServerSide Symposium (.NET and Java)

Java, Microsoft, Tech 8 Comments »

The old chestnut of “Java vs. .NET” has reared its head again (e.g. Java vs. Microsoft .Net debate rages).

I actually wished that one of the instant audience polls would have been:

How would like like TheServerSide to include other technologies outside of Java?

  • Only Java Tech please! This is your niche! Have a TSS.NET conference for that stuff
  • Other fringe tech, but from the point of view of an enterprise Java guy
  • I have to work in a heterogenous environment, so would love a hard core .NET track. Besides. I don’t have to go :)

The reason I mention this, is that I think the community has chilled out from the days of “oh man, I hope .NET doesn’t take over!”.

Now, several years have passed, and J2EE is doing fine. .NET is doing fine too. We can live in harmony ;)

These days, a lot of developers work in the world of both Java and .NET. In fact, what does it even mean to be an “enterprise Java developer”.

Why, just today I wrote SQL, Java, JavaScript, ruby, Groovy, bash, and had to look at XML. Hardly Java only :)

Now the politics has died down, I think there is a lot to gain by having a conference where the camps mix. I enjoyed my time at MS Tech Ed last year, and learnt a few things.

Are we ready?