Skip to content
master
Switch branches/tags
Code

@UTF-8

Go Report Card GoDoc GolangCI

WAJAF for GO v1

WAJAF is the WebAbility Javascript Application Framework. It is a synchronized GO-Server <=> JS-Client framework to developp organized web applications.

GO manuals are available on godoc.org GoDoc

JAVASCRIPT manual:

The examples and tests show the working functions and the manual of them.

[GoDoc

  1. The main core.

The main core contains:

  • 2 attributes:

Examples & manuals: [GoDoc

  • zIndex method, used to set an unused zIndex to a node,

Examples & manuals: [GoDoc

  • Verification methods is*, used to know the type of JS objects. All the functions return true/false. True means the variable match the specified type by the is* method. -- isDefined: returns true if the variable is not undefined. -- isEmpty: returns true if the variable is empty: empty means undefined, null, empty array or empty string. -- isBool: returns true if the variable is a boolean. -- isNumber: returns true if the variable is number, integer or float. -- isString: returns true if the variable is a string or a String object. -- isArray: returns true if the variable is an array. -- isObject: returns true if the variable is an object. It includes String(), Date(), {}. etc. Note than Javasript consider null as an object too. -- isFunction: returns true if the variable is a function. -- isDate: return true if the variable is a Date object. -- isDOM: return true if the variable is a DOM node object.

Examples & manuals: [GoDoc

  • Objects and nodes methods.

For objects:

  • WA.extend: Will extends an object from another (inheritance).
  • WA.clone: Will clone an object and all its children. -- If you dont care the type of object but only its attributes, you can use WA.clone(object, true) -- If you use the normal method WA.clone(object), it will close the whole object with attributes and methods.
  • WA.sizeof: Will calculates the size (number of attributes) of an object.

For DOM nodes:

  • WA.createDomNode: Will create a DOM Node of specified type, and apply classname if defined.
  • WA.getDomNode: Will get the DOM node of the specified Id.
  • WA.toDOM: Will get the DOM node from a string ID or a node itself.

Examples & manuals: [GoDoc

  • Node get() functions.

The get function lets you find a node or a set of nodes by rules, then apply some changes on the node.

The get() method works as followed:

  1. The code will search all the nodes corresponding to the filter you give it.

There are 3 posibilities:

a - No nodes were found. The subsequent operations will do nothing. b - There was only one node found. The subsequent operations will work directly on this node. c - There was more than 1 node found (from 2 to the whole DOM). The subsequent operations will work for each one of the found nodes.

  1. The operation is applied to all the node(s).

  2. The operations can be chained.

The parameter of get() method is a string used to search the nodes:

"#id": If you want to find a single node by its unique id, using the CSS syntax. ".class": If you want to find a list of nodes by their class, using the CSS syntax. "!name": If you want to find a list of nodes by their name (in a form). "tag": If you want to find a list of nodes by their tag type (example: 'div', 'a').

Examples & manuals: [GoDoc

  1. The browser core:

TO DO:

  • Adds local specific functions to all the Containers, Elements, Zones, etc to improve tree programmation.
  • Tests

Version Changes Control

v0.1.0 - 2020-12-22

  • First build on GO, with all the necesary code to devel, test, publish and show live examples.
  • Adds titleview parameter to buttonelement.js (missing)
  • Separates coreext.js and coretemplate.js from core.js

v0.0.15 - 2020-04-26

  • JS code is now embedded into GO code in resources directory. embed.go is added to generate embedded code, but is not compilable with the libraries.

v0.0.14 - 2020-04-13

  • Correction on node: HELP as messages, not help children

v0.0.13 - 2020-04-13

  • Correction on node: JSON Marshal, wrong ',' calculations (again)

v0.0.12 - 2020-04-13

  • Correction on node: JSON Marshal, wrong ',' calculations

v0.0.11 - 2020-04-13

  • Added parameters to creation of containers, zones, dataset and elements

v0.0.10 - 2020-04-08

  • Added know child "code" to event

v0.0.9 - 2020-04-08

  • Correction of event node so code is into code node.

v0.0.8 - 2020-04-08

  • Correction of all the Types of containers and elements to put correct js library name (nameContainer and nameElement syntax)

v0.0.7 - 2020-04-08

  • Added MarshalXML on Node to build XML code from nodes

v0.0.6 - 2020-04-08

  • Correction on assigning the node data (concatened, only if some info into it: will ignore spaces and line formatting characters)

v0.0.5 - 2020-04-07

  • Added UnmarshalXML
  • Added MarshalJSON
  • Added basic functions AddMessage, AddHelp, AddEvent to a Node, with auto creation of children nodes
  • Removed messages, events, help attributes of Node
  • Added AddZone() to SeparatorContainer as a new struct extended from DomDef interface to build upon specific functions for specific nodes (it works)

v0.0.4 - 2020-04-06

  • All structures and Application tree implemented in GO
  • Full wajaf JS available in js directory

About

Javascript and GO sychronized framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published