Tuesday, November 10, 2009

JavaScript

Developing with JavaScript for me is much like my previous semester where thoughts often fall into the categories of if and then decision-making for everyday life.  I've had some previous experience decoding JavaScript for purposes of just playing around with possible code features on a website where users log in to view a page.  I scripted the site so that if the user is in fact logged in then display the page, otherwise they will be redirected to the login page and will not be able to view the page requested.  It was this that consisted of the first points of my interest in JavaScript, and I found myself browsing the W3C school website quite often to better understand the code for which I had no previous editing experience.  I've begun again to think of different implementations for JavaScript, including authentication of users and form-filling features for users.  I look toward the future a little more, where I see ASP and PHP web programming languages taking over the features we see in JavaScript, but not entirely replacing the use for it on the web.

JavaScript and Java are often confused.  The basic difference is that a script is used to send instructions through a program to perform a task.  Scripts are interpreted whereas Java, as a program language, must be compiled and decompiled using a program that must be installed on the computer.  Scripting languages, like JavaScript and VBScript, are lighter in the sense of memory usage on the computer.  Once a programmed language like Java loads it must run the decompiler for the entire duration of the program.  In the case of JavaScript, the browser renders the script and interprets it as it comes across the code, and when the process is complete, the rendering of the script is over.  JavaScript is used to accept and apply user input and can be changed by the user.  Java is more of a static program when used online which cannot be changed, but instead has been packaged to meet a specified need before being distributed to be run by its own decompiler.

JavaScript, most formally although less widely known as ECMAScript or ECMA-262, was turned over to an international standards body in 1996, which then became responsible for subsequent development in the scripting language.  The ability today for JavaScript to be separated from the content and presentation of the website has broadened its use and enabled developers to implement the features of JavaScript more thoroughly on the Web without limiting users from accessing the content intended.  However, as of now, I cannot say I see the future in JavaScript.  I have seen its uses for programming simple sites where no database is used, but the future lies in the database-driven website and JavaScript might be an afterthought.

2 comments:

  1. ASP.net & PHP is server side. Look into AJAX!

    ReplyDelete
  2. That's a good point, Jayte. I see JavaScript as a client-side scripting language where the information isn't served to the webpage, but rather interpreted and changed after the page is downloaded. As such, the content in the HTML source document will likely be different than what is shown on the web page. Server-side scripting, like ASP.net and PHP among others will serve the code and the page to the request and both will match (unless, of course there's some client-side scripting included, I'm guessing).

    ReplyDelete