SlideShare a Scribd company logo
JAVASCRIPT NIRVANA
IN NETBEANS
Ryan Cuprak
About
Ryan Cuprak
• @ctjava
• rcuprak@gmail.com
• http://www.cuprak.info
• https://www.linkedin.com/in/rcuprak
Notepad?
JavaScript IDEs
• NetBeans 8.1+
• WebStorm
• VisualStudio 2013+
• Sublime Text
• Eclipse (with JSDT)
• Komodo
Free
$99
Why NetBeans?
• Intuitive
• Integrated
• Adaptable
• Full Stack
• Powerful
NetBeans 8.2 Features
Natively supports HTML5 projects.
• CSS3, HTML5, ECMAScript 6, etc.
• Support for HTML5 JavaScript libraries.
Features
• Syntax highlighting, auto-completion, code folding, etc.
• Full-fledged debugger
• Breakpoints on DOM, line, event, and XMLHttpRequests.
• Callstack, variables, watches
• JavaScript unit testing support
• Grunt Support
• SASS/LESS Support
• Apache Cordova (mobile HTML5 development)
CONFIGURATION
JavaScript Dependencies
NetBeans Configuration
1. Install Node.js
2. Install SASS
• Install Ruby 2.2.X
• gem install sass
3. Install Chrome Plugin
http://tinyurl.com/jjcorgm
Chrome Plugin
Tool Configurations
Looks in
default
locations
Key Bindings
Don’t want to re-learn keyboard shortcuts?
PROJECTS TYPES
Getting Started
NetBeans & Projects
Open Projects
Project Types
Key questions:
1. What JavaScript technology stack?
2. Are you starting fresh or with existing sources?
HTML5 Application Templates
Tools
Tool Description
package.json Project dependencies, meta-data, used by npm.
bower.json Manages front-end components like HTML, css, js.
Gruntfile.js JavaScript task runner tool.
gulpfile.js JavaScript task runner tool.
HTML5 Application Example
Angular Seed Template
Node.js Application
HTML5 + Node.js Application
Example Projects
File Templates
Category File Types
HTML5/JavaScript HTML File, JavaScript File, Cascading Style Sheet,
Sass File, Less file, JSON File, react.js, Jade File,
package.json, Gruntfile.js, gulpfile.js, bower.json,
.bowerrc, Empty JET module, Knockout JET
Module
Selenium Tests Protractor Configuration File, Selenium Mocha Test
Case, Selenium Jasmine Test Case
Unit Tests Karma Configuration File, jsTestDrive Configuration
File
Web Services RESTful JavaScript Client
Custom editor provided for each project type.
EDITOR FEATURES
Syntax and Semantic Highlighting
ECMAScript 6
Navigation
JavaScript Parser
Code Completion
JavaScript Debugging
DOM Debugging
CSS Editing
Popup for adding new
properties
LESS Support: New File
File -> New File
LESS Support: Editor + CSS Generation
Generated CSS
Customizable Palette
• Drag HTML elements from Palette into HTML Window (Wizard
appears)
• Drag selections from HTML document to Palette to create new HTML
snippets.
Embedded Web Server
Web Server for testing
Managing JavaScript Dependencies
Three different approaches:
• npm – Node Package Manager
• Bower
• CDNJS
Adding JavaScript Libraries (Bower)
https://bower.io/
Adding JavaScript Libraries (Continued…)
Downloads Library
Adding JavaScript Libraries (Continued…)
Insert Library
Drag library into target folder.
GRUNT & GULP
Build Script Automation
Gulp / Grunt
• Gulp and Grunt are both task runners (think Ant)
• Grunt uses a configuration based approach
• Gulp uses streams from Node
• Common tasks:
• Compile SASS/Less to CSS
• Run JSLint
• Minify JavaScript/CSS files
Gulp: Hello World
Gulp: Hello World
Gulp: Configuring IDE Actions
Grunt: Example
Install via npm
Grunt: Install Dependencies
RequireJS
Maps module names to local paths for testing.
NODE.JS
Serverside JavaScript
What is Node.js?
Node.js is a platform built onChrome’s JavaScript
runtime for easily building fast and scalable network
applications. Node.js uses an event-driven, non-blocking
I/O model that makes it lightweight and efficient, perfect for
data-intensive real-time applications that run across
distributed devices.
Node.js Runtime
• V8 JavaScript Engine is an open source JavaScript
engine developed by Google for the Chrome web
browser.
• V8 compiles JavaScript to native machine code (IA-32,
x86-64, ARM, etc.) before executing it.
Node.js + Express.js
Template Engines
• JADE <- supported natively by NetBeans
• EJS
• Handlebars
• Hogan.js
Node.js Express.js
Template
Engine
NetBeans & Node.js
• Fully integrated support for Node.js
• Project wizard for creating new projects
• Express generator is integrated
• Project specific Node.js settings
Demo
UNIT TESTING
Unit Testing
Supported Unit Testing frameworks:
• Karma
• JS Test Driver
• Mocha
Demo
• Jasmine – JavaScript unit testing framework
• Tests written in JavaScript
• Test synchronous and asychronous JavaScript code
• Karma – JavaScript test runner
• Based on NodeJS
• Launches and executes tests in web browser
(Chrome/FireFox/etc.)
Karma Configuration & Setup
Installing Karma for a project (from within project directory):
• npm install karma --save-dev
• npm install karma-jasmine karma-chrome-launcher --
save-dev
Karma Configuration & Setup
1
2
3
Create Karma Configuration
Karma Configuration
Karma Configuration
Karma Configuration & Setup
Karma: Test Run
Example Unit Test
CORDOVA
Introducing Cordova
• Originally named PhoneGap.
• Mobile development framework
• Development started in 2009.
• Wraps HTML5 applications in a native
wrapper.
• Purchased by Adobe in 2011.
• Code donated to Apache as Apache
Cordova.
• PhoneGap built on Cordova
• Adobe provides cloud build system for
PhoneGap.
Cordova
Platform SDK
• Certificates to test on devices ($$)
Ant (ant.apache.org)
NodeJS (nodejs.org)
• Install Apache Cordova (cordova.apache.org)
Chrome
Java 8 (java.oracle.com)
NetBeans 8.0.1 (netbeans.org)
What might we want to install?
Maven (maven.apache.org)
Karma (karma-runner.github.io)
Jasmine (jasmine.github.io)
Grunt (gruntjs.com)
Cordova Platform Tools and SDKs
iOS (xCode)
Apple App Store – search for XCode
Android (Android Studio)
https://developer.android.com/tools/index.html
Windows Phone
http://dev.windows.com/en-us/develop/downloads
Tizen
https://developer.tizen.org/downloads/tizen-sdk
BlackBerry
http://developer.blackberry.com
iOS Setup
Apache Cordova Setup
Installing Cordova:
• Mac/Linux: sudo npm install –g cordova
• Windows: npm install –g cordova
Adding Platforms:
• cordova platform add ios
• cordova platform add amazon-fireos
• cordova platform add android
• cordova platform add blackberry10
• cordova platform add firefoxos
Creating a project (without NetBeans)
• cordova create hello com.example.hello HelloWorld
Apache Cordova
Cordova is an HTML Project
• Start with Cordova Project
• Start with HTML5 and add Cordova
Cordova Project Creation
Project Layout
Apache Cordova – index.html
Apache Cordova – index.js
Run Target
Q&A
Best JavaScript IDE!

