*”AMWAY “* இந்திய மக்களுக்கு வேலைவாய்ப்பு தருவதாக உலா வரும் ஒரு அந்நிய நிறுவனம். இந்த நிறுவனத்தின் சில கொள்ளை உண்மைகளை கண்டறிய நான் எடுத்த சிறு முயற்சியின் விளைவுதான் இந்த பதிவு. இந்த நிறுவனத்தில் உள்ள நண்பர்கள் கண்ணில் பட்டவர்களை எல்லாம் பார்த்து சொல்லும் முதல் வார்த்தை “ஒரு பிஸ்னஸ் சொல்றேன் பண்றிங்களா?” இது தான் *MLM* நண்பர்களின் தாரக மந்திரம். ஒருவன் என்னதான் மாதம் முப்பதாயிரம் ரூபாய் சம்பாதிச்சாலும் உங்களுக்கு மேல் வருமானம் வருவதற்கு நான் ஒரு பிஸ்னஸ் சொல்லுறேன் பண்ணுங்க என்றால் மனுஷன் உடனே மண்டைய ஆட்டத்தான் செய்வான். அப்படி இருக்கும்போது வறுமையில் இருப்பவனையும், நடுத்தரகுடும்பத்தை சார்ந்தவனையும் பார்த்து இந்த வார்த்தையை சொன்னால் என்ன மாட்டேன் என்றா சொல்லுவான்?
ஒருவனை இரண்டு வகையில் சுலபமாக மூளைச்சலவை செய்துவிடலாம் ஒன்று “இந்த தொழில் செய்தால் நீ செல்வந்தன் ஆகிவிடலாம் என்று, மற்றொன்று நீ இதை சாப்பிட்டால் உன் நோய் குணமாகிவிடும்” என்று . இவை இரண்டையும் சொல்லி சுலபமாக கொள்ளையடிக்கும் கொள்ளைக்கும்பல் இனத்தை சேர்ந்ததுதான் “*AMWAY*” இதுவரை தமிழ்நாட்டில் பல *MLM *நிறுவனங்கள் பலவிதமான
வித்தைகளைக்காட்டி கொள்ளையடித்து ஓடிவிட்டனர். ஆனால் *AMWAY * நிறுவனம் கொஞ்சம் வித்தியாசமானது, சட்டப்பூர்வமான கொள்ளை கும்பல்.
ஒரு நாட்டில் இருந்து இன்னொரு நாட்டிற்கு வணீக ரீதியிலான பொருட்கள் விற்ப்பனைக்கு வருகிறது என்றால் உள்ளூர் கம்பனிகளும், நிறுவனங்களும் பாதிக்காத வகையில்தான் முடிவு எடுக்கப்படும். காரணம் வேறு ஒரு நாட்டில் இருந்து பொருட்களை இறக்குமதி செய்தால் உள்ளூர் நிறுவனங்களுக்கு வெளிநாட்டு நிறுவனத்தால் நஷ்ட்டம் ஏற்ப்பட்டுவிடும் என்பதால், இது நடக்காதவாறு கவனித்துக்கொள்வது அரசின் கடமை. இந்த கொள்கையைத்தான் வளர்ந்துவரும் நாடுகள்
என்று சொல்லப்படும் அனைத்து நாடுகளும் பின்பற்றி வருகின்றன. ஆனால் நம் இந்தியா அரசு மட்டும் இதுப்போன்ற நிறுவனங்களுக்கு வளைந்து கொடுத்து வருகிறது. இப்படி அரசின் அனுமதியில் கொள்ளையடிக்கும், மக்களை ஏமாற்றி பணம் பறிக்கும்
நிறுவனங்களில் ஒன்று தான் இந்த நிறுவனம். இந்த AMWAY நிறுவனம் விற்பனை செய்யும் அனைத்துப்பொருட்களும் *FMCG (FAST MOVING CONSUMER GOODS)* மற்றும் *PHARMACEUTICAL *பிரிவை சேர்ந்தவை.
* *
*FMCG* பொருட்கள் என்றால் நாம் தினமும் பயன்படுத்தும் பொருட்கள் பிரிவை சேர்ந்தது (உதாரணம்: சோப்பு,ஷாம்பு போன்றவை). இது போன்ற பொருட்களை விற்பனை செய்ய இந்தியாவில் ஏற்க்கனவே பல இந்திய நிறுவனங்கள் போட்டிப்போட்டுக்கொண்டு வருகின்றன, பின்பு எதற்க்காக இந்த பொருட்களை விற்பனை செய்ய அந்நிய நிறுவனத்துக்கு அரசு அனுமதி கொடுக்க வேண்டும்?. அடுத்தது * PHARMACEUTICAL* பொருட்கள், ஒருவனுக்கு உடலில் ஏதாவது பாதிப்பு என்றால் அவன் உடனே மருத்துவரை ஆலோசிப்பதுதான் சிறந்தது என்று அரசே அறிவுறுத்தி வருகிறது அப்படி இருக்கும்போது இவர்கள் எப்படி மருந்து பொருட்களை நேரடியாக விற்பனை செய்யலாம்?.
*பொருளாதார வீழ்ச்சியும் ஆம்வே நிறுவனமும்:*
ஒரு நாட்டில் பொருளாதார வீழ்ச்சி(RECESSION) ஏற்ப்பட்டால் பங்குசந்தையில் உள்ள அனைத்து நிறுவனங்களும் பாதிப்படையும்/பங்கு விலைகள் வீழ்ச்சி அடையும். இது போன்ற நேரங்களில் நாட்டின் பொருளாதாரம் வீழ்ச்சி அடைவதை சற்று தடுத்து நிறுத்துவது சில செக்ட்டார்கள் தான், அதனை டிபன்ஸ் செக்டார்(*DEFENCE SECTOR*)
என்று சொல்வார்கள். அந்த DEFENCE SECTOR என்று சொல்லப்படும் செக்டர்களில் முக்கியமான இரண்டு செக்டார்கள் தான் இந்த *FMCG *மற்றும்*PHARMACEUTICAL* செக்டோர்கள். இந்த இரண்டு பிரிவுகளையும் உள்ளடக்கி விற்பனை செய்து வரும் நிறுவனம்தான் இந்த *AMWAY* நிறுவனமும். ஆனால் இது இந்திய நிறுவனம் இல்லை, இது
ஒரு அயல்நாட்டு நிறுவனம். நம் நாட்டில் பொருளாதார வீழ்ச்சி ஏற்ப்பட்டால் இந்த நிறுவனத்தால் நம் நாட்டிற்கு கடுகளவும் பயன் இல்லை. இப்படி இருக்கும்போது இந்த *AMWAY* நிறுவனம் *DIRECT SALE* என சொல்லப்படும் நேரடி விற்ப்பனையில் வேறு ஈடுப்பட்டு வருகிறது. இதனால் *DEFENCE SECTOR* என சொல்லப்படும் இந்திய
நிறுவனங்களுக்கு பதிப்பு கண்டிப்பாக இருக்கும், இப்படிப்பட்ட சூழ்நிலையில் எதிர்க்காலத்தில் நமது நாட்டில் பொருளாதார வீழ்ச்சி ஏற்ப்பட்டால் பாதிப்பு முன்பை விட அதிகமாகவே இருக்கும். இதையெல்லாம் கருத்தில் கொள்ளாமல் நமது பாரத பிரதமர்
இந்த *AMWAY*நிறுவனத்துக்கு அனுமதி கொடுத்து வருகிறார் என்றால் நீங்களே யோசித்துப்பாருங்கள் மன்மோகன் சிங்கின் திறமையை.
இதனால் நமக்கு என்ன பாதிப்பு என நீங்கள் நினைத்து விட முடியாது, கண்டிப்பாக பாதிப்பு உண்டு. நாட்டில் பொருளாதார வீழ்ச்சி ஏற்ப்பட்டால் வேலை இழப்பால் பாதிக்கப்படப்போவது நாம்தான் மன்மோஹன்சிங் இல்லை. இவர் எப்படியும் அரசு வருவாயில் காலத்தை ஓட்டிவிடுவார். இப்போதாவது இந்திய குடிமகனுக்கு இருக்கும் கடமையை உணர்ந்து செயல்படுங்கள்.
இதுவரை நான் எழுதியதெல்லாம் நாட்டிற்கு பொருளாதார ரீதியில் எந்த ஒரு பாதிப்பும் வந்து விடக்கூடாது என்ற எண்ணத்தில் தான். ஆனால் இதையெல்லாம் பொருட்படுத்தாமல் எவன் எப்படி போனால் எனக்கென்ன எனக்கு பணம் வந்தால் போதும் என்று ஒருசிலர் இருப்பார்கள், இதோ உங்களுக்காகவே ஒரு சிறிய விளக்கம். நீங்கள்*
AMWAY* நிறுவனத்தில் சம்பாதிப்பதை விட இழப்பதுதான் அதிகம் என்பதற்கு.
*ஏமாற்றும் வழிகள்:*
இந்த நிறுவனத்தில் யாரும் பிடித்துபோய் சேருவது இல்லை, நண்பனோ அல்லது உறவினரோ ஒரு பிசினஸ் பண்ணலாம் என்று சொல்லி ஒரு குறிப்பிட்ட இடத்துக்கோ அல்லது வீட்டிற்கோ அழைத்து செல்வார்கள். அங்கு அவர்களால் முடிந்தளவுக்கு மூளைச்சலவை செய்யப்படும். உதாரணத்துக்கு ஒரு குறுப்பிட்ட நபரை காண்பித்து இவர் மாதம்
ஒருலட்சம்/ஐம்பதாயிரம் ரூபாய் ஆம்வே நிறுவனத்தால் சம்பாதிக்கிறார் என்று ஆசை வார்த்தையை கட்டவில்ப்பார்கள். இந்த வார்த்தையால்தான் பலர் நமது வறுமைக்கு ஒரு விடிவு வந்துவிடாதா என்று சேர்ந்து விடுகின்றனர்.
நமது இந்திய நிறுவனங்கள் ஒரு பொருளை தயாரிக்க செலவிடும் விற்பனை செலவில் இருந்து 30 % தான் செலவு செய்கின்றன, ஆனால் அது பயனாளர் கைக்கு வரும்போது மொத்த விற்பனை விலைக்கு வருகிறது, இதனால் நஷ்டம் அடைவது பயனாளர்தான். பயனாளர் மூலம்
கடைக்காரர்,விநியோகஸ்த்தர்,விளம்பரதாரர் என பலர் லாபம் பெறுகின்றனர் என்று சொல்லிதான் இந்த நிறுவனத்தின் ஊழியர்கள் மக்களை ஏமாற்றுகின்றனர். இவர்கள் சொல்வது உண்மைதான், மூன்று ரூபாய் பொருட்செலவில் தயாரிக்கும் பொருளை நாம் பத்துரூபாய்க்கு வாங்குவது நிஜம்தான், இந்த வார்த்தைகளை கேட்டு பலர் ஏமார்ந்து
விடுகின்றனர். நமது இந்திய நிறுவனத்துடன் ஆம்வே நிறுவனத்தின் பொருட்களின் விலையை ஒப்பிட்டு பார்த்தால் இந்திய நிறுவனங்களின் பொருட்கள்தான் மிகவும் விலை குறைவாக உள்ளது.
►இந்திய நிறுவனத்தின் தரமான சோப் *15 – 20* ரூபாய்(கடைக்காரர், விநியோகஸ்த்தர், விளம்பரதாரர், நிறுவன லாபம் எல்லாம் உட்பட).
►ஆனால் ஆம்வே நிறுவனத்தில் ஒரு சோப்பின் விலை *37*ரூபாய் (விளம்பரதாரர், விநியோகஸ்த்தர், கடைக்காரர் இவர்கள் யாருக்கும் லாபம் கொடுக்காமலே)
மேலும் ஆம்வே நிறுவன பொருட்களின் விலைகள்.
TOOTHBRUSH(1) – 19 ரூபாய்
HAIR OIL(500 ML) – 95 ரூபாய்
SHAVING CREAM(70G) – 86 ரூபாய்
OLIVE OIL (1 LITRE) -400 ரூபாய்
FACE WASH -229 ரூபாய்
PROTIEN POWDER(1KG) – 2929 ரூபாய்
மேலே இருக்கும் விலை பட்டியல் உதாரணம் மட்டும்தான் கொஞ்சம் யோசித்துப்பாருங்கள் இந்த விலை நமது இந்திய நிறுவனத்தின் விலையை விட குறைவா?. இத்தனைக்கும் இவர்கள்
விளம்பர நிறுவனங்கள் , விநியோகச்த்தர்கள், கடைக்காரர் என பலத்தரப்பட்டவர்களின் தொழில்களுக்கு நஷ்ட்டம் விளைவித்து மக்களுக்கு குறைந்த விலைக்கு(நேரடி விற்பனை (DIRECT SALE)) விற்பதாக சொல்லி விற்று வருகின்றனர்.
நேரடி விற்பனை(*DIRECT SALE*) என்றால் ஒருபொருளின் தயாரிப்பு செலவில் நிறுவனத்தில் லாபம் மட்டுமே வைத்து குறைந்த விலைக்கு விற்பதுதான் DIRECT SALE. ஆனால் ஆம்வே நிறுவனம் நேரடி விற்பனை செய்வதாக தம்பட்டம் அடித்துக்கொண்டு மற்ற இந்திய நிறுவனங்களை விட அதிக விலைக்கு விற்று வருகின்றனர். இந்திய நிறுவனங்கள்
ஒரு டூத்பிரஷ் தயாரிக்க செய்யும் செலவு 4 ரூபாய்தான் ஆகிறது ஆனால் விற்பனை செய்யும்போது 15 ரூபாய்க்கு விற்பதாக ஆம்வே நிறுவனம்(ஊழியர்கள்) நமது இந்திய நிறுவனம் மீது குற்றம் சொல்கிறது. ஆனால் இவர்கள் விற்பனை செய்யும் டூத்பிரஷ்ஷின் விலையோ 19 ரூபாய் அப்படியென்றால் இவர்களுக்கு தயாரிக்க ஆகும் செலவே 15 ரூபாயா?
► ஆம்வே நிறுவனத்தில் ஒருவர் இணைய வேண்டும் என்றால் *995* ரூபாய் கட்ட வேண்டும். (எந்த ஒரு செலவும் இல்லாமல் ஆம்வே நிறுவனத்துக்கு *995*ரூபாய் லாபம்)
►பின்பு தனக்கு கீழே இரண்டு நபர்களை சேர்த்து விட வேண்டும்.
(எந்த ஒரு செலவும் இல்லாமல் நிறுவனத்துக்கு *1990* ரூபாய் லாபம், ஆக மொத்தம் உங்களால் ஆம்வே நிறுவனத்துக்கு*2985* ரூபாய் லாபம். இது நீங்கள் அந்த நிறுவனத்தில் இணையும்போது மட்டும்தான்)
► இந்த நிறுவனத்தில் நீங்கள் சம்பாதிக்க வேண்டும் என்றால் மாதம் குறைந்தது * 6000* முதல் *6200*(100 pv) ரூபாய்க்கு பொருட்கள் வாங்க வேண்டும். ஒரு நிறுவனம் தனது பொருட்களை தயாரிக்க ஆகும் செலவு பொருட்களின் விற்பனை செலவில் *30 %* தான். சரி ஆம்வே நிறுவனத்துக்கு*50 %* என்று வைத்தால் கூட *3000* ரூபாய் லாபம்
வருகிறது.
*இப்போது கொள்ளை கும்பலின் கோள்ளை கணக்கை பாருங்கள்:*
►நீங்கள் ஆம்வே நிறுவனத்தில் இணையும்போது கட்டிய தொகை *995* ரூபாய்.
►நீங்கள் பொருட்கள் வாங்கிய விலையில் கம்பனி லாபம் *3000*ரூபாய்(6000-3000).இது 50 % தான் லாபம், கூடலாம் .
►ஆக மொத்தம் நீங்கள் இந்த நிறுவனத்தில் இணையும் போதே உங்கள் பக்க இழப்பு *3995 * ரூபாய்.
இந்த நிறுவனத்தில் இணைபவர்கள் எவனோ ஒருவன் இந்த நிறுவனத்தில் ஒருலட்ச்சம் ரூபாய் சம்பாதித்து விட்டான் நாம் ஏன் சம்பாதிக்க முடியாது என்று எண்ணித்தான் இணைகின்றனர் அவர்களுக்காக ஒரு சிரிய விளக்கம்.
►ஒருவன் ஒருலட்ச்ச்ம் ரூபாய் இந்த நிறுவனத்தில் சம்பாதித்தான் என்றால் இவன் தனக்கு கீழே குறைந்தது 100 நபர்களையாவது இணைத்திருப்பான்.(ஒரு நபர் இணையும்போது
இந்த நிறுவனத்தில் கட்ட வேண்டிய தொகை 995 ரூபாய்)
*100 x 995 = 99500 **ரூபாய்*
இந்த ஒருவன் மூலம் நிறுவனம் அடைந்த லாபம் மட்டும்*99500* ரூபாய். ஆனால் இதில் அவனுக்கு எந்த ஒரு லாபமும் கிடையாது. இவனுக்கு கீழே இருக்கும் ஒவ்வொருவரும் மாதம் 6000 ரூபாய்க்கு பொருட்கள் வாங்க வேண்டும் இதை 100 PV என்று சொல்வார்கள்.
* 3000 x 100 = 300000 **ரூபாய்*
அப்படிபார்த்தால் இவன் ஒருவன் மூலம் ஆம்வே நிறுவனத்துக்கு வந்த லாபம் மட்டும் *399500* ரூபாய். நிறுவனத்துக்கு ஒருமாத லாபம் *300000* ரூபாய் (மூன்று லட்சம்).
இவ்வளவு கொள்ளைகளும் போதாதென்று மேலும் ஒரு கொள்ளையாய் கணக்கை புதுப்பித்தல் (ACCOUNT RENEWABLE) சார்ஜ் வேறு *480 *ரூபாய் ஆண்டொன்றுக்கு.
இன்னொரு கொள்ளை விதிமுறை பற்றி சொல்லவேண்டும் என்றால் இந்த நிறுவனத்தில் இணைந்தால் வாங்கும் பொருட்களுக்கெல்லாம் கமிஷன் கொடுக்க மாட்டார்கள் அதிலும் ஒரு கொள்ளை விதிமுறையை வகுத்துள்ளனர். ஒருவன் இந்தநிருவனத்தில் இணைந்திருக்கிறான் என்றால் மாதம் *6000 *ரூபாய்க்கு பொருட்களை கண்டிப்பாக
வாங்கியே தீர வேண்டும் இல்லையென்றால் இவனுக்கு கீழே எவ்வளவு பொருட்கள் விற்பனை ஆனாலும் இவனுக்கு கமிஷன் கிடையாது. அதேபோல் இவர்கம் *PV* என்னும் POINT VALUE வேறு
கடைப்பிடிக்கிறார்கள் தனக்கு கீழே 300 அல்லது 900 PV , அதற்க்கு மேல் பொருட்கள் விற்பனை செய்தால் தான் சம்பாதிக்க முடியும்.
*300 PV = 16,500 **ரூபாய்* (விற்பனை விலையில் சலுகை போக)
*900 PV = 49,500 **ரூபாய்* (விற்பனை விலையில் சலுகை போக)
இந்த PV விஷயத்தில் பல தில்லுமுல்லு வேலைகள் உள்ளது. இந்த நிறுவனத்தில் இணைந்தவர்கள் வீட்டில் உட்க்கார்ந்து கணக்கு போட்டு பாருங்கள் விளங்கும்.
லட்ச்சங்களையும், கோடிகளையும் சம்பாதிக்கலாம் என்று ஆசை வார்த்தையை காட்டி இவர்கள் கோடி கோடியாய் மக்கள் பணத்தை கொள்ளையடித்து வருகின்றனர். ஆனால் இதெல்லாம் அறியாத மக்கள் தனது பணத்தை இது போன்ற நிறுவனங்களில் தொடர்ந்து
இழந்துகொண்டேதான் வருகின்றனர். மாதம் பத்தாயிரம் ரூபாய்
சம்பாதித்தவன்(கவுரவமாய்) கூட இந்த நிறுவனத்தில் இனைந்து தனது உறவினர்கள் நண்பர்கள் வீட்டில் நாயாய் பேயாய் அழைந்து ஆம்வே பொருட்களை விற்பனை செய்து துளியளவு கூட லாபம் ஈட்ட முடியாமல் இருப்பதே நிஜம்.
இந்த நிறுவனத்தில் நான் பார்த்த மிகப்பெரிய கொடுமை ஒரு வாலிபன் தனது வேலையை ராஜினாமா செய்துவிட்டு இந்த நிறுவனத்தில் நாயாய் பேயாய் அழைந்து முழு நேரமாக தனது பொருட்களை விற்பனை செய்து, ஆட்களை சேர்த்து விட்டு வருவதுதான் . இவன் தனது பழைய நிறுவனத்தில் வாங்கிய மாத சம்பளம் 8000 ரூபாய், ஆனால் இந்த ஆம்வே நிறுவனத்தில் இவன் வாங்கிய சம்பளம் பாதி கூட இல்லை இதுவும் இவன் தான் ஏமார்ந்து வருவதை உணரும் வரைதான்.
*இந்த பதிவை படிக்கும் ஒவ்வொரு வலைப்பதிவருக்கும் ஒரு சிறு வேண்டுகோள்:*
தயவு செய்து இந்த பதிவை உங்கள் நண்பருக்கோ அல்லது உறவினருக்கோ இந்த பதிவில் உள்ள எழுத்துக்கள் சென்றடைய உதவுங்கள். இதில் உள்ள கருத்துக்களை எடுத்து சொல்லுங்கள்
About Amway Leave a comment
We are all made to fly… Leave a comment
| Once there was a king who received a gift of two magnificent falcons from Arabia. They were peregrine falcons, the most beautiful birds he had ever seen. He gave the precious birds to his head falconer to be trained.
Months passed and one day the head falconer informed the king that though one of the falcons was flying majestically, soaring high in the sky, the other bird had not moved from its branch since the day it had arrived. The king summoned healers and sorcerers from all the land to tend to the falcon, but no one could make the bird fly. He presented the task to the member of his court, but the next day, the king saw through the palace window that the bird had still not moved from its perch. Having tried everything else, the king thought to himself, “May be I need someone more familiar with the countryside to understand the nature of this problem.” So he cried out to his court, “Go and get a farmer.” In the morning, the king was thrilled to see the falcon soaring high above the palace gardens. He said to his court, “Bring me the doer of this miracle.” The court quickly located the farmer, who came and stood before the king. The king asked him, “How did you make the falcon fly?” With his head bowed, the farmer said to the king, ” It was very easy, your highness. I simply cut the branch where the bird was sitting.” So let us learn to destroy the branch of fear we cling to and free ourselves to the glory of flight !!!!!!! |
–
Slides for Mobile Computing Leave a comment
AJAX FAQ Leave a comment
AJAX FAQ for the Java Developer
Author: Greg Murray
Translations: Chinese French Japanese Korean Russian
We have all had the chance to use AJAX now and as many of us are finding out a whole new world is now out there. While many developers will encounter AJAX via an existing framework, you may choose to dig deeper or provide functionality above and beyond what is provided. This FAQ is targeted for Java developer that would like to add AJAX functionality to an application.
- Should I consider AJAX?
- Does AJAX work with Java?
- Won’t my framework provide me with AJAX?
- Where should I start?
- What do I need to know to create my own AJAX functionality?
- Do I really need to learn JavaScript?
- What JavaScript Libraries and Frameworks are out there to assist a Java developer?
- Should I use XML or text, JavaScript, or HTML as a return type?
- Are there usability issues with AJAX?
- How do I debug JavaScript?
- Should I use an HTTP GET or POST for my AJAX calls?
- How do I provide internationalized AJAX interactions?
- How do I handle concurrent AJAX requests?
- What do I do on the server to interact with an AJAX client?
- Where do I store state with an AJAX client?
- How do I submit a form or a part of a form without a page refresh?
- Is the server or the client in control?
- Are there any security issues with AJAX?
- When do I use a synchronous versus a asynchronous request?
- What about applets and plugins?
- How do I handle the back and forward buttons?
- How do I send an image using AJAX?
- How do I create a thread to do AJAX polling?
- When should I use an Java applet instead of AJAX?
- How do I access data from other domains to create a mashup with Java?
- Does Java have support for Comet style server-side push?
Should I consider AJAX?
AJAX definitely has the buzz right now, but it might not be the right thing for you. AJAX is limited to the latest browsers, exposes browser compatibility issues, and requires new skill-sets for many. There is a good blog entry by Alex Bosworth on AJAX Mistakes which is a good read before you jump full force into AJAX.
On the other hand you can achieve highly interactive rich web applications that are responsive and appear really fast. While it is debatable as to whether an AJAX based application is really faster, the user feels a sense of immediacy because they are given active feedback while data is exchanged in the background. If you are an early adopter and can handle the browser compatibility issues, and are willing to learn some more skills, then AJAX is for you. It may be prudent to start off AJAX-ifying a small portion or component of your application first. We all love technology, but just remember the purpose of AJAX is to enhance your user’s experience and not hinder it.
Does AJAX work with Java?
Absolutely. Java is a great fit for AJAX! You can use Java Enterprise Edition servers to generate AJAX client pages and to serve incoming AJAX requests, manage server side state for AJAX clients, and connect AJAX clients to your enterprise resources. The JavaServer Faces component model is a great fit for defining and using AJAX components.
Won’t my server-side framework provide me with AJAX?
You may be benefiting from AJAX already. Many existing Java based frameworks already have some level of AJAX interactions and new frameworks and component libraries are being developed to provide better AJAX support. I won’t list all the Java frameworks that use AJAX here, out of fear of missing someone, but you can find a good list at www.ajaxpatterns.org/Java_Ajax_Frameworks.
If you have not chosen a framework yet it is recommended you consider using JavaServer Faces or a JavaServer Faces based framework. JavaServer Faces components can be created and used to abstract many of the details of generating JavaScript, AJAX interactions, and DHTML processing and thus enable simple AJAX used by JSF application developer and as plug-ins in JSF compatible IDE’s, such as Sun Java Studio Creator.
Where should I start?
Assuming the framework you are using does not suffice your use cases and you would like to develop your own AJAX components or functionality I suggest you start with the article Asynchronous JavaScript Technology and XML (AJAX) With Java 2 Platform, Enterprise Edition.
If you would like to see a very basic example that includes source code you can check out the tech tip Using AJAX with Java Technology. For a more complete list of AJAX resources the Blueprints AJAX Home page.
Next, I would recommend spending some time investigating AJAX libraries and frameworks. If you choose to write your own AJAX clients-side script you are much better off not re-inventing the wheel.
AJAX in Action by Dave Crane and Eric Pascarello with Darren James is good resource. This book is helpful for the Java developer in that in contains an appendix for learning JavaScript for the Java developer.
What do I need to know to create my own AJAX functionality?
If you plan not to reuse and existing AJAX component here are some of the things you will need to know.
Plan to learn Dynamic HTML (DHTML), the technology that is the foundation for AJAX. DHTML enables browser-base realtime interaction between a user and a web page. DHTML is the combination of JavaScript, the Document Object Model (DOM) and Cascading Style Sheets (CSS).
- JavaScript – JavaScript is a loosely typed object based scripting language supported by all major browsers and essential for AJAX interactions. JavaScript in a page is called when an event in a page occurs such as a page load, a mouse click, or a key press in a form element.
- DOM – An API for accessing and manipulating structured documents. In most cases DOM represent the structure of XML and HTML documents.
- CSS – Allows you to define the presentation of a page such as fonts, colors, sizes, and positioning. CSS allow for a clear separation of the presentation from the content and may be changed programmatically by JavaScript.
Understanding the basic request/response nature of HTTP is also important. Many subtle bugs can result if you ignore the differences between the GET and OIst methods when configuring an XMLHttpRequest and HTTP response codes when processing callbacks.
JavaScript is the client-side glue, in a sense. JavaScript is used to create the XMLHttpRequest Object and trigger the asynchronous call. JavaScript is used to parse the returned content. JavaScript is used to analyze the returned data and process returned messages. JavaScript is used to inject the new content into the HTML using the DOM API and to modify the CSS.
Do I really need to learn JavaScript?
Basically yes if you plan to develop new AJAX functionality for your web application.
On the other hand, JSF components and component libraries can abstract the details of JavaScript, DOM and CSS. These components can generate the necessary artifacts to make AJAX interactions possible. Visual tools such as Java Studio Creator may also use AJAX enabled JSF components to create applications, shielding the tool developer from many of the details of AJAX. If you plan to develop your own JSF components or wire the events of components together in a tool it is important that you have a basic understanding of JavaScript. There are client-side JavaScript libraries (discussed below) that you can call from your in page JavaScript that abstract browser differences. Object Hierarchy and Inheritance in JavaScript is a great resource for a Java developer to learn about JavaScript objects.
What JavaScript libraries and frameworks are available?
There are many libraries/frameworks out there (and many more emerging) that will help abstract such things as all the nasty browser differences. Three good libraries are The Dojo Toolkit, Prototype, and DWR.
- The Dojo Toolkit contains APIs and widgets to support the development of rich web applications. Dojo contains an intelligent packaging system, UI effects, drag and drop APIs, widget APIs, event abstraction, client storage APIs, and AJAX interaction APIs. Dojo solves common usability issues such as support for dealing with the navigation such as the ability to detect the browser back button, the ability to support changes to the URL in the URL bar for bookmarking, and the ability to gracefully degrade when AJAX/JavaScript is not fully support on the client. Dojo is the Swiss Army Knife of JavaScript libraries. It provides the widest range of options in a single library and it does a very good job supporting new and older browsers.
- Prototype focuses on AJAX interactions including a JavaScript AJAX object that contains a few objects to do basic tasks such as make a request, update a portion of a document, insert content into a document, and update a portion of a document periodically. Prototype JavaScript library contains a set of JavaScript objects for representing AJAX requests and contains utility functions for accessing in page components and DOM manipulations. Script.aculo.us and Rico are built on top of Prototype and provide UI effects, support for drag and drop, and include common JavaScript centric widgets. If you are just looking to support AJAX interactions and a few basic tasks Prototype is great. If you are looking for UI effects Rico and Script.aculo.us are good options.
- Yahoo UI Library is a utility library and set of widgets using the APIs to support rich clients. The utility library includes support for cross-browser AJAX interactions, animation, DOM scriptging support, drag and drop, and cross browser event support. The Yahoo UI Library is well documnented and contains many examples.
- DWR (Dynamic Web Remoting) is a client-side and server-side framework that focuses on allowing a developer to do RPC calls from client-side JavaScript to plain old Java objects in a Java Enterprise Edition web container. On the server side DWR uses a Servlet to interact with the Java objects and returns object representations of the Java objects or XML documents. DWR will be easy to get up and running and plays well with other Java technologies. If you are looking for a client-side and server-side framework that integrates well use DWR.
- Google Web Toolkit (GWT) is client/server framework provided by Google that allows a developer to write an AJAX application in pure Java. The GWT takes care of the details of generating all the client-side code using a Java-to-JavaScript compiler. One of the key benefits of the GWT Software Developer Kit (SDK) is that it allows you to debug your applications in what is known as GWT hosted mode using an embedded browser (IE on Windows and Mozilla/Gecko on Linux) that is tied to the toolkit. In GWT hosted mode you setup through the code and debug it as it is running on both the client and server. The GWT contains a default set of widgets and widget containers. An application is built by coding a set of widgets and containers together much like would be done in a Swing application. The GWT Software Developer Kit (SDK) is limited to Linux and Windows XP/2000 though the web applications it generates are compatible with the latest generation of the mainstream browsers.
There are many new and emerging libraries for JavaScript and this list only reviews some of the more common libraries. When making a choice choose the library which suites your needs the best. While it might be better to choose one, there is nothing stopping you from using more than one framework. For a more extensive list of client-side frameworks see: Survey of AJAX/JavaScript Libraries.
Should I use XML or text, JavaScript, or HTML as a return type?
It depends. Clearly the ‘X’ in AJAX stands for XML, but several AJAX proponents are quick to point out that nothing in AJAX, per se, precludes using other types of payload, such as, JavaScript, HTML, or plain text.
- XML – Web Services and AJAX seem made for one another. You can use client-side API’s for downloading and parsing the XML content from RESTful Web Services. (However be mindful with some SOAP based Web Services architectures the payloads can get quite large and complex, and therefore may be inappropriate with AJAX techniqes.)
- Plain Text – In this case server-generated text may be injected into a document or evaluated by client-side logic.
- JavaScript – This is an extension to the plain text case with the exception that a server-side component passes a fragment of JavaScript including JavaScript object declarations. Using the JavaScript
eval()function you can then create the objects on the client. JavaScript Object Notation (JSON), which is a JavaScript object based data exchange specification, relies on this technique. - HTML – Injecting server-generated HTML fragments directly into a document is generally a very effective AJAX technique. However, it can be complicated keeping the server-side component in sync with what is displayed on the client.
Mashup is a popular term for creating a completely new web application by combining the content from disparate Web Services and other online API’s. A good example of a mashup is housingmaps.com which graphically combines housing want-ads from craiglist.org and maps from maps.google.com.
Are there Usability Issues with AJAX?
The nature of updating a page dynamically using data retrieved via AJAX interactions and DHTML may result in drastically changing the appearance and state of a page. A user might choose to use the browser’s back or forward buttons, bookmark a page, copy the URL from the URL bar and share it with a friend via an email or chat client, or print a page at any given time. When designing an AJAX based application you need to consider what the expected behavior would be in the case of navigation, bookmarking, printing, and browser support as described below.
- Navigation – What would be the expected behavior of the back, forward, refresh, and bookmark browser buttons in your application design. While you could implement history manipulation manually it may be easer to use a JavaScript frameworks such as Dojo that provides API’s history manipulation and navigation control.
- Bookmarking and URL sharing – Many users want to bookmark or cut and paste the URL from the browser bar. Dojo provides client-side for bookmarking and URL manipulation.
- Printing – In some cases printing dynamically rendered pages can be problematic.
Other considerations as a developer when using AJAX are:
- Browser Support – Not all AJAX/DHTML features are supported on all browsers or all versions of a browser. See quirksmode.org for a list of browser support and possible workarounds.
- JavaScript disabled – You should also consider what happens if the user disables JavaScript. Additionally, there are several legitimate reasons why JavaScript and CSS support may be unavailable on a user’s web browser.
- Latency – Keep in mind latency in your design. A running application will be much more responsive than when it is deployed. Also keep in mind that when making multiple requests the return order is not guaranteed. For a more detailed discussion on latency see AJAX Latency problems: myth or reality?
- Accessibility – Guaranteeing your site is accessible to people with disabilities is not only a noble goal, it is also requited by law in many markets. Some marvelous enabling technology is available to help people use the Web in spite of disabilities including visual, auditory, physical, speech, cognitive, and neurological disabilities. With a little forethought, and comprehension of some well documented best practices, you can assure that your application is compatible with that enabling technology.
Degradability is the term used to describe techniques used by web applications to adapt to the wide range of web browser capabilities. Many AJAX libraries have automatic degradability built in. But if you are coding your own custom AJAX functionality, simply taking some care to follow the best practices promoted by standards bodies like the World Wide Web Consortium (W3C), and grass root movements like the Web Standards community and many others, your application can run usefully on browsers that are incapable of AJAX behaviors. Granted, your application may loose some of the “wow factor” on these less capable browsers, but your application will still be usable.
Remember to not design with AJAX just for the sake of coolness. The reason you built your application is so people will use it. And people will not use your application if your application is not compatible with their web browser.
How do I debug JavaScript?
There are not that many tools out there that will support both client-side and server-side debugging. I am certain this will change as AJAX applications proliferate. I currently do my client-side and server-side debugging separately. Below is some information on the client-side debuggers on some of the commonly used browsers.
- Firefox/Mozilla/Netscape – Have a built in debugger Venkman which can be helpful but there is a Firefox add on known as FireBug which provides all the information and AJAX developer would ever need including the ability to inspect the browser DOM, console access to the JavaScript runtime in the browser, and the ability to see the HTTP requests and responses (including those made by an XMLHttpRequest). I tend to develop my applications initially on Firefox using Firebug then venture out to the other browsers.
- Safari – Has a debugger which needs to be enabled. See the Safari FAQ for details.
- Internet Explorer – There is MSDN Documentation on debugging JavaScript. A developer toolbar for Internet Explorer may also be helpful.
While debuggers help a common technique knowing as “Alert Debugging” may be used. In this case you place “alert()” function calls inline much like you would a System.out.println. While a little primitive it works for most basic cases. Some frameworks such as Dojo provide APIs for tracking debug statements.
Should I use an HTTP GET or POST for my AJAX calls?
AJAX requests should use an HTTP GET request when retrieving data where the data will not change for a given request URL. An HTTP POST should be used when state is updated on the server. This is in line with HTTP idempotency recommendations and is highly recommended for a consistent web application architecture.
How do I provide internationalized AJAX interactions?
Just because you are using XML does not mean you can properly send and receive localized content using AJAX requests. To provide internationalized AJAX components you need to do the following:
- Set the charset of the page to an encoding that is supported by your target languages. I tend to use UTF-8 because it covers the most languages. The following meta declaration in a HTML/JSP page will set the content type:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- In the page JavaScript make sure to encode any parameters sent to the server. JavaScript provides the
escape()function which returns Unicode escape strings in which localized text will appear in hexadecimal format. For more details on JavaScript encoding see Comparing escape(), encodeURI(), and encodeURIComponent(). - On the server-side component set the character encoding using the HttpServletRequest.setCharacterEncoding() method. Before you access the localized parameter using the HttpServletRequest.getParameter() call. In the case of UTF this would be
request.setCharactherEncoding("UTF-8");.
A server-side component returning AJAX responses needs to set the encoding of the response to the same encoding used in the page.
response.setContentType("text/xml;charset=;UTF-8");
response.getWriter().write("<response>invalid</response>");
For more information on using AJAX with Java Enterprise Edition technologies see AJAX and Internationalization and for developing multi-lingual applications see Developing Multilingual Web Applications Using JavaServer Pages Technology.
How do I handle concurrent AJAX requests?
With JavaScript you can have more than one AJAX request processing at a single time. In order to insure the proper post processing of code it is recommended that you use JavaScript Closures. The example below shows an XMLHttpRequest object abstracted by a JavaScript object called AJAXInteraction. As arguments you pass in the URL to call and the function to call when the processing is done.
function AJAXInteraction(url, callback) {
var req = init();
req.onreadystatechange = processRequest;
function init() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else if (window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
}
}
function processRequest () {
if (req.readyState == 4) {
if (req.status == 200) {
if (callback) callback(req.responseXML);
}
}
}
this.doGet = function() {
req.open("GET", url, true);
req.send(null);
}
this.doPost = function(body) {
req.open("POST", url, true);
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send(body);
}
}
function makeRequest() {
var ai = new AJAXInteraction("processme", function() { alert("Doing Post Process");});
ai.doGet();
}
The function makeRequest() in the example above creates an AJAXInteraction with a URL to of “processme” and an inline function that will show an alert dialog with the message “Doing Post Process”. When ai.doGet() is called the AJAX interaction is initiated and when server-side component mapped to the URL “processme” returns a document which is passed to the callback function that was specified when the AJAXInteraction was created.
Using this closures insures that the proper callback function associated with a specific AJAX interaction is called. Caution should still be taken when creating multiple closure objects in that make XmlHttpRequests as to there is a limited number of sockets that are used to make requests at any given time. Because there are limited number of requests that can be made concurrently. Internet Explorer for example only allows for two concurrent AJAX requests at any given time. Other browsers may allow more but it is generally between three and five requests. You may choose to use pool of AJAXInteraction objects.
One thing to note when making multiple AJAX calls from the client is that the calls are not guaranteed to return in any given order. Having closures within the callback of a closure object can be used to ensure dependencies are processed correctly.
There is a discussion titled Ajaxian Fire and Forget Pattern that is helpful.
What do I do on the server to interact with an AJAX client?
The “Content-Type” header needs to be set to”text/xml”. In servlets this may be done using the HttpServletResponse.setContentType()should be set to “text/xml” when the return type is XML. Many XMLHttpRequest implementations will result in an error if the “Content-Type” header is set The code below shows how to set the “Content-Type”.
response.setContentType("text/xml");
response.getWriter().write("<response>invalid</response>");
You may also want to set whether or not to set the caches header for cases such as autocomplete where you may want to notify proxy servers/and browsers not to cache the results.
response.setContentType("text/xml");
response.setHeader("Cache-Control", "no-cache");
response.getWriter().write("<response>invalid</response>");
Note to the developer: Internet Explorer will automatically use a cached result of any AJAX response from a HTTP GET if this header is not set which can make things difficult for a developer. During development mode you may want set this header.
Where do I store state with an AJAX client
As with other browser based web applications you have a few options which include:
- On the client in cookies – The size is limited (generally around 4KB X 20 cookies per domain so a total of 80KB) and the content may not be secure unless encrypted which is difficult but not impossible using JavaScript.
- On the client in the page – This can be done securely but can be problematic and difficult to work with. See my blog entry on Storing State on the Client for more details on this topic.
- On the client file system – This can be done if the client grants access to the browser to write to the local file system. Depending on your uses cases this may be necessary but caution is advised.
- On the Server – This is closer to the traditional model where the client view is of the state on the server. Keeping the data in sync can be a bit problematic and thus we have a solution Refreshing Data on this. As more information processing and control moves to the client where state is stored will need to be re-evaluated.
How do I submit a form or a part of a form without a page refresh?
When creating a form make sure that the “form” element “onSubmit” attribute is set to a JavaScript function that returns false.
<form onSubmit="doAJAXSubmit();return false;" > <input type="text" id="tf1" /> <input type="submit" id="submit1" value="Update"/> </>
You can also submit data by associating a function with a form button in a similar way.
<form onSubmit="doAJAXSubmit();return false;" > <input type="text" id="tf1" /> <input type="button" id="button1" onClick="doAJAXSubmit()" value="Update"/> </>
Note that the form “onSubmit” attribute is still set. If the user hits the enter key in the text field the form will be submitted so you still need to handle that case.
When updating the page it is recommend you wait to make sure that the AJAX update of the form data was successful before updating the data in the page. Otherwise, the data may not properly update and the user may not know. I like to provide an informative message when doing a partial update and upon a successful AJAX interaction I will then update the page.
Is the server or the client in control?
It depends. With AJAX the answer is more in between. Control can be more centralized in a server-side component or as a mix of client-side and server-side controllers.
- Centralized server-side controller – When having a more centralized controller the key is to make sure the data in client-side page is in sync with that of the server. Some applications may keep all the state on the server and push all updates to client DOM via a simple JavaScript controller.
- Client and server-side controllers – This architecture would use JavaScript to do all presentation related control, event processing, page manipulation, and rendering of model data on the client. The server-side would be responsible for things such as business logic and pushing updated model data to the client. In this case the server would not have intimate knowledge of the presentation short of the initial page that would be sent to the client page request.
There are some use cases where an entire AJAX application can be written in a single page. Keep in mind if you choose this type of architecture that navigation and bookmarking should be considered.
Both methods are viable depending on what you are trying to accomplish. I tend to prefer spreading the control across the client and server.
Are there any security issues with AJAX?
JavaScript is in plain view to the user with by selecting view source of the page. JavaScript can not access the local filesystem without the user’s permission. An AJAX interaction can only be made with the servers-side component from which the page was loaded. A proxy pattern could be used for AJAX interactions with external services.
You need to be careful not to expose your application model in such as way that your server-side components are at risk if a nefarious user to reverse engineer your application. As with any other web application, consider using HTTPS to secure the connection when confidential information is being exchanged.
When do I use a synchronous versus a asynchronous request?
Good question. They don’t call it AJAX for nothing! A synchronous request would block in page event processing and I don’t see many use cases where a synchronous request is preferable.
What about applets and plugins?
Don’t be too quick to dump your plugin or applet based portions of your application. While AJAX and DHTML can do drag and drop and other advanced user interfaces there still limitations especially when it comes to browser support. Plugins and applets have been around for a while and have been able to make AJAX like requests for years. Applets provide a great set of UI components and APIs that provide developers literally anything.
Many people disregard applets or plugins because there is a startup time to initialize the plugin and there is no guarantee that the needed version of a plugin of JVM is installed. Plugins and applets may not be as capable of manipulating the page DOM. If you are in a uniform environment or can depend on a specific JVM or plugin version being available (such as in a corporate environment) a plugin or applet solution is great.
One thing to consider is a mix of AJAX and applets or plugins. Flickr uses a combination of AJAX interactions/DHTML for labeling pictures and user interaction and a plugin for manipulating photos and photo sets to provide a great user experience. If you design your server-side components well they can talk to both types of clients.
How do I handle the back and forward buttons?
While you could go out and create a custom solution that tracks the current state on your application I recommend you leave this to the experts. Dojo addresses the navigation in a browser neutral way as can be seen in the JavaScript example below.
function updateOnServer(oldId, oldValue, itemId, itemValue) {
var bindArgs = {
url: "faces/ajax-dlabel-update",
method: "post",
content: {"component-id": itemId, "component-value": itemValue},
mimetype: "text/xml",
load: function(type, data) {
processUpdateResponse(data);
},
backButton: function() {
alert("old itemid was " + oldId);
},
forwardButton: function(){
alert("forward we must go!");
}
};
dojo.io.bind(bindArgs);
}
The example above will update a value on the server using dojo.io.bind() with a function as a property that is responsible for dealing with the browser back button event. As a developer you are capable of restoring the value to the oldValue or taking any other action that you see fit. The underlying details of how the how the browser button event are detected are hidden from the developer by Dojo.
AJAX: How to Handle Bookmarks and Back Buttons details this problem and provides a JavaScript library Really Simple History framework (RSH) that focuses just on the back and forward issue.
How do I send an image using AJAX?
While it may appear that images are being sent when using AJAX with an application like Google Maps what is really happening is that the URLs of images are being send as the response of an AJAX request and those URLs are being set using DHTML.
In this example an XML document is returned from an AJAX interaction and the category bar is populated.
<categories> <category> <cat-id>1</cat-id> <name>Books</name> <description>Fun to read</description> <image-url>books_icon.gif</image-url> </category> <category> <cat-id>2</cat-id> <name>Electronics</name> <description>Must have gadgets</description> <image-url>electronics.gif</image-url> </category> </categories>
Notice that the image-url element contains the location of the URL for the image representing a category. The callback method of an AJAX interaction will parse the response XML document and call the addCategory function for each category included in the response XML document. The addCategory function looks up a table row element “categoryTable” in body of the page and adds a row to the element which contains the image.
<scrip type="text/javascript" >
...
function addCategory(id, name, imageSrc) {
var categoryTable = document.getElementById("categoryTable");
var row = document.createElement("tr");
var catCell = document.createElement("td");
var img = document.createElement("img");
img.src = ("images\\" + imageSrc);
var link = document.createElement("a");
link.className ="category";
link.appendChild(document.createTextNode(name));
link.setAttribute("onclick", "catalog?command=category&catid=" + id);
catCell.appendChild(img);
catCell.appendChild(link);
row.appendChild(catCell);
categoryTable.appendChild(row);
}
</script>
...
<table>
<tr>
<td width="300" bgoclor="lightGray">
<table id="categoryTable" border="0" cellpadding="0"></table>
</td>
<td id="body" width="100%">Body Here</td>
</tr>
</table>
Note that the source of the image is set to the image source. The image is loaded by a subsequent HTTP request for the image at the URL “images/books_icon.gif” or “images/electronic_icon.gif” that occurs when the img element is added to the categoryTable.
How do I create a thread to do AJAX polling?
JavaScript does not have threads. JavaScript functions are called when an event happens in a page such as the page is loaded, a mouse click, or a form element gains focus. You can create a timer using the setTimeout which takes a function name and time in milliseconds as arguments. You can then loop by calling the same function as can be seen in the JavaScript example below.
function checkForMessage() {
// start AJAX interaction with processCallback as the callback function
}
// callback for the request
function processCallback() {
// do post processing
setTimeout("checkForMessage()", 10000);
}
Notice that the checkForMessage will continue to loop indefinitely. You may want to vary the increment the interval based on activity in the page or your use cases. You may also choose to have logic that would break out of the loop based on some AJAX response processing condition.
When should I use an Java applet instead of AJAX?
Applets provide a rich experience on the client side and there are many things they can do that an AJAX application cannot do, such as custom data streaming, graphic manipulation, threading, and advanced GUIs. While DHTML with the use of AJAX has been able to push the boundaries on what you can do on the client, there are some things that it just cannot do. The reason AJAX is so popular is that it only requires functionality built into the browser (namely DHTML and AJAX capabilities). The user does not need to download and/or configure plugins. It is easy to incrementally update functionality and know that that functionality will readily available, and there are not any complicated deployment issues. That said, AJAX-based functionality does need to take browser differences into consideration. This is why we recommend using a JavaScript library such as Dojo which abstracts browser differences. So the “bottom line” is: If you are creating advanced UIs where you need more advanced features on the client where you want UI accuracy down to the pixel, to do complex computations on the client, use specialized networking techniques, and where you know that the applet plugin is available for your target audience, applets are the way to go. AJAX/DHTML works well for applications where you know the users are using the latest generation of browsers, where DHTML/AJAX “good enough” for you, and where your developers have JavaScript/DHTML/AJAX skills. Many amazing things can be done with AJAX/DHTML but there are limitations. AJAX and applets can be used together in the same UIs with AJAX providing the basic structure and applets providing more advanced functionality. The Java can communicate to JavaScript using the Live-Connect APIs. The question should not be should framed as do I use AJAX or applets, but rather which technology makes the best sense for what you are doing. AJAX and applets do not have to be mutually exclusive.
How do I access data from other domains to create a mashup with Java?
From your JavaScript clients you can access data in other domains if the return data is provide in JSON format. In essence you can create a JavaScript client that runs operates using data from a different server. This technique is know as JSON with Padding or JSONP. There are questions as to whether this method is secure as you are retrieving data from outside your domain and allowing it to be excuted in the context of your domain. Not all data from third parties is accessible as JSON and in some cases you may want an extra level of protection. With Java you can provide a proxy to third party services using a web component such as a servlet. This proxy can manage the communication with a third party service and provide the data to your clients in a format of your choosing. You can also cache data at your proxy and reduce trips to service. For more on using a Java proxy to create mashups see The XmlHttpProxy Client for Java.
Does Java have support for Comet style server-side push?
Current AJAX applications use polling to communicate changes data between the server and client. Some applications, such as chat applications, stock tickers, or score boards require more immediate notifications of updates to the client. Comet is an event based low latency server side push for AJAX applications. Comet communication keeps one of the two connections available to the browser open to continously communicate events from the server to the client. A Java based solution for Comet is being developed for Glassfish on top of the Grizzly HTTP connector. See Enabling Grizzly by Jean-Francois Arcand for more details.
Useful Keyboard Shortcuts Leave a comment
New CGHS Plastic Cards Leave a comment
Issue of Individual Plastic Cards to each CGHS Beneficiary
CGHS vide Circular No. Misc.6024/2007/CGHS(HQ)/CGHS (P) dated 17/12/2007 made it mandatory for each CGHS beneficiary to have Individual Plastic Card in place of Index Card for the family. All existing CGHS Card Holders in Delhi/NCR, who have not applied for Plastic Cards so far, may apply immediately.
- CGHS Card holders are requested to apply for individual Plastic Cards in the prescribed application form and the duly filled in application form may be deposited to Chief Medical Officer In-Charge of their respective Dispensaries.
- The last date for submission of completed application forms in the Dispensary is 31st May, 2009.
- The application form can be downloaded click here (20 KB) (PDF file that opens in a new window)

