Jan 27, 2010
Ajax the invincible hero?
Ajax seems to be invincible at the moment. I had learnt javascript sometime back but I need to refresh my javascript skills. Logic in programming remains the same while the syntax differs. Last time while writing down the simple beginner's program I was a bit confused at throw catch lines. Initially I was confused about the sudden appearance of the inbuilt browser functions. How are we supposed to know all of them beforehand. I guess the answer to all of it is to keep coding and practicing. I had come across exception handling in Java. It was no surprise that it was also present in Javascript.
What is try and catch exactly? Try and Catch lets us test a block of code for errors. Usually users get irritated if they get errors that pop up on webpages. It might lead to a large bounce rate that is not a good sign of a good website. In try, catch we try to test a block of code and in case of any errors the catch block catches the errors. This is the syntax of the code:-
try
{
Code
}
catch(err)
{
error is handled here.
}
Throw statement is use to create accurate error messages. We use throw statement to throw exceptions. It can be along with try and catch statements.
I am getting this feeling that it is a long way to go before we actually produce a professional mash up. I always feel so ignorant in spite of having some knowledge. I always feel its not enough. What if it doesn't match up to the professional requirements? What is professional requirement anyways? Does it mean that you need to be a walking talking question and answer bank on that subject. Do you think what ever you have learnt is enough for you to land yourself in a cubicle?
By the way Can anyone tell me the difference between an error and an exception?
Subscribe to:
Post Comments (Atom)
I agree with you. This is the hardest programming I have ever delt with at EMU. Even C# seems easier than this. Thank God this is my last semester here, I don't think I could take another semester of programming!
ReplyDelete