About Me

My photo
PhD Candidate at Purdue University, Computer Science.

Sunday, April 27, 2008

Javascript Flavour

I tried to introduce Prototype recently at my work...I was making some effort to let my peers in other teams get use of it..
I asked myself why did I move to prototype at first place!!
I guess the answer is time. Being alone in a project where you have to take care of all the tiny details (DB design, performance tuning, Data monitoring, HTML and CSS, Javascript, Java code, Ruby on rails, image processing..etc) was pushing me to dig to isolate myself from many details.
In Javascript I picked prototype.
The reasons were..Ruby on Rails helpers for prototype makes life makes much more easier. Although, I didn't use many helpers frequently for reasons and design..just the idea that there is a helper that will do the dirty work for me in case of time crunch makes me feel more safe.
Back to the reasons, 1-For example i think that rendering the helpers take more time than writing straight code. 2-helpers messes with the view. The HTML is blended with Javascript code, I think it is better to isolate your JS code form your HTML.
Prototype syntax is Ruby like, which makes time of development much more faster.
I faced some problems with prototype, mainly when there is conflict with function names. You can stay many hours looking for the error.

May be next time I can try the JQuery, It has many cons I believe that I can taste.

No comments: