How many ways are there to add JavaScript?

Way of adding JavaScript:

Inline
  • Inside head Tag
  • Inside body Tag
Inside Head Tag
Inside Body Tag

External file

  • Inside head Tag
  • Inside body Tag
Inside head Tag
Inside body Tag
  • <script> – Opening Script Tag.
  • src – It‟s an attribute of script tag. It defines source/location of script file.

• dev.js – This is our script file. Where dev is file name and .js is the extension
of javascript file.

• type – It‟s an attribute of script tag which tells the browser it is a javascript.
This is optional now a days.

• text/javascript – Its type of document

• document.write(“Hello World”); – This is a function to display data.

• </script> Closing Script tag

Tagged : / / / / /

Changed, Added and Deleted SLOC

An important consideration for Software Project Managers is whether the requirements are being altered in a given project without their knowledge or consent. The impact of unauthorized or unscheduled departure from requirements can lead to considerable problems in maintaining and managing large source projects.

Having received requests from several major C/C++ and Java projects to measure ‘changes’ in source code projects, Power Software was commissioned to manufacture an automated tool to measure changed lines of source code.

The first question we asked was ‘are there any existing tools that can already accomplish this task?’ The obvious starting place was ‘Change Management’ tools like CMVC (Configuration Management Version Control) systems. These tools indicate which files have changed between projects but do not gather and present the information in the format our customers’ required. One problem with CMVC systems was that a file shown to be ‘changed’ might have changed only by time and date. This is misleading if we are looking for actual changes in source code.

The next place we looked was at existing Software Metrics tools. These tools measure source code parameters including SLOC (source lines of code). However it is possible that a Software Metrics tool could report that the compared files or projects have the same total number of source lines but these could have changed intrinsically. The actual lines of code could have changed but the total number of lines will be unchanged so the ‘changed line’ is not detected.

For our customers the particular information required is ‘changed source lines of code’, ‘added source lines of code’ and ‘deleted source lines of code’. This needs to be gathered across two releases of the same project to show exactly what has ‘changed’. The information needs to be presented as ‘changed lines’ at the file and project level to assist management in their job of maintaining highest quality through proper control mechanisms.

Tagged : / / / / / /