Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A good reason to use JavaScript ?

 
Hugo Cesar Crohare Lavalle
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I recently read about Ajax in Java magazines here in Brazil. Some people who I talked about say: "Ok, I know that we have best response times... but I will never use JavaScript".

In the late years we were always trying to avoid the use of JavaScript, but for me Ajax apears to be a good reason to use JavaScript.

Ryan and Nathaniel, what can you say about this ?
 
Mary Wallace
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To or not to use JAVASCRIPT depends on what you expecting from the site.

I use javascript to make the site for more user friendly.But i wont use JS for buisness rule validation.
 
Ryan Asleson
Author
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaScript got a bad rap in the late 1990's because there was a whole lot of JavaScript code written by Web designers who weren't programmers, and they just pasted together some JavaScript they found on the Internet until they got it to work. This lead to a lot of poorly written and maintained JavaScript code. In addition, browser support for JavaScript back then varied widely and caused frequent headaches when trying to write JavaScript that could work in any browser.

Today, the situation is much better. Developers are more likely to be writing JavaScript code, leading to higher-quality code. Standards bodies like the W3C and ECMA have pushed hard for a standard DOM and JavaScript implementation, which has lead to surprisingly stable JavaScript support across today's modern browsers.

In short, don't avoid JavaScript for the sake of avoiding it. Use it were it makes sense and use the same tools and techniques you use for other development, like IDE's and test first development.

Personally, I wouldn't implement much business logic in JavaScript, preferring to leave that on the server. But that's a different topic.
 
Eric Gero
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree. I love JavaScript, but it has its place. Its great for making web pages more user friendly, and doing some client side form validation. But I never use it for my business logic. Keep that on the server.
Eric
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eric Gero:
I agree. I love JavaScript, but it has its place. Its great for making web pages more user friendly, and doing some client side form validation. But I never use it for my business logic. Keep that on the server.
Eric


i'm agree with you.

I'm using AJAX in my application that it's good response time and good performance...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic