1 / 24

JavaScript Development Tools

JavaScript Development Tools. Front-End Development. JS Development Tools. In order to work with JavaScript, we need to set up a couple of tools Many tools available; we wil go for a quite simple setup: Aptana Studio 3 Firefox browser, with Firebug extension. Aptana Studio 3.

carnig
Download Presentation

JavaScript Development Tools

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JavaScript Development Tools Front-End Development

  2. JS Development Tools • In order to work with JavaScript, we need to set up a couple of tools • Many tools available; we wil go for a quite simple setup: • Aptana Studio 3 • Firefox browser, with • Firebugextension

  3. Aptana Studio 3 • We need a tool for creating and editing HTML and JavaScript files (not compiling) • In principle, we could just use Notepad… • We will only use Aptana Studio for • Creating and editing (smart editor) • Launching websites to Firefox

  4. Aptana Studio 3 • Aptana Studio 3 is free, just download and install • Go to www.aptana.com, download and install the version for your OS

  5. Aptana Studio 3

  6. Aptana Studio 3 Open a file: File | Open File

  7. Aptana Studio 3

  8. Aptana Studio 3 • The Aptana Studio editor provides ”smart” facilities like: • Color coding of page elements • Auto-generation of closing tags • Auto-completion for JavaScript methods, properties, etc.. • …and probably a lot of other stuff we are not really going to use 

  9. Aptana Studio 3 If you do not like the default color scheme: Choose Themes (the ”color-wheel” icon), and choose a different theme. Current theme is greyed out

  10. Firefox Browser • Aptana Studio cannot ”run” (display) a website for you – we need a browser for that • What to choose… • We will use Firefox, mainly because of the Firebug plug-in (later) • Go to www.firefox.com, and install Firefox on your PC

  11. Firefox Browser • Once you have installed Firefox, you can set it as the default browser used by Aptana Studio • This is done by choosing the menu Run, and then Run Configurations

  12. Firefox Browser 2) Click ”New Launch Configuration” 1) Select ”Web Browser”…

  13. Firefox Browser 1) Enter a name for the new Run configuration 2) Browse to the Firefox executable 3) Leave rest as-is…

  14. Firefox Browser • When we now wish to run (display) a website, we should: • In the editor, go to that .html page which is the main page of the website (in our examples, we will typically only have only .html page) • Choose the menu Run, then Run (or Ctrl + F11, or click the green ”Run” icon)

  15. Firefox Browser

  16. Firefox Browser • NOTE: A classic mistake: • You edit some JavaScript (a .js file) • You save, and wish to see the website… • …so you click Run, while displaying the .js file in the editor • This will NOT launch the website, but just show the JavaScript directly in the browser • REMEMBER to shift to the .html page in the editor

  17. Firebug extension • If we always created error-free websites, this would be all we needed… • Aptana Studio cannot really help us with ”dynamic” errors, i.e. JavaScript errors • The Firebug extension to Firefox can help us with this! • Go to getfirebug.com , and install Firebug

  18. Firebug extension • Once Firebug is installed, you can start it in Firefox by: • Pressing F12, or • Clicking on the Firebug icon in the upper right corner

  19. Firebug extension • You can display the Firebug window either as part of the browser window, or in a separate window (I prefer at the bottom of the screen )

  20. Firebug extension

  21. Firebug extension We can show/inspect various webpage element, like e.g. JavaScript

  22. Firebug extension We can even debug JavaScript, using breakpoints, single-stepping, etc.

  23. Firebug extension In the Watch window, we can observe values of variables, etc (also mouse-over)

  24. Try it out! • Make sure you have all the below installed: • Aptana Studio 3 • Firefox browser • Firebug extension • Do JavaScript Exercise 01 (see class website)

More Related