[ANN] Nitro + Og 0.8.0

G

George Moschovitis

Hello everyone,

new versions of Nitro and Og were just released.

Homepage: http://www.navel.gr/nitro
Download: http://www.rubyforge.com/projects/nitro

A snapshot of the latest code. Cool new features,
many fixes and improvements in older features. Many thanks
to Michael Neumann for giving intelligent suggestions
and finding small bugs.

Most notable additions:

* New automatic validation system:

class User
prop_accessor :name, :password, String
validate_confirmation :password
validate_length :name, :range => 2..12
end

u = User.new(...)
unless u.valid?
p u.errors.on:)name)
p u.errors[:password]
end

* Programmatic xhtml rendering. This is an alternative
method of rendering that is usefull in building
components and helpers. This is a preview implementation.

options = ['Male', 'Female']
o.select:)name => 'sex') {
o.options(options, selected = 1)
}

options = { 'Male' => 'm', 'Female' => 'f' }
o.select:)name => 'sex') {
o.options(options, selected = 1)
}

o.html {
o.p:)class => 'header') { o.b('Hello') }
}

* No global variables in Og.

* Recoded Og to allow for future support of multiple databases
(even on different RDBMS systems) on a single application.

* Improved Blog example demonstrates latest advancements.
(You have to drop the database of earlier versions!)
* More unit tests.

* Supports Ruby 1.8.2

* Integrated extensions/dev-utils by Gavin Sinclair.

* Integrated blankslate by Jim Weirich.

* And many IMPORTANT bug fixes.

Nitro is an efficient, yet simple engine for developing professional
Web Applications using the Ruby language. Nitro aims to provide a
robust infrastructure for scalable web applications that can be
distributed over a server cluster. However, Nitro can also power simple
web applications for deployment on intranets or even personal
computers. Nitro integrates the powerful Og Object-Relational mapping
library.

Nitro is a multiparadigm application framework and will integrate ideas
from Rails, Wee, PHP, JSP and .NET

Nitro integrates the Og (ObjectGraph) object-relational mapping
library. Og provides transparent serialization of object graphs to a
RDBMS backend. Unlike other similar libraries Og maps standard Ruby
objects to SQL tables and not vice versa. Og provides a meta language
to describe the relations between objects, a flexible and intuitive api
for querieng the database, raw access to the SQL language if needed
(for example to fine tune the automatically generated SQL tables, or
for custom queries), suports deserialization to Ruby objects or tuples,
automatically generates join tables for many_to_many relations
and provides a collection of usefull Mixins to synthesize common
Entities.

Og is a combination of the best features of Active Record and the
former O-R mapping library included in Nitro (NDB). Adapters for
PostgreSQL and MySQL are included.

I would really appreciate your suggestions, ideas and bug reports. I
hope this software will be useful for you.

have fun,
George Moschovitis
 
B

Bill Atkins

This looks interesting, but is there any documentation on running the
examples? I tried running the blog example (even though I couldn't
set up the database), and got this error (on Win32):

----
../../lib/og.rb:189:in `initialize': (eval):1:in `initialize': uninitialized con
stant Og::Database::MysqlBackend (NameError)
from ./config.rb:55:in `eval'
from ../../lib/og.rb:189:in `initialize'
from ./config.rb:55:in `new'
from ./config.rb:55
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire__'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `re
quire'
from app.rb:19
-----

I tried this with the database set to PostgreSQL and I got the error
there as well, except with PostgresqlBackend instead of MysqlBackend
(I don't have PostgreSQL installed).

So how do I get the example to connect to the database and what kind
of setup do I need to do to get the database ready for the example?

Bill

Hello everyone,

new versions of Nitro and Og were just released.

Homepage: http://www.navel.gr/nitro
Download: http://www.rubyforge.com/projects/nitro

A snapshot of the latest code. Cool new features,
many fixes and improvements in older features. Many thanks
to Michael Neumann for giving intelligent suggestions
and finding small bugs.

Most notable additions:

* New automatic validation system:

class User
prop_accessor :name, :password, String
validate_confirmation :password
validate_length :name, :range => 2..12
end

u = User.new(...)
unless u.valid?
p u.errors.on:)name)
p u.errors[:password]
end

* Programmatic xhtml rendering. This is an alternative
method of rendering that is usefull in building
components and helpers. This is a preview implementation.

options = ['Male', 'Female']
o.select:)name => 'sex') {
o.options(options, selected = 1)
}

options = { 'Male' => 'm', 'Female' => 'f' }
o.select:)name => 'sex') {
o.options(options, selected = 1)
}