Related Links:
Right to Information (RTI) Leave a comment
The Government of India has enacted the Right to Information Act, 2005 (External website that opens in a new window), which came into effect from October 13, 2005. The Right to Information under this Act is meant to give the citizens of India access to information under control of public authorities. This is done to promote transparency and accountability in these organizations.
Information means any material in any form including records, documents, memos, e-mails, opinions, advices, press releases, circulars, orders, logbooks, contracts, reports, papers, samples, models, data material held in any electronic form and information related to any private body which can be accessed by a public authority under any other law for the time being in force but does not include ‘file notings’.
It includes the right to:
- Inspect works, documents or records.
- Take notes, extracts or certified copies of documents or records.
- Take certified samples of material.
- Take information in storage devices such as diskettes, tapes or video cassettes, in any other electronic mode or through printed hard copies of the document.
All administrative units or offices under it have a Public Information Officer who is designated by public authorities to provide information to citizens who request for it under the Act. The Public Information Officer (External website that opens in a new window) has to reply to such a request within 30 days. They may either provide the information on the payment of a fee or specify reasons why the information cannot be provided.
Under Sections 8 and 9 of the Act, certain types of information are to be exempt from disclosure. The Act also provides for the selection of a Chief Public Information Officer to deal with requests for information.
Union Budget Online Leave a comment
The presentation of the Union Budget is an annual event that is looked forward to by people from all strata of society ranging from corporate honchos, housewives, students, the working class and even vegetable sellers. The Budget is also known as the Annual Financial Statement. It is an estimate of the inflows and outflows of the government for a certain financial year. It lists the financial accomplishments of the previous year and enumerates the new fiscal policy to be followed during the current financial year.
According to Article 112 of the Constitution of India – External website that opens in a new window, a proper financial statement, giving calculated receipts and expenditures of the Union Government has to be presented before both the Houses of Parliament in respect of every financial year running from 1st April to 31st March. The Union Budget is usually declared on the last day of February. However, as the Lok Sabha Elections were scheduled to be held in April – May of 2009, an Interim Budget was announced on February 16th, 2009. This Budget provided for the financial requirements of the country till 31th July, 2009, after which, a second ‘Vote on Account, from Parliament would be needed.
The Union Budget for 2009 is scheduled to be presented on 6th July, after the Budget Session of Parliament commences on 2ndJuly. It is expected to be read out by the Finance Minister at 11.00 am. The government is required to get the budget passed by July 31st, the date when the first ‘Vote on Account’, which allowed the government to withdraw money from the Consolidated Fund of India expires.
Here are some resources on the Union Budget -
- <!–
- Webcast of the Union Budget – External website that opens in a new window
- Interim Budget 2009-2010 – External website that opens in a new window
- Previous Union Budgets – External website that opens in a new window
- Live Webcast of Lok Sabha Proceedings – External website that opens in a new window
- Live Webcast of Rajya Sabha Proceedings – External website that opens in a new window
- Procedure for Passing Money and Financial Bills – External website that opens in a new window
–>
<!–
–>
Economic Survey

