nitro 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. data/CHANGELOG +752 -543
  2. data/INSTALL +38 -38
  3. data/README +264 -225
  4. data/Rakefile +48 -49
  5. data/bin/nitro +3 -3
  6. data/bin/nitrogen +6 -6
  7. data/doc/AUTHORS +10 -10
  8. data/doc/CHANGELOG.1 +1939 -1939
  9. data/doc/CHANGELOG.2 +954 -954
  10. data/doc/LICENSE +3 -3
  11. data/doc/MIGRATION +28 -0
  12. data/doc/RELEASES +814 -643
  13. data/doc/config.txt +5 -5
  14. data/install.rb +7 -17
  15. data/lib/nitro.rb +38 -9
  16. data/lib/nitro/adapter/cgi.rb +311 -312
  17. data/lib/nitro/adapter/fastcgi.rb +18 -25
  18. data/lib/nitro/adapter/webrick.rb +128 -137
  19. data/lib/nitro/adapter/wee.rb +51 -0
  20. data/lib/nitro/caching.rb +20 -20
  21. data/lib/nitro/caching/actions.rb +43 -43
  22. data/lib/nitro/caching/fragments.rb +46 -46
  23. data/lib/nitro/caching/invalidation.rb +11 -11
  24. data/lib/nitro/caching/output.rb +65 -65
  25. data/lib/nitro/caching/stores.rb +67 -67
  26. data/lib/nitro/compiler.rb +262 -0
  27. data/lib/nitro/compiler/elements.rb +0 -0
  28. data/lib/nitro/compiler/errors.rb +65 -0
  29. data/lib/nitro/compiler/localization.rb +25 -0
  30. data/lib/nitro/compiler/markup.rb +19 -0
  31. data/lib/nitro/compiler/shaders.rb +206 -0
  32. data/lib/nitro/compiler/squeeze.rb +20 -0
  33. data/lib/nitro/compiler/xslt.rb +61 -0
  34. data/lib/nitro/context.rb +87 -88
  35. data/lib/nitro/controller.rb +151 -158
  36. data/lib/nitro/cookie.rb +34 -34
  37. data/lib/nitro/dispatcher.rb +195 -186
  38. data/lib/nitro/element.rb +132 -126
  39. data/lib/nitro/element/java_script.rb +6 -6
  40. data/lib/nitro/flash.rb +66 -66
  41. data/lib/nitro/mail.rb +192 -192
  42. data/lib/nitro/mixin/buffer.rb +66 -0
  43. data/lib/nitro/mixin/debug.rb +16 -16
  44. data/lib/nitro/mixin/form.rb +88 -0
  45. data/lib/nitro/mixin/helper.rb +2 -2
  46. data/lib/nitro/mixin/javascript.rb +108 -108
  47. data/lib/nitro/mixin/markup.rb +144 -0
  48. data/lib/nitro/mixin/pager.rb +202 -202
  49. data/lib/nitro/mixin/rss.rb +67 -0
  50. data/lib/nitro/mixin/table.rb +63 -0
  51. data/lib/nitro/mixin/xhtml.rb +75 -0
  52. data/lib/nitro/mixin/xml.rb +124 -0
  53. data/lib/nitro/render.rb +183 -359
  54. data/lib/nitro/request.rb +140 -140
  55. data/lib/nitro/response.rb +27 -27
  56. data/lib/nitro/routing.rb +21 -21
  57. data/lib/nitro/scaffold.rb +124 -118
  58. data/lib/nitro/server.rb +117 -80
  59. data/lib/nitro/server/runner.rb +341 -0
  60. data/lib/nitro/service.rb +12 -12
  61. data/lib/nitro/service/xmlrpc.rb +22 -22
  62. data/lib/nitro/session.rb +122 -120
  63. data/lib/nitro/session/drb.rb +9 -9
  64. data/lib/nitro/session/drbserver.rb +34 -34
  65. data/lib/nitro/template.rb +171 -155
  66. data/lib/nitro/testing/assertions.rb +90 -90
  67. data/lib/nitro/testing/context.rb +16 -16
  68. data/lib/nitro/testing/testcase.rb +34 -34
  69. data/proto/conf/lhttpd.conf +9 -9
  70. data/proto/public/error.xhtml +75 -75
  71. data/proto/public/index.xhtml +18 -18
  72. data/proto/public/js/behaviour.js +65 -65
  73. data/proto/public/js/controls.js +1 -1
  74. data/proto/public/js/prototype.js +3 -3
  75. data/proto/public/settings.xhtml +61 -61
  76. data/proto/run.rb +1 -5
  77. data/test/nitro/adapter/raw_post1.bin +0 -0
  78. data/test/nitro/adapter/tc_cgi.rb +57 -57
  79. data/test/nitro/adapter/tc_webrick.rb +4 -4
  80. data/test/nitro/mixin/tc_pager.rb +25 -25
  81. data/test/nitro/mixin/tc_rss.rb +24 -0
  82. data/test/nitro/mixin/tc_table.rb +31 -0
  83. data/test/nitro/mixin/tc_xhtml.rb +13 -0
  84. data/test/nitro/tc_caching.rb +10 -10
  85. data/test/nitro/tc_context.rb +8 -8
  86. data/test/nitro/tc_controller.rb +48 -48
  87. data/test/nitro/tc_cookie.rb +6 -6
  88. data/test/nitro/tc_dispatcher.rb +64 -64
  89. data/test/nitro/tc_element.rb +27 -27
  90. data/test/nitro/tc_flash.rb +31 -31
  91. data/test/nitro/tc_mail.rb +63 -63
  92. data/test/nitro/tc_server.rb +26 -26
  93. data/test/nitro/tc_session.rb +9 -9
  94. data/test/nitro/tc_template.rb +19 -19
  95. data/test/public/blog/list.xhtml +1 -1
  96. metadata +31 -37
  97. data/lib/nitro/buffering.rb +0 -45
  98. data/lib/nitro/builder/form.rb +0 -104
  99. data/lib/nitro/builder/rss.rb +0 -104
  100. data/lib/nitro/builder/table.rb +0 -80
  101. data/lib/nitro/builder/xhtml.rb +0 -132
  102. data/lib/nitro/builder/xml.rb +0 -131
  103. data/lib/nitro/conf.rb +0 -36
  104. data/lib/nitro/environment.rb +0 -21
  105. data/lib/nitro/errors.rb +0 -69
  106. data/lib/nitro/localization.rb +0 -153
  107. data/lib/nitro/markup.rb +0 -147
  108. data/lib/nitro/output.rb +0 -24
  109. data/lib/nitro/runner.rb +0 -348
  110. data/lib/nitro/shaders.rb +0 -206
  111. data/test/nitro/builder/tc_rss.rb +0 -23
  112. data/test/nitro/builder/tc_table.rb +0 -30
  113. data/test/nitro/builder/tc_xhtml.rb +0 -39
  114. data/test/nitro/builder/tc_xml.rb +0 -56
  115. data/test/nitro/tc_localization.rb +0 -49
data/INSTALL CHANGED
@@ -2,37 +2,37 @@
2
2
 
3
3
  1. Download and install RubyGems:
4
4
 
5
- http://rubygems.rubyforge.org
5
+ http://rubygems.rubyforge.org
6
6
 
7
7
  2. Install the distribution:
8
8
 
9
- gem install nitro
10
-
11
- If you wish to install Og only:
9
+ gem install nitro
10
+
11
+ If you wish to install Og only:
12
12
 
13
- gem install og
13
+ gem install og
14
14
 
15
- (make sure you have the latest stable versions of Ruby and RubyGems
16
- installed)
15
+ (make sure you have the latest stable versions of Ruby and RubyGems
16
+ installed)
17
17
 
18
- When asked about the dependencies to include, only accept
19
- the dependencies for the RDBMS backends you are planning
20
- to use.
18
+ When asked about the dependencies to include, only accept
19
+ the dependencies for the RDBMS backends you are planning
20
+ to use.
21
21
 
22
22
  3. Set environment variable (required to load RubyGems):
23
23
 
24
- export RUBYOPT=-rubygems
24
+ export RUBYOPT=-rubygems
25
25
 
26
- You can add this in you .bashrc in Unix.
26
+ You can add this in you .bashrc in Unix.
27
27
 
28
- Alternatively you can run your applications with the -rubygem
29
- option:
28
+ Alternatively you can run your applications with the -rubygem
29
+ option:
30
30
 
31
31
  ruby -rubygem xxx.rb
32
32
 
33
33
  4. To verify that everything works ok, run the command
34
34
 
35
- nitro
35
+ nitro
36
36
 
37
37
  = Installation without RubyGems using script.
38
38
 
@@ -42,13 +42,13 @@ a standard installation script is provided.
42
42
 
43
43
  1. Switch to an administrator account
44
44
 
45
- For example in Unix:
45
+ For example in Unix:
46
46
 
47
- $ su -
47
+ $ su -
48
48
 
49
49
  2. Run the installation script.
50
50
 
51
- $ ruby install.rb
51
+ $ ruby install.rb
52
52
 
53
53
  This installation script also installs some vendor libraries
54
54
  that you possibly have allready installed. Use with caution.
@@ -82,37 +82,37 @@ list for your reference. Please not that most of these
82
82
  libraries are optional.
83
83
 
84
84
  * PostgreSQL
85
- http://www.postgres.org
86
- Used for Database driven web applications.
87
-
85
+ http://www.postgres.org
86
+ Used for Database driven web applications.
87
+
88
88
  * MySQL
89
- http://www.mysql.org
90
- Used for Database driven web applications.
89
+ http://www.mysql.org
90
+ Used for Database driven web applications.
91
91
 
92
92
  * Ruby-psql
93
- http://www.postgresql.jp/interfaces/ruby/archive/ruby-postgres-0.7.1.tar.gz
94
- Ruby interface to the PostgreSQL RDBMS.
93
+ http://www.postgresql.jp/interfaces/ruby/archive/ruby-postgres-0.7.1.tar.gz
94
+ Ruby interface to the PostgreSQL RDBMS.
95
95
 
96
96
  * Ruby-mysql
97
- http://tmtm.org/ja/ruby/mysql/README_en.html
98
- Ruby interface to the MySQL RDBMS.
99
-
97
+ http://tmtm.org/ja/ruby/mysql/README_en.html
98
+ Ruby interface to the MySQL RDBMS.
99
+
100
100
  * Ruby-XSLT
101
- http://gregoire.lejeune.free.fr/ruby-xslt_0.4.0.tar.gz
102
- Used for XSLT based templates.
101
+ http://gregoire.lejeune.free.fr/ruby-xslt_0.4.0.tar.gz
102
+ Used for XSLT based templates.
103
103
 
104
104
  * Apache 2.0
105
- http://www.apache.org
106
- Used to host application in production environments.
105
+ http://www.apache.org
106
+ Used to host application in production environments.
107
107
 
108
108
  * Lighttpd
109
- http://www.lighttpd.net/
110
- A lean and efficient web server. A perfect companion to Nitro.
109
+ http://www.lighttpd.net/
110
+ A lean and efficient web server. A perfect companion to Nitro.
111
111
 
112
112
  * Ruby-fcgi
113
- http://www.moonwolf.com/ruby/archive/ruby-fcgi-0.8.5.tar.gz
114
- Used for FCGI based applications.
113
+ http://www.moonwolf.com/ruby/archive/ruby-fcgi-0.8.5.tar.gz
114
+ Used for FCGI based applications.
115
115
 
116
116
  * FastCGI development kit
117
- http://www.fastcgi.com/dist/fcgi.tar.gz
118
- Needed to compile the C-version of the ruby fcgi library.
117
+ http://www.fastcgi.com/dist/fcgi.tar.gz
118
+ Needed to compile the C-version of the ruby fcgi library.
data/README CHANGED
@@ -1,14 +1,24 @@
1
- = Nitro 0.20.0 README
1
+ = Nitro 0.21.0 README
2
2
 
3
- Nitro is an efficient, yet simple engine for developing professional Web
4
- Applications using the Ruby language. Nitro aims to provide a robust
5
- infrastructure for scalable web applications that can be distributed
6
- over a server cluster. However, Nitro can also power simple web
7
- applications for deployment on intranets or even personal computers.
8
- Nitro integrates the powerful Og Object-Relational mapping library.
3
+ Nitro provides everything you need to develop professional Web
4
+ applications using Ruby and Javascript.
9
5
 
10
- Nitro is a multiparadigm application framework and will incorporate ideas
11
- from Rails, Wee, PHP, JSP and Microsoft.NET.
6
+ Nitro redefines Rapid Application Development by providing a
7
+ clean, yet efficient API, a layer of domain specific languages
8
+ implemented on top of Ruby and the most powerful and elegant
9
+ object relational mapping solution available everywhere.
10
+
11
+ Nitro is Web 2.0 ready, featuring excellent support for AJAX,
12
+ XML, Syndication while staying standards compliant.
13
+
14
+ Nitro gives choice to the developer: Multiple paradigms are
15
+ implemented, incorporating ideas from Rails, CherryPy, Catalyst,
16
+ Wee, PHP, JSP and Microsoft.NET and more. The developer is free
17
+ to choose the pattern that better fits his application. This
18
+ kind of freedom makes Nitro applicable to a wide range of
19
+ applications, spanning from big, scalable web sites with thousands
20
+ of concurrent users to simple solutions for deployment on intranet
21
+ desktops.
12
22
 
13
23
 
14
24
  == Features
@@ -17,228 +27,256 @@ A short summary of the major features:
17
27
 
18
28
  * Multiparadigm web applications.
19
29
 
20
- You can write applications in the ASP/JSP/PHP style, ie by writting
21
- server pages that are automatically translated to Ruby code by
22
- Nitro.
30
+ You can write applications in the ASP/JSP/PHP style, ie by
31
+ writting server pages that are automatically translated to Ruby
32
+ code by Nitro.
23
33
 
24
- Alternatively, you can write MVC style applications (like Rails) by
25
- utilizing the powerfull Controller mechanism.
34
+ Or, you can write MVC style applications (like Rails) by
35
+ utilizing the powerfull Object publishing/Controller mechanism.
36
+
37
+ Alternatively, you can use stateful components and/or programmatic
38
+ rendering: Nitro is the premium container for Wee applications.
26
39
 
27
40
  * Advanced Code generation.
28
41
 
29
- Nitro in essence writes the Web application for you. The system
30
- provides a number of domain spefic language extensions (meta-languages)
31
- to automate generate of common code (OR mapping, validation,
32
- forms generation, syndication, markup and more).
42
+ Nitro in essence writes the Web application for you. The system
43
+ provides a number of domain spefic language extensions (meta-languages)
44
+ to automate the generation of common code (OR mapping, validation,
45
+ forms generation, syndication, markup and more).
33
46
 
34
47
  * Object-Relational Mapping
35
48
 
36
- Nitro integrates the Og (ObjectGraph) object-relational mapping
37
- library. Og provides transparent serialization of object graphs to a RDBMS
38
- backend. Unlike other similar libraries Og maps standard Ruby
39
- objects to SQL tables and not vice versa. Og provides a meta language
40
- to describe the relations between objects, a flexible and intuitive api
41
- for querieng the database, raw access to the SQL language if needed
42
- (for example to fine tune the automatically generated SQL tables, or
43
- for custom queries), provides automatic validation, suports deserialization
44
- to Ruby objects or tuples, automatically generates join tables for
45
- many_to_many relations and provides a collection of usefull Mixins to
46
- synthesize common Entities.
47
-
48
- Og is a combination of the best features of Active Record and the
49
- former O-R mapping library included in Nitro (NDB). Adapters for
50
- PostgreSQL, MySQL, SQLite3, Oracle and SQL Server are included.
49
+ Nitro integrates the Og (ObjectGraph) object-relational mapping
50
+ library. Og manages the lifecycle of Ruby objects and provides
51
+ transparent serialization of object graphs to stores (typically
52
+ RDBM systems)/.
53
+
54
+ Unlike other similar solutions Og maps standard Ruby objects
55
+ to SQL tables and not vice versa. Og provides a domain specific
56
+ language to describe the relations between objects, a flexible
57
+ and intuitive api for querieng the database, raw access to the
58
+ SQL language if needed (for example to fine tune the automatically
59
+ generated SQL tables, or for custom queries), provides automatic
60
+ validation, suports deserialization to Ruby objects or tuples,
61
+ automatically generates join tables for many_to_many relations
62
+ and provides a collection of usefull Mixins to synthesize
63
+ common Entities.
64
+
65
+ Adapters for PostgreSQL, MySQL, SQLite3, Memory, Filesystem,
66
+ Oracle and SQL Server are included.
51
67
 
52
68
  * XML server pages (.xhtml)
53
69
 
