wee 0.10.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (369) hide show
  1. data/README.rdoc +127 -0
  2. data/Rakefile +11 -32
  3. data/doc/rdoc/classes/Array.html +28 -24
  4. data/doc/rdoc/classes/Hash.html +28 -24
  5. data/doc/rdoc/classes/Object.html +37 -84
  6. data/doc/rdoc/classes/String.html +89 -21
  7. data/doc/rdoc/classes/Struct.html +32 -82
  8. data/doc/rdoc/classes/Wee.html +285 -86
  9. data/doc/rdoc/classes/Wee/AnswerDecoration.html +111 -48
  10. data/doc/rdoc/classes/Wee/{Context.html → AnswerDecoration/Answer.html} +61 -51
  11. data/doc/rdoc/classes/Wee/Application.html +161 -322
  12. data/doc/rdoc/classes/Wee/Application/SessionCache.html +162 -0
  13. data/doc/rdoc/classes/Wee/Brush.html +147 -62
  14. data/doc/rdoc/classes/{Enumerable.html → Wee/Brush/ActionInputTag.html} +68 -41
  15. data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +150 -100
  16. data/doc/rdoc/classes/Wee/Brush/CheckboxTag.html +132 -46
  17. data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +63 -41
  18. data/doc/rdoc/classes/Wee/Brush/FormTag.html +184 -78
  19. data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +48 -65
  20. data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +83 -37
  21. data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +334 -310
  22. data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +74 -54
  23. data/doc/rdoc/classes/Wee/Brush/HiddenInputTag.html +58 -43
  24. data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +64 -74
  25. data/doc/rdoc/classes/Wee/Brush/ImageTag.html +109 -86
  26. data/doc/rdoc/classes/Wee/Brush/InputTag.html +205 -45
  27. data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +96 -34
  28. data/doc/rdoc/classes/Wee/Brush/Page.html +129 -67
  29. data/doc/rdoc/classes/Wee/{Utils/LRUCache.html → Brush/PasswordInputTag.html} +65 -38
  30. data/doc/rdoc/classes/Wee/Brush/RadioButtonTag.html +132 -78
  31. data/doc/rdoc/classes/Wee/Brush/{RadioButtonTag/RadioGroup.html → RadioGroup.html} +91 -53
  32. data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +301 -127
  33. data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +96 -33
  34. data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +59 -44
  35. data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +94 -57
  36. data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +96 -33
  37. data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +181 -121
  38. data/doc/rdoc/classes/Wee/Brush/TableTag.html +94 -32
  39. data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +257 -71
  40. data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +58 -43
  41. data/doc/rdoc/classes/Wee/CallAnswerMixin.html +289 -0
  42. data/doc/rdoc/classes/Wee/CallbackMixin.html +233 -0
  43. data/doc/rdoc/classes/Wee/CallbackRegistry.html +179 -155
  44. data/doc/rdoc/classes/Wee/Callbacks.html +262 -0
  45. data/doc/rdoc/classes/Wee/Component.html +228 -779
  46. data/doc/rdoc/classes/Wee/Decoration.html +144 -159
  47. data/doc/rdoc/classes/Wee/DecorationMixin.html +340 -0
  48. data/doc/rdoc/classes/Wee/Delegate.html +119 -76
  49. data/doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html +64 -47
  50. data/doc/rdoc/classes/Wee/ErrorResponse.html +59 -62
  51. data/doc/rdoc/classes/Wee/FormDecoration.html +51 -37
  52. data/doc/rdoc/classes/Wee/GenericResponse.html +60 -35
  53. data/doc/rdoc/classes/Wee/HtmlCanvas.html +1000 -602
  54. data/doc/rdoc/classes/Wee/HtmlDocument.html +288 -0
  55. data/doc/rdoc/classes/Wee/HtmlWriter.html +227 -126
  56. data/doc/rdoc/classes/Wee/IdGenerator.html +60 -31
  57. data/doc/rdoc/classes/Wee/IdGenerator/Secure.html +282 -0
  58. data/doc/rdoc/classes/Wee/{SimpleIdGenerator.html → IdGenerator/Sequential.html} +76 -49
  59. data/doc/rdoc/classes/Wee/JQuery.html +221 -0
  60. data/doc/rdoc/classes/Wee/LRUCache.html +514 -0
  61. data/doc/rdoc/classes/Wee/LRUCache/Item.html +158 -0
  62. data/doc/rdoc/classes/Wee/ObjectSnapshotMixin.html +187 -0
  63. data/doc/rdoc/classes/Wee/PageDecoration.html +88 -59
  64. data/doc/rdoc/classes/Wee/Presenter.html +124 -704
  65. data/doc/rdoc/classes/Wee/RedirectResponse.html +64 -33
  66. data/doc/rdoc/classes/Wee/RefreshResponse.html +59 -44
  67. data/doc/rdoc/classes/Wee/Renderer.html +234 -54
  68. data/doc/rdoc/classes/Wee/Request.html +151 -286
  69. data/doc/rdoc/classes/Wee/Response.html +29 -212
  70. data/doc/rdoc/classes/Wee/Session.html +585 -360
  71. data/doc/rdoc/classes/Wee/{StateHolder.html → Session/AbortCallbackProcessing.html} +67 -40
  72. data/doc/rdoc/classes/Wee/Session/MutexSerializer.html +166 -0
  73. data/doc/rdoc/classes/{Cache/Strategy/LFU/Item.html → Wee/Session/Page.html} +26 -27
  74. data/doc/rdoc/classes/Wee/Session/ThreadSerializer.html +219 -0
  75. data/doc/rdoc/classes/Wee/State.html +307 -0
  76. data/doc/rdoc/classes/{Cache/Strategy/LRU/Item.html → Wee/State/Snapshot.html} +26 -27
  77. data/doc/rdoc/classes/{Cache/Strategy/Unbounded/Item.html → Wee/State/SnapshotIVars.html} +26 -27
  78. data/doc/rdoc/classes/Wee/StructSnapshotMixin.html +183 -0
  79. data/doc/rdoc/classes/Wee/WrapperDecoration.html +101 -35
  80. data/doc/rdoc/created.rid +1 -1
  81. data/doc/rdoc/files/README_rdoc.html +243 -0
  82. data/doc/rdoc/files/lib/wee/application_rb.html +22 -30
  83. data/doc/rdoc/files/lib/wee/{page_rb.html → call_answer_rb.html} +14 -25
  84. data/doc/rdoc/files/lib/wee/callback_rb.html +12 -29
  85. data/doc/rdoc/files/lib/wee/component_rb.html +22 -27
  86. data/doc/rdoc/files/lib/wee/decoration_rb.html +19 -20
  87. data/doc/rdoc/files/lib/wee/{idgen_rb.html → html_brushes_rb.html} +14 -25
  88. data/doc/rdoc/files/lib/wee/html_canvas_rb.html +15 -23
  89. data/doc/rdoc/files/lib/wee/{abstractsession_rb.html → html_document_rb.html} +17 -25
  90. data/doc/rdoc/files/lib/wee/html_writer_rb.html +15 -23
  91. data/doc/rdoc/files/lib/wee/{webrick_rb.html → id_generator_rb.html} +19 -25
  92. data/doc/rdoc/files/lib/wee/{core/page_rb.html → jquery/jquery_rb.html} +14 -25
  93. data/doc/rdoc/files/lib/wee/{state_registry_rb.html → jquery_rb.html} +17 -27
  94. data/doc/rdoc/files/lib/{cache/cache_rb.html → wee/lru_cache_rb.html} +14 -25
  95. data/doc/rdoc/files/lib/wee/presenter_rb.html +12 -34
  96. data/doc/rdoc/files/lib/wee/{holder_rb.html → renderer_rb.html} +14 -25
  97. data/doc/rdoc/files/lib/wee/request_rb.html +18 -32
  98. data/doc/rdoc/files/lib/wee/response_rb.html +17 -24
  99. data/doc/rdoc/files/lib/wee/session_rb.html +21 -23
  100. data/doc/rdoc/files/lib/wee/state_rb.html +90 -0
  101. data/doc/rdoc/files/lib/wee_rb.html +48 -40
  102. data/doc/rdoc/fr_class_index.html +111 -75
  103. data/doc/rdoc/fr_file_index.html +46 -76
  104. data/doc/rdoc/fr_method_index.html +473 -480
  105. data/doc/rdoc/index.html +6 -9
  106. data/doc/rdoc/rdoc-style.css +210 -119
  107. data/examples/ObjectSpaceBrowser.rb +33 -23
  108. data/examples/ajax.rb +71 -0
  109. data/examples/continuations.rb +28 -0
  110. data/examples/demo.rb +92 -36
  111. data/examples/demo/calculator.rb +63 -0
  112. data/examples/demo/calendar.rb +42 -55
  113. data/examples/demo/counter.rb +38 -0
  114. data/{lib/wee/examples → examples/demo}/editable_counter.rb +11 -6
  115. data/examples/demo/example.rb +28 -24
  116. data/examples/demo/file_upload.rb +19 -0
  117. data/{lib/wee/components → examples/demo}/messagebox.rb +3 -3
  118. data/examples/demo/radio.rb +33 -0
  119. data/{lib/wee/examples → examples/demo}/window.rb +15 -10
  120. data/examples/hw.rb +3 -4
  121. data/{lib/wee/components → examples}/pager.rb +14 -14
  122. data/lib/wee.rb +48 -25
  123. data/lib/wee/application.rb +69 -131
  124. data/lib/wee/call_answer.rb +118 -0
  125. data/lib/wee/callback.rb +88 -0
  126. data/lib/wee/component.rb +141 -0
  127. data/lib/wee/decoration.rb +242 -0
  128. data/lib/wee/html_brushes.rb +725 -0
  129. data/lib/wee/html_canvas.rb +241 -0
  130. data/lib/wee/html_document.rb +45 -0
  131. data/lib/wee/html_writer.rb +71 -0
  132. data/lib/wee/id_generator.rb +70 -0
  133. data/lib/wee/jquery.rb +1 -0
  134. data/lib/wee/jquery/jquery.rb +17 -0
  135. data/lib/wee/jquery/public/jquery-1.3.2.min.js +19 -0
  136. data/lib/wee/jquery/public/wee-jquery.js +19 -0
  137. data/lib/wee/lru_cache.rb +89 -0
  138. data/lib/wee/presenter.rb +43 -0
  139. data/lib/wee/renderer.rb +65 -0
  140. data/lib/wee/request.rb +37 -113
  141. data/lib/wee/response.rb +43 -70
  142. data/lib/wee/session.rb +304 -113
  143. data/lib/wee/state.rb +85 -0
  144. data/test/component_spec.rb +17 -0
  145. data/wee.gemspec +4 -3
  146. metadata +249 -452
  147. data/ChangeLog +0 -657
  148. data/INSTALL +0 -17
  149. data/README +0 -272
  150. data/TODO +0 -142
  151. data/benchmark/Centrino1300/result.2000.counter.action +0 -45
  152. data/benchmark/Centrino1300/result.2000.counter.render +0 -43
  153. data/benchmark/Centrino1300/result.2000.filehandler +0 -43
  154. data/benchmark/Centrino600/result.2000.counter.action +0 -47
  155. data/benchmark/Centrino600/result.2000.counter.render +0 -45
  156. data/benchmark/Centrino600/result.2000.filehandler +0 -43
  157. data/benchmark/Makefile +0 -53
  158. data/benchmark/counter.rb +0 -77
  159. data/benchmark/filehandler.rb +0 -6
  160. data/benchmark/report_req.rb +0 -12
  161. data/bin/wee +0 -100
  162. data/doc/rdoc/classes/ActionView.html +0 -107
  163. data/doc/rdoc/classes/ActionView/Base.html +0 -133
  164. data/doc/rdoc/classes/Cache.html +0 -126
  165. data/doc/rdoc/classes/Cache/StorageCache.html +0 -320
  166. data/doc/rdoc/classes/Cache/Strategy.html +0 -128
  167. data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +0 -269
  168. data/doc/rdoc/classes/Cache/Strategy/LFU.html +0 -238
  169. data/doc/rdoc/classes/Cache/Strategy/LRU.html +0 -238
  170. data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +0 -225
  171. data/doc/rdoc/classes/LiteralMethod.html +0 -196
  172. data/doc/rdoc/classes/Main.html +0 -289
  173. data/doc/rdoc/classes/OgApplication.html +0 -126
  174. data/doc/rdoc/classes/OgScaffolder.html +0 -827
  175. data/doc/rdoc/classes/OgScaffolder/Editor.html +0 -565
  176. data/doc/rdoc/classes/OgSession.html +0 -172
  177. data/doc/rdoc/classes/Recipe.html +0 -113
  178. data/doc/rdoc/classes/Wee/AbstractSession.html +0 -502
  179. data/doc/rdoc/classes/Wee/Brush/ActionCallbackMixin.html +0 -148
  180. data/doc/rdoc/classes/Wee/Brush/ActionMixin.html +0 -146
  181. data/doc/rdoc/classes/Wee/Brush/ActionURLCallbackMixin.html +0 -154
  182. data/doc/rdoc/classes/Wee/Brush/AssignMixin.html +0 -141
  183. data/doc/rdoc/classes/Wee/Brush/CallbackMixin.html +0 -141
  184. data/doc/rdoc/classes/Wee/Brush/InputCallbackMixin.html +0 -148
  185. data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +0 -158
  186. data/doc/rdoc/classes/Wee/Brush/ToCallback.html +0 -146
  187. data/doc/rdoc/classes/Wee/Callback.html +0 -231
  188. data/doc/rdoc/classes/Wee/CallbackStream.html +0 -227
  189. data/doc/rdoc/classes/Wee/Canvas.html +0 -235
  190. data/doc/rdoc/classes/Wee/CanvasMixin.html +0 -225
  191. data/doc/rdoc/classes/Wee/Component/OnAnswer.html +0 -153
  192. data/doc/rdoc/classes/Wee/ComponentDispatcher.html +0 -289
  193. data/doc/rdoc/classes/Wee/ComponentRunner.html +0 -321
  194. data/doc/rdoc/classes/Wee/ErrorPage.html +0 -175
  195. data/doc/rdoc/classes/Wee/Examples.html +0 -114
  196. data/doc/rdoc/classes/Wee/Examples/Calculator.html +0 -319
  197. data/doc/rdoc/classes/Wee/Examples/Counter.html +0 -289
  198. data/doc/rdoc/classes/Wee/Examples/EditableCounter.html +0 -210
  199. data/doc/rdoc/classes/Wee/Examples/Window.html +0 -346
  200. data/doc/rdoc/classes/Wee/FastCGIAdaptor.html +0 -227
  201. data/doc/rdoc/classes/Wee/Helper.html +0 -148
  202. data/doc/rdoc/classes/Wee/HtmlCanvasRenderer.html +0 -1230
  203. data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +0 -198
  204. data/doc/rdoc/classes/Wee/LoginDecoration.html +0 -261
  205. data/doc/rdoc/classes/Wee/Md5IdGenerator.html +0 -181
  206. data/doc/rdoc/classes/Wee/MessageBox.html +0 -180
  207. data/doc/rdoc/classes/Wee/MethodCallback.html +0 -193
  208. data/doc/rdoc/classes/Wee/Nitro.html +0 -114
  209. data/doc/rdoc/classes/Wee/Nitro/ControllerClassMixin.html +0 -192
  210. data/doc/rdoc/classes/Wee/Nitro/ControllerMixin.html +0 -345
  211. data/doc/rdoc/classes/Wee/Nitro/FormTag.html +0 -155
  212. data/doc/rdoc/classes/Wee/Nitro/HtmlCanvasRenderer.html +0 -178
  213. data/doc/rdoc/classes/Wee/Page.html +0 -115
  214. data/doc/rdoc/classes/Wee/PagelessApplication.html +0 -154
  215. data/doc/rdoc/classes/Wee/PagelessComponentDriver.html +0 -296
  216. data/doc/rdoc/classes/Wee/PagelessRequest.html +0 -208
  217. data/doc/rdoc/classes/Wee/PagelessSession.html +0 -359
  218. data/doc/rdoc/classes/Wee/Pager.html +0 -534
  219. data/doc/rdoc/classes/Wee/Rails.html +0 -114
  220. data/doc/rdoc/classes/Wee/Rails/ControllerClassMixin.html +0 -192
  221. data/doc/rdoc/classes/Wee/Rails/ControllerMixin.html +0 -342
  222. data/doc/rdoc/classes/Wee/Rails/FormTag.html +0 -155
  223. data/doc/rdoc/classes/Wee/Rails/HtmlCanvasRenderer.html +0 -177
  224. data/doc/rdoc/classes/Wee/RenderingContext.html +0 -283
  225. data/doc/rdoc/classes/Wee/RequestHandler.html +0 -341
  226. data/doc/rdoc/classes/Wee/Snapshot.html +0 -211
  227. data/doc/rdoc/classes/Wee/StateRegistry.html +0 -434
  228. data/doc/rdoc/classes/Wee/StateRegistry/Snapshot.html +0 -320
  229. data/doc/rdoc/classes/Wee/StateRegistry/WithObject.html +0 -153
  230. data/doc/rdoc/classes/Wee/Utils.html +0 -300
  231. data/doc/rdoc/classes/Wee/ValueHolder.html +0 -220
  232. data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +0 -368
  233. data/doc/rdoc/files/INSTALL.html +0 -130
  234. data/doc/rdoc/files/README.html +0 -471
  235. data/doc/rdoc/files/lib/wee/adaptors/fastcgi_rb.html +0 -108
  236. data/doc/rdoc/files/lib/wee/adaptors/nitro_rb.html +0 -101
  237. data/doc/rdoc/files/lib/wee/adaptors/rails_rb.html +0 -101
  238. data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +0 -108
  239. data/doc/rdoc/files/lib/wee/component_ext_rb.html +0 -101
  240. data/doc/rdoc/files/lib/wee/components/component_dispatcher_rb.html +0 -108
  241. data/doc/rdoc/files/lib/wee/components/form_decoration_rb.html +0 -101
  242. data/doc/rdoc/files/lib/wee/components/login_decoration_rb.html +0 -101
  243. data/doc/rdoc/files/lib/wee/components/messagebox_rb.html +0 -101
  244. data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +0 -101
  245. data/doc/rdoc/files/lib/wee/components/pager_rb.html +0 -101
  246. data/doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html +0 -101
  247. data/doc/rdoc/files/lib/wee/components_rb.html +0 -114
  248. data/doc/rdoc/files/lib/wee/context_rb.html +0 -101
  249. data/doc/rdoc/files/lib/wee/continuation/core/component_rb.html +0 -101
  250. data/doc/rdoc/files/lib/wee/continuation/session_rb.html +0 -108
  251. data/doc/rdoc/files/lib/wee/continuation_rb.html +0 -116
  252. data/doc/rdoc/files/lib/wee/core/callback_rb.html +0 -115
  253. data/doc/rdoc/files/lib/wee/core/component_rb.html +0 -108
  254. data/doc/rdoc/files/lib/wee/core/componentrunner_rb.html +0 -110
  255. data/doc/rdoc/files/lib/wee/core/context_rb.html +0 -101
  256. data/doc/rdoc/files/lib/wee/core/decoration_rb.html +0 -133
  257. data/doc/rdoc/files/lib/wee/core/idgen_rb.html +0 -101
  258. data/doc/rdoc/files/lib/wee/core/presenter_rb.html +0 -112
  259. data/doc/rdoc/files/lib/wee/core/renderer_rb.html +0 -107
  260. data/doc/rdoc/files/lib/wee/core/snapshot_rb.html +0 -113
  261. data/doc/rdoc/files/lib/wee/core/valueholder_rb.html +0 -110
  262. data/doc/rdoc/files/lib/wee/core_ext_rb.html +0 -101
  263. data/doc/rdoc/files/lib/wee/core_rb.html +0 -124
  264. data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +0 -101
  265. data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +0 -101
  266. data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +0 -115
  267. data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +0 -101
  268. data/doc/rdoc/files/lib/wee/databases/og_rb.html +0 -111
  269. data/doc/rdoc/files/lib/wee/examples/calculator_rb.html +0 -107
  270. data/doc/rdoc/files/lib/wee/examples/counter_rb.html +0 -101
  271. data/doc/rdoc/files/lib/wee/examples/editable_counter_rb.html +0 -114
  272. data/doc/rdoc/files/lib/wee/examples/window_rb.html +0 -101
  273. data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +0 -115
  274. data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +0 -107
  275. data/doc/rdoc/files/lib/wee/pageless/application_rb.html +0 -108
  276. data/doc/rdoc/files/lib/wee/pageless/request_rb.html +0 -101
  277. data/doc/rdoc/files/lib/wee/pageless/session_rb.html +0 -109
  278. data/doc/rdoc/files/lib/wee/pageless_rb.html +0 -110
  279. data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +0 -101
  280. data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +0 -108
  281. data/doc/rdoc/files/lib/wee/renderer/html/writer_rb.html +0 -108
  282. data/doc/rdoc/files/lib/wee/rendering/html/brushes_rb.html +0 -101
  283. data/doc/rdoc/files/lib/wee/rendering/html/canvas_rb.html +0 -101
  284. data/doc/rdoc/files/lib/wee/rendering/html/writer_rb.html +0 -108
  285. data/doc/rdoc/files/lib/wee/requesthandler_rb.html +0 -101
  286. data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +0 -101
  287. data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +0 -114
  288. data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +0 -101
  289. data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +0 -115
  290. data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +0 -101
  291. data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +0 -111
  292. data/doc/rdoc/files/lib/wee/snapshot_ext_rb.html +0 -101
  293. data/doc/rdoc/files/lib/wee/snapshot_rb.html +0 -107
  294. data/doc/rdoc/files/lib/wee/stuff_rb.html +0 -144
  295. data/doc/rdoc/files/lib/wee/template_rb.html +0 -101
  296. data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +0 -101
  297. data/doc/rdoc/files/lib/wee/utils/cache_rb.html +0 -108
  298. data/doc/rdoc/files/lib/wee/utils/helper_rb.html +0 -101
  299. data/doc/rdoc/files/lib/wee/utils_rb.html +0 -110
  300. data/examples/ajax/ajax.js +0 -444
  301. data/examples/ajax/ajax.rb +0 -31
  302. data/examples/cc.rb +0 -74
  303. data/examples/dispatcher.rb +0 -37
  304. data/examples/draw.rb +0 -94
  305. data/examples/live-update.rb +0 -45
  306. data/examples/nitro/run.rb +0 -42
  307. data/examples/og-test.rb +0 -60
  308. data/examples/radio.rb +0 -44
  309. data/examples/test.rb +0 -39
  310. data/install.rb +0 -14
  311. data/lib/cache/cache.rb +0 -167
  312. data/lib/wee/abstractsession.rb +0 -96
  313. data/lib/wee/adaptors/fastcgi.rb +0 -76
  314. data/lib/wee/adaptors/nitro.rb +0 -155
  315. data/lib/wee/adaptors/rails.rb +0 -154
  316. data/lib/wee/adaptors/webrick.rb +0 -89
  317. data/lib/wee/components.rb +0 -7
  318. data/lib/wee/components/component_dispatcher.rb +0 -46
  319. data/lib/wee/components/form_decoration.rb +0 -7
  320. data/lib/wee/components/login_decoration.rb +0 -35
  321. data/lib/wee/components/page_decoration.rb +0 -14
  322. data/lib/wee/components/wrapper_decoration.rb +0 -7
  323. data/lib/wee/continuation.rb +0 -5
  324. data/lib/wee/continuation/core/component.rb +0 -56
  325. data/lib/wee/continuation/session.rb +0 -64
  326. data/lib/wee/core.rb +0 -16
  327. data/lib/wee/core/callback.rb +0 -121
  328. data/lib/wee/core/component.rb +0 -356
  329. data/lib/wee/core/componentrunner.rb +0 -73
  330. data/lib/wee/core/context.rb +0 -27
  331. data/lib/wee/core/decoration.rb +0 -138
  332. data/lib/wee/core/idgen.rb +0 -5
  333. data/lib/wee/core/page.rb +0 -1
  334. data/lib/wee/core/presenter.rb +0 -100
  335. data/lib/wee/core/renderer.rb +0 -23
  336. data/lib/wee/core/snapshot.rb +0 -21
  337. data/lib/wee/core/valueholder.rb +0 -19
  338. data/lib/wee/core_ext.rb +0 -122
  339. data/lib/wee/databases/og.rb +0 -4
  340. data/lib/wee/databases/og/application.rb +0 -3
  341. data/lib/wee/databases/og/old_scaffolder.rb +0 -98
  342. data/lib/wee/databases/og/scaffolder.rb +0 -255
  343. data/lib/wee/databases/og/session.rb +0 -9
  344. data/lib/wee/examples/calculator.rb +0 -70
  345. data/lib/wee/examples/counter.rb +0 -33
  346. data/lib/wee/idgen/md5.rb +0 -21
  347. data/lib/wee/idgen/sequential.rb +0 -11
  348. data/lib/wee/pageless.rb +0 -3
  349. data/lib/wee/pageless/application.rb +0 -13
  350. data/lib/wee/pageless/request.rb +0 -27
  351. data/lib/wee/pageless/session.rb +0 -74
  352. data/lib/wee/renderer/html/brushes.rb +0 -667
  353. data/lib/wee/renderer/html/canvas.rb +0 -265
  354. data/lib/wee/renderer/html/writer.rb +0 -80
  355. data/lib/wee/requesthandler.rb +0 -81
  356. data/lib/wee/skeleton/og/README +0 -38
  357. data/lib/wee/skeleton/og/components/main.rb +0 -20
  358. data/lib/wee/skeleton/og/conf/db.rb +0 -8
  359. data/lib/wee/skeleton/og/models/recipe.rb +0 -5
  360. data/lib/wee/skeleton/og/run.rb +0 -23
  361. data/lib/wee/skeleton/simple/README +0 -32
  362. data/lib/wee/skeleton/simple/components/main.rb +0 -25
  363. data/lib/wee/skeleton/simple/run.rb +0 -12
  364. data/lib/wee/snapshot_ext.rb +0 -41
  365. data/lib/wee/template.rb +0 -42
  366. data/lib/wee/utils.rb +0 -5
  367. data/lib/wee/utils/autoreload.rb +0 -56
  368. data/lib/wee/utils/cache.rb +0 -7
  369. data/lib/wee/utils/helper.rb +0 -51
