SUN CA : University of Delhi Agraj's Weblog

Saturday Mar 22, 2008

To all my friends, who are web developers and frequently have problems debugging their code, I would strongly recommend using Firebug Debugger.
It is an amazing tool that integrates well with Firefox and is capable of editing, debugging and monitoring Javascript, CSS, HTML, DOM API, and AJAX. Some of its widely used features:

  • Logging for web pages - get rid of alert boxes
  • JavaScript Debugging
  • Ajax Request Spy - can log all Ajax request and response messages
  • Live Editing - let you edit some parts of DOM

 So what are you waiting for. Get Firebug Now!!

An excellent tutorial about Debugging JavaScript with Firebug can be found here.

I do not understand why Gmail shows up this ugly warning when using Firebug with it:

 Gmail says Firebug makes it slow !!

May be because Gmail makes excessive use of technologies like Ajax and JavaScript and if Firebug is actively trapping all Ajax request-response traffic, then it might just eat up a substantial portion of your RAM after being active for a longer time.
 

Friday Mar 21, 2008

Had problems multiplying large numbers ??

Have a look at the following video to see how easy it is :)

Limitations : Using the above method you can only multiply numbers with equal number of digits in them.

Enjoy playing with numbers. Have fun. :)
Do let me know if you find it useful.

Saturday Mar 15, 2008

Oh yeah, jMaki "rules" at DUCS (Delhi University Computer Science Deparment) :)

It was very much expected, especially after the last talk i gave. It was on Building Ajax applications with NetBeans 6.0 .
In that demo, i talked in brief about various jMaki (not jMonkey) :) toolkits and that really took students by surprise.
They were left impressed to see the ease by which one can create good looking web pages.

Although all widgets are pretty good and come handy for various requirements but some of my personal favorites
which i plan to use in building my website(as a part of my semester project) are:
--> jMaki Dojo
       <> Accordion (for leftsidebar)
       <> Drop Down Date Picker
       <> Fish Eye (really cool one)
       <> Tabbed View (this one u gotta see) -- much like orkut tabbed profile browsing
       <> Tree (for making sitemaps)
--> jMaki Google
       <> Map
--> jMaki Yahoo
       <> Menu
       <> Tooltip
       <> Slider

After using these basic widgets, one might want to divulge into details, and make your widget and hence your
application more useful by binding the widgets with the back-end database.
To do so, the ideal place to start with is to see the following entry:
Dynamic data in jMaki Widgets
A big thanks to Arun Gupta for making the task look so simple.

Other such entries:
Dynamic Ajax Table Example using jMaki and JPA on Glassfish
CRUD using jMaki & JPA

I'm still hunting more tutorials on using jMaki toolkits.
The one i always look back is located at JavaPassion.Com

Other than that, i would recommend students to post queries on various online forums that exists to help you out:
-- java.net forum - Project jMaki
-- java.net forum - Project Glassfish

Also have a look at Ajax FAQ's for more information on Ajax.

Please drop me a comment if you have some useful links.

         

Tuesday Mar 11, 2008

Folks, i present to you a poem written by one of my professors for me :)
It goes like ---


Under the SUN-MICROSYS SunRay
Has bloomed a Lovely Rose,
Over Joyful in Java & Solaris
He is SUN CAMPUS AMBASSADOR Agraj.
Only one request I want to make
to the SUN's shining flower,
To remain in serene silence
During my lecture hour

                Quoted by Dr. P.K Hazra

Felt like sharing it with you.

Friday Mar 07, 2008

So finally we had a demo on Building AJAX Applications with NetBeans 6.0 today with few teachers
and a reasonable amount of students attending the tech talk. It lasted for 75 minutes.
The talk started with a brief introduction of NetBeans and its various features.

It followed with an introduction to AJAX, its usage and comparison against the conventional web applications.
Then i showed them a small yet useful Ajax demo and talked in detail about its anatomy describing
how the asynchronous communication is taking place.