54
- Nitro uses standard, fully xml compliant xhtml pages with logic
55
- code, thus combining the power of embededed Ruby (like erb, eruby)
56
- with the xml compliance of Amrita. Even though it is a 'Callback'
57
- style templating system it is flexible enough to run as 'Pipeline'
58
- style system if the developer prefers this mode of operation.
59
-
60
- <?xml version="1.0"?>
61
-
62
- <!-- example page -->
63
- <html>
64
-
65
- <?r
66
- title = 'Example'
67
- version = params['version']
68
- ?>
69
-
70
- <h1>#{title}</h1>
71
-
72
- <?r if version > 1 ?>
73
- <b>Version:</b> #{version}
74
- <?r end ?>
75
-
76
- </html>
70
+ Nitro uses standard, fully xml compliant xhtml pages with logic
71
+ code, thus combining the power of embededed Ruby (like erb, eruby)
72
+ with the xml compliance of Amrita. Even though it is a 'Callback'
73
+ style templating system it is flexible enough to run as 'Pipeline'
74
+ style system if the developer prefers this mode of operation.
75
+
76
+ <?xml version="1.0"?>
77
+
78
+ <!-- example page -->
79
+ <html>
80
+
81
+ <?r
82
+ title = 'Example'
83
+ version = params['version']
84
+ ?>
85
+
86
+ <h1>#{title}</h1>
87
+
88
+ <?r if version > 1 ?>
89
+ <b>Version:</b> #{version}
90
+ <?r end ?>
91
+
92
+ </html>
77
93
 
78
94
  * Action / Fragment Synthesis
79
95
 
80
- Nitro actions and templates can include other actions or templates
81
- to allow for component-based development.
82
-
83
- Here is an example of including an action from a template:
84
-
85
- <render href="list" />
86
-
87
- or
88
-
89
- <inject href="list" />
90
-
91
- or from an action:
92
-
93
- list()
94
-
95
- Nitro server pages can include fragments at 'Compile' time or at
96
- 'RunTime' time.
97
-
98
- <!-- compile time include (static include) -->
99
- <?include href="myfile.inc" />
100
-
101
- <!-- run time include (dynamic include) -->
102
- <include href="myfile.inc" />
103
-
104
- * Shaders, XSLT templates
105
-
106
- Nitro features a fully programmable source transformation pipeline.
107
- A transformation stage in this pipeline is called a Shader. An example
108
- shader transforms an XHTML document with embeded ruby-code processing
109
- instructions to a Ruby method. Another shader might be an XSLT stage.
110
-
111
- Nitro promotes the usage of XSLT for web templates. The functional
112
- nature of XSL is ideal for the Web. Moreover, the engine efficiently
113
- precompiles the xsl transformation along with other transformations
114
- (for example localization) essentially providing a computationally
115
- free transformation step.
116
-
96
+ Nitro actions and templates can include other actions or templates
97
+ to allow for component-based development.
98
+
99
+ Here is an example of including an action from a template:
100
+
101
+ <render href="list" />
102
+
103
+ or
104
+
105
+ <inject href="list" />
106
+
107
+ or from an action:
108
+
109
+ list()
110
+
111
+ Nitro server pages can include fragments at 'Compile' time or at
112
+ 'RunTime' time.
113
+
114
+ <!-- compile time include (static include) -->
115
+ <?include href="myfile.inc" />
116
+
117
+ <!-- run time include (dynamic include) -->
118
+ <include href="myfile.inc" />
119
+
120
+ * Nitro provides full support for Aspect Oriented programming.
121
+ You can use aspects to intercept and customize any component
122
+ of the Nitro system.
123
+
124
+ * Fully customizable Compile time and Render time pipeline.
125
+ Nitro features a fully programmable source transformation pipeline.
126
+ For example a pipeline component transforms a standard XHTML
127
+ document with embeded ruby-code processing instructions to Ruby
128
+ code. Another component could apply XSLT transformation at compile
129
+ time to avoid the performance hit. Using the advanced AOP features
130
+ or standard OOP practice you can customize the pipeline to your
131
+ needs.
132
+
133
+ The same is true for the run time render pipeline. Nitro makes
134
+ it exteremely easy to add filters or customize the behaviour
135
+ of actions. Example filters are the autologin filter,
136
+ a gzip filter etc.
137
+
138
+ * Excellent support for AJAX and Javascript. Nitro integrates
139
+ a set of powerful javascript libraries:
140
+
141
+ Prototype
142
+ Script.aculo.us
143
+ Behaviour
144
+
145
+ These libraries are transparently integrated in the rendering
146
+ pipeline.
147
+
148
+ * Elements subsystem. This is Tag libraries on steroids. You can
149
+ define xhtml tags that generate calls to associated Ruby classes
150
+ to handle rendering special fx, skins and more.
151
+
117
152
  * Multiple Platforms
118
153
 
119
- Runs on Linux, Windows and Mac OSX. It will probably run on other
120
- Unix based system with minor modifications.
154
+ Runs on Linux, Windows and Mac OSX. It will probably run on other
155
+ Unix based system with minor modifications.
121
156
 
