Wednesday 26 October 2011

Can you hear the sounds of Diwali !!

And Diwali is finally here...

There's something in the air..a feeling of expectancy..a certain restlessness..which begins post Dusharra and continues right until one hears the sound of a cracker..the sizzle of a phuljhari..the boom of a sutli..the fizz of a anaar...the takeoff of the rocket..and the seeti of a seeti ;) ..

And so conditioned we are to the sounds of the festival...that the precursor sounds make us react a certain way..
a boom hrd in great distance willl make u look up expectantly for the fireworks....an burst of such absolute bright colours which will never fail to uplift your heart.. .
a burring sound close to your feet will make u take a step back..ever careful of the zipping zameen chakri
a slight sparky sound will make even the brave hearted cringe in expectation of the deadly sutli..!!!

And  through the windows of a million Indian homes..you hear the other Diwali sounds....the kitchen kadhai sizzling away waiting for gujiyas to be fried..the cluttered sounds of utensils..the giggles of the girls  busy making rangoli...the men loudly "telling' the ladies to get ready for the puja..the rustling sounds of sarees when rushing around for the samagri...voices raised in prayers to the Goddess of Wealth..and the lighting of the diyas!!! The wait is finally over ..its time for the fireworks to begin..

Diwali is a festival of lights...a mostly visual affair....but as I sit in my room ...thousands of kms away from home...these sounds fill my heart with a certain joy...away from the festivities,yet smack in the scheme of things...a crackle here a sizzle there..and I smile at each sound as  I try to seperate the 'successful' cracker-bombs from the ones that will disappointingly fizzle out of steam  :)

For all of you reading this..

Step out .....look up...and watch the sky light up .....Just for You !

Happy Diwali !!!

For the uninitiated:

1.phuljhari : a sort of wire based fire cracker which lights up with a sparkly effect...generally used by kids n girls n other fainthearted people
2.sutli : A deadly fire-cracker which bursts with a loud blast..ear ringing stuff !
3.anaar :  a visual fire cracker which gives off large colourful sparks , sometimes in different colours..sometimes it bursts!!
4.rocket :  a miniature firework which when lit flies into the sky...pretty much like the NASA variety!
5.seeti : a whistling ,zipping , bursty fire-cracker with a mind of its own...no kiddin!!!
6.zameen chakri : a rotating,revolving firecracker giving out beams of sparks..
7.kadhai :  a kitchen utensil used to deep fry eatables..
8.rangoli : http://en.wikipedia.org/wiki/Rangoli ..Cant explain it any better than this !

Wednesday 5 October 2011

ColdFusion Icebreaker#1 : Tried CF yet ?


Most of us , if we have something to do with the world wide web,  know the basic concepts of servers...
We know about application servers,web servers...who they are,what they do and when they are used....
Tomcat , Apache , Websphere Appplication Server(popularly called WAS) are common names today.

ColdFusion (CF) is one such server with a huge difference. Its easy !
Easy to install,easy to create powerful applications in and easy to deploy.
You can use the ColdFusion Markup Language  (called CFML) to do pretty much all that you can in any other language, only in fewer lines of code!

The basics are pretty simple : you write .cfm pages(essentially similar to JSP pages) for the view and put your business related code in CFC (ColdFusion components..essentially similar to Java classes)

For instance, lets talk about DB connections . Most developers will/would at least once in their lives have done a DB call, and if Java is what you speak , then it pretty much follows a common algorithm of :

1)Choose the driver
2)Load the driver
3)Get a connection
4)Create handlers to execute your query
5)Run your query
6)Store your results
7)Use your results

Add to that all the necessary exception handling,connection setting, data source setup and what you have is a considerable amount of time spent coding and debugging before the code is good to go.

As of CF 9, thanks to ORM , it is as easy as writing a few tags

1)Setup your data source in the CF Admin data source section.This lets you choose your database from a drop down .All you need to provide are the connection parameters like IP,password etc
2)Provide this datasource name is an Application.cfc file
Eg:   <cfset this.name="MyORMApp"
       <cfset this.ormenabled="TRUE">
       <cfset this.datasource="<your-datasource-name>"
3)Create a cfc that maps to your table (Need not even specify the table name, as long as its the same as the cfc name)
Eg:   <cfcomponent persistent="true">
           <cfproperty name="ROLL NO">
           <cfproperty name="MARKS">
        </cfcomponent>
4)Directly use functions that perform the necessary pull and push of data from the database.
Use this in UI tags like cfgrid
Eg : EntityLoad() = select *

And voila !! you have run a select query without having to bother about the type of driver you used,its syntax and all the related complications.

All this and more..but in less lines of code.

Feel free to try CF..the developer edition is free !