More Related Content

PPTX
Developing in the Cloud
PPTX
Hybrid Mobile Development with Apache Cordova and
PDF
Play Framework: Intro & High-Level Overview
PPTX
Containerless in the Cloud with AWS Lambda
PDF
Social Connections 2015 CrossWorlds and Domino
PPT
High Availability Perl DBI + MySQL
PDF
4 JVM Web Frameworks
PDF
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
Developing in the Cloud
Hybrid Mobile Development with Apache Cordova and
Play Framework: Intro & High-Level Overview
Containerless in the Cloud with AWS Lambda
Social Connections 2015 CrossWorlds and Domino
High Availability Perl DBI + MySQL
4 JVM Web Frameworks
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"

What's hot (19)

KEY
SOA on Rails
PPTX
CQRS Evolved - CQRS + Akka.NET
PDF
Service-Oriented Design and Implement with Rails3
PPT
Scalability using Node.js
PDF
Keynote Oracle Fusion Middleware Summit_2020
PDF
Camel oneactivemq posta-final
PDF
Eureka Moment UKLUG
PPTX
Saving Time By Testing With Jest
PPTX
Integrating Microservices with Apache Camel
PPTX
Mcknight well built extensions
PDF
The Dark Side of Single Page Applications
PPT
Introduction to Apache CloudStack by David Nalley
PPTX
NetflixOSS for Triangle Devops Oct 2013
PPTX
SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...
PDF
Padrino - the Godfather of Sinatra
PDF
GitBucket: The perfect Github clone by Scala
PDF
Play concurrency
PDF
Ruby performance - The low hanging fruit
PDF
Web Development using Ruby on Rails
SOA on Rails
CQRS Evolved - CQRS + Akka.NET
Service-Oriented Design and Implement with Rails3
Scalability using Node.js
Keynote Oracle Fusion Middleware Summit_2020
Camel oneactivemq posta-final
Eureka Moment UKLUG
Saving Time By Testing With Jest
Integrating Microservices with Apache Camel
Mcknight well built extensions
The Dark Side of Single Page Applications
Introduction to Apache CloudStack by David Nalley
NetflixOSS for Triangle Devops Oct 2013
SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...
Padrino - the Godfather of Sinatra
GitBucket: The perfect Github clone by Scala
Play concurrency
Ruby performance - The low hanging fruit
Web Development using Ruby on Rails
Ad