122
157
  * Multiple Adapters
123
158
 
124
- Nitro supports multiple web server configurations. Out of the box
125
- it supports WEBrick (pure ruby), Lighttpd (fastcgi), Apache (fastcgi).
126
- More options will be available in the future.
127
-
159
+ Nitro supports multiple web server configurations. Out of the box
160
+ it supports WEBrick (pure ruby), Lighttpd (fastcgi), Apache (fastcgi).
161
+ More options will be available in the future.
162
+
128
163
  * Minimum configuration
129
164
 
130
- Configuration files are kept to the absolute minimum. The target
131
- is to have no configuration files at all.
165
+ Configuration files are kept to the absolute minimum. The target
166
+ is to have no configuration files at all.
132
167
 
133
168
  * Scaffolding
134
169
 
135
- This enables the developer to get started as fast as possible.
170
+ This enables the developer to get started as fast as possible.
136
171
 
137
172
  * Distributed State
138
173
 
139
- Nitro provides a powerfull distributed state mechanism that utilizes
140
- the DRb library. A typicall use of this infrastructure is to provide
141
- distributed sessions when running your application over a server
142
- cluster. Distributed sessions are fully transparent to the developer.
143
-
144
- Support for Memcached will be available soon.
145
-
146
- * Request Filters
147
-
148
- The develpoper has full access to the request handling pipeline.
149
- Request filters are a powerfull mechanism for customized processing
150
- of special requests. Example filters are the autologin filter,
151
- a gzip filter etc.
174
+ Nitro provides a powerfull distributed state mechanism that utilizes
175
+ the DRb library. A typicall use of this infrastructure is to provide
176
+ distributed sessions when running your application over a server
177
+ cluster. Distributed sessions are fully transparent to the developer.
152
178
 
153
- Moreover, Nitro provides the fine-grained filtering method pioneered
154
- by Rails where you can attach single methods, blocks, objects or
155
- modules, before, after or arrounf actions.
179
+ * Scalability.
156
180
 
181
+ Nitro promotes the 'share-nothing' architecture pioneered in sites
182
+ like Yahoo, LiveJournal, Slashdot, etc to facilate easy scaling
183
+ through hardware.
184
+
157
185
  * Parts
158
186
 
159
- Parts are organized modules of web services. A Web Framework that
160
- integrates a large collection of parts (User management, Blog,
161
- Fora, CMS, Personalization, ..) will be released by Navel.
162
-
163
- Other libraries of parts are expected from the Ruby community when
164
- the Part API is finalized.
165
-
166
- * Fine-grained Caching
167
-
168
- Nitro provides a well designed and efficient caching mechanism. Caching
169
- will be provided at the following levels:
170
-
171
- * Object Cache (deserialized objects) (coming soon)
172
- * Fragment Caching (cache generated sub-parts of a page, or a page)
173
- * Action Caching (full pages)
174
- * Output Caching (the whole page is stored as html and served by
175
- the front web server, thus completely bypassing Nitro)
176
- * HTTP 1.1 Caching (downstream caching of whole pages)
187
+ Parts are organized modules of web services. A Web Framework that
188
+ integrates a large collection of parts (User management, Blog,
189
+ Fora, CMS, Personalization, ..) will be released by Navel.
190
+
191
+ * Web services
177
192
 
178
- The engine calculates intra-page dependencies automatically. A variety
179
- of invalidation strategies can be implemented.
193
+ Nitro automates the process of web service development. Just let
194
+ Nitro's advanced scaffolding algorithms to generate the boilerplate
195
+ code for you.
196
+
197
+ * Fine-grained Caching
180
198
 
181
- * Multi phase evaluation
199
+ Nitro provides a well designed and efficient caching mechanism. Caching
200
+ will be provided at the following levels:
201
+
202
+ Object Cache (deserialized objects) (coming soon)
203
+ Fragment Caching (cache generated sub-parts of a page, or a page)
204
+ Action Caching (full pages)
205
+ Output Caching (the whole page is stored as html and served by
206
+ the front web server, thus completely bypassing Nitro)
207
+ HTTP 1.1 Caching (downstream caching of whole pages)
182
208
 
183
- Experimental, facilitates efficient HTTP1.1 caching.
209
+ A variety of invalidation strategies can be implemented.
184
210
 
185
211
  * Programmatic xhtml rendering.
186
212
 
