AJAX is normally used to fetch the data and update part of the web page without re-loading the entire page. Sometimes, AJAX is misused by some developers.
If your product/project is totally based on AJAX, when you load the page, you invoke some web handler methods through AJAX to populate the initial data on the page.
When that web page functionality is enhanced, the developers keep adding additional AJAX calls to get additional data.
As the product goes through multiple releases, single web page might end up calling 10 calls just to populate the initial data, when the page is loaded. This is actually a misuse of AJAX.
Instead of making this mistake, developer can use the facade pattern and call one AJAX call and populate the page. That facade call can return a Map, so that it can be enhanced when the functionality of the web page is enhanced in the coming releases.
In the Javascript, the developer can access the initial data from the Map based on the keys.
But in some places, you might not use this facade call.
One of that scenario is the use of Complex AJAX UI Components. The components might internally make the AJAX calls, which cannot be controlled from the container page.
So, while designing the AJAX based UI components, the component designer has to double check whether it is worth calling the AJAX call inside the component or let the container page take care of the AJAX call and pass the data to the component.
If it is not worth making the AJAX call inside the component, it is better to design the component to take the data as an input from the container.
Monday, August 11, 2008
Sunday, May 04, 2008
Java Classpath
In the olden days, setting the library jars for an application is a pain. Because, You had to set each and every jar individually in the classpath. Now, with the recent releases of java, you can do this very easily without pain. All you need to do include /* in the the classpath. This includes all the jars in the .
Wednesday, January 23, 2008
Speed up Firefox
Some steps that will really speed up the Firefox.
1.Type "about:config" into the address bar and hit return.
Scroll down or filter and look for the following entries:
network.http.pipelining
network.http.proxy.pipelining
network.http.pipelining.maxrequests
Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.
2. Alter the entries as follows:
Set "network.http.pipelining" to "true"
Set "network.http.proxy.pipelining" to "true"
Set "network.http.pipelining.maxrequests" to some number like 30. This means it will make 30 requests at once.
3. Lastly right-click anywhere and select New-> Integer.
Name it "nglayout.initialpaint.delay" and set its value to "0".
This value is the amount of time the browser waits before it acts on information it recieves.
1.Type "about:config" into the address bar and hit return.
Scroll down or filter and look for the following entries:
network.http.pipelining
network.http.proxy.pipelining
network.http.pipelining.maxrequests
Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.
2. Alter the entries as follows:
Set "network.http.pipelining" to "true"
Set "network.http.proxy.pipelining" to "true"
Set "network.http.pipelining.maxrequests" to some number like 30. This means it will make 30 requests at once.
3. Lastly right-click anywhere and select New-> Integer.
Name it "nglayout.initialpaint.delay" and set its value to "0".
This value is the amount of time the browser waits before it acts on information it recieves.
Thursday, January 10, 2008
Tata Nano - 1 Lakh Indian Car
Tata unveiled the 1 lakh car, Tata Nano in Auto expo 2008, New Delhi, India. This car is supposed to be the cheapest car in the world. Proud to see that this piece of engineering is from India. The Tata Nano will hit the Indian market later this year. Hope all the Autos (3 wheeler) will be replaced by the Tata Nano in India soon. Many people will move from 2 wheeler to Tata Nano.
This is really good news for the normal salaried people across the world. He can easily afford or at least, afford to get a loan for this car :)
In spite of appreciating this, few people are raising concerns against this. Let me give my comments for those criticism.
> Environmentalists are raising issue about the pollution, which might raise.
- As per Tatas, Nano is less pollutant than a 2-wheeler.
- When people move from 2-wheeler to Nano, it reduces pollution & provides safety.
- Are all the environmentalists go by Bi-cycle? Don't they have any automobile?
> NGOs are raising concerns that their is no infrastructure in India to handle the traffic.
- Hope NGOs know that every automobile owner pay the road tax to the government.
When the number of automobiles on road shoots up, the government is going to receive more road tax, so Government has to provide the infrastructure to the common man to live his life.
Actually NGO should appreciate Tata for giving an opportunity to the Indian government
for increase in road tax collection, which they can use it for the infrastructure development.
When all the Indian roads are going to attain the global standards?
- Traffic will be better, If people buy small car rather than big car that blocks the road.
This is really good news for the normal salaried people across the world. He can easily afford or at least, afford to get a loan for this car :)
In spite of appreciating this, few people are raising concerns against this. Let me give my comments for those criticism.
> Environmentalists are raising issue about the pollution, which might raise.
- As per Tatas, Nano is less pollutant than a 2-wheeler.
- When people move from 2-wheeler to Nano, it reduces pollution & provides safety.
- Are all the environmentalists go by Bi-cycle? Don't they have any automobile?
> NGOs are raising concerns that their is no infrastructure in India to handle the traffic.
- Hope NGOs know that every automobile owner pay the road tax to the government.
When the number of automobiles on road shoots up, the government is going to receive more road tax, so Government has to provide the infrastructure to the common man to live his life.
Actually NGO should appreciate Tata for giving an opportunity to the Indian government
for increase in road tax collection, which they can use it for the infrastructure development.
When all the Indian roads are going to attain the global standards?
- Traffic will be better, If people buy small car rather than big car that blocks the road.
How to Avoid the 10 Worst Energy Zappers
When I was checking the news from different sources in iGoogle, I read an article today about the energy zappers. The article is good.
Let me post the excerpts from that article.
--------------------------------------------------------------------------------------------------
If you are trying to accomplish anything in life, whether it is work, raising a family, or even having fun, you need to have energy. When we run into trouble in the form of bad moods or poor productivity, its usually because we are low on energy. Oddly, many of us willingly subject ourselves daily to factors that suck us dry.
Here is a list of the top 10 energy zapping offenders and how you can avoid them.
Let me post the excerpts from that article.
--------------------------------------------------------------------------------------------------
If you are trying to accomplish anything in life, whether it is work, raising a family, or even having fun, you need to have energy. When we run into trouble in the form of bad moods or poor productivity, its usually because we are low on energy. Oddly, many of us willingly subject ourselves daily to factors that suck us dry.
Here is a list of the top 10 energy zapping offenders and how you can avoid them.
1. Lack of Sleep
2. Sugar
3. Caffeine
4. Lack of Exercise
5. Not enough oxygen
6. Processed foods
7. Dehydration
8. Stress
9.Chronic Pain
10.Toxic People
I just wrote the 10 topics, you can read more at the dumblittleman site. It is worth reading the entire article.
2. Sugar
3. Caffeine
4. Lack of Exercise
5. Not enough oxygen
6. Processed foods
7. Dehydration
8. Stress
9.Chronic Pain
10.Toxic People
I just wrote the 10 topics, you can read more at the dumblittleman site. It is worth reading the entire article.
Subscribe to:
Posts (Atom)