o.html {
o.p:)class => 'header') { o.b('Hello') }
}

* No global variables in Og.

* Recoded Og to allow for future support of multiple databases
(even on different RDBMS systems) on a single application.

* Improved Blog example demonstrates latest advancements.
(You have to drop the database of earlier versions!)
* More unit tests.

* Supports Ruby 1.8.2

* Integrated extensions/dev-utils by Gavin Sinclair.

* Integrated blankslate by Jim Weirich.

* And many IMPORTANT bug fixes.

Nitro is an efficient, yet simple engine for developing professional
Web Applications using the Ruby language. Nitro aims to provide a
robust infrastructure for scalable web applications that can be
distributed over a server cluster. However, Nitro can also power simple
web applications for deployment on intranets or even personal
computers. Nitro integrates the powerful Og Object-Relational mapping
library.

Nitro is a multiparadigm application framework and will integrate ideas
from Rails, Wee, PHP, JSP and .NET

Nitro integrates the Og (ObjectGraph) object-relational mapping
library. Og provides transparent serialization of object graphs to a
RDBMS backend. Unlike other similar libraries Og maps standard Ruby
objects to SQL tables and not vice versa. Og provides a meta language
to describe the relations between objects, a flexible and intuitive api
for querieng the database, raw access to the SQL language if needed
(for example to fine tune the automatically generated SQL tables, or
for custom queries), suports deserialization to Ruby objects or tuples,
automatically generates join tables for many_to_many relations
and provides a collection of usefull Mixins to synthesize common
Entities.

Og is a combination of the best features of Active Record and the
former O-R mapping library included in Nitro (NDB). Adapters for
PostgreSQL and MySQL are included.

I would really appreciate your suggestions, ideas and bug reports. I
hope this software will be useful for you.

have fun,
George Moschovitis
 
M

Martin DeMello

George Moschovitis said:
Nitro is a multiparadigm application framework and will integrate ideas
from Rails, Wee, PHP, JSP and .NET

Could you expand on 'multiparadigm' as it applies to web apps? (e.g.
what are the major paradigms available?) Off the top of my head, I can
think of JSP, MVC (rails et al), components (WebObjects and descendants)
and continuation-based (Seaside and I think ViaWeb). Any others? And
which ones does Nitro integrate?

martin
 
G

Graham Foster

This looks interesting, but is there any documentation on running
the
examples? I tried running the blog example (even though I couldn't
set up the database), and got this error (on Win32):
I too had a look at Nitro but the dearth of documentation compared to
Rails made me focus my newbie efforts in the Rails direction.
Graham
 
M

Michael Neumann

Martin said:
Could you expand on 'multiparadigm' as it applies to web apps? (e.g.
what are the major paradigms available?) Off the top of my head, I can
think of JSP, MVC (rails et al), components (WebObjects and descendants)
and continuation-based (Seaside and I think ViaWeb). Any others? And
which ones does Nitro integrate?

My understanding is:

It can make use of XSLT, has PHP or JSP (or ERb)-like templates (but
which are XHTML compatible, so that they can be validated and created by
dreamweaver).

It has the same request/response model as Rails. Indeed, Nitro is most
influenced by Rails, IMHO.

The only influence Nitro *currently* has from Wee is the programmatic
html generation, AFAIK. It does not have components like WebObjects
(IOWA), Seaside or Wee has.

Regards,

Michael
 
G

George Moschovitis

Hell Bill,

thanks for downloading nitro :)
This looks interesting, but is there any documentation on running the
examples

there is a README file for the blog example.
Generally this example does not run on Windows because it uses the
ruby-xslt library. I 'll release a new version next week that will
include a version of the blog example that will NOT use XSLT. I 'll
make sure it runs out of the box on Linux (if you have Mysql installed
of course).
I tried this with the database set to PostgreSQL and I got the error
there as well, except with PostgresqlBackend instead of MysqlBackend
(I don't have PostgreSQL installed).

how have you tried this with Postgres on Win32, is there a ruby-psql
driver that runs on Win32?
So how do I get the example to connect to the database and what kind
of setup do I need to do to get the database ready for the example?

There is absolutely no setup you need to do. Og automatically creates
the database and all tables, join tables, sequences, indices etc that
are needed by introspecting standard Ruby objects.

Thanks for your regards, I 'll try to prepare a Win32 version of the Bl
og example over the weekend. Btw, have you tried the tiny example?
regards,
George
 
G

George Moschovitis

At the moment Nitro supports:

- ASP/JSP/PHP style of webapps where the code is embeded in the
template
- Rails style MVC model (with a very compatible interface, but more
efficient implementation)
- Wee style programmatic rendering (this will be integrated in the
other two models in the future)

In the near future, I plan to add Wee style components (but NOT
continuation based).

Stay tuned :)

