Skip to content

Commit 11fbe2d

Browse files
authored
added more detailed readme
1 parent 0ef508c commit 11fbe2d

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

README.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,40 @@
1-
webapp.js
1+
MicroBoatWebapp.js
22
=========
33

4-
webapp.js is a mvc framework for web applications primarily using AJAX
4+
MicroBoatWebapp.js is a javascript/jquery framework that makes it easier for developers to create interactive pages with the use of AJAX. It takes care of the AJAX requests with a zero javascript sollution. This way an front-end developer can put his energy on the HTML page and does not have to worry about coding in javascript.
5+
6+
The general idea is that you define an 'action' attribute inside a element you want to make interactive. The action attribute takes a URL which is used for the AJAX request.
7+
8+
Example:
9+
10+
<button action="http://example.com/load/test.json">load some stuff inside the dom</button>
11+
12+
Then the ajax should return a result package in JSON, XML or HTML format. The JSON and XML contain a list of result actions used to manipulate the dom. This way the page can dynamicly be changed from the server side. When HTML is returned MicroBoatWebapp tries to replace the original triggering source.
13+
14+
Example:
15+
16+
->DOM before
17+
<div id="target">replace my value</div>
18+
<button action="http://example.com/load/test.json">load some stuff inside the dom</button>
19+
20+
->Button triggered ajax response
21+
{
22+
"load":{
23+
"query":"#target",
24+
"html":"hello world"
25+
}
26+
}
27+
28+
->DOM after
29+
<div id="target">hello worlde</div>
30+
<button action="http://example.com/load/test.json">load some stuff inside the dom</button>
31+
32+
This way it becomes relative easy to use AJAX.
33+
34+
Todo:
35+
36+
- support XML
37+
- support one way query (so you can decide inside the action element where to load the response)
38+
- support Jquery animations
39+
- support spinners and loading bars
40+
- support more dom manipulating functions

0 commit comments

Comments
 (0)