The technologies that are used in AJAX are
--> JavaScript
--> DOM API (Document Object Model - Application Programmable Interface)
--> CSS (Cascading Style Sheets)
--> XMLHttpRequest Object.

A very good tutorial on the same can be found on http://www.javapassion.com/ajaxcodecamp
Hats off to Sang Shin for maintaining and making such a friendly and resourceful website.
Its a boon for students and developers alike.

Coming back to the talk, I also showed to the students various jMaki toolkits and widgets that facilitate easy
drag and drop development of web applications by showing them the jMaki Dojo Toolkit esp.
<> The Tabbed View,
<> The Fish Eye,
<> The Accordion,
<> The Dojo Clock,
<> The Dojo Tree and some more widgets.


                     --- Making my point across ---

The students were left impressed and asking for more. :)
The session was overall interactive with students participating and i also distributed
Sun's Caps, Mugs and Pens to the curious, willing and interactive students.

               All Smiles after the talk was over !!

The presentation can be found on Java User Group Of Delhi University

Thursday Mar 06, 2008

This article can prove useful for novices (like me) who do not have much experience working with Solaris
or for that matter with any flavour of Linux.

If you have two or more Operating Systems installed in your machine, then you must have seen a blue screen
asking you for your choice of operating system to boot into. That is, the GRUB bootloader for you.

To change the default booting Operating System or to edit the Timeout interval (the time for which the screen appears),
one must edit the grub.conf file or menu.lst file

The steps are :

1. Locate the required file in your machine.
Normally it is located in /etc/grub.conf or /boot/grub/grub.conf
With Solaris 10, it is present in /boot/grub/menu.lst (menu.lst is an alias for grub.conf)

2. Following represent some selected information from menu.lst:

#pragma ident "@(#)menu.lst 1.2 07/01/10 SMI"
#
# default menu entry to boot
default 0
#
# menu timeout in second before default OS is booted
# set to -1 to wait for user input
timeout 10

#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Solaris Express Community Edition snv_76 X86
kernel$ /platform/i86pc/kernel/$ISADIR/unix
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Solaris xVM
kernel$ /boot/$ISADIR/xen.gz
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Solaris failsafe
kernel /boot/platform/i86pc/kernel/unix -s
module /boot/x86.miniroot-safe
#---------------------END BOOTADM--------------------

title Windows
rootnoverify (hd0,0)
chainloader +1

3. We will now change the default booting Operating system, its name and the timeout interval

To change the name of the OS, the 4th entry (with title) must be changed as follows:
"title Windows" is changed to "title Windows Vista" or anything of your choice

To double the timeout interval,
"timeout 10" is changed to "timeout 20" which means the blue screen will appear for 20 seconds now.

To change the default booting Operating system, change
"default 0" to "default x" where x is the position of the OS entry in menu.lst
for example to boot into Windows,
change "default 0" to "default 3"

4. Save the changes and bingo !! You are done.

5. Reboot to check that it has been done correctly.

Note 1 : Please do not edit any part of menu.lst file, which you do not know about, as it might
result in some unexpected behaviour.

Note 2 : Comments can be given in menu.lst by starting the line with # symbol

Note 3 : There is enough help given in the menu.lst file, just read the comments carefully and you will never fail.

Note 4 : Full tutorial on grub can be found on http://www.dedoimedo.com/computers/grub.html

Disclaimer : If you find anything wrong or missing, please leave a comment. Thanks.

Tuesday Mar 04, 2008

So here comes time for another Tech-Talk.
This time on Building AJAX Applications with Netbeans 6.0.1

Taking care of the fact that AJAX is something new for all the students,
the demo will start from the very basics. :)

The talk is scheduled on 7th March, 2008 in the Seminar Room,
Department of Computer Science, University of Delhi at 1500 hours.

For any queries, please mail me on Agraj.Mangal@Sun.Com