regards,
George Moschovitis
 
G

George Moschovitis

It does not have components like WebObjects
(IOWA), Seaside or Wee has.

I like so many things about Wee, so I plan to integrate them really
soon. For example components and the concept of Context encapsulating
Request/Response.
And of course the extremely clean source files :)

regards,
George.
 
G

George Moschovitis

I too had a look at Nitro but the dearth of documentation compared to
Rails made me focus my newbie efforts in the Rails direction.

This is sadly true :( I plan to improve the documentation and create a
Nitro web site, but I am still not ready. Btw, this is a community
effort, perhaps someone could help me wioth writing tutorials etc. I
know some people hava managed to get nitro and especially Og up and
running :)

regards,
George
 
M

Michael Neumann

George said:
how have you tried this with Postgres on Win32, is there a ruby-psql
driver that runs on Win32?

Yes, mine ;-)

postgres-pr, because it's pure Ruby :)


Regards,

Michael
 
G

George Moschovitis

Yes, mine ;-)
postgres-pr, because it's pure Ruby :)

Yes, but does Postgresql 7.x run on Windows? I think only under Cygwin.
And Postgresql 8-final is not released yet.

Anyway, point taken, I 'll make the blog example Win32-friendly, it is
very ieasy to do.

George.
 
J

James Britt

George said:
This is sadly true :( I plan to improve the documentation and create a
Nitro web site, but I am still not ready. Btw, this is a community
effort, perhaps someone could help me wioth writing tutorials etc. I
know some people hava managed to get nitro and especially Og up and
running :)

If and when I get something running I might write something (or at least
offer an example), but I've run into some avoidable problems right form
the start. I've installed 0.8.0 via gems, and it has some examples, but
most don't run because they have assorted dependencies.

Blog: Needs a postgres lib
Flash: requires ming/ming
Og: requires flexmock

Out the four included examples, the only one I could get running was
'tiny', which, at first glance, seems little different than running Erb
via WEBrick.

Please, if you can, include examples that demo the more interesting
features of Nitro and Og, and are known to run using only what comes
with ruby 1.8 and whatever Nitro itself installs.

I can understand that a database lib may have to be installed separately
(though if there are gems for them that would be sweet), but ideally it
should be something that works on all platforms and requires no C
compilation. (I have to check out postgres-pr now ...)

I know it's time-consuming to write docs and such, but good examples can
go a long way. I get the sense that Nitro is quite cool, and want to
give it a shot, and any help is appreciated.

Thanks,

James

P.S.

The Nitro home page has 0.6.0 as the latest version; the link to the
docs there says 0.3.0
 
M

Michael Neumann

James said:
If and when I get something running I might write something (or at least
offer an example), but I've run into some avoidable problems right form
the start. I've installed 0.8.0 via gems, and it has some examples, but
most don't run because they have assorted dependencies.

Blog: Needs a postgres lib
Flash: requires ming/ming
Og: requires flexmock

Out the four included examples, the only one I could get running was
'tiny', which, at first glance, seems little different than running Erb
via WEBrick.

Please, if you can, include examples that demo the more interesting
features of Nitro and Og, and are known to run using only what comes
with ruby 1.8 and whatever Nitro itself installs.

I can understand that a database lib may have to be installed separately
(though if there are gems for them that would be sweet), but ideally it
should be something that works on all platforms and requires no C
compilation. (I have to check out postgres-pr now ...)

Og works just fine with postgres-pr, I'm using it all the time (and even
ActiveRecord should work with postgres-pr).

Regards,

Michael
 
G

George Moschovitis

Hello James,
If and when I get something running I might write something (or at least
offer an example)

Thank you!

I just released a new version of Nitro. The source code is much
cleaner.
I have included a new example (no_xsl_blog) that does not require XSLT
and runs by default on Mysql.

By the way, it is extremely easy to get the Blog example to run with
Mysql.
Just change th og configuration in conf/app.conf.rb

I also updated the docs to reflect the latest changes.
I know it's time-consuming to write docs and such, but good examples can
go a long way. I get the sense that Nitro is quite cool, and want to
give it a shot, and any help is appreciated.

I 'll contact you by email later today and help you get up to speed
with Nitro!

best regards,
George Moschovitis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top