This post is part of the LabVIEW Web Services Series, which covers topics from install LabVIEW to creating an AJAX web app powered by LabVIEW.
LabVIEW Web Services enables LabVIEW programmers to create rich web apps powered by LabVIEW. Most of the programming can be done in LabVIEW, but in order to create truly amazing applications some knowledge of web development is needed.
The Basics
The modern web is made of HTML [Wiki], CSS [Wiki], and JavaScript [Wiki].
HTML is short for HyperText Markup Language and defines the basic structure and content of a webpage. The HTML code is saved as a text file with the file extension .html
CSS is short for Cascading Style Sheets and defines the position and look of the HTML content. The CSS code is saved as a text file with the file extension .css
and is referenced in the HTML file.
JavaScript is the scripting language that runs in the client's web browser. JavaScript can alter the HTML and CSS styling while the webpage is being displayed in the web browser. The JavaScript files have the file extension .js
and are referenced in the HTML file.
Development Tools
There are two tools used for developing web apps. The first is a text editor and the second is a web browser.
The text editor can be as simple as Notepad.exe or, more likely, an IDE such as Netbeans or Sublime Text. The most important feature is syntax highlighting for HTML, CSS and JavaScript. The fancier editors will keep track of your JavaScript code and have auto-complete. I wrote a post about The top 4 Cross-Platform Editors for Web Development which present four editors that are all good for web development.
The web browser is the debugger. More specifically modern web browses have debugging features built in. Usually the debugging features are hidden and disabled. I use Chrome, where the debugging tools are accessed by right-clicking anywhere on a webpage and then selecting 'Inspect Element'. This brings up a window that shows the HTML code and has several tabs of debugging tools. Before Chrome, Firefox was the preferred choice with the Firebug plugin installed. Safari has a nice set of debugging tools that are similar in features to Chrome's. I only use Internet Explorer for testing an app that has been built in Chrome. In my tutorials I will be using Chrome.
With just a text editor and a web browser most of the web pages on the internet can be created. There are many specialty tools available that will auto-generate code, compress code for speed and even deliver sections of code on demand to the client. These are great for high profile sites, but for an internally hosted LabVIEW web apps they are not necessary.
Want to get started right now? Check out codepen.io and program the whole app in a web browser.