data/INSTALL DELETED
@@ -1,17 +0,0 @@
1
- = Installation without Rubygems
2
-
3
- Simply run:
4
-
5
- ruby install.rb
6
-
7
- = Installation with Rubygems
8
-
9
- 1. Download and Install RubyGems: http://rubygems.rubyforge.org
10
-
11
- 2. Install Wee:
12
-
13
- gem install wee
14
-
15
- 3. Set environment variable (required to load RubyGems):
16
-
17
- export RUBYOPT=-rubygems
data/README DELETED
@@ -1,272 +0,0 @@
1
- = Wee Web Framework
2
-
3
- == Copyright and License
4
-
5
- Copyright (c) 2004, 2005 by Michael Neumann (mneumann@ntecs.de).
6
-
7
- Released under the same terms of license as Ruby. Some files under directory
8
- <tt>examples/</tt> might be copyrighted by third parties and licensed under
9
- different terms.
10
-
11
- == Status and Bugs
12
-
13
- Wee is now considered pretty stable (if you don't use continuations).
14
- Nevertheless I wouldn't use it yet for mission-critical applications ;-)
15
-
16
- Known Bugs:
17
-
18
- * Using continuations might leak memory, at least they did in the past. The
19
- latest memory stress-test has not showed up any memory problems, but since I
20
- haven't changed anything at the continuation implementation, I can't say for
21
- sure whether the problem has been fixed or not.
22
-
23
- == Introduction
24
-
25
- Wee is a light-weight, very high-level and modern web-framework that makes
26
- <b>W</b>eb <b>e</b>ngineering <b>e</b>asy. It mainly inherits many ideas and
27
- features from Seaside2[http://beta4.com/seaside2], but was written from scratch
28
- without ever looking at the Seaside (or any other) sources. All code was
29
- developed from ideas and lots of discussions with Avi Bryant.
30
-
31
- == Features
32
-
33
- === Reusable components
34
-
35
- Wee has _real_ components, which are like widgets in a GUI. Once written, you
36
- can use them everywhere. They are completely independent and do not interfere
37
- with other components. Components encapsulate state, a view and actions. Of
38
- course you can use an external model or use templates for rendering.
39
-
40
- === Backtracking
41
-
42
- See the <i>What is backtracking?</i> section below. In short, backtracking lets
43
- the browser's back and forward-button play well together with your application.
44
-
45
- === Clean and concise
46
-
47
- Wee is well thought out, is written in *and* supports clean and concise code.
48
- Furthermore I think most parts are now very well documented.
49
-
50
- === Abstract core
51
-
52
- The core of Wee is completely independent of both HTTP and HTML. That means,
53
- with little effort, you should be able to render other formats than HTML and
54
- use other communication protocols like SOAP, XML-RPC, Email, GUI or Console.
55
-
56
- === Templating-independent
57
-
58
- Wee does not depend on a special templating-engine. You can use a different
59
- templating engine for each component if you want.
60
-
61
- === Powerful programmatic HTML generation
62
-
63
- Wee ships with an easy to use and very powerful programmatic html-generation
64
- library. For example you can create a select list easily with this piece of
65
- code:
66
-
67
- # select an object from these items
68
- items = [1, 2, 3, 4]
69
-
70
- # the labels shown to the user
71
- labels = items.map {|i| i.to_s}
72
-
73
- # render it
74
- r.select_list(items).labels(labels).callback {|choosen| p choosen}
75
-
76
- # render a multi-select list, with objects 2 and 4 selected
77
- r.select_list(items).multi.labels(labels).selected([2,4])
78
-
79
- The callback is called with the selected objects from the _items_ array. Items
80
- can be any object, e.g. whole components:
81
-
82
- labels = ["msg1", "msg2"]
83
- items = labels.collect {|m| MessageBox.new(m)}
84
- r.select_list(items).labels(labels).callback {|choosen| call choosen.first}
85
-
86
- === Optional use of Continuations
87
-
88
- <b>IMPORTANT:</b> <i>The current implementation of continuations in Ruby (or
89
- their use in Wee) might lead to memory leaks, if you use continuations.
90
- Furthermore, if you use continuations, it's no longer possible to store the
91
- session state to disk.</i>
92
-
93
- Continuation-based frameworks are also known as _modal_ frameworks. You can
94
- write code like the one shown below (taken from one of Avi's emails) where each
95
- method displays a new page:
96
-
97
- def checkout
98
- billing = getAddress("Billing Address")
99
- if useSeparateShippingAddress()
100
- shipping = getAddress("Shipping Address")
101
- else
102
- shipping = billing
103
- end
104
- payment = getPaymentInfo()
105
- showConfirmation(billing, shipping, payment)
106
- end
107
-
108
- Try to implement the same in a non-continuation based framework and show me
109
- your code... ;-)
110
-
111
- To enable continuations, you have to require:
112
-
113
- require 'wee/continuation'
114
-
115
- === Fully Marshallable (drops Continuation support)
116
-
117
- If you don't need continuations, Wee can be made fully marshallable. It is not
118
- yet fully marshallable (it was in the past), but it can be made, if required.
119
-
120
- == Observations and Limitations
121
-
122
- * Using continuations (might) lead to memory leaks!
123
-
124
- * When using continuations for cross-component calls, it's impossible to
125
- store a session to disk (at least in Ruby). This problem is partly addressed
126
- by checkpointing provided by operating systems like
127
- DragonFly[www.dragonflybsd.org]. But with this approach it's still impossible
128
- to store sessions _selectively_ to disk.
129
-
130
- * When using continuations, each session runs in it's own (light-weigth)
131
- thread. This is not the case if you don't use continuations.
132
-
133
- * Only one action callback can be invoked per request (a former version of Wee
134
- was able to invoke multiple callback, and answer even from multiple
135
- components at the same time, but this was removed, due to the unreliability of
136
- continuations in Ruby).
137
-
138
- * Components are thread-safe, as a fresh components-tree is created for each
139
- session and requests inside a session are serialized.
140
-
141
- == What is backtracking?
142
-
143
- If you want, you can make the back-button of your browser work correctly
144
- together with your web-application. Imagine you have a simple counter
145
- application, which shows the current count and two links _inc_ and _dec_ with
146
- which you can increase or decrease the current count. Starting with an inital
147
- count of 0, you increase the counter up to 8, then click three times the back
148
- button of your browser (now displays 5) and finally decrease by one, then the
149
- counter really shows the expected 4, instead of 7 (as clicking the back button
150
- does usually not send a HTTP request, and the last state of your application
151
- was 8).
152
-
153
- Only individual objects are backtracked, those of which you explicitly take a
154
- snapshot, not the whole component. That's the easiest (from an application
155
- programmers perspective) and most flexible way. And its fast and uses less
156
- memory.
157
-
158
- You can decide yourself whether you want infinite backtracking or only
159
- backtracking up to n pages, with whatever replacement strategy you want, least
160
- recently used (LRU), least frequently used (LFU) etc.
161
-
162
- == Decorations
163
-
164
- Decorations are used to modify the look and behaviour of a component, without
165
- modifying the components tree. A component can have more than one decoration.
166
- This is implemented as a linked list of decorations (Wee::Decoration#owner
167
- points to the next decoration). Wee::Component#decoration points to the first
168
- decoration in the chain or to the component itself, if no decorations were
169
- specified. We actually use a Wee::ValueHolder for the <tt>@decoration</tt>
170
- instance variable of class Wee::Component to be able to easily backtrack it
171
- (required if you want to "undo" component calls).
172
-
173
- == The anatomy of a request/response cycle
174
-
175
- The request/response cycle in Wee is actually split into two separate phases
176
- or steps. Depending on the point-of-view (given that a page is rendered and
177
- the user clicks on a link or button), the first phase is to invoke an action
178
- (a "callback"). Then in the second phase, a new page is rendered and sent
179
- back to the user. So the two steps are:
180
-
181
- 1. invoke callbacks (action phase)
182
-
183
- 2. render new page and display (render phase)
184
-
185
- These two phases repeat permanently. Which tasks are performed in each of them, is briefly listed below:
186
-
187
- <b>Action:</b>
188
-
189
- 1. restore snapshot (if not up-to-date)
190
-
191
- 2. invoke actions
192
-
193
- 3. backtrack state
194
-
195
- 4. update url -> redirect to render phase (not yet)
196
-
197
- <b>Render:</b>
198
-
199
- 1. restore snapshot (if not up-to-date)
200
-
201
- 2. render
202
-
203
- For each session there is at most one request handled at the same time. That
204
- means, that there is either one action request or one render request handled.
205
- Why? Because we have only one components tree, which we update on action
206
- requests. As Wee allows to go back in time, we have to restore this components
207
- tree to a certain point in time before we can handle an action or render
208
- request. This disallows to handle e.g. two render requests simultaneous.
209
-
210
- === Action Phase (Invoking Callbacks)
211
-
212
- Possible sources for callbacks are links (anchors) and all kinds of
213
- form-elements like submit buttons, input-fields etc. There are two different
214
- kinds of callbacks:
215
-
216
- * Input callbacks (input-fields)
217
-
218
- * Action callbacks (anchor, submit-button)
219
-
220
- The distinction between input and action callbacks is important, as action
221
- callbacks might depend on values of input-fields being assigned to instance
222
- variables of the controlling component. Hence, Wee first invokes all input
223
- callbacks before any action callback is triggered.
224
-
225
- There are two methods related to callback processing:
226
-
227
- * Wee::Component#process_callbacks_chain
228
-
229
- * Wee::Presenter#process_callbacks
230
-
231
- Note that each Wee::Component is also a Wee::Presenter, whereas a
232
- Wee::Decoration is not a Component (but a Presenter)!
233
-
234
- Method <i>process_callbacks_chain</i> invokes <i>process_callbacks</i> for
235
- it's first decoration, or if the component has no decorations, the method is
236
- called for the component itself. As such, <i>process_callbacks_chain</i>
237
- is important to avoid entering an infinite loop (a method calling itself). What
238
- decorations are, is discussed elsewhere.
239
-
240
- There are two "process_callbacks" tree traversals. The first invokes all input
241
- callbacks, the second the action callback.
242
-
243
- === Rendering Phase
244
-
245
- The rendering phase is assumed to be side-effect free! So, you as a
246
- programmer should take care to meet this assumption.
247
-
248
- Similar as in the callback-step, there are two methods related to rendering a
249
- page:
250
-
251
- * Wee::Component#do_render_chain
252
-
253
- * Wee::Presenter#do_render
254
-
255
- Method <i>Component#do_render_chain</i> starts rendering the decoration chain by
256
- calling <i>Presenter#do_render</i> for the first decoration of the component or
257
- for the component itself if no decorations were specified. Method
258
- <i>Presenter#do_render</i> then generates the desired output which gets sent to
259
- the user. Note that method <i>do_render</i> might call other components'
260
- <i>do_render_chain</i> methods to display those components "inside" itself
261
- (usually a component does this for it's child components, but this has to be
262
- implemented by the programmer).
263
-
264
- === Further Reads
265
-
266
- In this order:
267
-
268
- * Wee::Presenter
269
- * Wee::Component
270
- * Wee::Decoration
271
- * Wee::Delegate
272
- * Wee::AnswerDecoration
data/TODO DELETED
@@ -1,142 +0,0 @@
1
- * OgScaffolder: cache fields
2
-
3
- * LiteralMethodCallback: use a simple symbol instead?
4
-
5
- * brushes.rb: tags as constants
6
-
7
- * Session.new(application)
8
-
9
- * live updates
10
-
11
- * transactions
12
-
13
- * use it with databases
14
-
15
- * diverting html-renderer
16
-
17
- * Add unit-tests for new global/local decorations
18
-
19
- * MessageBox: Buttons: OK_Cancel, YES_NO, Confirm
20
-
21
- * req-handler gc interval
22
-
23
- * use LiteralMethod object instead of block if callback(:method_name) is given
24
-
25
- * log requests
26
-
27
- * call method #backtrack from backtrack_state. you don't need to call super for #backtrack (at least for direct subclasses of Component).
28
- * call method #setup from initialize. same reason as for #backtrack.
29
-
30
- * initialize the component inside the handler thread, not from within Session#initialize
31
-
32
- * renamexxx_chain methods to: component_xxx, e.g.
33
- - process_callbacks/process_callback_chain to process_callbacks/component_process_callbacks
34
- - ... to backtrack_state/component_backtrack_state
35
- - render/render_chain to render/component_render
36
-
37
- * callback -> core, how is the callback registry best done?
38
-
39
- * Context.... reduce
40
-
41
- * root_for -> script style etc.
42
-
43
- * Application == Dispatcher... collection of Session classes (or RequestHandlers)
44
-
45
- * file-comments != class-comments... remove them
46
-
47
- application.template_manager = {
48
- My => {'html' => RDocTemplate.new('view/html/file.tmpl'), 'wap' => RDocTemplate.new('view/wap/file.tmpl')}
49
- }
50
-
51
- either this way, or reversed: flavour/style => template-manager
52
-
53
- class My < TemplatedComponent
54
- def action_blah
55
- end
56
- def action_blub
57
- end
58
-
59
- attr_accessor :blah
60
-
61
- # run-time
62
- def template_flavour
63
- session.property['style'] || 'html'
64
- end
65
- end
66
-
67
- view/html/filt.tmpl:
68
-
69
- <form action="__action_blah">
70
- <input name="__input__blah">
71
- </form>
72
-
73
- __action and __input get replaced
74
-
75
- * unify RequestHandler/Session
76
-
77
- * Wee = Web Engineering made Easy
78
-
79
- callback.rb -> core
80
- context -> core?
81
-
82
- Wee::Callback: abstract
83
- * values -> default_values
84
- Wee::BlockCallback
85
- * invoke -> call/[]
86
-
87
- overthink CallbackStream
88
- CallbackStream abstracts from the Request.
89
- use only blocks as callbacks.
90
-
91
- * different models:
92
-
93
- M = Model, V = View, C = Controller
94
-
95
- M: e.g. use ActiveRecord as model
96
- V: use external templates
97
- C: Wee::Component
98
-
99
- MC: Wee::Component
100
- V: external template
101
-
102
- MVC: Wee::Component
103
-
104
- * callbacks.create_callback_stream -> create_stream
105
-
106
- * better webrick
107
-
108
- * AbstractSession:
109
-
110
- last_access: time of last access
111
-
112
- expires_after: expires after n seconds of inactivity (Time.now - last_access > expires_after) if expires_after.not_nil?
113
- expires_after = n_seconds
114
-
115
- max_lifetime: how long may this session run in total? nil == infinity
116
- max_lifetime =
117
-
118
- Session#terminate: quits a session
119
-
120
- Application.remove_session(self.session_id)
121
-
122
- Session#session_id
123
- Session#application
124
-
125
- Application also stores other RequestHandlers. Session is one RequestHandler.
126
-
127
- class RequestHandler
128
- attr_reader :application
129
-
130
- attr_reader :last_access
131
- attr_accessor :expires_after, :max_lifetime
132
-
133
- def alive?
134
- returns true if it should not be terminated
135
- end
136
- end
137
-
138
- * Decoration#owner: use a ValueHolder, too. and register it for being backtracked.
139
-
140
- * mark_objects_for_backtracking() instead of state-registry (snapshot_objects)
141
-
142
- * improve error messages
@@ -1,45 +0,0 @@
1
- This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
2
- Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
3
- Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
4
-
5
- Benchmarking localhost (be patient)
6
-
7
-
8
- Server Software: WEBrick/1.3.1
9
- Server Hostname: localhost
10
- Server Port: 2000
11
-
12
- Document Path: /counter/s:1/p:0/h:1
13
- Document Length: 62 bytes
14
-
15
- Concurrency Level: 1
16
- Time taken for tests: 12.63163 seconds
17
- Complete requests: 2000
18
- Failed requests: 1991
19
- (Connect: 0, Length: 1991, Exceptions: 0)
20
- Write errors: 0
21
- Non-2xx responses: 2000
22
- Total transferred: 552679 bytes
23
- HTML transferred: 133786 bytes
24
- Requests per second: 165.79 [#/sec] (mean)
25
- Time per request: 6.032 [ms] (mean)
26
- Time per request: 6.032 [ms] (mean, across all concurrent requests)
27
- Transfer rate: 44.68 [Kbytes/sec] received
28
-
29
- Connection Times (ms)
30
- min mean[+/-sd] median max
31
- Connect: 0 0 0.4 0 9
32
- Processing: 3 5 3.8 4 69
33
- Waiting: 0 2 3.9 1 69
34
- Total: 3 5 3.9 4 72
35
-
36
- Percentage of the requests served within a certain time (ms)
37
- 50% 4
38
- 66% 4
39
- 75% 4
40
- 80% 5
41
- 90% 6
42
- 95% 15
43
- 98% 16
44
- 99% 18
45
- 100% 72 (longest request)