Monday, September 8, 2008

Contest to review technologies... hmm

I came across this piece of news a few days ago

Welcome, Students!
Review Sun products, and you may win cool prizes...Contest Details

Use MySQL database and GlassFish application server to develop a web application and write a review for...
A chance to win a grand prize of $500 in Visa debit card, and
Five chances to win a prize of $250 in Visa debit card

1. Download MySQL 5.1 Community Edition and GlassFish v2 Update Release 2 (UR2).
2. Develop a cool web application using the combination.
3. Create a project of your application at
4. Write a review of these products and post it in your blog.
5. Submit your project's URL and your review's URL.
6. Do it before October 22, 2008.

You can read the complete thing here. It sounds like a worthy project, though I guess projects that demonstrate and test the more elaborate features will be given more weightage. As they should be, I'd think, writing a review that tests basic JSP code would not really amount to much. The best part is that the competition only requires these two technologies as the qualifying criteria. Any other technology might be used in combination. This is a more open-ended approach than competitions that other companies organize. You can program in Java, PHP, Python or Ruby. With PHP in the mix, I'm sure the playing field would expand. And with Netbeans 6.5 beta offering PHP support, I'm sure Sun wouldn't some reviews. Oops, I veered off a little there... you do not HAVE to use Netbeans.

There are actually two compeitions, one for all students, and there is a seperate category for Sun Campus Ambassdors such as myself. Well, you don't have to tell me twice. But I'm still unclear of what technology to make the center-piece. I'm mid-way through learning jMaki (an AJAX framework) and the Metro WebServices Stack. But I'm also interested in SailFin and Semantic Web technologies. Well, I'll try a few of these out and then decide... Watch this space.

Friday, September 5, 2008

First encounter with Web Services on Java

In case you do not know what a web-service is, do head on down to the wikipedia page in order to get an idea of what they are. If I had to sum it up in one line I'd probably say it is "executing functions over the Internet, instead of fetching pages". Of course, that might be an over-simplification, but it if it gets you to read about it in detail on wikipedia, it serves my purpose :)

Some of you might be wondering what's so great about "executing functions over the Internet", that's what remote procedure calls are for. CORBA, RMI or DCOM do pretty much the same thing. Of course, if you read the complete page, you wouldn't ask that. It has advantages: it uses XML, (and in my opinion, when something which is already a vital asset begins to use XML, you'll have plenty of people supporting it in no time), it allows for loose coupling (SOA), and more...

The reason I put in the "and more..." is that Web Services are an industry-standard and has a lot of jargon. I discovered that this jargon and the complex standards can make this area almost intractable. I'd once tried my hand at a project that used Web Services in Python. The support at that time was iffy too, and the entire project was lost in an irretrievable maze of words I still had no idea about at the time I decided to scrap the entire thing.

About three years later, and I had to use Web Services for another project. There's a saying in hindi that'd summarize my views on doing that "doodh ka jala chaach bhi phoonk phoonk ke peeta hai" :D . It just means that I'd really want to test the waters before I went ahead. This time, I discovered, I had tools at hand to help me through the maze. In particular, Glassfish and Netbeans. I learned about it in a presentation given by Mr. Arun Gupta, and you can get some screencasts that should be just as good here or on his blog. Well, what a relief it was to use these facilities, as I never had to deal with the bare-bones of SOAP or WS-Security or WS-Transaction or WS-Policy. These were the very same words that'd I'd fumbled around with and tried to create right from the specifications on the W3C site all that time ago. Can't stress if enough: What a relief!

How do they do it? Well, Sun has created an entire stack of web services. It is called Metro, and starts with JAX-WS (Java API for XML WebServices) and then builds in all the other stuff I mentioned on top of it. You can have a look at the entire feature-matrix. And yes, inter-operability means that the code works with .net, whether client-side or server-side. It's called Web Services Interoperability Technologies (WSIT). If you want to know more, check out the project's site here

Now for the tools. Glassfish includes the reference implementations for all of this stuff, and if thus reliable. Not to mention, it Metro comes bundled with Glassfish, so minimal download and installation hassles. Next comes Netbeans, which allows you to just drag-and-drop your web-services. Client-side, server-side, it's all taken care of. Of course, I had Glassfish with Netbeans, and minimal hassles.

All in all, I can go right to developing using these tools after reading around, and watching the screencasts, in the maximum of a day. Pretty nifty, I you ask me.

Wednesday, August 27, 2008

First job, first task

Hey everyone

I'm really lazy about writing anything, (that includes coding, strangely enough) and generally want to avoid such hardship. Anyways, today I'm going to talk about this program I am a part of, called "Sun Campus Ambassador". As might be apparent from the name itself, my task is to a technology evangelist for Sun Microsystems on my campus, Delhi University. Since most of Sun's products are open-source, it'd be appropriate to post about those here. And yes, I am succeeding the immensely talented and helpful Agraj Mangal on this job. You can have a look at his blog here.

Sun is the largest corporate contributor to the Open Source movement with reference to the number of lines of code contributed. I think that's the most obvious criteria, since measuring man-hours contributed would be non-trivial. If memory serves me right, IBM also claimed the same in a session I attended but what there criteria is, I am unaware.

