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.
- data/CHANGELOG +752 -543
- data/INSTALL +38 -38
- data/README +264 -225
- data/Rakefile +48 -49
- data/bin/nitro +3 -3
- data/bin/nitrogen +6 -6
- data/doc/AUTHORS +10 -10
- data/doc/CHANGELOG.1 +1939 -1939
- data/doc/CHANGELOG.2 +954 -954
- data/doc/LICENSE +3 -3
- data/doc/MIGRATION +28 -0
- data/doc/RELEASES +814 -643
- data/doc/config.txt +5 -5
- data/install.rb +7 -17
- data/lib/nitro.rb +38 -9
- data/lib/nitro/adapter/cgi.rb +311 -312
- data/lib/nitro/adapter/fastcgi.rb +18 -25
- data/lib/nitro/adapter/webrick.rb +128 -137
- data/lib/nitro/adapter/wee.rb +51 -0
- data/lib/nitro/caching.rb +20 -20
- data/lib/nitro/caching/actions.rb +43 -43
- data/lib/nitro/caching/fragments.rb +46 -46
- data/lib/nitro/caching/invalidation.rb +11 -11
- data/lib/nitro/caching/output.rb +65 -65
- data/lib/nitro/caching/stores.rb +67 -67
- data/lib/nitro/compiler.rb +262 -0
- data/lib/nitro/compiler/elements.rb +0 -0
- data/lib/nitro/compiler/errors.rb +65 -0
- data/lib/nitro/compiler/localization.rb +25 -0
- data/lib/nitro/compiler/markup.rb +19 -0
- data/lib/nitro/compiler/shaders.rb +206 -0
- data/lib/nitro/compiler/squeeze.rb +20 -0
- data/lib/nitro/compiler/xslt.rb +61 -0
- data/lib/nitro/context.rb +87 -88
- data/lib/nitro/controller.rb +151 -158
- data/lib/nitro/cookie.rb +34 -34
- data/lib/nitro/dispatcher.rb +195 -186
- data/lib/nitro/element.rb +132 -126
- data/lib/nitro/element/java_script.rb +6 -6
- data/lib/nitro/flash.rb +66 -66
- data/lib/nitro/mail.rb +192 -192
- data/lib/nitro/mixin/buffer.rb +66 -0
- data/lib/nitro/mixin/debug.rb +16 -16
- data/lib/nitro/mixin/form.rb +88 -0
- data/lib/nitro/mixin/helper.rb +2 -2
- data/lib/nitro/mixin/javascript.rb +108 -108
- data/lib/nitro/mixin/markup.rb +144 -0
- data/lib/nitro/mixin/pager.rb +202 -202
- data/lib/nitro/mixin/rss.rb +67 -0
- data/lib/nitro/mixin/table.rb +63 -0
- data/lib/nitro/mixin/xhtml.rb +75 -0
- data/lib/nitro/mixin/xml.rb +124 -0
- data/lib/nitro/render.rb +183 -359
- data/lib/nitro/request.rb +140 -140
- data/lib/nitro/response.rb +27 -27
- data/lib/nitro/routing.rb +21 -21
- data/lib/nitro/scaffold.rb +124 -118
- data/lib/nitro/server.rb +117 -80
- data/lib/nitro/server/runner.rb +341 -0
- data/lib/nitro/service.rb +12 -12
- data/lib/nitro/service/xmlrpc.rb +22 -22
- data/lib/nitro/session.rb +122 -120
- data/lib/nitro/session/drb.rb +9 -9
- data/lib/nitro/session/drbserver.rb +34 -34
- data/lib/nitro/template.rb +171 -155
- data/lib/nitro/testing/assertions.rb +90 -90
- data/lib/nitro/testing/context.rb +16 -16
- data/lib/nitro/testing/testcase.rb +34 -34
- data/proto/conf/lhttpd.conf +9 -9
- data/proto/public/error.xhtml +75 -75
- data/proto/public/index.xhtml +18 -18
- data/proto/public/js/behaviour.js +65 -65
- data/proto/public/js/controls.js +1 -1
- data/proto/public/js/prototype.js +3 -3
- data/proto/public/settings.xhtml +61 -61
- data/proto/run.rb +1 -5
- data/test/nitro/adapter/raw_post1.bin +0 -0
- data/test/nitro/adapter/tc_cgi.rb +57 -57
- data/test/nitro/adapter/tc_webrick.rb +4 -4
- data/test/nitro/mixin/tc_pager.rb +25 -25
- data/test/nitro/mixin/tc_rss.rb +24 -0
- data/test/nitro/mixin/tc_table.rb +31 -0
- data/test/nitro/mixin/tc_xhtml.rb +13 -0
- data/test/nitro/tc_caching.rb +10 -10
- data/test/nitro/tc_context.rb +8 -8
- data/test/nitro/tc_controller.rb +48 -48
- data/test/nitro/tc_cookie.rb +6 -6
- data/test/nitro/tc_dispatcher.rb +64 -64
- data/test/nitro/tc_element.rb +27 -27
- data/test/nitro/tc_flash.rb +31 -31
- data/test/nitro/tc_mail.rb +63 -63
- data/test/nitro/tc_server.rb +26 -26
- data/test/nitro/tc_session.rb +9 -9
- data/test/nitro/tc_template.rb +19 -19
- data/test/public/blog/list.xhtml +1 -1
- metadata +31 -37
- data/lib/nitro/buffering.rb +0 -45
- data/lib/nitro/builder/form.rb +0 -104
- data/lib/nitro/builder/rss.rb +0 -104
- data/lib/nitro/builder/table.rb +0 -80
- data/lib/nitro/builder/xhtml.rb +0 -132
- data/lib/nitro/builder/xml.rb +0 -131
- data/lib/nitro/conf.rb +0 -36
- data/lib/nitro/environment.rb +0 -21
- data/lib/nitro/errors.rb +0 -69
- data/lib/nitro/localization.rb +0 -153
- data/lib/nitro/markup.rb +0 -147
- data/lib/nitro/output.rb +0 -24
- data/lib/nitro/runner.rb +0 -348
- data/lib/nitro/shaders.rb +0 -206
- data/test/nitro/builder/tc_rss.rb +0 -23
- data/test/nitro/builder/tc_table.rb +0 -30
- data/test/nitro/builder/tc_xhtml.rb +0 -39
- data/test/nitro/builder/tc_xml.rb +0 -56
- 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
|
-
|
|
5
|
+
http://rubygems.rubyforge.org
|
|
6
6
|
|
|
7
7
|
2. Install the distribution:
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
gem install nitro
|
|
10
|
+
|
|
11
|
+
If you wish to install Og only:
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
gem install og
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
(make sure you have the latest stable versions of Ruby and RubyGems
|
|
16
|
+
installed)
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
24
|
+
export RUBYOPT=-rubygems
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
You can add this in you .bashrc in Unix.
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
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
|
-
|
|
45
|
+
For example in Unix:
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
$ su -
|
|
48
48
|
|
|
49
49
|
2. Run the installation script.
|
|
50
50
|
|
|
51
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
http://www.postgres.org
|
|
86
|
+
Used for Database driven web applications.
|
|
87
|
+
|
|
88
88
|
* MySQL
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
http://www.mysql.org
|
|
90
|
+
Used for Database driven web applications.
|
|
91
91
|
|
|
92
92
|
* Ruby-psql
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
http://tmtm.org/ja/ruby/mysql/README_en.html
|
|
98
|
+
Ruby interface to the MySQL RDBMS.
|
|
99
|
+
|
|
100
100
|
* Ruby-XSLT
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
106
|
-
|
|
105
|
+
http://www.apache.org
|
|
106
|
+
Used to host application in production environments.
|
|
107
107
|
|
|
108
108
|
* Lighttpd
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
http://www.lighttpd.net/
|
|
110
|
+
A lean and efficient web server. A perfect companion to Nitro.
|
|
111
111
|
|
|
112
112
|
* Ruby-fcgi
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
|
|
118
|
-
|
|
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.
|
|
1
|
+
= Nitro 0.21.0 README
|
|
2
2
|
|
|
3
|
-
Nitro
|
|
4
|
-
|
|
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
|
|
11
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
120
|
-
|
|
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
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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
|
-
|
|
131
|
-
|
|
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
|
-
|
|
170
|
+
This enables the developer to get started as fast as possible.
|
|
136
171
|
|
|
137
172
|
* Distributed State
|
|
138
173
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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
|
-
|
|
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
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
|
|
179
|
-
|
|
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
|
-
|
|
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
|
-
|
|
209
|
+
A variety of invalidation strategies can be implemented.
|
|
184
210
|
|
|
185
211
|
* Programmatic xhtml rendering.
|
|
186
212
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
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
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
*
|
|
214
|
-
|
|
215
|
-
|
|
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
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
*
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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
|
-
|
|
241
|
-
|
|
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
|
-
|
|
275
|
-
|
|
313
|
+
http://www.ruby-lang.org
|
|
314
|
+
Version 1.8.2 is recomended
|
|
276
315
|
|
|
277
316
|
* Facets
|
|
278
|
-
|
|
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
|
-
|
|
284
|
-
|
|
285
|
-
|
|
322
|
+
http://www.postgres.org
|
|
323
|
+
Used for Database driven web applications.
|
|
324
|
+
|
|
286
325
|
* MySQL
|
|
287
|
-
|
|
288
|
-
|
|
326
|
+
http://www.mysql.org
|
|
327
|
+
Used for Database driven web applications.
|
|
289
328
|
|
|
290
329
|
* Ruby-psql
|
|
291
|
-
|
|
292
|
-
|
|
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
|
-
|
|
296
|
-
|
|
297
|
-
|
|
334
|
+
http://tmtm.org/ja/ruby/mysql/README_en.html
|
|
335
|
+
Ruby interface to the MySQL RDBMS.
|
|
336
|
+
|
|
298
337
|
* Ruby-XSLT
|
|
299
|
-
|
|
300
|
-
|
|
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
|
-
|
|
304
|
-
|
|
342
|
+
http://www.apache.org
|
|
343
|
+
Used to host application in production environments.
|
|
305
344
|
|
|
306
345
|
* Lighttpd
|
|
307
|
-
|
|
308
|
-
|
|
346
|
+
http://www.lighttpd.net/
|
|
347
|
+
A lean and efficient web server. A perfect companion to Nitro.
|
|
309
348
|
|
|
310
349
|
* Ruby-fcgi
|
|
311
|
-
|
|
312
|
-
|
|
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
|
-
|
|
316
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
460
|
+
Commands and wizards.
|
|
422
461
|
|
|
423
462
|
examples/
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
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
|
-
|
|
470
|
+
Nitro library source files.
|
|
432
471
|
|
|
433
472
|
test
|
|
434
|
-
|
|
473
|
+
Unit and functional tests.
|
|
435
474
|
|
|
436
475
|
|
|
437
476
|
== Running Tests
|