November 26, 2007

Linus on where Linux is heading to..

I just read an interview from InformationWeek with Linus Torvalds, the creator of linux about where linux is headed in 2008. Linus is very exicted about the solid-state drives, graphics and wireless networking. When asked about Linux and Windows server development, here is what is had to say:

I simply don't use Microsoft products, not because I hate them, but because they aren't interesting to me.

If you are interested, here is the whole story.

November 08, 2007

Mandriva's open letter to Steve Ballmer

I came across Mandirva' Blog and site after a long time. I have used the distro when it was named Mandrake. One of their blog entries caught me. It shows how unethical Microsoft is.

It’s an open letter to Micorsoft CEO Steve Ballmer. Here is the full post:

Dear Steve,

Hi, this is Fran├žois, from Mandriva.

I’m sure we are way too small for you to have heard of us. You know, we are one of these Linux company who is working hard to make its place in the market. We publish a Linux Distro, called Mandriva Linux. Mandriva Linux 2008, our last edition, has a pretty good review and we’re proud of it. You should try it, I’m sure you’d like it. We also happen to be one of the Linux companies that did not sign an agreement with your company (nobody’s perfect).

We recently closed a deal with the Nigerian Government. Maybe you heard about it, Steve. They were looking for an affordable hardware+software solution for their schools. The initial batch was 17,000 machines. We had a good deal to respond to their need: the Classmate PC from Intel, with a customized Mandriva Linux solution. We presented the solution to the local government, they liked the machine, they liked our system, they liked what we offered them, especially the fact that it was open, and that we could customize it for their country and so on.

Then, your people get in the game and the deal got more competitive. I would not say it got dirty, but someone could have said that. Your team fought and fought again the deal, but still the customer was happy with the CMPC and Mandriva.
We actually closed the deal, we took the order, we qualified the software, we got the machine shipped. To conclude, we did our job. And, the machine are being delivered right now.

Now, we hear a different story from the customer: “we shall pay for the Mandriva Software as agreed, but we shall replace it by Windows afterward.”
Wow! I’m impressed, Steve! What have you done to these guys to make them change their mind like this? It’s quite clear to me, and it will be to everyone. How do you call what you just did Steve? There is various names for it, I’m sure you know them.
Of course, I will keep fighting this one and the next one, and the next one. You have the money, the power, and maybe we have a different sense of ethics you and I, but I still believe that hard work, good technology and ethics can win too.



PS: a message to our friends in Nigeria: it’s still time to do the right thing and make the right choice, you will get lots of support for it and excellent services!

I am quite happy to see the Mandriva challenge Microsoft, because it has gone through bankruptcy protection and have emerged a strong open source player.

November 06, 2007

Google's OpenSocial API

Google might have failed to get the piece of Facebook cake, but they are on a roll! They recently announced OpenSocial, a set of APIs for building social applications. In May Facebook launched Facebook Platform giving access to developers to create applications inside Facebook. After this many third party applications by Microsoft, Slide, iLike, Digg etc have come up. Google with its new API is set to make bigger bang in social networking.

Google’s OpenSocial provides a common set of APIs for social applications across multiple websites. Unlike Facebook, which keeps its applicati
on platform closed, Google has opened up its API to any network that is ready to participate. So, Google is aiming at an open platform so that application lifecycle (create, deploy and manage) is easy and developers don’t have to make a choice from many different APIs. And if Google get control of this on web, they will be in the center! They will have control of the network!

So, with OpenSocial developers will be using the standard JavaScript and HTML to create applications that will fit to social networks like Orkut, LinkedIn, MySpace. Google says :

The ultimate goal is for any social website to be able to implement the APIs and host 3rd party social applications

Looking into the APIs.. there are three set of APIs:
  1. 1.People Data API
  2. 2.Activities Data API
  3. 3.Persistence Data API

These three are Javascript APIs. To access these APIs we can go for use client-side JavaScript API or use server-side RESTful data APIs. Here is the list of thing that Google promises the API is capable of:

  • Build applications without maintaining your own server
  • Build applications that include a server-side component (for offline processing and/or access from other websites)
  • Create brand-new applications
  • Expose existing web applications in the context of existing social websites
  • Add social features to existing Google Gadgets
  • Write one application that can run in the context of many different social websites