One of the tasks I have to do as a Campus Ambassador is to deliver talks in my department on topics related to open-source software and/or Sun. In order to start off, I chose the easiest topic I could think of, "Open Source : How we already use it". (Remember how I can be lazy even about writing code? Well, I can get away with it because of Open Source Software obviously) The reason I chose this topic is that the target audience consisted of first years, all of whom did not know what open-source software is. Also, the "How we already use it" part would help me demonstrate the use of open-source software that is already taking place. I also tried to build in basics like what is a database, how the Internet works. In very simple terms ,of course.

I started off taking Orkut as an example. I know, I know, it's written in ASPX. No marks for pointing that out. But it fit the bill perfectly. Indian Internet users log on to social networking sites extensively. I could talk about databases (think personal info), servers and stuff in an obvious and intuitive manner. Also, Google has open-sourced a part of Orkut, and it was the first to do so. And if that is not enough, just think of how people forgive the "sins" of Apple and Google just because of the fantastic user experience they provide, and use that as an excuse here :D

I also tried to tie in how things are done at our department with all of this. We use Java and C++ as the primary programming languages, and both GCC and Java are of course Open Source. Then come the projects and assignments which usually involve stuff like MySQL, JSP, Tomcat, Glassfish, and Netbeans. A couple of projects also had Solaris, and J2ME. All in all, I didn't have to work hard on that part.

I also introduced the Java User Group for Delhi University and the Sun Club for the same. The Sun club was initiated by me, and isn't that active yet, but I'm sure it'll grow with time. I also tried to get a democratic approach to the sessions, but I'll blog about that some other time. (Effect from reading the book Maverick! during that time). Well, the first result of that was that my next session changed from Netbeans to an OpenSolaris session.

Well, there were pens distributed, and some refreshments were served. And yeah, the refreshments got late, so I talked about the Sun Academic Initiative and Certification impromptu. :D I had an audience of around 100. According to what I gathered, they were with me for the most part. Except maybe the institute projects part. Well, many of them were first years, so can't blame them.

Some points to improve upon:
It was pretty short. I generally tend to speak only 60% of what I intend to when I prepare for a presentation.
My speech can do without the “aaaahh”s I tend to use as for when I'm thinking of a word... Well, I'm not that good yet...
The impromptu part could've come without Agraj prompting me :D
I should've presented the various business methods behind Open Source Software

Overall it went well enough.

Saturday, August 9, 2008

RSS and blogs

The second post took a while in coming. But I'm still finding my feet here, so bear with me.

I told a few friends about this blog, and told them to subscribe to the same on their RSS feed. Some of them asked me what that was... that's fair enough, it's what I'm here for. And I'll try to explain it. (RSS, btw, also refers to the Rashtriya Swayemasevak Sangh, a Hindu religious organization. I'm not talking about that, just in case. It's membership is upwards of 2 million... always surprised by that figure)

The idea is very simple. Subscribing to a newspaper used to give you access to information in the good old days. But that information came from only one source. TV channels then let you get information from a number of sources, at little increase in cost. But a lot of information was something you didn't want. (Who here loves Aaj Tak?) The Internet, of course, turned that on it's head. Now, you could choose the news you wanted to see. The trouble with that is, case you are reading your news from a news website, or a blog, you'd have to visit the page, and then find out the "new" news. Of course, you could use services that brought these news together at one place. But that's just a newspaper, isn't it :D Enter, RSS. What RSS does is, you tell an 'RSS reader' what news you want and from what source. Then, it'll bring those news down to you any time you want. So all of your news, at one place. And mind you, it'll mark out the latest news... just to save you the effort.

I'm still new to this, so, in case I've messed up my explanation, you can search on youtube for what are RSS feeds

Now, there are several ways to use these news. And, they're very easy to use. There's your web browser, for firefox, Internet Explorer 7 , and opera. There's rss readers available online, like Google Reader. It's built like gmail, so you should not have much trouble using it if you've used e-mail :D . 

The last part, of course, is how to use it. I told my friends to RSS my blog because I know they might be too lazy to check my blog regularly. As a blogger, the more people have your blog address on RSS, the better. Then we come to the technical side. An RSS feed is essentially XML in an agreed-upon format. XML lets you store your data in a human-readable format, that can be read by any machine. Those more technically minded would realize that that “any” is very important here. So, an RSS feed is just a standard that can be used to describe any new published news. Since it is standard, people the world over can write programs that use it. So do I, in fact. For PHP, I've used Magpie, and currently I'm using JSP, and Sun Microsystems has it's own tag library for that.

That should be enough to get you started on RSS.

Saturday, August 2, 2008

First Post

Hello all-comers,

Ahem, after years of dodging the bullet, I'm going to start a blog after all. Let me start by an introduction. I am Aadhar Mittal from Delhi, India. Currently a post-graduate student in Computer Science. Let's see if the blog lasts long enough for me to have to revise that...

Starting this, I can't help but think back to the time when fiction and poetry used to be my all-consuming passion... Of course, this was in the days before blogs came into the picture. Now, however, my inclinations are towards technology. Actually, even my feelings on technology are conflicted. Let me put it this way, I'd much rather sing by myself, and annoy everyone around me, rather than buy an iPod. The reason I'm interested in technology is that it allows me to be creative, so if I have something I want to create, I learn the details behind it, otherwise I don't bother.

Anyways, this blog will be about Java and open-source. I'm currently dabbling into a ton of diverse stuff on this front, you'll come to know of them in time. 

Later then