-
Notifications
You must be signed in to change notification settings - Fork 0
/
thinking.txt
220 lines (155 loc) · 3.6 KB
/
thinking.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
yeoman
maps
node_modules
autobahnjs
expressjs
deepjs
deep-views
deep-jquery
deep-routes
deep-login
deep-nodejs
deep-swig
deep-restful
deep-mongo
deep-shell
www
bower_components
deepjs
deep-views
deep-jquery
deep-restful
deep-local-storage
deep-login
deep-browser-routes
deep-routes
min-history
deep-swig
jquery
requirejs
tests
index.html
main.js
routes.js
tests
shell
shell.js
index.js
_______________________
should rename repo :
deep-node in deep-nodejs
autobahn in autobahnjs
deep-jquery
deep-dom
/lib/dom // dom protocol
deep-http-client
/lib/jquery/json|text|xml
/lib/nodejs/json|text|xml
==> deep.http.json|text|xml
deep-browser
deep-browser-routes
deep-login
_______________________
auto tester :
give
protocols to test
modes/user/session list
initialisation, loggedIn, sessionModes equality test
loop on protocols list
loop on modes/user
look store methods
check forbidden
get schema
get private, readOnly, transformers, ownership, format and type.
test :
get : id, private, owner
query : rql, private, owner
range : with(out) query
post : transformers, private returns, owner association, validation
put : transformers, private returns, readOnly, ownership, validation
patch : transformers, private returns, readOnly, ownership, validation
del : ownership
session : initialisation, loggedIn, sessionModes ==> provides equality test
Full test :
from nodejs server/deep-login/deep-restful and protocols
==> apply tests
from shell with http/nodejs client :
==> apply same tests
from browser with http/ajax client
==> apply same tests
==> the three reports should be exactly the same
deep-routes
// server
app : {
restful:{
},
views:{
},
statics:{
}
}
// client
app : {
views:{
}
}
==> server/client/shell side :
// use views map. client : assign actual state linked to history. server : use context
deep.route.views("/products/info/12")
.done(function(renderOutput){
})
deep.mainApp et deep.app : splitted in two files loadable separatly
=> valid for both sides
in deep.login.logout/impersonate/session : use context.app || deep.mainApp()
in deep.route.xxx use context.app || deep.mainApp()
deep.route.restful("/bloupi/12") // server only : use restful map.
.equal(...)
deep.route.statics("/css/custom.css") // server only : use statics map
.equal(...)
==> test case
{
"/bloupi/12":{
// equal
},
"/bloupi/?hello=12":[{
// equal
}]
}
deep.login.client(app);
deep.route.client(app);
deep.login.middlewares = {
login:require("./middlewares/login"),
logout:require("./middlewares/logout"),
impersonate:require("./middlewares/imperonsate"),
modes:require("./middlewares/modes"),
context:require("./middlewares/context")
}
namespace
==> deep.route.structuredMap
==> deep.route.structuredViews
==> deep.route.flatMap
==> deep.route.Route
==> deep.route.RouteNode
==> deep.route.Stater
dedicated API
==> deep.route.views('/campaign/12')
==> deep.route.restful('/products/12')
==> deep.route.statics('/some/file.css')
"route" chain identity API
deep.route()
.login()
.views("/campaign/12")
.done(function(renderOutput){
});
/*
==> un seul deep-login/lib/chain
qui manipule l'app décorée au travers des décorations. ajouté dans promise API
==> deep-login/lib/client or server
deep.login.client(app) // apply decoration
or
deep.login.server(app) // apply decoration
==> deep-routes/lib/chain
identité dédiées avec .restful, .views et .statics
deep.routes.client(app) // apply decoration
deep.routes.server(app) // apply decoration
*/