Problem Silverlight: Micro$oft owns your computer

I am using official version of M$ Windows XP at work, and all the day yesterday I fought with it's updates. Yes, I am talking about Silverlight. I do not care about other possible updates as long as they have no impact on my work. But this one... "Why not?" you will ask... Well, I have few reasons.

1. This computer is MINE!
It installed without my approve. Just downloaded and made ready to install. And more, when I am checking box "Don't notify me about this updates again" it waits about 5 minutes, than downloads it again and installs it again. I can't cancel or forbid installation of this package. Just can't. I have no control over own operation system! I can put TABOO on any package on my SUSE Linux box, but I can't make Windows ignore this peace of "optional" crap.

2. User-agent of browsers
When silverlight is installed - it changes user-agent string of web browser to include itself. M$ already changed user-agent of my Firefox to this one:
Mozilla/5.0 (Windows; U; Windows NT 5.1; uk; rv:1.9) Gecko/2008052906 Firefox/3.0 (.NET CLR 3.5.30729)

What for? Someone is using those dirty techniques to determine silverlight or .NET installed on my machine? And why M$ hacks my browsers without my permission to do it? I can't agree with such politics.

3. Politics
Development of Silverlight looks like politics solution from my point of view. If you can remember history of Netscape - you will see that M$ always releases own products of same kind after they're losing market. Market is totally occupied by Adobe with it's products and experience with graphical applications. M$ will easily take market back with such "optional" features as Silverlight.

4. Religion
I am Java developer. And being Java developer I can see that no one believes in desktop java apps because of JRE on client's computer. Do you really think that JRE is harder to install than Flash Player? No it's not. But "everyone has a flash player, but no one has JRE installed" is already mature religion in most countries. So that will be my own religion - if something is written in silverlight - I don't need it with it's crappy silverlights.


Java and music player

Today I found post on elliotth's blog about Java and MP3. Being developer of Xine engine for aTunes I have own thoughts about it.

Step 1: Target users
At first you should decide who will be your users. Depending on this choice you have different amount of possibilities. For example, Qt Jambi with Phonon will fit for all systems, while Xine is not available for M$Windows users.

Step 2: Engine
Second part of music player is engine. I am long time SUSE user and I prefer Xine over other because it ships with SUSE and all best KDE apps are using it as engine. Also popular MPlayer, VLC and Gstreamer. Of course I hate Gstreamer because of strange format support politics and trashy sound, but it's your own choice.

Step 3: How to use engine
After you decided what engine you want to use - there is a question how to use it.

a) JNI
You can use some wrapper generator like SWIG to generate wrappers and use it from your application. While this is the fastest way to invoke engine - there are few possible problems:
1. You have to build your application for all platforms yourself. It can be hard enough if you have no compilers for target platform and you have never used some of target platforms, or you have only 32bit CPU.
2. Static vs dynamic linking. I am not C/C++ guru, but I noticed that some apps build on other systems than mine can't find libs from system folders like /usr/lib. It's easy to understand that there are some linking problems for target platform depending on libs path or libs versions.

b) JNA
It's my favorite. JNA guys did a great job. They solved all possible problems in JNI approach, building jna.jar for all platforms and supporting dynamic linking. The only problem - mostly you have to read *.h files and write classes to wrap them. It is simple if you know a bit of C/C++.

c) cmd line
You always can invoke your engine from command line. MPlayer have it's own command line interface, so you can just send commands and read responses from Process stream. Also, Amarok supports commands like "amarok -s" to stop. May be your favorite player also does? Of course you should give user to choose path to your supported engine, while Linux platforms can be found in $PATH it will not work on M$Windows.

d) Use Qt Jambi
I already wrote about Qt Jambi. It's great solution for any desktop application, not just music player. And it have it's own media API, that can be found in examples. I suggest you to download and take a look yourself.

e) choose from existing wrappers
Many engines have it's own wrappers already. Here are some of them: