Wednesday, October 22, 2008

Send Free SMS and mCards in India

Want to send an SMS for free in India ? Login to

There are hundreds of websites available on internet claiming that you can send sms for free in the India, but actually when you try those applications nothing happens and you never get the expected sms.

I was in desperate need of a website which allows me a clean and clear way of sending free SMS to my friends.

Now i have a website which allows hassle free way of sending free sms and to my surprise it delivers sms immediately. I love this service and now am a regular user. I love mdakia.

You need to sign up with mdakia and then you can enjoy the world of free SMS. Once you register, you get 20 credits and to my surprise credits increase every time i login to the site and send SMS. Really cool and it rocks :) .

mdakia also allows users to send customized mCards to phone users who have GPRS enabled handsets. This is a wonderful service and the GUI looks awesome.

One can send cards different cards for different occasions. I love this feature.

I am enjoying this service and it works gr8.. sing up and have fun with

Devang Paliwal

Saturday, October 18, 2008

Don't get tense when youtube says : Hello, you either have JavaScript turned off or an old version of Adobe's Flash Player. Get the latest Flash playe

I got this message when i tried playinga video on youtube ....

"Hello, you either have JavaScript turned off or an old version of Adobe's Flash Player. Get the latest Flash player."

It is actually a problem at YouTube. They have issued the following statement:

"Wednesday, October 24, 2007
UPDATE: JavaScript turned off or an old version of Macromedia's Flash Player.

ERROR: "Hello, you either have JavaScript turned off or an old version of Macromedia's Flash Player. Get the latest Flash player."

Users with ad-blocking software enabled may not be able to see videos due to a conflict with our flash detection code and may see this error. Our engineers are still working on resolving this issue but it is expected to be fixed soon. If you are unable to see any videos because of this issue, you may want to try temporarily disabling ad-blocking in your browser or security software. Thanks for your patience."

Thanks to yahoo answers

Thursday, October 16, 2008

Typical Software Engineer

Features by which a Software Engineer can be identified:

He/She never bargains... No wonder things have become so costly!

When a cab/bus passes by and you see all the commuters in it are sleeping like they haven't slept for years...

Dilbert or Calvin is their favorite cartoon...

Words like issues, tracker, raising requests, buzz/ping, compile, delete [unlike erase or rub it off], onsite [n not abroad is what 'foreignland' is called] are the ones that would be used by 'default'...

Weekends are holy words... they are like a salvation one seeks for...

"Wazzzup", "Hows life?", are few obvious questions one will be greeted with which would be immediately followed by "how's work?"

Salaries, work etc are always better or in good shape in other companies than the one he/she is currently in...

They don't send or take things... they always forward them!

Drinking coffee is the most pleasurable thing they think they do inthe entire day...

They seek a search engine in just almost everything they do... When I forget where I have kept my things at home the first thing that comes to my mind is "I wish there was a Google search for my room"

Mondays are always blue...

All of them will have a dream to do something in life and that something would never be what they are doing right now...


Wednesday, October 15, 2008

India - Online Grievance Forum

Government of India has an online Grievance forum.

Can you imagine this is happening in INDIA ?

The govt. wants people to use this tool to highlight the problems they faced while dealing with Government officials or departments like Passport Office, Electricity board, BSNL/MTNL, Railways etc.

So use this grievance forum and educate others who don't know about this facility. This way we can at least raise our concerns instead of just talking about the ' System ' in India.

Invite your friends to contribute for many such happenings.


Devang Paliwal

SUN - Gift from god

The Sun is the star at the center of the Solar System. The Earth and other matter (including other planets, asteroids, meteoroids, comets, and dust) orbit the Sun,[9] which by itself accounts for about 99.8% of the Solar System's mass. Energy from the Sun, in the form of sunlight, supports almost all life on Earth via photosynthesis, and drives the Earth's climate and weather. (Wikipedia)

I recently saw some beautiful pictures of SUN and thought to share it with you all.

For more beautiful pictures go to My SUN. Enjoy this gift of God :)

Monday, October 6, 2008

SRK is back!! Rab ne bana di jodi :)

Aditya Chopra and SRK are back to create history once again after DDLJ and mohabettien.
Got the first feel of this would be blockbuster movie ......

I can't wait to see this movie. Thanks to Glamsham for this wonderful first look.

Sunday, October 5, 2008

Yahoo, Gmail, Orkut, LinkedIn, rediff ----Address Book importer

Lot of people and companies are looking for this common feature which is desired for almost every site. I also required such a feature for one on my assignments. Now there are lot of products available in the market which gives you this functionality. Example Improsys . This company offers importing contacts from all streams for 240$.

But i know we always search for free things on net and for this we can use contactgrabber . This project allows one to import contacts from yahoo,gmail,orkut,rediff etc etc.
It is damn easy to integrate this with any website.

I studies the code and found out that this is built on PHP CURL library. I think once anyone master CURL he/she can get anything from internet. He can use the internet as information mine.

So guys PHP CURL is the key. Till the time you learn CURL enjoy this open source project

PHP -- Supress Warnings

Yesterday i was working on PHP's file handling functions. Due to default permissions i was getting default warnings generated by PHP Engine. I decided to suppress the warning messages. Found out a very simple solution for this problem.

Just need to put a @ before calling file handling functions.

$handle = @ fwrite("abc.txt", "w");

After this warning messages were not rendered on the screen.

Thursday, October 2, 2008

JIBX -- Step by Step Tutorial

To install JiBX, just download the distribution zip file and unpack it. This will create a jibx directory that contains the distribution files, including a complete copy of this documentation. 

I installed it in C:\JIBX

Create a directory example23 in C:\jibx\tutorial\

Create a file with following contents:

package example23;

public class Customer {
    public Person person;
    public String street;
    public String city;
    public String state;
    public Integer zip;
    public String phone;

Create a file with following contents:

package example23;

public class Person {
    public int customerNumber;
    public String firstName;
    public String lastName;

Create a file binding.xml with following contents:

Go to C:\jibx\tutorial from cmd prompt and execute following command:
javac example23/*.java

Now execute 
java -jar C:\jibx\lib\jibx-bind.jar example23\binding.xml

Now go to example23 directory and create wih contents

package example23;

import org.jibx.runtime.BindingDirectory;
import org.jibx.runtime.IBindingFactory;
import org.jibx.runtime.IMarshallingContext;
import org.jibx.runtime.IUnmarshallingContext;
import org.jibx.runtime.JiBXException;

public class CustomerManager {
public CustomerManager()
try {
IBindingFactory bfact = BindingDirectory.getFactory(Customer.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
Object obj = uctx.unmarshalDocument
   (new FileInputStream("C:/jibx/tutorial/example23/customer.xml"), null);
Customer customer = (Customer)obj;
System.out.print(customer.street+", ";
IMarshallingContext mctx = bfact.createMarshallingContext();
   mctx.marshalDocument(obj, "UTF-8", null,
       new FileOutputStream("C:/jibx/tutorial/example23/customer2.xml"));
} catch (FileNotFoundException e) {
} catch (JiBXException e) { 
public static void main(String[] args) {
new CustomerManager();


Create a customer.xml file with following contents:

Now execute and see JIBX in action :) 

Thanks note to techBlog.

But the process was not clear so i wrote this blog with things crystal clear.

Tuesday, September 23, 2008

Save your Eyes

Simple steps to save your eyes ----

Eat better

Have a vitamin-rich diet which includes citrus fruits, green leafy veggies, tomatoes, spinach, poultry and dairy products.

Drink water
Drink plenty of water. It helps reduce puffiness.

Tea bags
Place two refrigerated tea bags on your eyes for a few minutes as you relax. This soothes your eyes and also reduces puffiness.

Take a walk
After lunch, go out for a stroll to expose your eyes to fresh air.

Splash water
Close your eyes and splash water on your face to relax your eyes.

Use your palms
Sit upright, rub your palms against each other and lightly cup your eyes for 60 seconds. The warmth thus generated helps soothe your tired eyes.

Shift Focus
Try and look at distant objects every now and then. This exercise helps reduce strain and lets you focus better.

Exercise your eyes.
Begin with blinking your eyes several times. Then, close your eyes and roll your eyeballs both clockwise and anticlockwise. Slowly exhale and open your eyes. You’ll find them totally relaxed.

Wednesday, September 17, 2008

Pramati: The technical juggernaut

Hi folks, i feel proud that i was a part of the tech juggernaut ie Pramati for 2 years.

Pramati has the reputation of having best java/j2ee guys in the industry.

 Pramati guys are really smart people and all have one thing in common ..that is hunger for technology and learning new stuff.

I was a member of pramati from nov 2006 to sept 2008.

I loved the time which i spent with pramati. It satisfied my tech hunger, gave me oppourtunities and provided the right platform needed to make an impact.

It was an amazing journey and i know that at some point in life, i will return back to pramati to contribute and take pramati to greater heights.

Devang Paliwal

Monday, September 15, 2008

Whacky thought : Googlized World

Yesterday night i was watching my favorite television show and while watching it my mind started thinking about how the concept of globalization has changed the world.

I was amazed about how business has crossed the man made boundaries and spread over the entire world. I imagined business as a blue sky which has covered the entire world.

While going through this my ind juggled the words ...Globalized and coined the term Googlized world. And suddenly blood started gushing through my veins more rapidly.

Think about this : Every FMCG ie Fast moving consumer goods which you consume, every other commodity which you buy/use in day to day life for example tooth brush, news paper, toilet paper .... If all of them comes from GOOGLE then it will be called googlized world.

Imagine one day in that world.

Here is a normal person's day in that world.

Morning: Wake up , brush ur teeth with Google brush and paste, after that drink google tea in google mugs, then take a shower in googlebaths. Get ready to go to google office.

Afternoon: work on google projects, then have lunch in googleplex, drink tea and leave office at 5:00.

Evening: Take a google cab and come back to home (built by google constructions). Watch Google TV, play with his/her kids.

Night: Have dinner using google grossery and then sleep on google beds and use google blankets, google AC, google Pillows.

This will be a typical day in one's life.

This can become a reality if google starts venturing in fields other that what it is doing right now.
If it becomes reality then days will not be far ahead when we will se something like the picture below .....

Guys be prepared to enjoy the google world soon ....... I can see this coming.

What are your thought on this ???

Tuesday, September 9, 2008

A whacky marketing thought !!

I was thinking about how aggresive advertisers have become and while thinking about this, a random thought came to  my mind. 

Companies like Peter England, Reliance, TATA etc wants to have their brand/banner everywhere. They want their product to reach public and be in public minds for long.

So here is my whacky thought on this.

A day can come when all the stray animals like dogs , cows etc will be having company's banner on them.

Companies will apply in municipality for control over animals of a particular area. Think how funny and it will be. For example, a dog of your locality moving with a Tata Indicom banner or a Google banner. People will call them the GOOGLE dog or TATA dog :) .

It can lead to a scene like this ----> 

People will apply for ads to some company to give them ads to post on their Pet. This can lead to something like google adwords and it can be called animal adworld. 

So guys/girls be ready for seeing such thing happen in reality because nothing is impossible.
Guys be ready for the revolution :) 


Sunday, September 7, 2008

Chase Your Dream

Dreams ?? Nobody can put a limit on what one can do in his/her dreams. In my view dream is way by which you see future which can become reality. Dream is a window through which an individual is able to capture his desires without efforts.

Making dreams come true depends on individual and whether he has four 'C' in himself.

Somehow I can’t believe there are any heights that can’t be scaled by a man who knows the secret of making dreams come true,” Disney said. “This special secret, it seems to me, can be summarized in four C’s. They are Curiosity, Confidence, Courage, and Constancy and the greatest of these is Confidence.

Dream big , but four 'C' which are within you and see how things change. How things start following you..... 

Four 'C' = Curiosity, Confidence, Courage, and Constancy.
In my view 
Success = Dreams + four 'C''s

So go ahead and chase your dreams with the power of four C's.

Thursday, September 4, 2008

First sight love : Google chrome

4:30 pm: Downloaded chrome

4:40 pm: Installed it.

4:42 pm: Fell in love.

It is awesome. Chrome downloads pages with a speed unimaginable/never encountered before.
It changed the whole browsing experience in 2 minutes. Now i can browse more pages in less time.
This is a must have software for every desktop.

I am njoying my chrome. Are you doing the same ???

Thursday, August 21, 2008

Tomato Story

A Jobless man applied for the position of 'office boy' at Microsoft.
The HR manager interviewed him then watched him cleaning the floor as
a test.

'You are employed' he said. Give me your e-mail address and I'll send
you the application to fill in, as well as date when you may start.

The man replied 'But I don't have a computer, neither an email'.

'I'm sorry', said the HR manager. If you don't have an email, that
means you do not exist. And who doesn't exist, cannot have the job.'

The man left with no hope at all. He didn't know what to do, with only
$10 in his pocket. He then decided to go to the supermarket and buy a
10Kg tomato crate.
He then sold the tomatoes in a door to door round. In less than two hours,
he succeeded to double his capital. He repeated the operation three times,
and returned home with $60.

The man realized that he can survive by this way, and started to go
everyday earlier, and return late. Thus, his money doubled or tripled

Shortly, he bought a cart, then a truck, and then he had his own fleet
of delivery vehicles.

5 years later, the man is one of the biggest food retailers in the US ...
He started to plan his family's future, and decided to have a life insurance.

He called an insurance broker, and chose a protection plan.
When the conversation was concluded the broker asked him his email.
The man replied,'I don't have an email.'
The broker answered curiously, 'You don't have an email, and yet have
succeeded to build an empire. Can you imagine what you could have been
if you had an e mail?!!' The man thought for a while and replied,
'Yes, I'd be an office boy at Microsoft!'

Moral of the story

Moral 1
Internet is not the solution to your life.

Moral 2
If you don't have Internet, and work hard, you can be a millionaire.

Moral 3
If you received this message by email,
you are closer to being a office boy/girl,than a millionaire..........

Sunday, August 10, 2008

INDIA gets GOLD !! :)

India's Abhinav Bindra won a gold in men's 10-metre Air Rifle event in Beijing. Bindra shot 104.5 to take his total to 700.5 in the final. This is India's first ever Olympic gold in any individual event and ninth in total.

In ten rounds, Bindra shot 10.7, 10.3, 10.4, 10.5, 10.5, 10.5, 10.6, 10.0, 10.2, 10.8 to clinch the first berth. China's Qinan Zhu won silver while Finland's Henri Hakkinen won bronze.

Bindra had shot a total of 596 out of 600, shooting a perfect 100 in 3 of the 6 rounds of the qualifiers. Bindra finished 4th to qualify 2 points behind Henri Hakkinen of Finland.

Wednesday, August 6, 2008

Check out myPicks Beijing 2008

There is an interesting game on Facebook that I am playing. You need to
predict Beijing 2008 Summer Games winners and win points for your country.
The country with the maximum points wins. The more people from your country,
the more the chances of that country winning. Join me!

Wednesday, June 18, 2008

E2O : Enterprise 2.0

What is Enterprise 2.0 ?
E2O is all about simplifying the collabration between independently existing application in an enterprise.

WebEx Connect provides an on demand platform which brings people , data and process together on a single flat base.

Connect Application development framework allows developers to build applications using connect platform services and provides them with rich set of features (UI Constructs).

Application development platform (ADF) is modular, simple and extensible. It is based on MVC architecture. So User interface acts as View, Store ie data constructs acts as Model and Wire Constructs acts as controller.

UI Construct: Connect Platform SDK provides rich set of UI elements like mashkit.input.Button, mashkit.container.Tree etc

Store Constructs: Data constructs which interfaces with backend or existing in cloud services and then it retrieves and save data.

Wire Construct: It connects constructs together and allow them to communicate with each other.

Connect Application is composed of Application modules. Application modules are made of UI,Store,Wire constructs or of other Applications.

Benefits :
Connect ADF is built on DOJO 1.0 which has a widgetized architecture.
Application is composed of multiple modules ie widgets and can communicate with each other.
ADF is built using MVC architecture which helps in cleaner separation of roles and responsible for minimal changes when one has to modify an application.
The application is seamless across thick as well as thin client.

Connect Developer platform architecture.

This framework is built using DOJO taking all the advantages which DOJO provides example widgetized structure. The application is called AppConstruct and it is compased of allpication modules.

AppConstruct = Header + AppModules

Header contains the metadata about the application.
Header contains a name of the AppConstruct, Identity, params, innerHTML , events.

AppModule can be of one of the three categories.

UI , Store and Wire .
AppModule can also refer to other AppConstruct.

Each construct can have Id , Type , params, children ,style, script, innerHTML

Sunday, June 8, 2008

Custom Tags: Don't worry !! They are damn simple ...

I have observed that many JSP/servlets developers are afraid of custom tags. They think its very difficult to write Custom Tags. I believe that custom tags is the most easy topic and very easy to develop.

In JSP we have a tag directive < %@ taglib uri='/web-inf/tag' prefix='mytag' %>

we invoke custom tag by
The uri specifies where to find the tag named "savemoney" ie in which .tld file.
tld file that is tag library descriptor tells us which class is associated with this tag.

Till now the picture is clear. We have a JSP file from which we invoke a custom Tag. This tag is mapped to a java file. The mapping is done in .tld file.

Now we have to write our tag handler class ie the java class which is the backbone of our Tag.

We have two options in which we can write Tag handler class.
  • Simple Tag API
  • Classic Tag API

SimpleTag API

This is the easiest way to write tag handler class. Once you understand it, you will love writing custom tags and handler classes.

SimpleTag is an interface which has methods defined in order to process tag. It contains methods like doTag, getParent, setPatent. getJspBody etc. As a developer we just need to extend SimpleTagSupport Class which implements SimpleTag Interface.

So we have :

So when we invoke the tag in a jsp page, the doTag method of the class associated with the tag is called.
Our tag handler has access to JSP implicit objects and get them using JspContext Object.

If the tag has a body the we can execute the body within doTag() via call to getJspBody().invoke(null).

If some exception occurs in the tag which will stop the tag execution we have SkipPageException. This will stop the execution of the page in which our tag is invoked.

So it is that simple to write a custom tag using SimpleTag interface.

Classic Tag handlers

There is no need to write the tags using classic tag handler but one should understand the way it is written. One can land up in a situation where he has to examine the code written by some other developer and he may have used classic tag.

We write a class which extends TagSupport Class. TagSupport class implements IterationTag interface. Itertion Tag interface implements Tag interface. We have methods like doStartTag, doEndTag, doAfterBody etc.

We have various Constants defined like SKIP_PAGE, SKIP_BODY, EVAL_BODY_INCLUDE, EVAL_PAGE which decides the execution of body, page.

So now you now how easy it is to develop custom tags. Don't be afraid of custom Tags because "dar ke aage jeet hai".

Thursday, June 5, 2008

MVC: A very effective old fighter

Most of us have heard of MVC ie Model View Controller. MVC is a famous design pattern used to separate presentation logic and business logic and this bring in Separation of Concern into picture. All web frameworks like struts, ruby on rails, JSF etc are based on MVC design pattern.

Let me define role of Model, View and Controller in a typical web Application.

It is responsible for the presentation logic. It displays information supplied by the controller to it. Controller puts the model data in a place where a View can find it. It is also responsible for collecting user inputs and send it to the controller for further action.

It decides what to do with the input parameters it receive from the view. It decides which model should process the request depending on the request url. It tells the model to update its state and make new model state available to views.

It holds the actual business logic and state . It has methods for updating and getting state of the object. It can also have the logic to communicate with the database. It is entity responsible for interaction with the database.

MVC is not only separating presentation and business logic but to allow different clients to consume models without rewriting the code. Model classes should be independent of the controller i.e Model classes should be plain old reusable java classes. These classes can be reused and work with any client.

Models should not have any idea about the views. It should not know whether a view exists or not.

MVC architecture of 90% of the web application running on the Internet today.

Wednesday, June 4, 2008

Intel Mashmaker's Table widget: A wheel reinvented

This post is about the table widget developed by me for Intel. People will think what is so special about the table widget that i am blogging about it.

Table widget widget is unique in a way that it does not use any existing javascript library ie no prototype, scriptaculous, ext, jQuery etc. All features were built by using plain old javascript.

An example of Table widget done using jQuery/prototype is flexigrid.

Table widget features:
  • Swap columns
  • Resize columns
  • Sorting
  • Export to CSV
  • Copy to Clipboard
  • Hide/show column
  • Select rows
  • Alignment of data depending on their datatype.
  • Highlight row
  • Filter/Search Functionality
  • Rearranging Columns
  • Container for other widgets

I was restricted for not using any JS library as library's type can conflict with the page in which widgets would be loaded.

One major requirement for this table widget was to hold other widgets in it. For example it should be able to hold Image widget in one of its cells.

Most exciting thing was to work on features like swap columns / resize columns /export to CSV /Sorting.

It required quite a bit of work to make the widget work in both major browser .IE6, IE7, Firefox compatibility made me sweat a lot before i conquered them and made my widget to work on them. It required me to put CSS hacks for IE6 , IE7 and many javascript changes to achieve desired results.

Learning during the development
  • Develope widgets features one by one on both browsers.
  • It should not be like developing full widget on FF and then on IE or vice versa. This approach takes more time and effort.
The image below show Table widget in action on Google Search Page.

ShopprStream: Socializing the shopping experience

ShopprStream , a product from Pramati Technologies focuses on bringing the social experience to websites.

It aims on empowering old/new sites with web 2.0 features. This product has features which helps sites to spread word about themselves or about their product.

In simple words shopprstream can be plugged into web 1.0 sites to make them web 2.0.
ShopprStream allows sites to build communities around their product/site.It adds an "Architecture of participation" that encourages user to participate and add value to the site as well as product.

It enables users to read/write reviews about products which he purchased and liked/hated. User can post comments on the existing reviews. User can write a review and then inform his/her friends on socio-websites/IM/mail.

Spread a word functionality being the most popular now is getting attention from Big players like Intel ,Sun Microsystems. Intel used this product to spread a word about their research project Mashmaker.

The entire idea of empowering sites with web 2.0 features excites me. Reason being sites do not have to change their existing architecture/model. This product act as a plugin and serve as a server for all social/community based activities.

A web1.0 site undergoes these steps to get converted to web 2.0. steps are-->

  1. Web1.0 Site
  2. Basic Elements to enable customer feedback (Reviews/Ratings)
  3. Enabling easier social Networking
  4. Adding incentives to generate more content.
  5. Creating communities and hence bringing in stickiness
  6. Tracking users behaviors
  7. Web2.0 Site

In brief, ShopprStream allows web1.0 sites to migrate to web2.0 sites with minimum effort. No rework is required. ShopprStream acts as a bridge from web1.0 to web2.0.
Thats why it was know as web122 project in its developement phase.

Tuesday, June 3, 2008

Intel Mashmaker : Dream Come true

"Intel" the name itself brings different feelings in different individuals.
I was quite surprised when i heard that intel research labs is coming out with a software product.
Yes, Intel with a software product. Hard to believe but it is truth.

Mashmaker is the name of the product. The tagline describes its intent which says "mashups for the masses".

Nearly all the big players in the software industry have wither launched their mashup product or are in process of building one. Take example of Microsoft, it has POPFLY which even has a developement environment and lots of features to make simple and useful mashups.
Yahoo has Yahoo Pipes.

So what is new with Intel mashmaker ?

Intel mashmaker feeds user with mashups while they surf web. It makes surfing fun for users.Think about this, when you search for sony handycam on google and you want to see Yahoo,MSN LIve, altavista results for sony handycam on same page, mashmaker do this for you. It can bring you all the results on the same page with just a button click on mashmaker toolbar.

I was excited when i used mashmaker and built a mashup which takes pics from my friendlist from Orkut and plot it on googlemaps. Faces were plotted on their current location. For example Vivek chakrapani's pic was plotted on Banglore. Exciting isn't it !!

Users can create useful mashups while browsing the web and save them for future use for himself or he can also share the mashup with others.

Once a user makes a mashup he can choose from the available list of widgets to render the mashup.

Here is where Pramati technologies comes into picture. Intel outsourced the creation of widgets part to pramati technologies.

I was one of the lucky guys who got to work on this project called Intel Mashmaker visualization engagement.

We were a team of 4 developers and 1 CSS guy. We among us developed 12-15 widgets.
some of them are Google maps, Table, Calender, Image , Photo Tile etc.

So once a user creates a extractor to extract data from the page he visits , he can choose from a list of widgets to render the data or mashup.

Example: When one search apartmentlist from, he can view the results in Table widget and he can also see the image of the apartments in Image widget or Photo widget.

Developing widget was an exciting task as we went deep down into javascript and browser issues.

It started with mocks for widgets using photoshops, doing HTML/CSS, adding functionality to it using javascript and mamking this widget work with mashmaker API and lastly seeing that it works in IE and firefox.

Each and every widget was reviewed and re-reviewed by Vivek(VP SOA Practices @ Pramati) and team.

Finally on June 22nd, Intel reaped fruits of our as well as their efforts when they demoed Mashmaker at WEB 2.0 Expo.

Mashmaker has taught me a lot and its a gr8 product. If you have time please try it at

Thursday, May 29, 2008

Reading a file from local file system using javascript

Reading a file into javascript variable is a issue anyone can face while developing client side application.

The problem has different solution depending on platform/browser


1) Windows/IE
: Use the available FileSystemObject. It allows one to read and write files from local machine.

2) Firefox
: It does not have a object corresponding to FileSystemObject in IE. So we rely on XMLHTTPREQUEST Object provided. Our strategy here is to send the file to the server. On server read the file and flush the content to the client. On client side we can get the file contents in xmlhttprequest.responseText property.

3) Applet:
This solution makes use of Java Applet which allows you to read the local files.

Example of 2nd method using PHP as scripting language

1) From the client side write a form having a file upload utility.

2)Send the file to the server.

3) On sever side read that file and flush the contents

PHP Code

if ($_FILES["file"]["error"] > 0)
echo "Error: " . $_FILES["file"]["error"] . "
echo "
$file = fopen($_FILES["file"]["tmp_name"], "r") or exit("Unable to open file!");
//Output a line of the file until the end is reached
echo fgets($file). "

4) On client side read it as
var fileContent=xmlhttprequest.responseText

Thats it!! you are done.

Monday, May 26, 2008

Export to CSV + PHP

On Client
From the client send the string in csvContent field.
input name="csvContent " type="hidden"

Send the fileName in fileName field.
input name="fileName " type="text"

On the Server

$Content = $_POST['csvContent'];
header('Content-Disposition: attachment; filename='.$filename);
header("Content-type: application/text");
echo $Content;

Set header :
1. Content-Disposition:attachment; filename='fileName'
2. Content-type:application/text

Write the content to the browser.

Result : It will open a save-as dialog on the browser.

Wednesday, January 9, 2008

WEB 2.0 : Reincarnation of web

Everyone related to web development use a word which is very difficult to define. The word is WEB 2.0.

What is it ?
Web 2.0 is a trend in the use of www and webdesign that aims to enhance creativity, information sharing, and, most notably, collaboration among users.

Web 2.0 is a marketing buzzword, which is made up of a group of buzzwords.
Let me try to define the buzzwords which combine and make WEB 2.0.

The most important component of web 2.0 is RIA ie Rich Internet Applications.
Now you might ask what do i mean by rich internet applications. RIA means web applications which have a rich user interface. All of us have used desktop applications in one form or the other.
Desktop applications have a rich user interface that comprises of fast response, great and good looking features like drag and drop etc. RIA brings all these features to web application's user interface. We have AJAX ie Asunchronous Javascript and XML calls for fast server side response and various toolkits which provide us ability to have all cool desktop features on our web page.
Some of the JS toolkits and libraries which provide development of RIA are DOJO, Prototye.js, Windows.js, Scriptaculous.js, Effects.js etc.

SOA - Service Oriented Atchitecture
Web 2.0 thrives on pulling information from different distributed and independent sources. RSS , ATOM feeds, REST calls, consuming wxposed services by various companies etc became the source of information which is presented on Rich UI. Web 2.0 Apps consumes a lot of information from these sources.

Web 2.0 Applications promotes social networking and colloboration amongst users. A nice example of Web 2.0 is Pramati technologies product ShopprStream. It allows user to write reviews, comment on existing posts, telling people about what a user found interesting on net etc. The whole idea is to bring user in picture. Empowering user and make him feel that he is part and parcel of the game. Instead of just browsing websites now user can edit them. Social web is a big factor behind the success of web 2.0 among the users.

Finally summarizing all the discussion WEB 2.0 is combination of RIA , SOA , Social WEB.