One major advantage of the new API seems to be the usage of existing technology. Google is not introducing any markup language like facebook (FBML). So, developers will be able to use the raw HTML,CSS for formating and display. There will be three types of people involved in using the OpenSocial: Host, Developer and End-User. Host will be any site that will allow OpenSocial to run on.

What is not clear is who will regulate and administer the Advertisements on the applications. Will developers have a hand? or the host will administer? We will have to wait and see on this. It will be interesting to see how Facebook will take it. And further, how sites adopting the API will extend, use and administer.

Oh!, and to checkout some OpenSocial stuff, try this!

November 01, 2007

Hello World with Ext JS 1.x and Ext 2.0 JS

Ext JS doesn't require an introduction on my blog. I have already written about it and now I am into it. Ext JS 2.0 beta was out recently and looks really cool with lot of new widgets, layouts etc.. The 2.0 version is definitely going to be a big release. I tried out my old Ext JS test files with the new version and found it incompatible! Some of the basic widget like buttons didn’t render properly. So, what is the difference? How can we get it running? In this article we will go through the setup, tools and compare "Hello World" programs.

The Setup

Setup of Ext is very simple. All you have to do is download the zipped library and extract it on you system. You can put it in the web server directory so that the applications we write will be able to access it. This is how it looks like on my Eclipse or web server:

The red box is the ext folder and files. You can remove the doc and examples when you deploy on your web server. In the blue boxed folder ie, appjs I have my custom javascript files for the web application. Now even if you don’t use Eclipse, a setup like this is enough for you to start programming using Ext JS library.

Tools of trade

The best tool available is Eclipse with the Spket IDE plugin installed. The plugin is free for non-commercial purpose and support many libraries like Laszlo, Silverlight , YUI etc. The Spket site also has tutorials on how to configure the plugins and get you started.

Hello World on 1.x

Ok. Lets get started with programming… Here is the HTML for Hello World program:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="js/extjs/resources/css/ext-all.css">
<script type="text/javascript" src="js/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="js/extjs/ext-all-debug.js"></script>
<script type="text/javascript" src="js/appjs/index.js"></script>
<!-- A Localization Script File comes here -->
<script type="text/javascript">
<div id="button-div"></div> 
There is not much to explain if you know HTML, but for the first times in Ext JS: Note the standard Ext javascript files included. Remember you can use the ext-all.js instead of the ext-all-debug.js. Also notice we have our own javascript file named index.js which is included before the Ext.onReady method is called. Now let’s have a look at the index.js:
App = function() {

var button;
var buttonHandler = function(button, event) {
alert('Hello World!'); 

return {

init: function() {
button = new Ext.Button('button-div',{text:'Hello World',handler: buttonHandler});
Running this will give you a simple button on top of the web page titled "Hello World". On clicking it you get an alert box saying "Hello World" – That's All!

The Ext applications follow the module pattern described by Eric Miraglia. I will talk about this and Javascript OOP later. For now looking closely at the javascript you will see that when you instantiate a button you provide the DOM element and the object properties. In this case the DOM element is "button-div" and properties are text and handler function.

Hello World on 2.0

This code on Ext JS 2.0 is not going to work! You will get a button without any title and on clicking; you will not get the alert box too. In the latest version, we have lot of changes to the Ext that makes new version stand out among all other javascript libraries. If you do through the API documentation you will see new layout and widgets, changes in API etc. These changes in API cause the above mentioned problem. If you compare the constructor of Ext.Button class, you will notice that the latest version have only one parameter and that is the object configuration. You do not have to pass the DOM as in the case of old version. In Ext 2.0 you can specify the DOM in object configuration or you can make use of the applyToMarkup method. So our program will now look like:
App = function() {

var buttonObject;
var buttonHandler = function(button, event) {
alert('Hello World');
return {

init: function() {
buttonObject = new Ext.Button(
{text:'Hello World',handler:buttonHandler}); 

Instead of using the applyToMarkup method apply the DOM element you can instantiate the button as :
buttonObject=new Ext.Button({applyTo:'button-div',text:'Hello World',handler:buttonHandler});
Wrap up
Wrapping up .. I will post more on the Ext in coming days demonstrating different widgets and techniques as I study them.