187
- options = ['Male', 'Female']
188
- o.select(:name => 'sex') {
189
- o.options(options, selected = 1)
190
- }
191
-
192
- or
193
-
194
- options = { 'Male' => 'm', 'Female' => 'f' }
195
- o.select(:name => 'sex') {
196
- o.options(options, selected = 1)
197
- }
213
+ labels = ['George', 'Stella', 'Renos']
214
+ html {
215
+ head {
216
+ title 'A simple test'
217
+ }
218
+ body {
219
+ 10.times {
220
+ strong 'Hello World'
221
+ i 'Hello World222'
222
+ }
223
+ select(:id => 'names') {
224
+ options :labels => labels, :selected => 1
225
+ }
226
+ }
198
227
 
199
228
  * Automatic validation.
200
229
 
201
- class User
202
- prop_accessor :name, :password, String
203
- validate_confirmation :password
204
- validate_length :name, :range => 2..12
205
- end
206
-
207
- u = User.new(...)
208
- unless u.valid?
209
- p u.errors.on(:name)
210
- p u.errors[:password]
211
- end
212
-
213
- * Routing
214
-
215
- This enables portable rewrites and 'nice' urls.
216
-
230
+ class User
231
+ prop_accessor :name, :password, String
232
+ validate_confirmation :password
233
+ validate_length :name, :range => 2..12
234
+ end
235
+
236
+ u = User.new(...)
237
+ unless u.valid?
238
+ p u.errors.on(:name)
239
+ p u.errors[:password]
240
+ end
241
+
242
+ * Implicit nice urls. Nitro automatically generates nice urls
243
+ for your actions. However, if you want to customize the defaults,
244
+ a powerful routing mechanism is provided.
245
+
217
246
  * Advanced debuging features
218
247
 
219
- * When running in debug mode, all exceptions raised are logged
220
- to a special debug panel in the current page. Find out the offending
221
- file and line from the exception dump, fix the bug, refresh the page.
222
-
223
- * in-process console: inject an irb session to a running application
224
- server. You can use the irb console to investigate all variables
225
- and code in your running server process.
226
-
227
- * integrates the 'breakpoint' library by Florian Gross. The Breakpoint
228
- library provides the convenience of being able to inspect and modify
229
- state, diagnose bugs all via IRB by simply setting breakpoints in
230
- your applications by the call of a method.
231
-
232
- * UI Components
233
-
234
- Nitro is distributed with a collection of usefull UI components
235
- to make form based application development easier (for example
236
- an efficient, database-aware Pager component).
237
-
248
+ When running in debug mode, all exceptions raised are logged
249
+ to a special debug panel in the current page. Find out the offending
250
+ file and line from the exception dump, fix the bug, refresh the page.
251
+
252
+ in-process console: inject an irb session to a running application
253
+ server. You can use the irb console to investigate all variables
254
+ and code in your running server process.
255
+
256
+ integrates the 'breakpoint' library by Florian Gross. The Breakpoint
257
+ library provides the convenience of being able to inspect and modify
258
+ state, diagnose bugs all via IRB by simply setting breakpoints in
259
+ your applications by the call of a method.
260
+
261
+ * Helper mixins
262
+
263
+ Nitro is distributed with a collection of usefull mixins
264
+ to make form based application development easier (for example
265
+ an efficient, database-aware Pager component).
266
+
238
267
  * Localization
239
268
 
240
- Nitro supports efficient and fully transparent localization of
241
- web applications.
269
+ Nitro supports efficient and fully transparent localization of
270
+ web applications.
271
+
272
+ * Mailer
273
+
274
+ Nitro provides excellent support for handling emails in your
275
+ Web application.
276
+
277
+ * Wee integration.
278
+
279
+ Nitro is the premium container for Wee stateful components.
242
280
 
243
281
 
244
282
  == What's new
@@ -255,6 +293,7 @@ The latest version of Nitro can be found at
255
293
 
256
294
  * http://www.nitrohq.com
257
295
 
296
+
258
297
  == Documentation
259
298
 
260
299
  Documentation for Nitro can be found at
@@ -271,53 +310,53 @@ the test directory for examples of usage.
271
310
  Nitro requires the following applications or libraries:
272
311
 
273
312
  * Ruby 1.8.1 and greater
274
- http://www.ruby-lang.org
275
- Version 1.8.2 is recomended
313
+ http://www.ruby-lang.org
314
+ Version 1.8.2 is recomended
276
315
 
277
316
  * Facets
278
- http://rubyforge.org/frs/?group_id=483
279
-
317
+ http://rubyforge.org/frs/?group_id=483
318
+
280
319
  The following applications or libraries are OPTIONAL:
281
320
 
282
321
  * PostgreSQL
283
- http://www.postgres.org
284
- Used for Database driven web applications.
285
-
322
+ http://www.postgres.org
323
+ Used for Database driven web applications.
324
+
286
325
  * MySQL
287
- http://www.mysql.org
288
- Used for Database driven web applications.
326
+ http://www.mysql.org
327
+ Used for Database driven web applications.
289
328
 
290
329
  * Ruby-psql
291
- http://www.postgresql.jp/interfaces/ruby/archive/ruby-postgres-0.7.1.tar.gz
292
- Ruby interface to the PostgreSQL RDBMS.
330
+ http://www.postgresql.jp/interfaces/ruby/archive/ruby-postgres-0.7.1.tar.gz
331
+ Ruby interface to the PostgreSQL RDBMS.
293
332
 
294
333
  * Ruby-mysql
295
- http://tmtm.org/ja/ruby/mysql/README_en.html
296
- Ruby interface to the MySQL RDBMS.
297
-
334
+ http://tmtm.org/ja/ruby/mysql/README_en.html
335
+ Ruby interface to the MySQL RDBMS.
336
+
298
337
  * Ruby-XSLT
299
- http://gregoire.lejeune.free.fr/ruby-xslt_0.4.0.tar.gz
300
- Used for XSLT based templates.
338
+ http://gregoire.lejeune.free.fr/ruby-xslt_0.4.0.tar.gz
339
+ Used for XSLT based templates.
301
340
 
302
341
  * Apache 2.0
303
- http://www.apache.org
304
- Used to host application in production environments.
342
+ http://www.apache.org
343
+ Used to host application in production environments.
305
344
 
306
345
  * Lighttpd
307
- http://www.lighttpd.net/
308
- A lean and efficient web server. A perfect companion to Nitro.
346
+ http://www.lighttpd.net/
347
+ A lean and efficient web server. A perfect companion to Nitro.
309
348
 
310
349
  * Ruby-fcgi
311
- http://www.moonwolf.com/ruby/archive/ruby-fcgi-0.8.5.tar.gz
312
- Used for FCGI based applications.
350
+ http://www.moonwolf.com/ruby/archive/ruby-fcgi-0.8.5.tar.gz
351
+ Used for FCGI based applications.
313
352
 
314
353
  * FastCGI development kit
315
- http://www.fastcgi.com/dist/fcgi.tar.gz
316
- Needed to compile the C-version of the ruby fcgi library.
354
+ http://www.fastcgi.com/dist/fcgi.tar.gz
355
+ Needed to compile the C-version of the ruby fcgi library.
317
356
 
318
357
  * RedCloth
319
- http://rubyforge.org/projects/redcloth/
320
-
358
+ http://rubyforge.org/projects/redcloth/
359
+
321
360
  Please install the required applications and libraries before continuing
322
361
  with the installation of Nitro.
323
362
 
@@ -384,9 +423,9 @@ if you wan to run this application with MySQL
384
423
  edit the configuration file to include
385
424
 
386
425
  {
387
- ...
388
- :backend => "mysql"
389
- ...
426
+ ...
427
+ :backend => "mysql"
428
+ ...
390
429
  }
391
430
 
392
431
  instead.
@@ -418,20 +457,20 @@ browser when running in debug mode.
418
457
  == Description of contents
419
458
 
420
459
  bin
421
- Commands and wizards.
460
+ Commands and wizards.
422
461
 
423
462
  examples/
424
- Various examples. 'tiny' is a minimal example, 'blog' is a
425
- fully working and nice looking Blog implementation, 'no_xsl_blog'
426
- is the same example without using XSLT, 'og' contains some Og
427
- examples and 'flash' is an example for generating binary content
428
- for a Nitro response.
463
+ Various examples. 'tiny' is a minimal example, 'blog' is a
464
+ fully working and nice looking Blog implementation, 'no_xsl_blog'
465
+ is the same example without using XSLT, 'og' contains some Og
466
+ examples and 'flash' is an example for generating binary content
467
+ for a Nitro response.
429
468
 
430
469
  lib/nitro
431
- Nitro library source files.
470
+ Nitro library source files.
432
471
 
433
472
  test
434
- Unit and functional tests.
473
+ Unit and functional tests.
435
474
 
436
475
 
437
476
  == Running Tests