technicalcreative

Wednesday, May 24, 2006

Ditching web forms, learning Javascript

It's a shocking admission to make, but I'm currently learning Javascript.

With eight years of post-Uni software development behind me, including four doing web, I've never seriously looked at the language. I'd open the odd window or include the odd validation script; you know, pidgin Javascript.

Difficult to believe, eh? Hardly. In the old days, we never bothered with Javascript. You could never fully rely on it for validation, it got processed in different ways on different browsers and I started doing ASP .NET stuff soon after, which handily started generating Javascript at your behest.

We've recently decided to abandon the extensive use of web forms on front-end work, the eventual aim being to free ourselves of the constraints of postback and form-based server controls.

The case for learning Javascript starts there. Client-side validation is important. You've still got to validate on the server, but a few choice validation functions can prevent your servers from having to validate incorrect data from Javascript-enabled visitors.

The most surprising thing I've learn't about Javascript is how much I already know. The operators and syntax are very close to C# ( it's even got try..catch :D ) and I've managed to whip through the basic language in a couple of nights. Still need to go through the libraries, but before I take myself through the DOM and get onto prototype and AJAX, but things are going well.

I'm encouraging the junior members of the team to re-visit the language as well. They too, have been spoiled on the sumptous banquet of ASP .NET Validation Controls. We're all working from the concise, but decent tutorial over at w3schools.

Been fun so far, but learning something new normally is.

0 Comments:

Post a Comment

<< Home