WireIt 0.5.0
Hi everyone !
I'm pleased to announce the latest version of WireIt, namely 0.5.0.
This release had 2 major goals:
- Enhance the WiringEditor
- Documentation documentation documentation
The WiringEditor received a lot of attention: by providing a full-page
editor, people have been able to start prototypes very quickly for
their projects. However, we needed to improve the way we connect this
editor to the backend, and that's what we've done, through "adapters".
I'm even very proud of this idea because... it's not mine ! Big thanks to this insightful comment from Jonathan Lister and hurray for open-source communities!
Concerning the documentation, although we already had a full API
documentation and many examples, it was still missing some guidelines.
I therefore wrote the WireIt guide: http://javascript.neyric.com/wireit/guide.html
Of course, we also have some minor improvements :
- the new InOutContainer
- Wire mouse events
- some experimental layout options
You can view the complete changeset at:
http://javascript.neyric.com/wireit/VERSION.txt
And of course download the library from the home page: http://javascript.neyric.com/wireit/
Have fun !
Eric
WireIt 0.4.0 released
The long awaited release of WireIt is finally here ! Awaited indeed, since a major bug was still present in version 0.3.0, preventing it to work on IE. It has been fixed for a long time on the repository but has discouraged many people using WireIt (hopefully not too much...).
What’s new in version 0.4.0 ?
- inputEx integration: inputEx is another of my YUI libraries, to create fields and forms. Through a new class called "FormContainer", you can now build WireIt containers using the advanced forms options from inputEx. The value is saved at the layer level for you through Layer.getWiring
- WiringEditor: This is my favorite feature. While still largely incomplete, the Wiring Editor provide a full-blown interface to create visual languages. It takes care of most of the interface you might want to build a visual editor on top of WireIt. The language definitions are written in JSON, I hope this will greatly reduce the learning curve of WireIt. The transparent ajax communication with the database is handled through a SMD webservice using YUI-RPC. WireIt provides a simple php backend that stores the JSON wiring states in MySql (used for the demos on wireit's website).
- new options:
- terminals position in containers: {top: , left: , right: , bottom: } instead of [x,y]
- Terminal.alwaysSrc : force this terminal to be the source element in every connected wires
- Container.preventSelfWiring : prevent connections between two terminals of this container
- Four Wire methods for handling mouse events. You can override them for a custom use :
- API Documentation with YUI Doc (much more precise on properties and events)
- Layer Map is now clickable and draggable. It will move the linked layer accordingly.
- IE Bug fix ! (finally)
- Moved to github for git repository and better wiki
It's now pretty easy to build visual languages applications. (or at least, prototype them...).
You can follow some projects on http://github.com/neyric/wireit/network. I'm especially looking forward to LeifW XProc Visual Editor
Here is a little presentation that I published on WireIt's homepage :
inputEx 0.2.2, SMD and YUI-RPC
0.2.2 release
Although we didn't add any new field in this release, inputEx 0.2.2 still brings a new set of options and bugfixes. (see the changeset for details)
The most significant part of this version, which I'm pretty excited about, resides in the following components :
- improved JSON-schema support (example one and two)
- yui-rpc: A Service Mapping Description (SMD) client for YUI, based on the SMD Proposal
- inputex-rpc: automatically builds a form from a SMD
- JsonTreeInspector widget: simple widget to display a JSON tree
- The SMD-tester utility
YUI-RPC or "What the heck is Service Mapping Description (SMD)" ?
Abstract from the proposal:
A Service Mapping Description (SMD) is a JSON representation describing web services. An SMD can defines the various aspects of a web service such that clients can coherently interact with the web services. An SMD can be used by generic tools to generate interfaces, human and programmatic, to access available web services. A wide array of web services can be described with SMD including REST services and JSON-RPC services. The SMD format is designed to be flexible, compact, simple, readable, and easily implemented.
SMD is basically a WSDL-like, but for JSON. It's so much simpler to implement that I regret the time I spent on WSDL ! Instead of using XML, XML-RPC and SOAP, we are now able to play with technologies better suited for the browser environment: JSON, JSON-RPC, REST, JSONP etc...
Concerning the "programmatic interface", the dojo framework already provides a remote procedure calls module. However, since I'm a YUI-user, I had to re-implement it on YUI, which gave birth to YUI-RPC.
How inputEx is playing with SMD
From the inputEx point of view, the best part of SMD is that the method parameters are defined using... JSON-Schema !
inputEx was already able to build a form from a JSON-Schema, so it was pretty trivial to implement an automated form generation to call webservices based on a SMD. Here is an example of such a form using a SMD for Yahoo! search.
I believe this will help a lot in decoupling interfaces and webservices. To prove my point, I quickly wrote some SMDs for popular webservices like Yahoo! search, pipes, Twitter, geonames, delicious, flickr, YQL and others, and built a tiny interface, the SMD-tester, to build the forms, call those webservices, and display the response.
Have fun !
JSON Schema and inputEx
Proposed by Kris Zyp, JSON Schema takes the good ideas from XML Schema. From http://json-schema.org/ :
JSON Schema is a specification for a JSON-based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON data is required for a given application and how it can be modified, much like what XML Schema provides for XML. JSON Schema is intended to provide validation, documentation, and interaction control of JSON data.
There are numerous similarities between inputEx and JSON Schema. If you are not convinced, here is an example of a JSON schema:
{"description":"A person",
"type":"object",
"properties": {
"name": {"type":"string"},
"born" : {
"type":["integer","string"],
"minimum":1900,
"maximum":2010,
"format":"date-time",
"optional":true
},
"gender" : {"type":"string",
"options":[
{"value:"male","label":"Guy"},
{"value":"female","label":"Gal"}]},
"address" : {"type":"object",
"properties":{
"street":{"type":"string"},
"city":{"type":"string"},
"state":{"type":"string"}
}
}
}}
inputEx users should be comfortable writing a form for this schema :
{
type: "group",
fields: [
{type: "string", inputParams: {name: "name", required: true}},
{type: "date", inputParams: {name: "born"} },
{type: "select", inputParams: {name: "gender", selectOptions:["Guy", "Gal"], selectValues: ["male", "female"]}},
{type: "group", inputParams: {
name:"address",
fields: [
{type: "string", inputParams: {name: "street"}},
{type: "string", inputParams: {name: "city"}},
{type: "string", inputParams: {name: "state"}}
] } } ] }
The main difference is that the JSON schema ontology is data-centric, wheras the inputEx JSON schema ontology is form-centric, but as you can see, they are very similar.
Another similarity is the self-descriptive ability of JSON Schema and inputEx.