October 27, 2007

Java is #1 Programming language

The first time I heard about Ruby was when one of my friend gave a seminar on it. That was way back in 2004. Later "Ruby on Rails" caught on. We have seen PHP's popularity increase. At the same time C# and ASP have emerged much stronger from the Microsoft. And Ajax technology pushing the Web 2.0 jargon to extrme limits. We now have a debate if it will evolve to Enterprise technology or not. There has been big words about Java missing the RIA (Rich Internet Application) wagon. Lets see, which language has fared in the market?

The TIOBE Programming Community mantains a programming language popularity index and its updated on a monthly basis. Its based on a combination of factor like availability of skilled engineers, courses and third party vendors. They have also make use of the search engines to calcuate the popularity. Here is the list taken from the TIOBE site :
  1. Java
  2. C
  3. Visual basic
  4. C++
  5. PHP
  6. Perl
  7. C#
  8. Python
  9. Javascript
  10. Ruby

Java topping the list is not a surprise, but it shows how popular and demanding Java is in the market compared to others. Interesting part is to see PHP and Ruby down at 5th and 10th position. Ruby has started to loose share to PHP for sure, but PHP has two rival's Java and C#. I am sure C# in the form of ASP.Net will catch on soon. I would say new developers should look at one server side technology and work on the design (CSS,Javascript,Ajax,Flex,Flash etc) as well. Its hard to get an expert on both side.

You can get the complete list of language populaity here. But remember that this list doesn't show the best language. Instead it shows what is popular. Many of my friends ask ask which language is study.. I would say, learn on core technology Java or .Net. But never stop there. You need know a combination to be known as the best!

October 07, 2007

Improved modularity in Java 7

Java 7 has been evolving @ at jdk7.dev.java.net for some time now. I decided to peep in and have a look at the features of what the next generation JDK has to offer. One of the eye catching features is the enhancement of modularity feature in JDK7. Technically we can call it: "JSR 294", but for now let’s have a look at it.

The JSR 294 calls for language extensions in support of information hiding and separate compilation. Along with this we also have JSR 277 which calls for a new form of distribution format or say new "jarring" technology. According to D.L. Parnas information hiding is :

Each module is characterized by its knowledge of a design decision which hides from all others. Its interface is chosen to reveal as little as possible about its inner workings.


So, Information hiding is powerful and should be enabled by the language itself. Java already has packages for information hiding. What is wrong with this? What are its limitations? For this we have the new "super package" or JSR 294!

Java packages supports information hiding, prevents name conflicts and they can be hierarchical. But projects are not confined to just one simple package. Thus public in a package become too "public"! Well what does that mean? Let’s have a look... In the current scenario, we can have a package P and another P.Q. Now when we import P.* to a client, we are able to access the entire P package’s hierarchy. What if we want to restrict P.Q package? So the goal of new language construct is to have an entity bigger than the package, provide a runtime access control, interfaces for packages and a new basis for deployment modules.



Thus, superpackage is defined as: A superpackage is a named collection of one or more packages or superpackages and their types. For example:

superpackage example.sample.lib {

// member packages
member package example.sample.lib;

// member superpackages
member superpackage example.sample.lib.network, example.sample.lib.parser;

// list of exported types
export example.sample.lib.SampleClass;

export superpackage example.sample.lib.network;

}

By using the superpackage feature we can limit the access to certain package part. We can depict it like this:



So, how are we going to work? What changes and do we implement this superpackage? To implement we will have another java file say, super-package.java. This file will declare which type belongs to the superpackage. The normal java class file will not have information on which superpackage it belongs to. On compiling the superpackage declaration file, we get a with .spkg extension which will contain declarations about the superpackage. At the run-time, accessibility inside the superpackage remains the same as today. Outside the superpackage, the JVM consults the .spkg file to determine accessibility. Other features of superpackage are nested superpackage and interfaces.

Conclusion:

Superpackages are an effective mechanism for information hiding in the Java programming language. It will work fine with the existing deployment mechanisms like JAR, WAR and EAR. But watch out for the JSR 277 (Java Module System).

October 01, 2007

GNOME's Online Desktop

Google, Yahoo! and Facebook... Virtual OSes like eyeOS,Virtual OS, YouOS, and countless other organizations are changing the software we use by shifting applications from Desktop Operating system to the web. Microsoft will integrate their Windows Desktop and Live service for sure(but I can't see it in near future ). Open source is all set and have released Online Desktop to integrate with anything and everything users want to use.

Virtual OS or Web desktops are not enough! That's where products like iGoogle come into picture. But iGoogle is still not complete, you need Google gadgets to integrate the net on your desktop. GNOME's solution to interating Web and Desktop is what we call : Online Desktop! The Open source team doesn't take Online Desktop as another web-based desktop or "webtop". Instead they define it as:

We are trying to create the ideal experience outside your browser. The fact is, you need hardware drivers, and the browser itself can't be web-based. The computing environment of the future won't be "turtles all the way down." But neither does it need a bunch of complexity designed for a pre-web world.


The idea is to keep all the information online. People will use a live CD or "Linux on thumb" to just boot and connect to the web. The main catch in Online Desktop's pilosophy is:

Because our desktop is open source, it will work with all the best-in-category web sites and services that you use, no matter who owns them.


You can access the GNOME Online Desktop through http://online.gnome.org/. The registration is very simple with a invitation. Once registered, you get a interface like social networking where you can aggregate feeds, share links, rate and comment on anything shared on Mugshot. Mugshot (Online Desktop) also have downloadable gadgets for both windows and linux. For linux, they presently have Fedora 6 and 7. It also supports latest Ubuntu or you can download the source and build your binary.

For me, the Online Desktop doesn't seem to be much of a new inovation. But for a open source community its a new start. We will have something like iGoogle,Orkut, etc.... in one box!