<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vseth</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vseth"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Vseth"/>
	<updated>2026-06-11T19:45:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Samplepdf.png&amp;diff=81720</id>
		<title>File:Samplepdf.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Samplepdf.png&amp;diff=81720"/>
		<updated>2013-10-31T00:39:58Z</updated>

		<summary type="html">&lt;p&gt;Vseth: Screenshot of the pdf generated for the sample report&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot of the pdf generated for the sample report&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81719</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81719"/>
		<updated>2013-10-31T00:38:37Z</updated>

		<summary type="html">&lt;p&gt;Vseth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.jpg|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
[[File:userscreen.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:samplepdf.png]]&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java script.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:classDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
The code makes use of following external java-script libraries to achieve the objective.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
Future development of the project can be implementation of following functionalities.&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting graph and pivot table(generated interactively by user) to a PDF. In future, graphs and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excels are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user can subscribe to receive reports daily/weekly/monthly through emails. The format of this report can be PDF or Excel.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sahana.jpg&amp;diff=81718</id>
		<title>File:Sahana.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sahana.jpg&amp;diff=81718"/>
		<updated>2013-10-31T00:37:50Z</updated>

		<summary type="html">&lt;p&gt;Vseth: Sahana Software Foundation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sahana Software Foundation&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81717</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81717"/>
		<updated>2013-10-31T00:37:04Z</updated>

		<summary type="html">&lt;p&gt;Vseth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:sahana.png|right]]&lt;br /&gt;
This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
[[File:userscreen.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:samplepdf.pdf]]&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java script.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:classDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
The code makes use of following external java-script libraries to achieve the objective.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
Future development of the project can be implementation of following functionalities.&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting graph and pivot table(generated interactively by user) to a PDF. In future, graphs and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excels are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user can subscribe to receive reports daily/weekly/monthly through emails. The format of this report can be PDF or Excel.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81704</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81704"/>
		<updated>2013-10-31T00:30:04Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Description and Objective */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
[[File:userscreen.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:samplepdf.pdf]]&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java script.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:classDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
The code makes use of following external java-script libraries to achieve the objective.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
Future development of the project can be implementation of following functionalities.&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting graph and pivot table(generated interactively by user) to a PDF. In future, graphs and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excels are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user can subscribe to receive reports daily/weekly/monthly through emails. The format of this report can be PDF or Excel.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81701</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81701"/>
		<updated>2013-10-31T00:29:26Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Description and Objective */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
