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"

(18 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
'''V'''alidation - provide semantic validation
 
'''V'''alidation - provide semantic validation
  
'''I'''nstruction - Helps with inline documentation
+
'''I'''nstruction - Helps with inline documentation, learn while you work.
  
 
'''L'''ibraries - Packaged as an Eclipse project just import and depend on.
 
'''L'''ibraries - 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===
 +
 +
# Dojo 1.6  [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/DojoTL git]]
 +
# EcmaScript Ed. 5 api updates [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/ES5TL git]]
 +
# HTML 5 Canvas 2D API [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/CanvasTL git]]
 +
# jQuery 1.4  [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/JQueryTL git]]
 +
# jQuery Mobile 1.0 Alpha 4.1 (Requires JQuery ANVIL)  [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/JqMobileTL git]]
 +
# JSON (plans to include in the built in ANVIL) - see bug [[https://bugs.eclipse.org/bugs/show_bug.cgi?id=402813 402813]]  [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/JSONTL git]]
 +
# Node.js 0.4  [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/NodejsTL git]]  [[VJET/NodeJS|screenshots]]
 +
 +
===3rd party created commercial ANVILs ===
 +
 +
#  ExtJs 4.0.7, 4.1, 4.2 - [[http://sencha.com Sencha]]
 +
#  Sencha Touch 2.1,2.2 - [[http://sencha.com Sencha]]
 +
 +
== Under development/ VJET ANVILs ==
 +
 +
===These ANVILs are part of VJET project===
 +
 +
# Console [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/ConsoleTL git]]
 +
# PerformanceTiming  [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/PerformanceTimingTL git]]
 +
# SWFObject  [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/SWFObjectTL git]]
 +
# Scriptaculous [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/ScriptaculousTL git]]
 +
# Prototype [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/PrototypeTL git]]
 +
# PhoneGap/Apache Cordova [[http://git.eclipse.org/c/vjet/org.eclipse.vjet.typelibs.git/tree/PhoneGapTL git]]
 +
 +
===3rd party created/provided ANVILs===
 +
 +
# NodeJS 0.10
 +
# 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]]

Revision as of 16:37, 20 March 2013

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
  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

Copyright © Eclipse Foundation, Inc. All Rights Reserved.