The Economic Survey of India showcases the annual economic development of the country. It is scheduled to be presented on 2nd July, when the Budget Session of Parliament begins. While the Union Budget sets goals and targets for the next one year, the Economic Survey focuses on the growth achieved the previous year and the factors that contributed to it.
It talks about the state of the economy while concentrating on selected economic indicators such as industrial production, food grains production, exports, imports, money supply growth and wholesale price changes. It also looks at changes in social sectors such as health, education and environment that were brought about through various policies, agreements or schemes. Here is a Year -Wise List of Economic Surveys – External website that opens in a new window.
Railway Budget
The Railway Budget, also known as the Rail Budget is likely to be presented on 3rd July by the Minister for Railways. This budget consists of all financial matters related to the railways such as maintenance of funds, investment in infrastructure, profitability and current performance. It also includes details about new fares for different classes of train travel, launch of new trains, freight rates and information about other schemes and facilities brought about for the benefit of citizens.
The Rail Budget witnesses a similar form of Parliamentary and Audit control as the Union Budget. Here are the Rail Budgets for this year -
- Interim Rail Budget 2009-2010 (56KB) – PDF file that opens in a new window

- Rail Budget 2009-2010 – External website that opens in a new window
<!–
–>
Globally, the potential of India as an economic power is widely recognized. Through the provisions of the Budget, the government seeks to eradicate poverty, provide an impetus to economic growth and ensure a better standard of living to the citizens of India. It is time to rediscover the latent capabilities of this country and steer her towards even more financial expansion.
Influenza A (H1N1) Leave a comment
Influenza A (H1N1) is an influenza virus, which has been reported as a cause of illness and death in people. It was earlier known as Swine Flu. Originating in Mexico in April 2009, the virus has since spread to many countries worldwide. Early laboratory testing showed that many genes in this virus were similar to those found in pigs of North America, which is why the illness was originally called Swine Flu. Later on, further tests proved that this virus has gene segments from the swine, avian and human flu virus genes. This led scientists to discard the previous name and rename the virus the ‘Influenza-A (H1N1) Virus’. Swine Flu- More details… (External website that opens in a new window)
Symptoms of Influenza A (H1N1)
The symptoms of Influenza A (H1N1) are similar to the symptoms of regular seasonal flu. People who have this illness may experience fever, cough, sore throat, body aches, headache, chills and fatigue. Some patients have also reported diarrhoea and vomiting.
The flu virus is thought to spread from person to person through droplets that come out of an infected person’s nose or mouth when he/she sneezes or coughs. Pigs have nothing to do with this disease. Pork products are absolutely safe if properly cooked and culling of pigs is not needed.
Commons Precautions
Here are some precautions to prevent contraction of the virus -
- Cover your nose and mouth with a tissue when you cough or sneeze. Discard the tissue after use.
- Wash your hands thoroughly after you cough or sneeze.
- Avoid touching your eyes, nose or mouth as germs may spread this way.
- Stay away from close contact with people having respiratory illnesses.
- If one displays influenza like symptoms, one must limit contact with others by staying at home. However, in case of respiratory distress, one should visit a nearby hospital without delay.
- Take care of your health. Get plenty of sleep, exercise regularly, manage stress, drink plenty of liquids and eat wholesome food.
Medicines for the treatment of this illness are available in India. The Government has procured and stored the necessary drugs in sufficient quantities at designated hospitals. Citizens are strongly advised against procuring and taking medicines on their own, as it will lower their immunity.
The Government has also created a strategy to detect Influenza A (H1N1) cases among passengers arriving from affected countries either by air, land or sea and quarantine them. A standard process for screening, testing and treatment will be used across the country. If you have travelled from any of the affected countries in the past 10 days and display the symptoms of Influenza A (H1N1), then kindly visit a nearby hospital or contact the Outbreak Monitoring Cell at 011-23921401.
Related Links:
What is the "Chief Executive Officer"? Leave a comment
A “Definition”
The definition of “chief executive officer” (almost always) depends on whether a business is a corporation or not, that is, whether it (usually) has a board of directors or not. In an organization that has a board of directors, the “chief executive officer” is (usually) the singular organizational position that is primarily responsible to carry out the strategic plans and policies as established by the board of directors. In this case, the chief executive reports to the board of directors. In a form of business that is usually without a board of directors (sole proprietorship, partnership, etc.), the “chief executive officer” is (usually) the singular organizational position (other than partnerships, etc.) that sets the direction and oversees the operations of an organization.
Major Roles of the Position of Chief Executive Officer
LEADER
· Advises the Board
· Advocates / promotes organization and stakeholder change related to organization mission
· Supports motivation of employees in organization products/programs and operations
VISIONARY / INFORMATION BEARER
· Ensures staff and Board have sufficient and up-to-date information
· Looks to the future for change opportunities
· Interfaces between Board and employees
· Interfaces between organization and community
DECISION MAKER
· Formulates policies and planning recommendations to the Board
· Decides or guides courses of action in operations by staff
MANAGER
· Oversees operations of organization
· Implements plans
· Manages human resources of organization
· Manages financial and physical resources
BOARD DEVELOPER
· Assists in the selection and evaluation of board members
· Makes recommendations, supports Board during orientation and self-evaluation
· Supports Board’s evaluation of Chief Executive