Viewers also liked (11)

PPTX
JavaOne 2013: Organizing Your Local Community
PPTX
JavaFX Versus HTML5 - JavaOne 2014
PPTX
Combining R With Java For Data Analysis (Devoxx UK 2015 Session)
PPTX
Java EE 8 Update
PPTX
Batching and Java EE (jdk.io)
PPTX
Jms deep dive [con4864]
PPTX
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
PPTX
Top 50 java ee 7 best practices [con5669]
PPTX
50 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
PPTX
Faster java ee builds with gradle [con4921]
PPTX
Faster Java EE Builds with Gradle
JavaOne 2013: Organizing Your Local Community
JavaFX Versus HTML5 - JavaOne 2014
Combining R With Java For Data Analysis (Devoxx UK 2015 Session)
Java EE 8 Update
Batching and Java EE (jdk.io)
Jms deep dive [con4864]
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Top 50 java ee 7 best practices [con5669]
50 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
Faster java ee builds with gradle [con4921]
Faster Java EE Builds with Gradle
Ad

Similar to Java script nirvana in netbeans [con5679] (20)

PPTX
Node.js Development with Apache NetBeans
PDF
Open source and cross platform .net
PDF
The MEAN Stack
PPTX
PHP Indonesia - Nodejs Web Development
PPTX
Irfan maulana nodejs web development
PPT
Getting Started with Docker
PDF
JHipster
PDF
How to generate a REST CXF3 application from Swagger ApacheConEU 2016
PPTX
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
PPTX
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
PPTX
What is Mean Stack Development ?
PDF
Introduction to node js - From "hello world" to deploying on azure
PDF
End-to-end W3C APIs - tpac 2012
PPT
Front-End Tools and Workflows
PDF
Implementing your own Google App Engine
PDF
Peru JUG Micronaut & GraalVM
PDF
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
PPTX
Introduction to node.js by jiban
KEY
Nodejs web,db,hosting
PDF
Everything-as-code - A polyglot adventure
Node.js Development with Apache NetBeans
Open source and cross platform .net
The MEAN Stack
PHP Indonesia - Nodejs Web Development
Irfan maulana nodejs web development
Getting Started with Docker
JHipster
How to generate a REST CXF3 application from Swagger ApacheConEU 2016
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
What is Mean Stack Development ?
Introduction to node js - From "hello world" to deploying on azure
End-to-end W3C APIs - tpac 2012
Front-End Tools and Workflows
Implementing your own Google App Engine
Peru JUG Micronaut & GraalVM
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Introduction to node.js by jiban
Nodejs web,db,hosting
Everything-as-code - A polyglot adventure

More from Ryan Cuprak (8)

PPTX
Jakarta EE Test Strategies (2022)
PPTX
DIY Home Weather Station (Devoxx Poland 2023)
PPTX
Why jakarta ee matters (ConFoo 2021)
PDF
Polygot Java EE on the GraalVM
PPTX
Exploring Java Heap Dumps (Oracle Code One 2018)
PPTX
Preparing for java 9 modules upload
PPTX
Faster Java EE Builds with Gradle
PPTX
Java EE 8
Jakarta EE Test Strategies (2022)
DIY Home Weather Station (Devoxx Poland 2023)
Why jakarta ee matters (ConFoo 2021)
Polygot Java EE on the GraalVM
Exploring Java Heap Dumps (Oracle Code One 2018)
Preparing for java 9 modules upload
Faster Java EE Builds with Gradle
Java EE 8

Recently uploaded (20)

PDF
Softaken Excel to vCard Converter Software.pdf
PDF
top salesforce developer skills in 2025.pdf
PPT
Introduction Database Management System for Course Database
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Nekopoi APK 2025 free lastest update
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
System and Network Administration Chapter 2
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Transform Your Business with a Software ERP System
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Softaken Excel to vCard Converter Software.pdf
top salesforce developer skills in 2025.pdf
Introduction Database Management System for Course Database
How Creative Agencies Leverage Project Management Software.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Navsoft: AI-Powered Business Solutions & Custom Software Development
Wondershare Filmora 15 Crack With Activation Key [2025
Nekopoi APK 2025 free lastest update
Operating system designcfffgfgggggggvggggggggg
ISO 45001 Occupational Health and Safety Management System
System and Network Administration Chapter 2
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Transform Your Business with a Software ERP System
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Understanding Forklifts - TECH EHS Solution
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Upgrade and Innovation Strategies for SAP ERP Customers
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool

Java script nirvana in netbeans [con5679]

Editor's Notes

  • #2: I would like to welcome everybody to
  • #4: It is 2016, are you still coding with Notepad or Notepad++.
  • #67: What do you need to get started?