C779-Chapter 8 - Extending HTML
Web Application Frameworks
A Web application framework is a software framework that enables developers to create and manage dynamic Websites, Web applications and Web services. Software frameworks generally provide common programming code for generic functions that can be selectively overridden by the developer for specific functionality. There are two types of frameworks, frontend and backend. ►Frontend frameworks have features that help developers create a dynamic, elegant, and interactive user experience from a design and functionality standpoint. Current frontend frameworks include Angular, React, JQuery UI, and Vue.js. ►Backend frameworks focus on controlling data access, storage, and manipulation of data through RESTful API services, WebSockets, caching, and other data centric technologies. Web application frameworks provide software libraries that contain reusable code that developers can use to: ►Help manage the creation and maintenance of online databases. ►Provide Webpage security. ►Manage data on the servers that host the Webpages. ►Provide templates that make it possible to change the background of Webpages while keeping the graphics, text and other elements of the page intact. Two Web application frameworks that are quickly gaining favor with Website developers are: ►Django. ►Ruby on Rails.
SSI file name extensions
A Web server that supports SSI reads each HTML page for SSI instructions, and then processes the instructions for each user request Standard practice is for HTML files that use SSI to use the .shtml or .shtm file name extension, rather than simply .html or .htm. The Web server knows to look for files with these extensions.
Array
A collection of variables stored in a series. Arrays are used to hold multiple values; a variable can hold only one value
A command that prints application output to a destination, often a computer screen. For example, you can create an application that prints information to a window on the screen so you can monitor the application's progress. Print is generally part of a programming language's Input/Output library, which is responsible for allowing users to input information (e.g., through a keyboard) or output information (e.g., to a monitor).
Echo
A command that repeats the input you type back to a terminal or an application window. Echo can also be used in an application to repeat input so that it can be processed or forwarded.
Function
A line of code that allows you to refer to an entire series of steps or commands. Functions are used to organize code into discrete sections.
Variable
A place in memory used to store information for later use. Variables are used in simple applications and are essential in complex ones. Variables are usually created by using the equal sign ( = ). For example, to create a variable named James, you would use the following command: James=James. Variables are often referred to as values preceded with a dollar sign ( $ ). For example, the variable named James would be referred to as $James. In many languages, variables are case-specific (e.g., the variable $James is different from the variable $james).
Server-side includes (SSIs)
A server-side include (SSI) is an instruction within an HTML page that directs the Web server to perform an action SSI is considered to be an alternative to CGI because it does not use languages such as JavaScript, Visual Basic or Java. Rather, SSI instructions are written in SGML. The instruction is used to dynamically add content to a page just before it is downloaded to a user. SSI can be used to: ►Place the results of a database query into a page. ►Execute other programs. ►Indicate the last time that the displayed document was modified. ►Insert text at the bottom of a page (i.e., a footer). The footer can contain any text you want, from the current date to a customized message. ►Add the current date as a timestamp to a page.
Include
A set of files called a library that you can refer to in your code. Programmers often include libraries in their code to avoid having to re-create code that has already been written.
Active Server Pages (ASP) using VBScript
Active Server Pages (ASP) is Microsoft's original server-side scripting solution. It has largely been supplanted by .NET. You can create ASP applications using VBScript, which is quite similar to JavaScript, except that VBScript is a proprietary Microsoft language. PHP is an alternative to ASP. Sample VBScript ASP <%@ LANGUAGE=vbscript %><html> <head> <title>ASP CGI Example</title> </head><body> <h1>Hello, World!</h1><% path = Request.ServerVariables("PATH_INFO") pagename = Request.ServerVariables("HTTP_HOST") method = Request.ServerVariables("REQUEST_METHOD") browser = Request.ServerVariables("HTTP_USER_AGENT" user = Request.ServerVariables("REMOTE_ADDR")
Compiler
An application used to process code in standard text files into executable applications. For example, to compile a C application named james.c, you would use the gcc application: gcc james.c -o james.exe.
Dynamic HTML (DHTML)
An umbrella term that describes the combination of HTML, script, styles and the Document Object Model (DOM) to provide Webpage interactivity. term to describe HTML's ability to work with other technologies to provide animation, interactivity and dynamic updating in Webpages. With DHTML, you can create a Webpage that reacts to user actions without contacting the server or downloading complex, bandwidth-consuming applications. Because it eases the burden on the server, DHTML is an effective front-end and back-end solution Additional DHTML uses include the following ►Automatic adjustment of font sizes and colors — You can use a DHTML event handler to animate text when a user passes a mouse over certain parts of the page. ►Absolute positioning — You can create text that moves to certain positions in reaction to user input. ►New document content — Content can be exchanged dynamically, without having to refresh the browser window. ►Granular control over animation, audio and video — Rather than writing page code to constantly present a video clip, you can write code to begin a sequence at a certain time or after a certain event.
DOM compliance
Browser compliance with the W3C DOM is important for the following reasons: ►Compliant browsers have all of the functionality currently needed in your workplace. ►Compliant browsers are able to offer all accessibility features advocated by the W3C. ►Compliant browsers will be able to access popular features in the future.
C#
C# (pronounced "C sharp") is a compiled object-oriented programming language, and is the proprietary Microsoft competitor to Java C# was designed to be easier to use (like Visual Basic) but still powerful. C# is also sometimes known as Visual C#, the Microsoft product name. Because C# is a Microsoft-specific language, it has features that make it much easier to develop applications and interfaces for the Windows operating systems.
Issues with client-side languages
Consider the following problems: ►Some clients do not support JavaScript or any other scripting language. ►Users can deactivate script execution in browsers that normally support it. Many companies direct their employees to disable scripting in their browsers due to security concerns. If your page relies upon client-side scripting for browser recognition and/or database connectivity, then your pages may not render as expected to some portion of your audience.
Django
Django is an open-source Web application framework that is designed to support the development of dynamic Websites. Django is written in Python, which is an open-source, object-oriented programming language. Python is a highly readable language that emphasizes an uncluttered visual layout by using white space as block delimiters and applying minimalistic syntax and semantics. Django allows developers to easily create complex, database-driven Websites. Django emphasizes Rapid Application Development (RAD) and the Don't Repeat Yourself (DRY) principle, in which the duplication of elements is kept to an absolute minimum. With the DRY principle, modifying any single element of a system will not change logically unrelated elements, and logically related elements will change correspondingly to ensure uniformity and predictability.
Drag-and-Drop Functionality
Drag-and-drop functionality on a Webpage allows a user to move an item from one place on the page to another by dragging it across the screen and dropping it in a different location. The user can also drag an item off the Webpage and drop it into an external application such as a word processor, a photo editor or another browser. When drag-and-drop functionality is enabled on a Webpage, all links, text and image elements are draggable. With the use of a drop zone — a place where items can be dropped — many elements can be manipulated. There are two kinds of drag-and-drop functionality: ►dragging files from the user's computer onto a Webpage; ►dragging items to a different location within the same page. Adding drag-and-drop functionality to your Webpages requires several steps. 1. First, you must specify the HTML element you would like to be draggable. To do this you must set the draggable attribute to "true". 2. Next, you must add an event listener for the dragstart event on any of the HTML draggable elements. 3. Last, you must add an event listener for the dragover and drop events on any elements that will accept a dragged item You must use the DataTransfer object to define the draggable element's data type and value. Assigning an id to the item to be dragged will allow that id to be saved in the DataTransfer object to be used again after the element is dropped. Next, you must define a drop zone. This is done by creating two events: dragover and drop. The dragover event is called when you drag something over it, and the drop event is called when something is dropped.
Dynamic HTML (DHTML) and the Document Object Model (DOM)
Dynamic HTML ►Allows you to create Web pages that react to user actions ►Allows you to animate text when a user passes a mouse over certain parts of the page ►Allows content to be exchanged dynamically, without the need to refresh the browser window DOM ►A standard developed by the W3C ►A vendor-neutral, cross-platform application programming interface (API) ►Specifies how objects in a document can be referred to and manipulated through scripting languages
Embedding JavaScript into HTML
Embedded with the script tag. The alert() function displays an alert dialog box. document.write() function to output text to the client window in sequence with an HTML. The prompt() function requests user input in a text area within a dialog box. The prompt() function initiates a conversation, or dialog. The result returned by the prompt() can be used as an argument to another method, such as the document.write().
If/then
Executes a process only if a particular condition is true. For example, an application may contain a statement that checks whether the \tmp\ folder is present. If it is, then the application will run. Classic if/then statements allow only one condition to occur. Known as a conditional statement
Choosing a DOM-compliant browser
Factors that might affect browser choice include: ►Stability and security — Some of the more popular browsers have experienced serious security issues. Sometimes these problems occur because the code used in the browser is proprietary and therefore "closed"; it cannot be readily reviewed for problems. ►Authentication features — Some browsers, such as Windows Internet Explorer, support proprietary authentication features found in IIS. Traditionally, other browsers have not supported these features. Recently, Mozilla Firefox has supported some of Microsoft's proprietary authentication features. ►Availability — Most browsers are available free of charge, but some companies do not want to bother with downloading and installing a new browser when an operating system already provides one
ISPs and Web servers
Following are the actions you will need to request that the ISP perform: ►Enable execute permissions on your scripts — The ISP can assign these permissions after they receive your files. ►Create a directory that contains available scripts — The ISP should create this directory for your site files. ►Provide user names and passwords with enough permissions for the system — The ISP will usually assign the appropriate permissions. The administrative password for UNIX systems is root. The administrative password for Windows systems is administrator. However, understand that it is possible for an ISP to create new accounts that may have sufficient permissions to accomplish a task normally reserved for the root or administrator account.
Go
Go, often times called Golang, is a programming language developed by Google Announced in 2009, and dropping its 1.0 release in 2012, Go is a relative newcomer in the world of programming languages. Accordingly, it commands a smaller market share than many languages (C/C++, Java, etc.) but it has been gaining traction in recent years. The primary drive behind Go is production speed and it boasts several large advantages in its compiler to this end. Compiling directly to machine code without the use of a Virtual Machine (such as Java uses) means compiling even large-scale projects can be done quickly. The language was built with speedy distribution in mind, and does its best to shorten the production to distribution pipeline. Projects built in Go are inherently cross-platform and by default produce only a single executable file without any other necessary files (dependencies), making it easy to distribute a finished project. Go neglects to implement several otherwise common features (generic typing, function overloading, exceptions, inheritance) that most other major programming languages come with. Proponents of Go argue that the language offers alternative, more desirable means of achieving the same things these missing features do in other languages. Go also suffers from sub-standard runtime safety, which makes some people reticent to use it in their systems. This may or may not be an acceptable tradeoff for Go's production speed, depending on a project's demands
Canvas
HTML API that provides a place on a Webpage (a "canvas") where developers can display graphics, animation, video and games "on the fly" without the need for a plug-in. Canvas is described by the W3C as an HTML5 element that "provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, or other visual images on the fly." By itself, canvas is a simple pixel-based drawing API that produces a bitmap image. It basically requires an advanced Web application developer to fill it in with multimedia content he or she has created. The canvas API uses fewer resources than a plug-in does (such as battery power and CPU usage). This is especially important with regard to mobile devices, such as smartphones and tablets, that rely upon battery power. Sample <canvas id="myCanvas" width="200" height="100" style="border:1px solid #000000;"> Your browser does not support the canvas element.</canvas> The canvas element has only two attributes: height and width. These attributes can be omitted; however, the default height of 300 pixels and width of 150 pixels will be applied. The canvas element uses a DOM method called getContext. The getContext method needs only one parameter: the type of context. There are two types of context — 2D and 3D. The getContext method is a built-in HTML5 object. It has many methods such as circles, rectangles, paths and many more.
JavaServer Pages (JSP) and Java servlets
Java can be used to create a JavaServer Pages (JSP) API. JSP is a technology that uses Java commands embedded into HTML code Java can be used to create Java servlets. A Java servlet is an application that must be installed directly onto the remote server; code from a Java servlet is not downloaded to the browser. One of the most popular Web servers that supports JSP and servlets is Apache Tomcat When using Java servlets, you must perform the following steps: ►Compile the servlet. ►Place the servlet on a server that is capable of handling it.
Java
Java is also an object-oriented programming language. Java is a compiled language Java is designed to allow its applications to run on any operating system that has the Java interpreter installed. Uncompiled text files that contain Java code often have the .java file name extension. When a file is compiled into a Java application, the file usually has the .jar extension. Java has two benefits: ►Java is object-oriented — It allows the creation of powerful applications. ►Java is platform-independent — You do not compile a Java application to a specific computer type (e.g., IBM, Macintosh or Sun Sparc). Rather, you compile a Java application to a specific Java interpreter. The Java interpreter can be installed on any system, and the Java application can be used on any system running the interpreter.
External JavaScript
JavaScript can also reside in external files with the .js file extension. These external files are useful when the same JavaScript code needs to be repeated in many different Webpages. It will keep each of these pages less cluttered, as well as help maintain consistency between pages. If this repeated code ever needed to be changed, it would just need to be changed on the .js file to change every Webpage that references it. The downside to using external JavaScript is that, when the JavaScript is small, it can slow down the Webpage compared to embedded JavaScript. This is because the HTML page will need to take an additional step in requesting the JavaScript from the Web server every time it is loaded. External JavaScript is a useful tool when considering code management, consistency and organization. script src="script.js" type="text/javascript"></script
JavaScript
JavaScript is an object-based scripting language that allows developers to add interactivity to their Webpages. JavaScript can be used on the client side or on the server side. When used on the client side, JavaScript code must reside inside HTML documents in order to run. JavaScript syntax closely resembles that of C. The code is placed within your Web document so that when your browser retrieves a page that incorporates JavaScript, it runs the programs and performs the appropriate operations. JavaScript can add the following functionality to a Webpage or site: ►Pop-up windows, such as alert, dialog and prompt boxes ►Automatic date and time changes ►Images and text that change upon mouse rollover ►Cookie creation and identification
JavaScript is object-based, not object-oriented
JavaScript is not considered an object-oriented language because it does not support inheritance JavaScript is an object-based language that has a collection of built-in objects, including: ►Document— allows you to obtain values from and write values to a document. ►Navigator— allows you to determine the type of browser accessing a Webpage. ►Array— allows you to create a series of variables to later manipulate.
Statement
Logical constructs that allow you to control the way that information flows in the application
SSI support in Web servers
Most Web servers include SSI capability. However, the SSI feature may be disabled Even though your Web server may be configured to support SSI, it may not be configured to look for the standard .shtml or .shtm file name extensions. In such cases, you can take either of two approaches: ►Find the supported extension type for SSI. ►Define a MIME type for the .shtml or .shtm extensions for the Web server. Either solution will allow the Web server to process SSI instructions.
PHP Hypertext Preprocessor (PHP)
PHP is an interpreted server-side scripting language for creating dynamic Webpages. is embedded in HTML pages but is always executed on a Web server. Sample PHP code In this code, notice the first line that begins with the #! characters. This first line is known as the "shebang." The shebang is used in Perl applications to point to the location of the Perl interpreter. Many problems with Perl scripts originate with an improperly created shebang line #!/usr/bin/perl use CGI qw/:all/; $cgi_object = CGI::new(); print "Content-type: text/html\n\n"; print "<html>\n<head>\n<title>\nPerl CGI Example\n</title>\n<body>\n<h1>Hello, World!</h1>\nYour user agent is: <b>\n"; print $cgi_object->user_agent(); print "</b>.</html>\n";
Common server-side languages
PHP, Perl, Active Server Pages (ASP), Visual Basic, Python, C# and Java
Connecting to a Database
Provide a way for the Web server and database to recognize each other — For example, Microsoft systems use ODBC. Provide permissions to the database so that it can be read and/or written to — Most databases allow users to write to them.
Python
Python is a programming language that was developed in the 1980s, but only started to gain popularity in 2004. Python is object-oriented and has a plethora of frameworks that makes it more flexible than other languages. It is well documented and typically requires less code to achieve its goals than more traditional languages. These advantages over other programming languages have led Python to gain immense popularity and challenge JavaScript for dominance in the scripting world. Python is not the best choice for mobile Web development, a fast-growing market in technology. Python is also traditionally slower than other languages and has some limitations in building high quality, 3-D graphics.
Ruby On Rails
Ruby On Rails is another open-source Web application framework that also emphasizes Rapid Application Development (RAD) and the Don't Repeat Yourself (DRY) principle for rapid Website development. Ruby On Rails (or "Rails," for short) works with a wide range of Web servers (e.g., Apache, lighttpd), databases (e.g., MySQL, Oracle, SQL Server, DB2) and operating systems (Windows, Linux, Mac OS X). Like Django, Rails emphasizes simplicity and ease-of-use so that developers can create complex Websites quickly.
Do while
Runs ("do") a specified subprocess while a specified condition is true. For example, an application may continue to present an alternative window while the mouse is being right-clicked. Often used as a part of an if/then or if/then/else statement, the do while statement ensures that an action occurs the entire time a condition is true. Sometimes known as a repeat until statement.
Web servers and permissions
Scripts that run on Web servers often fail to execute properly not because they are coded incorrectly, but because the Web server does not have execute permissions. Failure for Web servers to execute scripts is caused by the following: ►The Web server does not have the permissions to execute files and scripts. ►The file or script used has incorrect permissions, which prohibits the server from executing the file. To solve such problems, first make sure that the Web server you are using has all of the necessary permissions. Then, modify the permissions assigned to the file so that it has only enough permissions to function. This allows the Web server to execute the file securely. Allowing a file too many permissions can cause serious security problems.
Do until
Similar to a do while statement, but runs the specified subprocess until a specified number of events have occurred. For example, a calculation process may add the number 1 to the result of the previous statement until the sum reaches 100, then exit.
If/then/else
Similar to an if/then statement, but executes a group of additional commands if the given condition is false. For example, an if/then/else statement can direct the following logic: If the \tmp\ folder is not available, then check to see if the \temp\ directory is available, or else create a directory named \tmp\. Known as a conditional statement.
Interpreter
Software used to read and process code in standard text files. Interpreters either reside on the server or are downloaded to a client. PHP, Perl and ASP are all languages that use an interpreter. Some CGI applications must explicitly specify the location of the interpreter. For example, Perl requires the first line to include a correct reference, or the script will fail.
Document Object Model (DOM)
The Document Object Model (DOM) is a standard developed by the W3C It describes the elements, or objects, within a document rendered by a Web browser. It is a vendor-neutral, cross-platform Application Programming Interface (API) that specifies how objects in a document can be referred to and manipulated through scripting languages. With the DOM, you can open a new browser instance and control its functions. For example, you can determine the size of the new browser instance, the toolbars that will be open, and so forth. You can also create pop-up dialog boxes, change the font and colors used in the current document, and alter the address bar or almost any other component of the browser. Currently, the DOM is not as universal as expected. Most browser vendors either add their own features or do not implement all of the DOM as proposed by the W3C. To work with the DOM for any browser, you need to use a scripting language, such as JavaScript or VBScript. JavaScript is more difficult to learn, but more universal. At present, VBScript works only with Windows Internet Explorer.
Geolocation
The HTML5 geolocation API is used to locate a user's geographical position. The W3C defines geolocation as "an API that defines an advanced interface for location information associated only with the device hosting the application, such as latitude and longitude." Geolocation determines how to display a user's location based on how the user visits a Website. A number of technologies can be used, such as the user's IP address, wireless network, or GPS hardware utilized on his or her device. Because this can compromise a user's privacy, the user is usually required to approve the action, depending on the user's security settings. A prompt will display in the browser asking for permission Geolocation uses three methods for getting the location information from the user: ►getCurrentPosition, - Retrieves the current geographic location of the user. ►watchPosition - Retrieves periodic updates about the current geographic location of the user. ►clearPosition.- Cancels an ongoing watchPosition() call. Using JavaScript, the geolocation method starts with the getCurrentPosition() method to obtain the user's location. The latitude and longitude of the user are the returned values.
HTML5 APIs
They provide an open environment for developing Web applications that does not rely on proprietary browser plug-ins. The HTML5 APIs are an excellent example of DHTML. HTML5 APIs consist of ►HTML5, ►CSS3 ►JavaScript. JavaScript is used to access the DOM. HTML5 APIs are used to create apps for mobile devices, not just Webpages. For example, the mobile apps for Pandora and LinkedIn use HTML5 APIs. Some functions of the HTML5 APIs include: ►Media (audio and video). ►Document editing. ►Cross-document messaging. ►MIME type and protocol handler registration. ►Web storage.
Visual Basic
Visual Basic (VB) is a compiled programming language developed by Microsoft Corporation. It is used for stand-alone applications and server-side Web applications. It is not often used as a client-side application in Web browsers, as is JavaScript or VBScript. Earlier versions of Visual Basic were more procedural in nature than they were object-oriented. Visual Basic now has more object-oriented capabilities. It is often used in the Microsoft .NET CGI solution. Visual Basic is considered to be easier to use than languages such as C++ and Java, but as a result, this simplicity sometimes does not allow Visual Basic to perform all the tasks that C++ and Java can perform
N-tier applications
When discussing databases, three elements are generally involved: ►Data — the database file or multiple database files. ►Business logic — the SQL coding necessary to create relationships with the data stored in the database. ►Presentation — the way that data and business logic are presented on the user screen. Presentation includes Web forms created with HTML, and application-specific interfaces such as Microsoft Access or a Web browser. In a single-tier database, All three layers are combined into one application or database. example - A Microsoft Access database available only on a local system. A user simply opens Access, then manipulates the database. In a two-tier application,The client is responsible for presentation and business logic, and a server houses only the data. Called a client-server relationship. Any change to the database requires client upgrade Example - A proprietary client connects to a database server to process information. For example, using Microsoft Access to query a remote database. In an n-tier solution, The business logic, data and presentation are completely separated. An upgrade in one of the layers does not necessarily mean the others are affected. example Using a Web browser to visit a Website that is connected to a remote database. The Web browser downloads the necessary forms and is responsible for presentation. The Web server is responsible for providing the business logic and programming. The remote database provides the data. Many times, multiple Web servers and databases are used.
Break
When placed inside of a statement, allows an application to break out of an infinite loop in case of a problem.
JavaScript and cookies
You can also use JavaScript to deposit cookies on the system hard drives of users who visit your site. Using simple JavaScript code, you can use cookies to: ►Store passwords. ►Store user preferences. ►Choose which Webpages will be displayed based on the browser version used.
Undefined object error and the DOM
You may receive an undefined object error if you visit a Webpage and your browser does not support a specific DOM. In other cases, you may simply view an unformatted document in plaintext. Not all versions of a browser support the same DOM. Therefore, not all objects can be defined.
Offline Web Application
allow users to interact with Websites while they are offline. This will allow a user to continue to interact with a Website when a network connection is unavailable Webpages will store data locally within the user's browser, utilizing the application cache, allowing them to continue accessing the site. Utilizing a manifest, which tells the browser which files to store locally, is what allows the user to continue working without the connection. In addition to using a Web application when the computer is offline, the application allows quicker loading of the application next time it is used. To set up a site and its applications to work offline, follow these steps. 1. First, you will need to create a mandatory cache.manifest file. The manifest lists the files needed for the Web application to work offline. 2.The file name requires a file name extension of .manifest. The file name itself is usually the application name, such as mortagagecalculator.manifest or date.manifest. 3. Next, the HTML files that will be cached need to point to the cache manifest file. Include a manifest attribute in the <html> tag that identifies the manifest file you are linking to. The manifest file always includes the text "CACHE MANIFEST" in the first line. The contents of the file follow the following format: CACHE MANIFEST #The CACHE MANIFEST line is required. This line is a comment. #Blank lines and comments are ignored CACHE:i ndex.html styles.css actions.js banner.jpg FALLBACK: images/banner.fallback.jpg /offline.html * Three section headers that can be used are CACHE, FALLBACK and NETWORK. The CACHE section lists the application files that will be used offline (e.g., cached). The FALLBACK section defines what the user will see in the event a resource does not load. The NETWORK section defines an online whitelist. A whitelist includes the files that are never stored.
HTML, the DOM and browser compatibility
some of the more ambitious improvements, including frames and the ability to respond to users, do not work well (or at all) with earlier browser versions. Additionally, modern browser versions interpret many HTML commands quite differently, which means that your pages will render differently from browser to browser. Some DHTML solutions will work well in one browser but disable another. JavaScript appears slightly differently, depending on the browser.
A server-side language has the following attributes
►Code is executed by the Web server, not by the Web browser. ►Code is generally placed into files called applications. These applications are assigned execute permissions by the Web server. In some cases, code is embedded into HTML pages. ►Code executes because an interpreter has been installed and activated on the Web server. Server-side scripts are used for various purposes, including: ►Browser detection. ►Database connectivity. ►Cookie creation and identification. ►Logon scripts. ►Hit counters. ►File uploading and downloading
JavaScript advantages
►Quick development Because JavaScript does not require time-consuming compilation, scripts can be developed in a relatively short period of time. Most of the interface features, such as forms, frames and other GUI elements, are handled by the browser and HTML code, further shortening the development time. JavaScript programmers do not have to create or handle these elements of their applications. ►Easy to learn Although JavaScript shares many characteristics with the Java programming language, the JavaScript syntax and rules are simpler. If you know any other programming languages, it will be easy for you to learn JavaScript. ►Platform-independence Like HTML, JavaScript is not specific to any operating system. The same JavaScript program can be used on any browser on any system, provided that the browser supports JavaScript.