In my programming tasks, I utilize JavaScript a ton, but how does JavaScript fit into the world around us, the web world and our various applications? In the past, there were people that were web designers and there were web developers. The two did not ‘speak the same language’. Those days are long gone. To be a good designer, you have to understand development and vice versa. For example, if a web designer is creating a modern interface, it is not uncommon to utilize a JavaScript UI library (jQuery UI, Script.aculo.us, etc.) to provide a rich internet application (RIA). If you do not have a solid understanding of JavaScript, you will run into difficulties in attempting to use these resources.
So where does JavaScript fit into the puzzle? JavaScript has been around a long time and is a mature language. It is an interpreted language. What that means is each browser has a JS Interpreter built in. When the browser hits JS code, it asks the interpreter to take over and tell the browser what it means. This is different than a compiled language, such as C# or Java. These languages are compiled into packages before their code can be executed.
JavaScript is traditionally a client-side language. What that means is the code is read on the end user’s machine within their browser, not on the web server. I say traditionally, because over the past several years, there has been a growth in server-side/enterprise JS and JS libraries (Node, Dart, TypeScript). Let’s stick with the traditional usage, however. So, on the client-side, we use the browser, which combines our content (HTML), style/layout (CSS) and our functionality (JS) to provide the web site experience. I call this the ‘three-legged stool’ of a web app.
In my programming, I have typically found that the more I do on the client-side, the better my application performs. This is due, in part, because we do not have to go across the network of the internet. This does not de-value the need of a server-side language component. In fact, all of my applications have a server-side component that provides the business logic.
I hope this high-level look at JS and the role it plays in the web space helps clarify things for you. If you have any questions, let me know.
Happy Coding!
Clay Hess