[[File:userscreen.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:samplepdf.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java script.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:classDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
The code makes use of following external java-script libraries to achieve the objective.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
Future development of the project can be implementation of following functionalities.&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting graph and pivot table(generated interactively by user) to a PDF. In future, graphs and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excels are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user can subscribe to receive reports daily/weekly/monthly through emails. The format of this report can be PDF or Excel.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Userscreen.png&amp;diff=81697</id>
		<title>File:Userscreen.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Userscreen.png&amp;diff=81697"/>
		<updated>2013-10-31T00:28:50Z</updated>

		<summary type="html">&lt;p&gt;Vseth: Screen shot of pivot table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screen shot of pivot table&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81687</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81687"/>
		<updated>2013-10-31T00:26:26Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Description and Objective */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
[[File:userscreen.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:samplepdf.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java script.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:classDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
The code makes use of following external java-script libraries to achieve the objective.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
Future development of the project can be implementation of following functionalities.&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting graph and pivot table(generated interactively by user) to a PDF. In future, graphs and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excels are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user can subscribe to receive reports daily/weekly/monthly through emails. The format of this report can be PDF or Excel.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81684</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81684"/>
		<updated>2013-10-31T00:23:17Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java script.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:classDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
The code makes use of following external java-script libraries to achieve the objective.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
Future development of the project can be implementation of following functionalities.&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting graph and pivot table(generated interactively by user) to a PDF. In future, graphs and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excels are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user can subscribe to receive reports daily/weekly/monthly through emails. The format of this report can be PDF or Excel.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ClassDiagram.png&amp;diff=81680</id>
		<title>File:ClassDiagram.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ClassDiagram.png&amp;diff=81680"/>
		<updated>2013-10-31T00:22:03Z</updated>

		<summary type="html">&lt;p&gt;Vseth: Diagram shows the relationships between the classes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Diagram shows the relationships between the classes.&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81660</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81660"/>
		<updated>2013-10-31T00:09:08Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java scripts.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
[[File:classDiagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
The code makes use of following external java-script libraries to achieve the objective.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
Future development of the project can be implementation of following functionalities.&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting graph and pivot table(generated interactively by user) to a PDF. In future, graphs and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excels are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user can subscribe to receive reports daily/weekly/monthly through emails. The format of this report can be PDF or Excel.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81657</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81657"/>
		<updated>2013-10-31T00:08:12Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Dependency */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java scripts.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
The code makes use of following external java-script libraries to achieve the objective.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
Future development of the project can be implementation of following functionalities.&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting graph and pivot table(generated interactively by user) to a PDF. In future, graphs and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excels are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user can subscribe to receive reports daily/weekly/monthly through emails. The format of this report can be PDF or Excel.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81652</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81652"/>
		<updated>2013-10-31T00:06:42Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Future */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java scripts.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
Future development of the project can be implementation of following functionalities.&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting graph and pivot table(generated interactively by user) to a PDF. In future, graphs and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excels are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user can subscribe to receive reports daily/weekly/monthly through emails. The format of this report can be PDF or Excel.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81647</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81647"/>
		<updated>2013-10-31T00:03:28Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Subscription */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java scripts.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting graph and pivot table(generated interactively by user) to a PDF. In future, graphs and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excels are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user can subscribe to receive reports daily/weekly/monthly through emails. The format of this report can be PDF or Excel.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81644</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81644"/>
		<updated>2013-10-31T00:01:27Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Export to Excel File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java scripts.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting graph and pivot table(generated interactively by user) to a PDF. In future, graphs and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excels are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81643</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81643"/>
		<updated>2013-10-30T23:59:54Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* html2canvas.js */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java scripts.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to take &amp;quot;screenshots&amp;quot; of webpages or parts of it opened on users' browser. The screenshot is created by parsing several DOM objects.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting the graph and pivot table-generated interactively by user to a PDF. In future, the grahps and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excel are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81641</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81641"/>
		<updated>2013-10-30T23:57:37Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
Exporting of reports is implemented using java scripts.&lt;br /&gt;
&lt;br /&gt;
The base class is Exporter, defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently we are focusing on exporting report to a PDF. PdfExporter Class serves this purpose. It is a sub-class of Exporter Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are reusing the code. TableRenderer can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to having ability to take &amp;quot;screenshots&amp;quot; of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting the graph and pivot table-generated interactively by user to a PDF. In future, the grahps and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excel are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81632</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81632"/>
		<updated>2013-10-30T23:51:41Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Setup (Installation) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework. Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku. Pycharm IDE can be used for development.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The base class Exporter is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have implemented the Pdf functionality, a PdfExporter is defined for this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are achieving code reuse. This can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to having ability to take &amp;quot;screenshots&amp;quot; of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting the graph and pivot table-generated interactively by user to a PDF. In future, the grahps and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excel are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81628</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81628"/>
		<updated>2013-10-30T23:50:10Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Setup (Installation) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on different operating systems:Linux,Windows,Mac. Sahana Eden is written in Javascript, Perl, HTML, Python. To run Eden then you will need to run Python. Sahana Eden requires web2py framework.  Eden uses SQLite database. Sahana Eden can be easily deployed on Amazon EC2, Heroku.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, you can fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The base class Exporter is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have implemented the Pdf functionality, a PdfExporter is defined for this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are achieving code reuse. This can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to having ability to take &amp;quot;screenshots&amp;quot; of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting the graph and pivot table-generated interactively by user to a PDF. In future, the grahps and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excel are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81583</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81583"/>
		<updated>2013-10-30T23:32:22Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description and Objective==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. The objective of the project is to export reports in the form of downloadable format, so that user can see view reports offline. Currently we focused on exporting report to a PDF.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on several different operating systems:Linux,Windows,Mac. The installation of Sahana eden requires web2py framework. Sahana Eden can be easily deployed on Amazon EC2, Heroku.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The base class Exporter is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have implemented the Pdf functionality, a PdfExporter is defined for this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are achieving code reuse. This can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to having ability to take &amp;quot;screenshots&amp;quot; of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM.&lt;br /&gt;
&lt;br /&gt;
===bytescoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting the graph and pivot table-generated interactively by user to a PDF. In future, the grahps and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excel are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81557</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81557"/>
		<updated>2013-10-30T23:21:05Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For the data to be useful and share-able, it needs to be presented in a way that can help users to make decisions and plan activities. To achieve this Sahana Eden produce reports that are flexible and user friendly.&lt;br /&gt;
&lt;br /&gt;
Reports can be in the form of: Pivot Table, Bar Chart, or Pie chart. Our work includes the exporting the generated report to user's computer so that user can see the generated report offline. Currently we focused on exporting report to PDF document.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on several different operating systems:Linux,Windows,Mac. The installation of Sahana eden requires web2py framework. Sahana Eden can be easily deployed on Amazon EC2, Heroku.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The base class Exporter is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have implemented the Pdf functionality, a PdfExporter is defined for this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are achieving code reuse. This can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to having ability to take &amp;quot;screenshots&amp;quot; of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM.&lt;br /&gt;
&lt;br /&gt;
===bytesscoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting the graph and pivot table-generated interactively by user to a PDF. In future, the grahps and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excel are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81540</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81540"/>
		<updated>2013-10-30T23:13:59Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is one of the unique strength of Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot;, Sahana Software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization, registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For this data to add value it needs to be processed and shared in a way in which it can present the information people need to make decisions and plan activities. To achieve this Sahana Eden should be able to produce reports which analyse and visualize data in a flexible, user friendly and configurable way.&lt;br /&gt;
The types of the report can be Pivot Table, Bar Chart, or Pie chart. Our work includes the exporting the generated report to user's computer so that user can see the generated report offline. Currently we focused on exporting report to PDF document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on several different operating systems:Linux,Windows,Mac. The installation of Sahana eden requires web2py framework. Sahana Eden can be easily deployed on Amazon EC2, Heroku.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The base class Exporter is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have implemented the Pdf functionality, a PdfExporter is defined for this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are achieving code reuse. This can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to having ability to take &amp;quot;screenshots&amp;quot; of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM.&lt;br /&gt;
&lt;br /&gt;
===bytesscoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting the graph and pivot table-generated interactively by user to a PDF. In future, the grahps and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excel are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81529</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81529"/>
		<updated>2013-10-30T23:10:57Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of the 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is a unique strength of the Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot; Sahana software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
&lt;br /&gt;
How can responsible authorities find hospitals that can accommodate more patients?&lt;br /&gt;
&lt;br /&gt;
How can family members be reunited who were separated during evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For this data to add value it needs to be processed and shared in a way in which it can present the information people need to make decisions and plan activities. To achieve this Sahana Eden should be able to produce reports which analyse and visualize data in a flexible, user friendly and configurable way.&lt;br /&gt;
The types of the report can be Pivot Table, Bar Chart, or Pie chart. Our work includes the exporting the generated report to user's computer so that user can see the generated report offline. Currently we focused on exporting report to PDF document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on several different operating systems:Linux,Windows,Mac. The installation of Sahana eden requires web2py framework. Sahana Eden can be easily deployed on Amazon EC2, Heroku.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The base class Exporter is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have implemented the Pdf functionality, a PdfExporter is defined for this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are achieving code reuse. This can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to having ability to take &amp;quot;screenshots&amp;quot; of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM.&lt;br /&gt;
&lt;br /&gt;
===bytesscoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting the graph and pivot table-generated interactively by user to a PDF. In future, the grahps and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excel are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81461</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81461"/>
		<updated>2013-10-30T22:38:03Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Export to Excel File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of the 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is a unique strength of the Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot; Sahana software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
How can responsible authorities understand where hospitals that can accommodate additional patients are located?&lt;br /&gt;
How  can family members remaining in villages be reunited with their parents, spouses, and children separated by evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For this data to add value it needs to be processed and shared in a way in which it can present the information people need to make decisions and plan activities. To achieve this Sahana Eden should be able to produce reports which analyse and visualize data in a flexible, user friendly and configurable way.&lt;br /&gt;
The types of the report can be Pivot Table, Bar Chart, or Pie chart. Our work includes the exporting the generated report to user's computer so that user can see the generated report offline. Currently we focused on exporting report to PDF document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on several different operating systems:Linux,Windows,Mac. The installation of Sahana eden requires web2py framework. Sahana Eden can be easily deployed on Amazon EC2, Heroku.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The base class Exporter is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have implemented the Pdf functionality, a PdfExporter is defined for this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are achieving code reuse. This can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to having ability to take &amp;quot;screenshots&amp;quot; of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM.&lt;br /&gt;
&lt;br /&gt;
===bytesscoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting the graph and pivot table-generated interactively by user to a PDF. In future, the grahps and pivot table can be exported to an excel(.xls). Exporting to an excel will require significant amount of effort as excel are interactive. User should be able to manipulate the generated excel document.(Not required in the case of PDF as they are static).&lt;br /&gt;
XLS would ideally include raw Data on one or more sheets, the Pivot table on another sheet &amp;amp; Graphs on one or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81460</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81460"/>
		<updated>2013-10-30T22:37:23Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Dependency */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of the 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is a unique strength of the Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot; Sahana software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
How can responsible authorities understand where hospitals that can accommodate additional patients are located?&lt;br /&gt;
How  can family members remaining in villages be reunited with their parents, spouses, and children separated by evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For this data to add value it needs to be processed and shared in a way in which it can present the information people need to make decisions and plan activities. To achieve this Sahana Eden should be able to produce reports which analyse and visualize data in a flexible, user friendly and configurable way.&lt;br /&gt;
The types of the report can be Pivot Table, Bar Chart, or Pie chart. Our work includes the exporting the generated report to user's computer so that user can see the generated report offline. Currently we focused on exporting report to PDF document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on several different operating systems:Linux,Windows,Mac. The installation of Sahana eden requires web2py framework. Sahana Eden can be easily deployed on Amazon EC2, Heroku.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The base class Exporter is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have implemented the Pdf functionality, a PdfExporter is defined for this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are achieving code reuse. This can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
We have implemented the code using external java-script libraries.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to having ability to take &amp;quot;screenshots&amp;quot; of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM.&lt;br /&gt;
&lt;br /&gt;
===bytesscoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting the graph and pivot table-generated interactively by user to the PDF version of it. In future newer implementation can include exporting the pivot table and graph to the excel(.xls) version. This implementation may requires significant efforts as excel documents are interactive. So a user should able to manipulate the generated excel document.(Not required in the case PDF document as they are static documents).&lt;br /&gt;
XLS would ideally include the raw Data on 1 or more sheets, the Pivot table on another sheet &amp;amp; Graphs on 1 or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81458</id>
		<title>CSC/ECE 517 Fall 2013/oss fmv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_fmv&amp;diff=81458"/>
		<updated>2013-10-30T22:36:13Z</updated>

		<summary type="html">&lt;p&gt;Vseth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project is developed as a contribution to Sahana Software Foundation (Eden).&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Sahana Software Foundation was originally developed by members of the Sri Lankan IT community who wanted to apply their talent and help their country  to recover from the aftermath of the 2004 Indian Ocean earthquake and tsunami. The word “Sahana” means “relief” in Sinhalese, one of the national language of Sri Lanka. Sahana community has since grown to include experts from emergency and disaster management as partners in software development process. This is a unique strength of the Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
Under the stewardship of &amp;quot;The Lanka Software Foundation (LSF)&amp;quot; Sahana software grew into a free and open source software project. Hundreds of volunteers, contribute and support both local and national relief agencies in their response to numerous large-scale, sudden-onset disasters. The Sahana Software Foundation was established in 2009 as a non-profit organization registered in the State of California to serve diverse group of customers. SSF partners together with disaster and technologies experts address following questions:&lt;br /&gt;
&lt;br /&gt;
How can an urgent requirement be effectively communicated to international donor community?&lt;br /&gt;
How can responsible authorities understand where hospitals that can accommodate additional patients are located?&lt;br /&gt;
How  can family members remaining in villages be reunited with their parents, spouses, and children separated by evacuation?&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Sahana Eden can be used to collect and manage a large variety of data. For this data to add value it needs to be processed and shared in a way in which it can present the information people need to make decisions and plan activities. To achieve this Sahana Eden should be able to produce reports which analyse and visualize data in a flexible, user friendly and configurable way.&lt;br /&gt;
The types of the report can be Pivot Table, Bar Chart, or Pie chart. Our work includes the exporting the generated report to user's computer so that user can see the generated report offline. Currently we focused on exporting report to PDF document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setup (Installation)==&lt;br /&gt;
&lt;br /&gt;
Sahana Eden can be installed on several different operating systems:Linux,Windows,Mac. The installation of Sahana eden requires web2py framework. Sahana Eden can be easily deployed on Amazon EC2, Heroku.&lt;br /&gt;
&lt;br /&gt;
To contribute to Eden foundation, fork repository from&lt;br /&gt;
https://github.com/flavour/eden&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
The base class Exporter is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function Exporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
    this.tableExporter = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setExporter = function(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.setTableExporter = function(exporter)&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter = exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Exporter.prototype.renderTable = function()&lt;br /&gt;
{&lt;br /&gt;
    this.tableExporter.render();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we have implemented the Pdf functionality, a PdfExporter is defined for this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function PdfExporter(exp)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype = new Exporter();&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    return this.exporter;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.export = function(imageObj, json)&lt;br /&gt;
{&lt;br /&gt;
    this.exportImage(imageObj);&lt;br /&gt;
    this.exportPivotTable(json);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportImage = function(imageObj)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    // load image from canvas into BytescoutPDF&lt;br /&gt;
&lt;br /&gt;
    this.exporter.imageLoadFromUrl(imageObj);&lt;br /&gt;
&lt;br /&gt;
    // place this mage at given coordinates and dimesionson on the page&lt;br /&gt;
    this.exporter.imagePlaceSetSize(50, 50, 0, 750, 500);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfExporter.prototype.exportPivotTable = function(json)&lt;br /&gt;
{&lt;br /&gt;
    this.exporter.pageAdd();&lt;br /&gt;
&lt;br /&gt;
    if(this.tableExporter == null || this.tableExporter == undefined)&lt;br /&gt;
    {&lt;br /&gt;
        this.setTableExporter(new PdfTableRenderer(json, this.exporter));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    this.renderTable();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Table exporter is written only for table creation in Pdf. This can even be used for table creation in XLS or RSS or so. Thus, we use strategy pattern here.&lt;br /&gt;
&lt;br /&gt;
Table renderer is defined as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TableRenderer()&lt;br /&gt;
{&lt;br /&gt;
    this.X = 50;&lt;br /&gt;
    this.Y = 50;&lt;br /&gt;
    this.PageWidth = 750;&lt;br /&gt;
    this.PageHeight = 500;&lt;br /&gt;
    this.numcols = 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.constructor = function(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
TableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
    // this method is abstract and does nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And Pdf table renderer having functionality of exporting table to Pdf, is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfTableRenderer(json_data, exp)&lt;br /&gt;
{&lt;br /&gt;
    this.json = json_data;&lt;br /&gt;
    this.exporter = exp;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype = new TableRenderer();&lt;br /&gt;
&lt;br /&gt;
PdfTableRenderer.prototype.render = function()&lt;br /&gt;
{&lt;br /&gt;
  // render code here&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By setting TableRenderer in Exporter class to an instance of PdfTableRenderer, we are achieving code reuse. This can be extended for XLS by writing XLSTableRenderer class which inherits from TableRenderer and overrides the &amp;lt;b&amp;gt;render()&amp;lt;/b&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
At last, the final Pdf object which needs to be downloaded, is generated by &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt;. Here we have used Factory pattern to achieve the same. &amp;lt;i&amp;gt;getPdf()&amp;lt;/i&amp;gt; method of &amp;lt;i&amp;gt;PdfFactory&amp;lt;/i&amp;gt; hides all the implementation details from outside of the library.&lt;br /&gt;
&lt;br /&gt;
PdfFactory is defined as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PdfFactory()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
PdfFactory.getPdf = function()&lt;br /&gt;
{&lt;br /&gt;
    //... code to extract canvas image&lt;br /&gt;
&lt;br /&gt;
    var pe = new PdfExporter(pdf);&lt;br /&gt;
&lt;br /&gt;
    pe.export(dataURL, json_data);&lt;br /&gt;
&lt;br /&gt;
    return pe.getPdf(); // gets final pdf object&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dependency==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
During implementation of this project we used external java-script library.&lt;br /&gt;
&lt;br /&gt;
===html2canvas.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this file is to having ability to take &amp;quot;screenshots&amp;quot; of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM.&lt;br /&gt;
&lt;br /&gt;
===bytesscoutpdf.js===&lt;br /&gt;
&lt;br /&gt;
The purpose of this client-side Javascript library to generate PDF with text, images and graphics.It Works with mainstream desktop and mobile browsers, iPhone and iPad.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
==Future==&lt;br /&gt;
&lt;br /&gt;
===Export to Excel File===&lt;br /&gt;
&lt;br /&gt;
Currently our work is restricted to exporting the graph and pivot table-generated interactively by user to the PDF version of it. In future newer implementation can include exporting the pivot table and graph to the excel(.xls) version. This implementation may requires significant efforts as excel documents are interactive. So a user should able to manipulate the generated excel document.(Not required in the case PDF document as they are static documents).&lt;br /&gt;
XLS would ideally include the raw Data on 1 or more sheets, the Pivot table on another sheet &amp;amp; Graphs on 1 or more additional sheets. The Pivot Table &amp;amp; Graphs should be linked to the raw data using XLS functionality.&lt;br /&gt;
&lt;br /&gt;
===Subscription===&lt;br /&gt;
&lt;br /&gt;
A user would like to subscribe to a report to receive by email daily/weekly/monthly. The format of this report can be PDF or Excel document.&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
:1. [https://github.com/flavour/eden Git repository]&lt;br /&gt;
:2. [http://demo.eden.sahanafoundation.org/eden/ Sahana Eden Demo]&lt;br /&gt;
:3.  [http://bytescout.com/ Bytescout]&lt;br /&gt;
:4.  [http://html2canvas.hertzen.com/ Html2Canvas]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79168</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79168"/>
		<updated>2013-09-25T03:58:37Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color. Thus inspecting styles of any element is very easy with firebug.&lt;br /&gt;
&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot, background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken for each response. By laying the load time out in a timeline various sources of delay can be tracked. The sources includes html, css, javascript, images etc. Options to see the analysis of these sources appear on the menu bar of net tab. &lt;br /&gt;
&lt;br /&gt;
It also shows the start and finish time of loading a file relative to the other files. This helps in tuning the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Other web development tools ==&lt;br /&gt;
&lt;br /&gt;
Other web development tools available are :&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Internet_Explorer_Developer_Tools Internet Explorer Developer Tools]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Opera_Dragonfly Opera Dragonfly]&lt;br /&gt;
*[https://developer.apple.com/technologies/safari/developer-tools.html Safari's Web Inspector]&lt;br /&gt;
*[https://developers.google.com/chrome-developer-tools/ Google Chrome Developer Tool]&lt;br /&gt;
&lt;br /&gt;
All these tools work like firefug with their own minor variances, which make various actions a tiny bit easier or harder. Since websites should be cross-browser compatible, one have to be really comfortable in the debugging tools of every browser. Firebug can be good starting point for a naive developer as it is very easy to use.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;br /&gt;
* http://www.smashingmagazine.com/2008/11/18/15-helpful-in-browser-web-development-tools/&lt;br /&gt;
&lt;br /&gt;
== See More ==&lt;br /&gt;
&lt;br /&gt;
For better understanding [http://www.youtube.com/watch?v=sHbYpl1XFiM see this video]&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79167</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79167"/>
		<updated>2013-09-25T03:46:17Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Other web development tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color. Thus inspecting styles of any element is very easy with firebug.&lt;br /&gt;
&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot, background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken for each response. By laying the load time out in a timeline various sources of delay can be tracked. The sources includes html, css, javascript, images etc. Options to see the analysis of these sources appear on the menu bar of net tab. &lt;br /&gt;
&lt;br /&gt;
It also shows the start and finish time of loading a file relative to the other files. This helps in tuning the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Other web development tools ==&lt;br /&gt;
&lt;br /&gt;
Other web development tools available are :&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Internet_Explorer_Developer_Tools Internet Explorer Developer Tools]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Opera_Dragonfly Opera Dragonfly]&lt;br /&gt;
*[https://developer.apple.com/technologies/safari/developer-tools.html Safari's Web Inspector]&lt;br /&gt;
*[https://developers.google.com/chrome-developer-tools/ Google Chrome Developer Tool]&lt;br /&gt;
&lt;br /&gt;
All these tools work like firefug with their own minor variances, which make various actions a tiny bit easier or harder. Since websites should be cross-browser compatible, one have to be really comfortable in the debugging tools of every browser. Firebug can be good starting point for a naive developer as it is very easy to use.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;br /&gt;
* http://www.smashingmagazine.com/2008/11/18/15-helpful-in-browser-web-development-tools/&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79166</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79166"/>
		<updated>2013-09-25T03:39:27Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Other web development tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color. Thus inspecting styles of any element is very easy with firebug.&lt;br /&gt;
&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot, background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken for each response. By laying the load time out in a timeline various sources of delay can be tracked. The sources includes html, css, javascript, images etc. Options to see the analysis of these sources appear on the menu bar of net tab. &lt;br /&gt;
&lt;br /&gt;
It also shows the start and finish time of loading a file relative to the other files. This helps in tuning the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Other web development tools ==&lt;br /&gt;
&lt;br /&gt;
Other web development tools available are :&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Internet_Explorer_Developer_Tools Internet Explorer Developer Tools]&lt;br /&gt;
*Opera Dragonfly&lt;br /&gt;
*Safari's Web Inspector&lt;br /&gt;
*Google Chrome Inspector&lt;br /&gt;
&lt;br /&gt;
All these tools work like firefug with their own minor variances, which make various actions a tiny bit easier or harder. Since websites should be cross-browser compatible, one have to be really comfortable in the debugging tools of every browser. Firebug can be good starting point for a naive developer as it is very easy to use.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;br /&gt;
* http://www.smashingmagazine.com/2008/11/18/15-helpful-in-browser-web-development-tools/&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79165</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79165"/>
		<updated>2013-09-25T03:36:02Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Other web development tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color. Thus inspecting styles of any element is very easy with firebug.&lt;br /&gt;
&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot, background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken for each response. By laying the load time out in a timeline various sources of delay can be tracked. The sources includes html, css, javascript, images etc. Options to see the analysis of these sources appear on the menu bar of net tab. &lt;br /&gt;
&lt;br /&gt;
It also shows the start and finish time of loading a file relative to the other files. This helps in tuning the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Other web development tools ==&lt;br /&gt;
&lt;br /&gt;
Other web development tools available are :&lt;br /&gt;
&lt;br /&gt;
*Internet Explorer Developer Tools&lt;br /&gt;
*Opera Dragonfly&lt;br /&gt;
*Web Inspector&lt;br /&gt;
*Google Chrome Inspector&lt;br /&gt;
&lt;br /&gt;
All these tools work like firefug with their own minor variances, which make various actions a tiny bit easier or harder. Since websites should be cross-browser compatible, one have to be really comfortable in the debugging tools of every browser. Firebug can be good starting point for a naive developer as it is very easy to use.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;br /&gt;
* http://www.smashingmagazine.com/2008/11/18/15-helpful-in-browser-web-development-tools/&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79157</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79157"/>
		<updated>2013-09-25T03:20:37Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Comparison with other web development tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color. Thus inspecting styles of any element is very easy with firebug.&lt;br /&gt;
&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot, background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken for each response. By laying the load time out in a timeline various sources of delay can be tracked. The sources includes html, css, javascript, images etc. Options to see the analysis of these sources appear on the menu bar of net tab. &lt;br /&gt;
&lt;br /&gt;
It also shows the start and finish time of loading a file relative to the other files. This helps in tuning the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Other web development tools ==&lt;br /&gt;
&lt;br /&gt;
Other web development tools available are :&lt;br /&gt;
&lt;br /&gt;
*Internet Explorer Developer Tools&lt;br /&gt;
*Opera Dragonfly&lt;br /&gt;
*Web Inspector&lt;br /&gt;
*Google Chrome Inspector&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;br /&gt;
* http://www.smashingmagazine.com/2008/11/18/15-helpful-in-browser-web-development-tools/&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79146</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79146"/>
		<updated>2013-09-25T03:11:30Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color. Thus inspecting styles of any element is very easy with firebug.&lt;br /&gt;
&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot, background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken for each response. By laying the load time out in a timeline various sources of delay can be tracked. The sources includes html, css, javascript, images etc. Options to see the analysis of these sources appear on the menu bar of net tab. &lt;br /&gt;
&lt;br /&gt;
It also shows the start and finish time of loading a file relative to the other files. This helps in tuning the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;br /&gt;
* http://www.smashingmagazine.com/2008/11/18/15-helpful-in-browser-web-development-tools/&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79137</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79137"/>
		<updated>2013-09-25T02:57:51Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Network Performance Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color. Thus inspecting styles of any element is very easy with firebug.&lt;br /&gt;
&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot, background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken for each response. By laying the load time out in a timeline various sources of delay can be tracked. The sources includes html, css, javascript, images etc. Options to see the analysis of these sources appear on the menu bar of net tab. &lt;br /&gt;
&lt;br /&gt;
It also shows the start and finish time of loading a file relative to the other files. This helps in tuning the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79136</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79136"/>
		<updated>2013-09-25T02:56:28Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Network Performance Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color. Thus inspecting styles of any element is very easy with firebug.&lt;br /&gt;
&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot, background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken by the response. By laying the load time out in a timeline various sources of delay can be tracked. The sources includes html, css, javascript, images etc. Options to see the analysis of these sources appear on the menu bar of net tab. &lt;br /&gt;
&lt;br /&gt;
It also shows the start and finish time of loading a file relative to the other files. This helps in tuning the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79121</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79121"/>
		<updated>2013-09-25T02:34:56Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Network Performance Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color. Thus inspecting styles of any element is very easy with firebug.&lt;br /&gt;
&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot, background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79120</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79120"/>
		<updated>2013-09-25T02:34:40Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Debugging XmlHttpRequest */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color. Thus inspecting styles of any element is very easy with firebug.&lt;br /&gt;
&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot, background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79118</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79118"/>
		<updated>2013-09-25T02:33:44Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* CSS Debugging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color. Thus inspecting styles of any element is very easy with firebug.&lt;br /&gt;
&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot, background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79112</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79112"/>
		<updated>2013-09-25T02:30:27Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* CSS Debugging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Style rules are viewed in the order of precedence. The overridden properties are struck out. Eg if body have style {text-color : red;}. Every element in body follow this style(known as cascading of styles). But if an element (element1) have its own style like .element1 {text-color :blue;} then the body style is struck out and the text in element1 are in blue color.&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. In the below snapshot,background-color of .body1 is changed to blue. This change is applied immediately. But, as mentioned earlier, these tweaks are not permanent. This tools is of great help to web/css designers.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79101</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79101"/>
		<updated>2013-09-25T02:20:54Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* HTML Debugging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page. The below snapshot depicts the editing of title. This change is applied immediately as you type.&lt;br /&gt;
&lt;br /&gt;
[[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Rules are viewed in the order of precedence. The overridden properties are struck out.&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. This tools is of great help to web/css designers.&lt;br /&gt;
While editing a CSS property, the up and down arrow keys can be used to see all possible properties in alphabetical order. Firebug has the complete dictionary of standard CSS keywords in its memory.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79099</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79099"/>
		<updated>2013-09-25T02:16:39Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* HTML Debugging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]]&lt;br /&gt;
&lt;br /&gt;
Once an element is selected, you can change its value to see its affect on the page. These edits are not permanent. It just provide a kind of visual aid to web designer in enriching the look and feel of the page.&lt;br /&gt;
&lt;br /&gt;
[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Rules are viewed in the order of precedence. The overridden properties are struck out.&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. This tools is of great help to web/css designers.&lt;br /&gt;
While editing a CSS property, the up and down arrow keys can be used to see all possible properties in alphabetical order. Firebug has the complete dictionary of standard CSS keywords in its memory.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79093</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79093"/>
		<updated>2013-09-25T02:12:08Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* HTML Debugging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type. The below snapshot depicts the position of selected  &amp;quot;h1&amp;quot; element in html.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]] [[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Rules are viewed in the order of precedence. The overridden properties are struck out.&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. This tools is of great help to web/css designers.&lt;br /&gt;
While editing a CSS property, the up and down arrow keys can be used to see all possible properties in alphabetical order. Firebug has the complete dictionary of standard CSS keywords in its memory.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79091</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79091"/>
		<updated>2013-09-25T02:08:00Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* HTML Debugging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
----&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]] [[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Rules are viewed in the order of precedence. The overridden properties are struck out.&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. This tools is of great help to web/css designers.&lt;br /&gt;
While editing a CSS property, the up and down arrow keys can be used to see all possible properties in alphabetical order. Firebug has the complete dictionary of standard CSS keywords in its memory.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79090</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79090"/>
		<updated>2013-09-25T02:07:27Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Debugging XmlHttpRequest */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]] [[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Rules are viewed in the order of precedence. The overridden properties are struck out.&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. This tools is of great help to web/css designers.&lt;br /&gt;
While editing a CSS property, the up and down arrow keys can be used to see all possible properties in alphabetical order. Firebug has the complete dictionary of standard CSS keywords in its memory.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79089</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79089"/>
		<updated>2013-09-25T02:06:53Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Network Performance Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]] [[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Rules are viewed in the order of precedence. The overridden properties are struck out.&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. This tools is of great help to web/css designers.&lt;br /&gt;
While editing a CSS property, the up and down arrow keys can be used to see all possible properties in alphabetical order. Firebug has the complete dictionary of standard CSS keywords in its memory.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
&lt;br /&gt;
To view the net panel, right click on net tab menu and enable net panel as shown in the screenshot below.&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
Another important consideration when designing a website is the page load time. This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79068</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=79068"/>
		<updated>2013-09-25T01:47:25Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Debugging Using Firebug */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
&lt;br /&gt;
Firebug is a Firefox browser add-on that puts together various web development tools to facilitate web development. It enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites. It is widely used in major companies such as Amazon, eBay, ThoughtWorks etc. by web developers to test and fix bugs in their code.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different versions of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here]. A cross-browser version is in development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provides different tabs to examine HTML(Markup), CSS(Styling), DOM(Document Object Model), Scripts, Net (Network Analysis) etc. This section briefly explains  the various tools available by Firebug and how to use them to debug web applications. To start with debugging, you should right click on the browser and select &amp;quot;Inspect element with Firebug&amp;quot;, which will show the Firebug panel.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect element.png ]]&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]] [[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Rules are viewed in the order of precedence. The overridden properties are struck out.&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. This tools is of great help to web/css designers.&lt;br /&gt;
While editing a CSS property, the up and down arrow keys can be used to see all possible properties in alphabetical order. Firebug has the complete dictionary of standard CSS keywords in its memory.&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. Following are some ways in which you can stop the execution of script and use execution control buttons listed below to continue debugging your code. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution. &lt;br /&gt;
&lt;br /&gt;
  if(var == 0){&lt;br /&gt;
      debugger;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In the above example if value of var  becomes equal to 0, the control would go to the next statement which is debugger. This statement would make the execution to halt at this line and a notification for the break point would be shown.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
Following is a brief description of the tools available in script panel toolbar.&lt;br /&gt;
&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Firebug provides the option to show each of these types of scripts in the following combinations which makes debugging easier.&lt;br /&gt;
&lt;br /&gt;
[[File:script type-wiki.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
The following buttons are available to step through the code once the control is provided to the developer at a break point. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Debugging XmlHttpRequest ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can also be used to debug XmlHttpRequest. To enable select &amp;quot;Show XmlHttpRequests&amp;quot; in the options menu. Once you enable this, whenever an XmlHttpRequest is made, the request made, response received, time taken, value of the headers for the request etc. can be seen on the console panel. Refer to [http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx Debug XmlHttpRequest with Firebug]&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To view the net panel, enable the panel using net' tab menu&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
Another important consideration when designing a website is the page load time.As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You can also filter files by their type and organize them by amount of activity which can help in debugging. By laying the load time out in a timeline various sources of delay can be tracked. For example in the screenshot above the main document takes just short of half a second to load.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== Comparison with other web development tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
To summarize Firebug is the most popular and powerful web development tool. It provides features to modify style and layout in real time and  uses the most advanced JavaScript debugger available for a large number of browsers. It also has a lot of support available on the web to learn and use its capabilities to develop advanced websites. It is highly recommended for web developers to use this tool, as it will certainly make web development much easier.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;br /&gt;
* http://www.ulancer.com/2012/01/firebug-tutorial-getting-started/&lt;br /&gt;
* http://codeclimber.net.nz/archive/2007/08/01/How-to-debug-XmlHttpRequest-with-Firebug.aspx&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Net_perf_2.png&amp;diff=78202</id>
		<title>File:Net perf 2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Net_perf_2.png&amp;diff=78202"/>
		<updated>2013-09-18T20:56:06Z</updated>

		<summary type="html">&lt;p&gt;Vseth: uploaded a new version of &amp;amp;quot;File:Net perf 2.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Net_perf_2.png&amp;diff=78197</id>
		<title>File:Net perf 2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Net_perf_2.png&amp;diff=78197"/>
		<updated>2013-09-18T20:54:31Z</updated>

		<summary type="html">&lt;p&gt;Vseth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=78196</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w11_sv&amp;diff=78196"/>
		<updated>2013-09-18T20:54:16Z</updated>

		<summary type="html">&lt;p&gt;Vseth: /* Network Performance Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Debugging Using Firebug =&lt;br /&gt;
[[File:firebug.png|right]]&lt;br /&gt;
Firebug is a tool that enables web developers to debug, edit and inspect websites' components like CSS, HTML, DOM, JavaScripts. Firebug is free and open source software distributed under the BSD License. Apart from providing debugging, Firebug is also used to analyse performance of websites.&lt;br /&gt;
__TOC__&lt;br /&gt;
== Installation and Activation ==&lt;br /&gt;
Firebug can be installed as a Add-On/Plugin for Firefox. Firebug compatibility for different version of Firefox can be looked [https://addons.mozilla.org/en-US/firefox/addon/firebug/ here].&lt;br /&gt;
&lt;br /&gt;
Version for other browsers is under development.&lt;br /&gt;
&lt;br /&gt;
Following are the ways to activate Firebug&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click F12 =&amp;gt; Activates Firebug on same window as a bar at the bottom.&lt;br /&gt;
&amp;lt;li&amp;gt;Click Ctrl+F12 =&amp;gt; Activates Firebug on a separate window&lt;br /&gt;
&amp;lt;li&amp;gt; Right click on the webpage and click on &amp;quot;Inspect Element with Firebug&amp;quot;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugging ==&lt;br /&gt;
&lt;br /&gt;
Firebug provide different tabs to examine HTML(Markup), CSS(Styling), DOM(Object Model, Scripts, Net (Network Analysis) etc.&lt;br /&gt;
&lt;br /&gt;
=== HTML Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can point any HTML element with precision. HTML elements' attributes and text can be created, deleted, or edited just by clicking them. The changes will be reflected immediately as one type.&lt;br /&gt;
&lt;br /&gt;
[[File:inspect_html_2.png]] [[File:Edit_title.png]]&lt;br /&gt;
&lt;br /&gt;
=== CSS Debugging ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug shows the styles that cascade together for each element. Rules are viewed in the order of precedence. The overridden properties are struck out.&lt;br /&gt;
The style of any html element can be tweaked and checked in real-time. This tools is of great help to web/css designers.&lt;br /&gt;
While editing a CSS property, the up and down arrow keys can be used to see all possible properties in alphabetical order. Firebug has the complete dictionary of standard CSS keywords in its memory&lt;br /&gt;
&lt;br /&gt;
[[File:edit_css_1.png ]][[File:edit_css_2.png ]]&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Debugging ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Firebug can be used to debug JavaScript code using the Console and Script Panel provided by this tool. These panels allow you to step-debug your code, profile performance, log errors and information and other useful functionality.&lt;br /&gt;
&lt;br /&gt;
==== Console Panel ====&lt;br /&gt;
This panel primarily allows you to log information and shows errors and warnings in your code. &lt;br /&gt;
First you need to enable logging of debug information which can be done by checking &amp;quot;Show JavaScript Errors&amp;quot; and &amp;quot;Show JavaScript Warnings&amp;quot; in the options menu.The options menu can be found by clicking on the little arrow in the panel tab or right clicking on the panel tab. This makes all the errors and warnings in the JavaScript code be displayed on the console tab. You can also enable &amp;quot;Show Stack Trace with Errors&amp;quot;, a small icon will be shown besides the run-time errors which on expanding will show the stack trace. The console panel also allows to log user defined messages.&lt;br /&gt;
&lt;br /&gt;
[[File:Console_panel.png]]&lt;br /&gt;
&lt;br /&gt;
==== Script Panel ====&lt;br /&gt;
The script panel provides powerful functionality of step-debugging your code. In order to step debug your code, Firebug has various methods to stop the execution of code at specific point and continue watching or inspecting the outcome at each step. &lt;br /&gt;
&lt;br /&gt;
* '''Breakpoints'''&lt;br /&gt;
You can set breakpoint on the line you want to stop execution by clicking on the breakpoint column on the left side inside the Script Panel. In some of the breakpoints, firebug allows you to set a condition to control when they trigger. There is a breakpoint side Panel to manage breakpoints.&lt;br /&gt;
&lt;br /&gt;
* '''Using Debugger keyword'''&lt;br /&gt;
The keyword &amp;lt;code&amp;gt;debugger;&amp;lt;/code&amp;gt; can be placed in the code at the point where you want to stop execution.&lt;br /&gt;
&lt;br /&gt;
* '''Break On'''&lt;br /&gt;
Firebug also has a break on feature which stops the script execution when a specific event occurs. This feature is present in several panels.&lt;br /&gt;
&lt;br /&gt;
===== Script Panel Toolbar =====&lt;br /&gt;
* '''Break On Features'''&lt;br /&gt;
There is a break on Next button([[File:Break_On_Next_Button.png‎]]) which allows you to stop the script execution at the next executed command. When you click on the button and a script execution comes, the debugger halts the script and you can step through the script using the execution control buttons.&lt;br /&gt;
&lt;br /&gt;
* '''Menu for Script Types'''&lt;br /&gt;
There are 3 different types of scripts.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || Description&lt;br /&gt;
|- &lt;br /&gt;
|static || Scripts loaded together with the page (via the &amp;lt;script&amp;gt; tag)&lt;br /&gt;
|- &lt;br /&gt;
|event || Scripts generated through an event &lt;br /&gt;
|-&lt;br /&gt;
|eval() || Scripts executed using the eval() function (e.g. scripts loaded via an XMLHttpRequest)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* '''Execution Control Buttons'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|- bgcolor=lightgrey&lt;br /&gt;
! style=&amp;quot;width:60px&amp;quot; | Type || style=&amp;quot;width:50px&amp;quot; | Button || Description&lt;br /&gt;
|- &lt;br /&gt;
| Rerun || [[Image:rerunButton.png|center]] || Reruns the current call stack &lt;br /&gt;
|- &lt;br /&gt;
| Continue || [[Image:continueButton.png|center]] || To continue the script execution until the next breakpoint or the execution ends&lt;br /&gt;
|- &lt;br /&gt;
| Step Into || [[Image:stepIntoButton.png|center]]|| Get inside the body of the function to debug it.&lt;br /&gt;
|-&lt;br /&gt;
| Step over || [[Image:stepOverButton.png|center]] || Executes functions,moves to the next line of the same scope does not go inside the function.&lt;br /&gt;
|-&lt;br /&gt;
| Step out || [[Image:stepOutButton.png|center]] || Executes the rest of the current function and jumps back to it's caller&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The attached screenshot shows the script panel, the breakpoint at line 6074 stops execution of code at that line which is also highlighted in yellow. On the right side, the values of the variables like &amp;quot;state&amp;quot; can be seen at runtime under the Watch panel.&lt;br /&gt;
&lt;br /&gt;
[[File:script-debug.png]]&lt;br /&gt;
&lt;br /&gt;
==== Step Debugging ====&lt;br /&gt;
Once the script execution is stopped at a particular step, detailed information about values of variables, stack trace and method parameters can be seen on the Watch and Stack side panel. You can continue the execution of your script slowly watching the behavior of your script using the Execution control buttons. Hovering on the variables and functions in script panel will also give you information about their values.&lt;br /&gt;
&lt;br /&gt;
=== Network Performance Analysis ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To view the net panel, enable the panel using net' tab menu&lt;br /&gt;
&lt;br /&gt;
[[File:net_enable.png]]&lt;br /&gt;
&lt;br /&gt;
This panel shows the network performance of each request and also the time taken by the response. Net tab shows when the file started and stopped loading relative to all the other files. This helps to tune the order of files to show up in the page, so that the users don't have to wait for the important information to be displayed.&lt;br /&gt;
&lt;br /&gt;
[[File:net_perf_2.png]]&lt;br /&gt;
&lt;br /&gt;
== Advantages and Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
=== Advantages === &lt;br /&gt;
* '''Inspecting and Editing HTML'''&lt;br /&gt;
Firebug allows you to inspect HTML code as it currently appears not after JavaScript has modified it. It therefore gives you the flexibility to debug more efficiently and reduces the overall time to debug. If you edit the code the changes are reflected immediately and are highlighted in yellow in the firebug window.&lt;br /&gt;
&lt;br /&gt;
* '''Ability to find errors quickly'''&lt;br /&gt;
One of major advantage of Firebug is that it shows the errors in your code in the bottom left corner of the firebug window in bold red. You can examine all the errors pertaining to the webpage you are editing. The errors are organized so that it is easy to find and address it.&lt;br /&gt;
&lt;br /&gt;
* '''Editing CSS'''&lt;br /&gt;
You can easily tweak CSS features using the cascading style sheet. When you click on a CSS feature, an editor pops up which allows you to edit the code and the changes are immediately reflected and are reversible.&lt;br /&gt;
&lt;br /&gt;
* '''Monitoring Network Activity and Performance'''&lt;br /&gt;
As explained in the above section, Firebug has the Net panel which is a powerful tool to monitor network activity and performance. It allows you to monitor the activity of every single file on the website. You have complete information about file activity. You can also filter files by their type and organize them by amount of activity which can help in debugging.&lt;br /&gt;
&lt;br /&gt;
=== Disadvantages === &lt;br /&gt;
* May cause Firefox slightly slower since firebug is relatively big.&lt;br /&gt;
* It is not available for Internet Explorer.&lt;br /&gt;
* May sometimes(though rarely) make Firefox unstable.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* http://getfirebug.com/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Debugging&lt;br /&gt;
* http://www.ehow.com/info_8544247_advantages-firebug.html&lt;br /&gt;
* https://addons.mozilla.org/en-US/firefox/addon/firebug/&lt;br /&gt;
* http://getfirebug.com/wiki/index.php/Script_Panel&lt;br /&gt;
* http://en.wikipedia.org/wiki/Firebug_(software)&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Net_perf.png&amp;diff=78194</id>
		<title>File:Net perf.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Net_perf.png&amp;diff=78194"/>
		<updated>2013-09-18T20:53:37Z</updated>

		<summary type="html">&lt;p&gt;Vseth: uploaded a new version of &amp;amp;quot;File:Net perf.png&amp;amp;quot;: Reverted to version as of 20:52, 18 September 2013&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Net_perf.png&amp;diff=78192</id>
		<title>File:Net perf.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Net_perf.png&amp;diff=78192"/>
		<updated>2013-09-18T20:53:08Z</updated>

		<summary type="html">&lt;p&gt;Vseth: uploaded a new version of &amp;amp;quot;File:Net perf.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vseth</name></author>
	</entry>
</feed>