Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "VJET/ANVILS"

(Introducing VJET ANVILS)
 
(7 intermediate revisions by the same user not shown)
Line 19: Line 19:
 
The idea behind the "ANVIL" is to create definitions which describe other JavaScript libraries.  JavaScript is a huge area today thanks to Client and Server-side libraries such as jQuery and Node.js.
 
The idea behind the "ANVIL" is to create definitions which describe other JavaScript libraries.  JavaScript is a huge area today thanks to Client and Server-side libraries such as jQuery and Node.js.
  
ANVIL "descriptions" are defined in a structured definition format called vjo.js.  vjo.js is JavaScript itself (which is kind of nice - JavaScript describing other JavaScript).
+
ANVIL "descriptions" are defined in a structured definition format called vjo.js (along with vjetdoc js comments).  vjo.js is JavaScript itself (which is kind of nice - JavaScript describing other JavaScript).
  
 
We can think of the vjo.js as being similar to Java Interfaces and Class declarations.  We can "describe" the coding contracts only but no their implementation.  The implementation is always the real runtime library that would physically be included in your webpage like jquery (<script src="http://code.jquery.com/jquery-1.9.1.min.js";></script>) or server-side Node module being used via require(...).
 
We can think of the vjo.js as being similar to Java Interfaces and Class declarations.  We can "describe" the coding contracts only but no their implementation.  The implementation is always the real runtime library that would physically be included in your webpage like jquery (<script src="http://code.jquery.com/jquery-1.9.1.min.js";></script>) or server-side Node module being used via require(...).
Line 28: Line 28:
  
 
JavaScript is a simple language on the surface and provides very limited types (Object, Function, Array, Date, Boolean, String, Number and RegExp) only.  However, JavaScript can create very complex functions and types that benefit from more type support and that's where VJET comes into play.
 
JavaScript is a simple language on the surface and provides very limited types (Object, Function, Array, Date, Boolean, String, Number and RegExp) only.  However, JavaScript can create very complex functions and types that benefit from more type support and that's where VJET comes into play.
 +
 +
== How to use a VJET ANVIL ==
 +
 +
http://wiki.eclipse.org/VJET/Importing_VJET_ANVILs
  
 
== Available VJET ANVILs ==
 
== Available VJET ANVILs ==
Line 59: Line 63:
 
===3rd party created/provided ANVILs===
 
===3rd party created/provided ANVILs===
  
NodeJS 0.10 - Mark Palaima http://www.linkedin.com/in/markpalaima
+
# NodeJS 0.10 - https://github.com/vjetanvils/nodejs
 +
# Underscore https://npmjs.org/package/underscore
 +
# JQuery 1.9.1 http://jquery.com/
 +
# Async https://npmjs.org/package/async
 +
# MongoDB https://npmjs.org/browse/depended/mongodb
 +
# Optimist https://npmjs.org/package/optimist
 +
 
 +
== Writing a VJET ANVIL ==
 +
 
 +
#Learn VJO.js
 +
## [[VJET/VJO Language Ref]]
 +
## [[VJET/Semantic Comparison - Java and vjojs]]
 +
#Learn VJETDoc
 +
## [[VJET/VJETDoc Quick Reference]]
 +
## [[VJET/VJETDoc Reference Guide]]
 +
## [[VJET/VJETDoc Syntax]]
 +
# Tutorials
 +
## [[VJET/VJET_ANVIL_Tutorial_-_part_1 | Anvil Tutorial]]
 +
 
 +
 
 +
== Google Summer of Code ANVIL projects ==
 +
 
 +
http://wiki.eclipse.org/Google_Summer_of_Code_2013_Ideas#Eclipse_VJET:_Help_test_and_improve_VJET.27s_NodeJS_support
 +
http://wiki.eclipse.org/Google_Summer_of_Code_2013_Ideas#Eclipse_VJET:_Improve_VJET.27s_support_for_JQuery_UI
  
  
 
[[Category:VJET|ANVILs]]
 
[[Category:VJET|ANVILs]]

Latest revision as of 16:29, 20 March 2014

Introducing VJET ANVILS

(Formerly known as VJET Type libraries)

Authoring - give you great code assist for the right javascript scope

Navigation - help you navigate the code base based on call hierarchy, references, etc.

Validation - provide semantic validation

Instruction - Helps with inline documentation, learn while you work.

Libraries - Packaged as an Eclipse project just import and depend on.

Overview

VJET ANVILs provide a way to work with 3rd party Javascript libraries without requiring an Eclipse plugin because the ANVILS are described with javascript.

The idea behind the "ANVIL" is to create definitions which describe other JavaScript libraries. JavaScript is a huge area today thanks to Client and Server-side libraries such as jQuery and Node.js.

ANVIL "descriptions" are defined in a structured definition format called vjo.js (along with vjetdoc js comments). vjo.js is JavaScript itself (which is kind of nice - JavaScript describing other JavaScript).

We can think of the vjo.js as being similar to Java Interfaces and Class declarations. We can "describe" the coding contracts only but no their implementation. The implementation is always the real runtime library that would physically be included in your webpage like jquery (<script src="http://code.jquery.com/jquery-1.9.1.min.js";></script>) or server-side Node module being used via require(...).

The ANVIL is read in by the Eclipse IDE and provides the necessary information for it to provide authoring assistance and validations. Authoring assistance would be things like type completion and proposals which are concepts we generally enjoy with typed languages like Java.

Also, those definitions help VJET do validation on your code as well. For example your function takes a String and Number argument but someone passed in an Array or Date. In raw JavaScript this is just tough luck and bad things happen at runtime. With VJET, this scenario is caught and flagged as an error for the developer to correct.

JavaScript is a simple language on the surface and provides very limited types (Object, Function, Array, Date, Boolean, String, Number and RegExp) only. However, JavaScript can create very complex functions and types that benefit from more type support and that's where VJET comes into play.

How to use a VJET ANVIL

http://wiki.eclipse.org/VJET/Importing_VJET_ANVILs

Available VJET ANVILs

These ANVILs are part of the VJET project

  1. Dojo 1.6 [git]
  2. EcmaScript Ed. 5 api updates [git]
  3. HTML 5 Canvas 2D API [git]
  4. jQuery 1.4 [git]
  5. jQuery Mobile 1.0 Alpha 4.1 (Requires JQuery ANVIL) [git]
  6. JSON (plans to include in the built in ANVIL) - see bug [402813] [git]
  7. Node.js 0.4 [git] screenshots

3rd party created commercial ANVILs

  1. ExtJs 4.0.7, 4.1, 4.2 - [Sencha]
  2. Sencha Touch 2.1,2.2 - [Sencha]

Under development/ VJET ANVILs

These ANVILs are part of VJET project

  1. Console [git]
  2. PerformanceTiming [git]
  3. SWFObject [git]
  4. Scriptaculous [git]
  5. Prototype [git]
  6. PhoneGap/Apache Cordova [git]

3rd party created/provided ANVILs

  1. NodeJS 0.10 - https://github.com/vjetanvils/nodejs
  2. Underscore https://npmjs.org/package/underscore
  3. JQuery 1.9.1 http://jquery.com/
  4. Async https://npmjs.org/package/async
  5. MongoDB https://npmjs.org/browse/depended/mongodb
  6. Optimist https://npmjs.org/package/optimist

Writing a VJET ANVIL

  1. Learn VJO.js
    1. VJET/VJO Language Ref
    2. VJET/Semantic Comparison - Java and vjojs
  2. Learn VJETDoc
    1. VJET/VJETDoc Quick Reference
    2. VJET/VJETDoc Reference Guide
    3. VJET/VJETDoc Syntax
  3. Tutorials
    1. Anvil Tutorial


Google Summer of Code ANVIL projects

http://wiki.eclipse.org/Google_Summer_of_Code_2013_Ideas#Eclipse_VJET:_Help_test_and_improve_VJET.27s_NodeJS_support http://wiki.eclipse.org/Google_Summer_of_Code_2013_Ideas#Eclipse_VJET:_Improve_VJET.27s_support_for_JQuery_UI

Back to the top