From ak at navel.gr Fri Apr 1 08:29:54 2005
From: ak at navel.gr (Anastasios Koutoumanos)
Date: Fri, 01 Apr 2005 16:29:54 +0300
Subject: [Nitro] MS Sql Server adapter
Message-ID: <424D4CD2.6080406@navel.gr>
Hello all,
I started creating the SQL Server adapter for OG. Apparently it's almost
done - at least it passes successfuly all the test cases. I have sent it
to George who will (hopefully ;-) include it in the next version of og.
Let me note some issues I run into while making the adapter:
- I had to name it SqlserverAdapter, not SqlServerAdapter, due to
og\adapter.rb:43: eval %{ return #{name.capitalize}Adapter.instance }
- It was hard to track down some error messages from the ms sql driver.
It would be much better if we use eval <
Is there some what to have a template file under /public, and have it
include another file in a sibling directory?
I have this directory tree
/conf
/public
/log
/templates
my index.xhtml file has
so it can slurp in header.xhtml
but it fails.
I've also tried
My run.rb (this is running under WEBrick) has
N::Runner.run( :host => '127.0.0.1',
:port => 9999 ,
:template_root => 'templates',
:name => "Tagegory"
)
which I though would tell Nitro to look in templates/ for files.
On a related issue, if I simply put the header file in the same dir as
index.xhtml, and use
then it works. If I try to put the header file is a subdirectory of
public, and use this
I get errors about no such action.
Thanks,
James
--
http://www.ruby-doc.org
http://www.rubyxml.com
http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com
From george.moschovitis at gmail.com Sun Apr 3 04:29:38 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Sun, 3 Apr 2005 11:29:38 +0300
Subject: [Nitro] Placing tempaltes and includes outside of 'public'
directory
In-Reply-To: <424F770D.4030107@neurogami.com>
References: <424F770D.4030107@neurogami.com>
Message-ID:
Hello
> Is there some what to have a template file under /public, and have it
> include another file in a sibling directory?
>
> I have this directory tree
> ...
>
in 0.14.0 you can do:
class MyController < Controller
@template_root = 'templates'
...
end
then in your html:
But I 'll change this so that your version works too. Please be patient.
> N::Runner.run( :host => '127.0.0.1',
> :port => 9999 ,
> :template_root => 'templates',
> :name => "Tagegory"
> )
If you set the templates root then you should just:
> On a related issue, if I simply put the header file in the same dir as
> index.xhtml, and use
> ...
>
As I said, will fix ASAP.
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Sun Apr 3 17:05:36 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Mon, 4 Apr 2005 00:05:36 +0300
Subject: [Nitro] Placing tempaltes and includes outside of 'public'
directory
In-Reply-To:
References: <424F770D.4030107@neurogami.com>
Message-ID:
Fixed it, now you can render from subdirs.
Will be available in the next version.
regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From epiperak at softlab.ece.ntua.gr Sat Apr 2 05:52:24 2005
From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis)
Date: Sat, 2 Apr 2005 13:52:24 +0300 (EEST)
Subject: [Nitro] Hello Everyone...
In-Reply-To:
Message-ID:
After a lot of thought, deep consideration, and a lot of research on the
topic, I decided to stop the developing of my web app on *r*l* (I promised
a friend I will never use the "r" word again, ..., anyway... , and join
the world of Nitro.
Anyway, ... I would like to say hello to everyone... :-)
Emmanouil Piperakis (epiperak at cs.ntua.gr)
{To explore is Human, to Create is Devine,
To teach is Primal, to Rule is Sin}
From george.moschovitis at gmail.com Mon Apr 4 05:21:04 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Mon, 4 Apr 2005 12:21:04 +0300
Subject: [Nitro] [ANN] Nitro + Og 0.15.0
Message-ID:
Hello everyone,
new versions of Nitro and Og were just released.
Homepage + Downloads: http://nitro.rubyforge.org
A great release. Many cool new features and tons of subtle
improvements. We also welcome a new core developer, Anastastios
Koutoumanos, who's first contribution is the new SqlServer adapter.
Most notable additions:
* Advanced localization support:
locale_en = {
'See you' => 'See you',
:long_paragraph => 'The best new books, up to 30% reduced price',
:price => 'Price: %d %s',
:proc_price => proc { |value, cur| "Price: #{value} #{cur}" }
}
locale_de = {
'See you' => 'Auf wieder sehen',
...
}
lc = Localization.get
lc['See you'] -> See you
lc[:price, 100, 'euro'] -> Price: 100 euro
lc = Localization.get[:de]
lc['See you'] -> Auf wiedersehen
Using the LocalizationShader you can have templates like this:

[[This is a localized]] String

do you [[:like]] this?

All strings enclosed in [[ ]] are replaced with localized
versions (honouring the session locale). Localization rules can also
be provided with a .yml file. Check out the updated blog example.
* Dynamic/Parametrised mixins. A great extension to Ruby's mixin
feature. The Og::list implementation is replaced with the new
Orderable dynamic mixin, here is an example:
class Comment
property :body, String
belongs_to :article, Article
include Orderable, :scope => article
end
c.move_higher
The Orderable mixin uses the :scope parameter to dynamically alter
the methods appended to the Comment class. This new feature will be
used throughout the platform.
* NestedSets mixin:
class Comment
include NestedSets
end
or
class Comment
include Hierarchical, :method => :nested_sets
end
c.add_comment(child_comment)
c.full_children
c.direct_children
c.children
this is a reimplementation of the SqlTraversable mixin
available in older versions.
* Improved templating system. Now allows intrerpolators
and provides a number of html morphing effects:

admin interface

#{u.first_name} #{u.last_name}

and more...
* Og provides an SqlServer adapter out of the box.
* Improved scaffolding code (still a lot more to come).
* Build default environment, introduced nitro and nitrogen
commands to help new users.
* Many, many small improvements and fixes.
--
http://nitro.rubyforge.org
http://www.joy.gr
From james_b at neurogami.com Mon Apr 4 23:32:00 2005
From: james_b at neurogami.com (James Britt)
Date: Mon, 04 Apr 2005 20:32:00 -0700
Subject: [Nitro] Tempalte hack and feature requet
Message-ID: <425206B0.6000009@neurogami.com>
I was wondering about doing a conditional header include, so that each
page in a Web site can have a common set of links , but not link back to
itself.
Here's a simple example, where the index page doesn't need a link to
itself.
# file header.xhtml -----
My Blog"
links = "My Blog" if caller[6] =~ /index/
?>

#{links}

Today is #{today}

# end file -----
This gets included into index.xhtml, and other pages, and manages to
detect the calling xhtml page. But it feels hackish, and wonder if
there was, or could be, a cleaner way for one file to know what parent
page was including it.
Thanks,
James
--
http://www.ruby-doc.org
http://www.rubyxml.com
http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com
From ak at navel.gr Tue Apr 5 03:22:07 2005
From: ak at navel.gr (Anastasios Koutoumanos)
Date: Tue, 05 Apr 2005 10:22:07 +0300
Subject: [Nitro] Hello Everyone...
In-Reply-To:
References:
Message-ID: <42523C9F.4060308@navel.gr>
Emmanuel Piperakis wrote:
> After a lot of thought, deep consideration, and a lot of research on the
> topic, I decided to stop the developing of my web app on *r*l* (I promised
> a friend I will never use the "r" word again, ..., anyway... , and join
> the world of Nitro.
>
> Anyway, ... I would like to say hello to everyone... :-)
>
> Emmanouil Piperakis (epiperak at cs.ntua.gr)
> {To explore is Human, to Create is Devine,
> To teach is Primal, to Rule is Sin}
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
Hello Emmanouil!
Nice to have you on board ;-)
Now, could you explain this? Your name and email address seem Greek (to
me...) but a little trace (sorry, couldn't resist!) leads to Tokyo,
Japan! So where are you located, what are you working on? Are you in any
way related to Matz!??!!
enJOY!
Tasos Koutoumanos
--
Navel Ltd
http://www.navel.gr - info at navel.gr - +30 210 6898050
Have fun: www.joy.gr/ and create: www.navel.gr/nitro
From george.moschovitis at gmail.com Tue Apr 5 04:29:17 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Tue, 5 Apr 2005 11:29:17 +0300
Subject: [Nitro] Tempalte hack and feature requet
In-Reply-To: <425206B0.6000009@neurogami.com>
References: <425206B0.6000009@neurogami.com>
Message-ID:
> I was wondering about doing a conditional header include, so that each
> ...
> there was, or could be, a cleaner way for one file to know what parent
> page was including it.
Hmm another nice suggestion. Will add this asap along with your other
suggestions, and send you an updated gem. Please be patient till
tomorrow though.
best regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From ak at navel.gr Tue Apr 5 04:38:29 2005
From: ak at navel.gr (Anastasios Koutoumanos)
Date: Tue, 05 Apr 2005 11:38:29 +0300
Subject: [Fwd: Re: [Nitro] Tempalte hack and feature requet]
Message-ID: <42524E85.7000503@navel.gr>
--
Navel Ltd
http://www.navel.gr - info at navel.gr - +30 210 6898050
Have fun: www.joy.gr/ and create: www.navel.gr/nitro
-------------- next part --------------
An embedded message was scrubbed...
From: Anastasios Koutoumanos
Subject: Re: [Nitro] Tempalte hack and feature requet
Date: Tue, 05 Apr 2005 10:32:51 +0300
Size: 1985
Url: http://rubyforge.org/pipermail/nitro-general/attachments/20050405/bced84ac/attachment.mht
From george.moschovitis at gmail.com Tue Apr 5 10:21:43 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Tue, 5 Apr 2005 17:21:43 +0300
Subject: [Nitro] What do you think.
Message-ID:
I planning some changes for the next version, and I would like your opinion:
- change Nitro namespace from N to Nitro (to follow the ruby way)
- change Glue namespace from N to Glue (to follow the ruby way)
The Nitro namespace will by default include the Glue/Og namespaces.
The .xhtml extension will be changed to .rx (ruby xml/xhtml) or .sx
(server xml/xhtml)
Which one do you prefer?
I 'll also add an .rxi or .sxi extension for includable templates.
Those templates will not be allowed to be accessed as top level
templates (for extra security).
regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From mneumann at ntecs.de Tue Apr 5 10:35:50 2005
From: mneumann at ntecs.de (Michael Neumann)
Date: Tue, 5 Apr 2005 16:35:50 +0200
Subject: [Nitro] What do you think.
In-Reply-To:
References:
Message-ID: <200504051635.50955.mneumann@ntecs.de>
Am Dienstag 05 April 2005 16:21 schrieb George Moschovitis:
> I planning some changes for the next version, and I would like your
> opinion:
>
> - change Nitro namespace from N to Nitro (to follow the ruby way)
> - change Glue namespace from N to Glue (to follow the ruby way)
Good idea!
> The Nitro namespace will by default include the Glue/Og namespaces.
>
> The .xhtml extension will be changed to .rx (ruby xml/xhtml) or .sx
> (server xml/xhtml)
> Which one do you prefer?
I'd prefer .rx (or .rxml).
Regards,
Michael
From george.moschovitis at gmail.com Tue Apr 5 10:50:16 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Tue, 5 Apr 2005 17:50:16 +0300
Subject: [Nitro] What do you think.
In-Reply-To: <200504051635.50955.mneumann@ntecs.de>
References:
<200504051635.50955.mneumann@ntecs.de>
Message-ID:
> Good idea!
One reason for this change is to make Og more compatible with Wee :)
It would not be nice to include the N namespace in wee applications.
Glue is more neutral. The main reason is to make using other Ruby
projects with Nitro feel more natural.
> I'd prefer .rx (or .rxml).
ok, other opinions?
-g.
--
http://nitro.rubyforge.org
http://www.joy.gr
From ak at navel.gr Tue Apr 5 12:24:02 2005
From: ak at navel.gr (Anastasios Koutoumanos)
Date: Tue, 5 Apr 2005 19:24:02 +0300
Subject: [Nitro] What do you think.
In-Reply-To:
References:
Message-ID: <20050405192402.u821qtldqi9a88os@atlas.navel.gr>
> I planning some changes for the next version, and I would like your opinion:
>
> - change Nitro namespace from N to Nitro (to follow the ruby way)
> - change Glue namespace from N to Glue (to follow the ruby way)
super!
>
> The Nitro namespace will by default include the Glue/Og namespaces.
>
> The .xhtml extension will be changed to .rx (ruby xml/xhtml) or .sx
> (server xml/xhtml)
> Which one do you prefer?
I prefer the xhtml extension - if you must change it though, I prefer
.sx
.rx reminds me or rexx, some bike models, and is more commonly used
than sx (check out
http://filext.com/detaillist.php?extdetail=rx&Submit3=Go%21)
>
> I 'll also add an .rxi or .sxi extension for includable templates.
> Those templates will not be allowed to be accessed as top level
> templates (for extra security).
Nice idea!
Tasos
>
> regards,
> George.
>
>
> --
> http://nitro.rubyforge.org
> http://www.joy.gr
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
----- End message from george.moschovitis at gmail.com -----
From mneumann at ntecs.de Tue Apr 5 13:59:53 2005
From: mneumann at ntecs.de (Michael Neumann)
Date: Tue, 5 Apr 2005 19:59:53 +0200
Subject: [Nitro] Hello Everyone...
In-Reply-To:
References:
Message-ID: <200504051959.53604.mneumann@ntecs.de>
Hi,
Am Samstag 02 April 2005 12:52 schrieb Emmanuel Piperakis:
> After a lot of thought, deep consideration, and a lot of research on the
> topic, I decided to stop the developing of my web app on *r*l* (I promised
> a friend I will never use the "r" word again, ..., anyway... , and join
> the world of Nitro.
What were the reasons for leaving *r*l* ?
Just curious.
Regards,
Michael
From george.moschovitis at gmail.com Tue Apr 5 15:52:18 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Tue, 5 Apr 2005 22:52:18 +0300
Subject: [Nitro] What do you think.
In-Reply-To: <4252BE55.7080208@neurogami.com>
References:
<4252BE55.7080208@neurogami.com>
Message-ID:
> 1. I tend to be against any names that presume to be Ruby-standard
> rather than app-standard or neutral. So, either .sx or .nx (for Nitro XML)
i agree, I like .sx more
> I like the idea of using spec-compliant templates, as it opens the door
> for validation the templates both before and after rendering. it also
>
> You would end up with something like this:
>
> xmlns="http://www.w3.org/1999/xhtml">
>
>
>
>
>
>> example, if my template is not well-formed XML, does anything in Nitro
> break?
at the moment only if you use XSLT stylesheets (the parser expects a
valid xml file).
> .sxi is an extension used by OpenOffice Impress.
thanks for pointing this out.
> What difference does the extension name have on processing? For
> example, if a template (foo.sx) references another file, bar.sx, does it
> handle it differently if the file were named bar.rxi or bar.txt?
> ...
> Do you mean they cannot live under public/ ?
no i mean you can ONLY include .sxi templates in .sx templates. Ie if
you have a file named myaction.sxi you cannot acces it with
http://www.mysite.com/myaction. Only files with .sx extension will be
allowed by the dispatcher. .sxi files will be only included.
-g.
--
http://nitro.rubyforge.org
http://www.joy.gr
From james_b at neurogami.com Tue Apr 5 16:33:26 2005
From: james_b at neurogami.com (James Britt)
Date: Tue, 05 Apr 2005 13:33:26 -0700
Subject: [Nitro] What do you think.
In-Reply-To:
References:
<4252BE55.7080208@neurogami.com>
Message-ID: <4252F616.7090701@neurogami.com>
George Moschovitis wrote:
...
>>>example, if my template is not well-formed XML, does anything in Nitro
>>
>>break?
>
>
> at the moment only if you use XSLT stylesheets (the parser expects a
> valid xml file).
I see. Haven't tried that yet.
> ...
> no i mean you can ONLY include .sxi templates in .sx templates. Ie if
> you have a file named myaction.sxi you cannot acces it with
> http://www.mysite.com/myaction. Only files with .sx extension will be
> allowed by the dispatcher. .sxi files will be only included.
Oh, nice.
Thanks,
James
From dan at zeraweb.com Tue Apr 5 16:37:41 2005
From: dan at zeraweb.com (Dan Yoder)
Date: Tue, 5 Apr 2005 15:37:41 -0500
Subject: [Nitro] What do you think.
In-Reply-To:
References:
Message-ID: <2380d9e6de9158ac8b06cf133a39f5b3@zeraweb.com>
My two cents inline below ...
On Apr 5, 2005, at 9:21 AM, George Moschovitis wrote:
> - change Nitro namespace from N to Nitro (to follow the ruby way)
> - change Glue namespace from N to Glue (to follow the ruby way)
>
> The Nitro namespace will by default include the Glue/Og namespaces.
this is all goodness, but i have one comment. is it possible (and i
think it is, i just don't recall quite how) to alias the namespaces to
N, G, and O? then you could have something like Include
NitroShortNamespaces or something. after all, nitro is a fairly
significant framework, and it *is* kind of nice to be able to say
N::FooBar. it isn't like this is a little utility or something ... =)
> The .xhtml extension will be changed to .rx (ruby xml/xhtml) or .sx
> (server xml/xhtml)
> Which one do you prefer?
i am all for sx and sxi (or, if that is used, isx). for one thing,
there is no reason the templating needs to be tightly coupled to ruby.
sure, if you embed code, it will be ruby code, but that could vary with
the platform. in addition, embedded ruby solutions (like JRuby) could
still use it anyway, even though the apps are not ruby apps. i think it
is more important to shoot for a good templating solution, and the
ruby-ness of it is secondary. the reality is that we have to take it
one step at a time, but to the extent that the naming should reflect
the underlying philosophy behind the design, i would say sx. plus, it's
just SeXier.
> I 'll also add an .rxi or .sxi extension for includable templates.
> Those templates will not be allowed to be accessed as top level
> templates (for extra security).
this is a very good idea.
~dan
From james_b at neurogami.com Tue Apr 5 16:52:15 2005
From: james_b at neurogami.com (James Britt)
Date: Tue, 05 Apr 2005 13:52:15 -0700
Subject: [Nitro] File adapter for Og
Message-ID: <4252FA7F.5080004@neurogami.com>
I'm slowly building up a Nitro tutorial. It starts from the
snake-simple, gradually adding in more Nitro features. The premise is
that one can start with mocked-out plain HTML, add in some templating,
then actual Ruby code, and gradually get more complex, all based on the
actual needs of the application. There is no de facto presumption of a
database (or any storage, for that matter) until such time that a need
is demonstrated.
I've yet to get to any mention of Og, but I started thinking about how
one might ease into the use of a database, and figured that the file
system would make the best first choice. I see there is a
FilesysAdapter class, which is sweet. But the comments say it is "proof
of concept and at the moment severely limited."
What's missing or broken? And what's the forecast?
Has anyone used this and can comment on it?
Thanks,
James
--
http://www.ruby-doc.org
http://www.rubyxml.com
http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com
From james_b at neurogami.com Tue Apr 5 16:52:32 2005
From: james_b at neurogami.com (James Britt)
Date: Tue, 05 Apr 2005 13:52:32 -0700
Subject: [Nitro] File adapter for Og
Message-ID: <4252FA90.6000909@neurogami.com>
I'm slowly building up a Nitro tutorial. It starts from the
snake-simple, gradually adding in more Nitro features. The premise is
that one can start with mocked-out plain HTML, add in some templating,
then actual Ruby code, and gradually get more complex, all based on the
actual needs of the application. There is no de facto presumption of a
database (or any storage, for that matter) until such time that a need
is demonstrated.
I've yet to get to any mention of Og, but I started thinking about how
one might ease into the use of a database, and figured that the file
system would make the best first choice. I see there is a
FilesysAdapter class, which is sweet. But the comments say it is "proof
of concept and at the moment severely limited."
What's missing or broken? And what's the forecast?
Has anyone used this and can comment on it?
Thanks,
James
--
http://www.ruby-doc.org
http://www.rubyxml.com
http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com
From dan at zeraweb.com Tue Apr 5 17:08:05 2005
From: dan at zeraweb.com (Dan Yoder)
Date: Tue, 5 Apr 2005 16:08:05 -0500
Subject: [Nitro] File adapter for Og
In-Reply-To: <4252FA7F.5080004@neurogami.com>
References: <4252FA7F.5080004@neurogami.com>
Message-ID:
I would like to stress how badly needed this kind of documentation is
... i realize, of course, that i am stating the obvious, and the
equally obvious response is to do like james and write some of it.
unfortunately, i don't have the time (at least right now) to do this,
and the lack of documentation is making it difficult to make progress
with nitro.
so what i am wondering is where is this on the agenda? what is the
estimated time frame for this? are there other folks working actively
on documentation? is there a to do list?
again, please understand this is in NO WAY meant to slam the current
effort. g & co are doing great work moving this forward and it is great
to see the activity on the list picking up. i am just asking the
questions to try and better understand where we are at. =)
~dan
p.s. one thought i have is a similar tutorial in the spirit of what
james is doing, but converting a rails app to nitro. this could also
address why you might want to do such a thing. =) i could potentially
write or contribute to this, since that is a big part of my struggle.
p.p.s. another rails-related thought: i think a lot of the
documentation for rails is actually pretty weak. there is plenty of it,
but some of it is badly out of date and there are a lot of really basic
kinds of things that are not addressed well. i think a really strong
set of tutorials and cookbooks could really help nitro's adoption.
On Apr 5, 2005, at 3:52 PM, James Britt wrote:
> I'm slowly building up a Nitro tutorial. It starts from the
> snake-simple, gradually adding in more Nitro features. The premise is
> that one can start with mocked-out plain HTML, add in some templating,
> then actual Ruby code, and gradually get more complex, all based on
> the actual needs of the application. There is no de facto presumption
> of a database (or any storage, for that matter) until such time that a
> need is demonstrated.
>
> I've yet to get to any mention of Og, but I started thinking about how
> one might ease into the use of a database, and figured that the file
> system would make the best first choice. I see there is a
> FilesysAdapter class, which is sweet. But the comments say it is
> "proof of concept and at the moment severely limited."
>
> What's missing or broken? And what's the forecast?
>
> Has anyone used this and can comment on it?
>
> Thanks,
>
>
> James
>
> --
>
> http://www.ruby-doc.org
> http://www.rubyxml.com
> http://catapult.rubyforge.com
> http://orbjson.rubyforge.com
> http://ooo4r.rubyforge.com
> http://www.jamesbritt.com
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
From james_b at neurogami.com Tue Apr 5 17:56:27 2005
From: james_b at neurogami.com (James Britt)
Date: Tue, 05 Apr 2005 14:56:27 -0700
Subject: [Nitro] File adapter for Og
In-Reply-To:
References: <4252FA7F.5080004@neurogami.com>
Message-ID: <4253098B.9090404@neurogami.com>
Dan Yoder wrote:
> I would like to stress how badly needed this kind of documentation is
> ... i realize, of course, that i am stating the obvious, and the equally
> obvious response is to do like james and write some of it.
> unfortunately, i don't have the time (at least right now) to do this,
> and the lack of documentation is making it difficult to make progress
> with nitro.
Truth is, I started writing the tutorial to help me use Nitro. Writing
helps me think; if you want to know want you really think or know about
something, try writing it down.
>
> so what i am wondering is where is this on the agenda? what is the
> estimated time frame for this? are there other folks working actively on
> documentation? is there a to do list?
I'm getting close to sending something off to George. It does not cover
all aspects of Nitro; I don't even know what that would entail. The
goals of the tutorial are to encourage use of Nitro, and demonstrate a
methodology of design and development facilitated by Nitro.
I decided to send time with Nitro for variety of reasons: curiosity;
disgust with the prevalent "Mine's bigger" pissing contest driven by
many in the Rails community (and little apparent interest from anyone in
toning it down or reigning it in); a suspicion that Nitro did in fact
offer a valuable alternative to Rails.
Hopefully, my doc will clarify that last point. Rails has some great
features, stuff worth stealing to be sure. But it presumes an awful lot
about your application design process and architecture. I might very
well be wrong; Rails is remarkably complex, so for all I know it has a
way to do everything I see in Nitro, but so far I haven't found it.
>
> again, please understand this is in NO WAY meant to slam the current
> effort. g & co are doing great work moving this forward and it is great
> to see the activity on the list picking up. i am just asking the
> questions to try and better understand where we are at. =)
Lots to do. We have the mixed blessing of working with a framework
still in progress. The nice thing is that there is time to change
things before they get to entrenched.
For those playing along at home, here are some possible ways to contribute:
* Post to the list when you find something unclear or unintuitive.
Sometimes simply changing the name of something can be a big step, but
users need to speak up
* Write docs for methods you understand. If you look at the rdoc for
Nitro you find very few comments. The method names aren't, to me,
immediately self-explanatory. If you've used something and think you've
gained some insight, offer up an rdoc comment for the method.
* Write simple examples that highlight one or two features.
>
> ~dan
>
> p.s. one thought i have is a similar tutorial in the spirit of what
> james is doing, but converting a rails app to nitro. this could also
> address why you might want to do such a thing. =) i could potentially
> write or contribute to this, since that is a big part of my struggle.
Sound nice. BTW, I really hope not to see any (well, too much) Rails
sniping here. I've used it, I've made money off it, there are many
good, smart people working on it. But it may not be suited for all
cases, and people should have and understand the alternatives. It would
be nice if you wrote up some guidelines or lessons learned from Rails
porting.
>
> p.p.s. another rails-related thought: i think a lot of the documentation
> for rails is actually pretty weak. there is plenty of it, but some of it
> is badly out of date and there are a lot of really basic kinds of things
> that are not addressed well. i think a really strong set of tutorials
> and cookbooks could really help nitro's adoption.
Docs is hard! Especially as things change. Nitro docs I wrote this
morning are out of date. Code samples really help. Here's a thought:
Is there am automated tool that lets you store a set of code samples,
unit test them, then publish them as HTML, with annotation indicating if
a sample failed any tests? As Nitro/Og progresses, the cookbook would
be run against the latest versions, and any out-of-date samples flagged.
I hate copying code, trying out, having it fail, only to learn that it
will never work with the current version.
On a related note, my tutorial has, so far, made no mention of unit
testing. I'm planning on suggesting that code of any complexity should
be encapsulated into clearly defined classes that are easy to test
independent of the Nitro environment; you shouldn't have to run a server
to test the code. Any thoughts on Nitro/Og unit testing?
James
From james_b at neurogami.com Tue Apr 5 19:50:30 2005
From: james_b at neurogami.com (James Britt)
Date: Tue, 05 Apr 2005 16:50:30 -0700
Subject: [Nitro] File adapter for Og
In-Reply-To:
References: <4252FA7F.5080004@neurogami.com>
Message-ID: <42532446.6090604@neurogami.com>
Dan Yoder wrote:
> I would like to stress how badly needed this kind of documentation is
> ... i realize, of course, that i am stating the obvious, and the equally
> obvious response is to do like james and write some of it.
> unfortunately, i don't have the time (at least right now) to do this,
> and the lack of documentation is making it difficult to make progress
> with nitro.
Truth is, I started writing the tutorial to help me use Nitro. Writing
helps me think; if you want to know want you really think or know about
something, try writing it down.
>
> so what i am wondering is where is this on the agenda? what is the
> estimated time frame for this? are there other folks working actively on
> documentation? is there a to do list?
I'm getting close to sending something off to George. It does not cover
all aspects of Nitro; I don't even know what that would entail. The
goals of the tutorial are to encourage use of Nitro, and demonstrate a
methodology of design and development facilitated by Nitro.
Essentially, I had no good idea of where to start with Nitro. The
tutorial fixes that.
I decided to send time with Nitro for variety of reasons: curiosity;
disgust with the prevalent "Mine's bigger" pissing contest driven by
many in the Rails community (and little apparent interest from anyone in
toning it down or reigning it in); a suspicion that Nitro did in fact
offer a valuable alternative to Rails.
Hopefully, my doc will clarify that last point. Rails has some great
features, stuff worth stealing to be sure. But it presumes an awful lot
about your application design process and architecture. I might very
well be wrong; Rails is complex, so for all I know it has a
way to do everything I see in Nitro, but so far I haven't found it.
>
> again, please understand this is in NO WAY meant to slam the current
> effort. g & co are doing great work moving this forward and it is great
> to see the activity on the list picking up. i am just asking the
> questions to try and better understand where we are at. =)
Lots to do. We have the mixed blessing of working with a framework
still in progress. The nice thing is that there is time to change
things before they get to entrenched.
For those playing along at home, here are some possible ways to contribute:
* Post to the list when you find something unclear or unintuitive.
Sometimes simply changing the name of something can be a big step, but
users need to speak up.
* Write docs for methods you understand. If you look at the rdoc for
Nitro you find very few comments. The method names aren't, to me,
immediately self-explanatory. If you've used something and think you've
gained some insight, offer up an rdoc comment for the method.
* Write simple examples that highlight one or two features. For
example, my tutorial shows conditional render of a common header file by
using the new @parent_action_name. Nothing earth-shattering, but simple
and useful, both for accomplishing a task and demonstrating syntax.
>
> ~dan
>
> p.s. one thought i have is a similar tutorial in the spirit of what
> james is doing, but converting a rails app to nitro. this could also
> address why you might want to do such a thing. =) i could potentially
> write or contribute to this, since that is a big part of my struggle.
Sound nice. BTW, I really hope not to see any (well, too much) Rails
sniping here. I've used it, I've made money off it, there are many
good, smart people working on it. But it may not be suited for all
cases, and people should have, and understand, alternatives. It would
be nice if you wrote up some guidelines or lessons learned from Rails
porting.
>
> p.p.s. another rails-related thought: i think a lot of the documentation
> for rails is actually pretty weak. there is plenty of it, but some of it
> is badly out of date and there are a lot of really basic kinds of things
> that are not addressed well. i think a really strong set of tutorials
> and cookbooks could really help nitro's adoption.
Docs is hard! Especially as things change. The Nitro docs I wrote this
morning are out of date. Code samples really help.
Here's a thought:
Is there am automated tool that lets you store a set of code samples,
unit test them, then publish them as HTML, with annotation indicating if
a code sample failed any tests? As Nitro/Og progresses, the cookbook
would be run against the latest versions, and any out-of-date samples
flagged. I hate copying code, trying out, having it fail, only to learn
that it will never work with the current version.
On a related note, my tutorial has, so far, made no mention of unit
testing. I'm planning on suggesting that code of any complexity should
be encapsulated into clearly defined classes that are easy to test
independent of the Nitro environment; you shouldn't have to run a server
to test the code. Any thoughts on Nitro/Og unit testing?
James
From epiperak at softlab.ece.ntua.gr Tue Apr 5 22:45:08 2005
From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis)
Date: Wed, 6 Apr 2005 05:45:08 +0300 (EEST)
Subject: [Nitro] To Nitro In Vitro!
Message-ID:
To answer to all the posed questions, and enlight the situation I would
have to say:
1) Tasos: I am Greek ;-) but located in Japan/Tokyo. Except for my current
University research topics I am also working for a real estate consulting
company for which I am building a Online Reporting System.
2) Michael: For the beforementioned System, r*i*s has proven inadequate in
many ways. Yet I am not a person who looks down on other peoples work, and
this in not a *a*l* list so, no comments here.
3) George: I can not help it and get reminded of SEX with .sx !
Therefore... good choice! (GUDOCHO as we say here in Tokyo = latest slang
meaning Good Choice!!!)
4) James: I am also working on a small tutorial. My approach is kind of
different. Let me explain: not all of us are HTML/XML/XSL/WEB/RUBY gurus.
Some common mortals from other fields of science feel the need (the need
for speed! => Nitro) to "blog" their way into the web. Sometimes simple
apps, sometimes complicated reporting systems, force us to develop an
publish online. In that case, personaly, and I believe I speak for most
research/developers (or light-developers as I like calling us), we need a
tool that help us put our app online.
Nitro is THE tool. Why? Because it has not a restricted mentality of use:
"No, I do not need to post messages, and make mailing lists!"
But, I also do not want to spend weeks on XML/HTML/RUBY...(the list goes
on and on).
So, (finally a conclussion ..), with Georges' help, I will try to write
the Dummys' Tutorial to Nitro, for people who want to spend time on
nothing but their app.
My time is also limited, but by combining a long list of Q&As the tutorial
will soon come to life (soon => 1 or 2 months).
In G. we trust! ;-)
Emmanouil Piperakis (epiperak at cs.ntua.gr)
{To explore is Human, to Create is Devine,
To teach is Primal, to Rule is Sin}
From george.moschovitis at gmail.com Wed Apr 6 02:25:52 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 6 Apr 2005 09:25:52 +0300
Subject: [Nitro] What do you think.
In-Reply-To: <2380d9e6de9158ac8b06cf133a39f5b3@zeraweb.com>
References:
<2380d9e6de9158ac8b06cf133a39f5b3@zeraweb.com>
Message-ID:
> this is all goodness, but i have one comment. is it possible (and i
> think it is, i just don't recall quite how) to alias the namespaces to
> N, G, and O? then you could have something like Include
> NitroShortNamespaces or something. after all, nitro is a fairly
> significant framework, and it *is* kind of nice to be able to say
> N::FooBar. it isn't like this is a little utility or something ... =)
As you can see in the source code, Nitro promotes the usage of
FooBar instead of N::FooBar. So there will be no change. Og and Glue
will be inteligently included in Nitro so that you can always write
FooBar instead of Og::FooBar or Glue::FooBar.
Btw, I dont know how to alias Nitro, Og, Glue etc... to N, O, G If you
have any idea, tell me :)
> > one step at a time, but to the extent that the naming should reflect
> the underlying philosophy behind the design, i would say sx. plus, it's
> just SeXier.
Yeah, this is the extension of our current framework (netrino) and it
is pronnounced .SeX pages :)
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Wed Apr 6 02:32:28 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 6 Apr 2005 09:32:28 +0300
Subject: [Nitro] File adapter for Og
In-Reply-To: <4252FA7F.5080004@neurogami.com>
References: <4252FA7F.5080004@neurogami.com>
Message-ID:
> What's missing or broken? And what's the forecast?
I plan to finish this adapter. In short, it works like this: Classes are mapped
to directories and Objects (instances) are mapped to files. At the
moment you can't do much querying. But I may be able to fix something
when I find some time. However, everyone is invited to have a look at
the current code and finish this.
But I plan to do some refactoring in the Og (and Nitro) code. I want
to make the code cleaner and easier to work with, understand and
adapt. So if you see that something could be better implemented with
Og (for example a place where eval is not necessary, duplication of
code, etc) please let me know.
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Wed Apr 6 02:38:20 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 6 Apr 2005 09:38:20 +0300
Subject: [Nitro] File adapter for Og
In-Reply-To:
References: <4252FA7F.5080004@neurogami.com>
Message-ID:
> so what i am wondering is where is this on the agenda? what is the
> estimated time frame for this? are there other folks working actively
> on documentation? is there a to do list?
Of course this is on the agenda. I plan to do some refactoring on the
code for 0.16.0 and then try to write some documentation for 0.17.0
Hopefully James will finish his tutorial earlier though. I also plan
to make some videos (but first I need to implement some more stuff in
the scaffolder). But you understand that any help on this matter is
greatly appreciated. Firstly I don't have much time either (and Nitro
takes almost all of my free time). And Secondly I am not a native
speaker either :(
> address why you might want to do such a thing. =) i could potentially
> write or contribute to this, since that is a big part of my struggle.
Please, If you can do this this would be great. I doesn't have to be a
long text, It could be just a Blog entry.
regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Wed Apr 6 02:43:06 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 6 Apr 2005 09:43:06 +0300
Subject: [Nitro] File adapter for Og
In-Reply-To: <4253098B.9090404@neurogami.com>
References: <4252FA7F.5080004@neurogami.com>
<4253098B.9090404@neurogami.com>
Message-ID:
> I'm getting close to sending something off to George. It does not cover
> all aspects of Nitro; I don't even know what that would entail. The
> goals of the tutorial are to encourage use of Nitro, and demonstrate a
> methodology of design and development facilitated by Nitro.
Great, thanks a lot.
> Lots to do. We have the mixed blessing of working with a framework
> still in progress. The nice thing is that there is time to change
> things before they get to entrenched.
Yeap, I think this is the number one reason to investigate Nitro at this moment.
> * Post to the list when you find something unclear or unintuitive.
> Sometimes simply changing the name of something can be a big step, but
> users need to speak up
This is very important.
> Sound nice. BTW, I really hope not to see any (well, too much) Rails
> sniping here. I've used it, I've made money off it, there are many
Of course not, we are all Ruby enthusiasts. We are coopetitors not competitors.
> Docs is hard! Especially as things change. Nitro docs I wrote this
> ..
> I hate copying code, trying out, having it fail, only to learn that it
> will never work with the current version.
great idea.
> On a related note, my tutorial has, so far, made no mention of unit
> testing. I'm planning on suggesting that code of any complexity should
> be encapsulated into clearly defined classes that are easy to test
> independent of the Nitro environment; you shouldn't have to run a server
> to test the code. Any thoughts on Nitro/Og unit testing?
support for unit/functional testing will be included out of the box in 0.16.0 :)
You simply CANNOT code an application in Ruby without Unit testing.
-g.
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Wed Apr 6 02:45:14 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 6 Apr 2005 09:45:14 +0300
Subject: [Nitro] To Nitro In Vitro!
In-Reply-To:
References:
Message-ID:
> So, (finally a conclussion ..), with Georges' help, I will try to write
> the Dummys' Tutorial to Nitro, for people who want to spend time on
> nothing but their app.
Thanks Emmanuel,
I 'll help you as much as I can. Can't wait for the finished document.
regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From paulha at aracnet.com Wed Apr 6 21:47:05 2005
From: paulha at aracnet.com (PAUL HANCHETT)
Date: Wed, 06 Apr 2005 18:47:05 -0700
Subject: [Nitro] Trouble opening MySQL database on Win32
Message-ID: <42549119.6040006@aracnet.com>
When I try to install the mysql gem, I get the following error:
C:\Documents and Settings\phanchet\Desktop>gem install mysql >junk.txt
ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/mysql-2.5.1 fo
r inspection.
ruby extconf.rb install mysql\nchecking for mysql_query() in
mysqlclient.lib..
. no
checking for main() in m.lib... yes
checking for mysql_query() in mysqlclient.lib... no
checking for main() in z.lib... no
checking for mysql_query() in mysqlclient.lib... no
checking for main() in socket.lib... no
checking for mysql_query() in mysqlclient.lib... no
checking for main() in nsl.lib... no
checking for mysql_query() in mysqlclient.lib... no
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/mysql-2.5.1/gem_make.out
How do I fix it? Og is unhappy with me...
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050406/032ce07b/attachment.html
From james_b at neurogami.com Thu Apr 7 00:29:22 2005
From: james_b at neurogami.com (James Britt)
Date: Wed, 06 Apr 2005 21:29:22 -0700
Subject: [Nitro] Trouble opening MySQL database on Win32
In-Reply-To: <42549119.6040006@aracnet.com>
References: <42549119.6040006@aracnet.com>
Message-ID: <4254B722.9000408@neurogami.com>
PAUL HANCHETT wrote:
> When I try to install the mysql gem, I get the following error:
>
> C:\Documents and Settings\phanchet\Desktop>gem install mysql
>junk.txt
> ERROR: While executing gem ... (RuntimeError)
> ERROR: Failed to build gem native extension.
The gem expects to find a complier so it can compile C code into some
native binary.
You may be better off just using the pure-Ruby MySQL lib.
See
http://rubyurl.com/LA3Yv
AKA
http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/136505
James
--
http://www.ruby-doc.org
http://www.rubyxml.com
http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com
From epiperak at softlab.ece.ntua.gr Thu Apr 7 00:47:00 2005
From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis)
Date: Thu, 7 Apr 2005 07:47:00 +0300 (EEST)
Subject: [Nitro] The Newbie! Q0-Q10
In-Reply-To: <42549119.6040006@aracnet.com>
Message-ID:
So here how it all starts!
"In the beginning there was chaos.
And then G. (G. stands for George, or Dr G., I like that, it has a reference
to God, or the "G" spot!!) decided to sit down and code Nitro...
After a couple of days G. stopped, looked at Nitro and saw that it was
GOOD! And G. was pleased, and rested..."
And then the newbie came along and said: (Some of the questions are
explained in the Nitro API documentaion, and some seam very simple for
experienced users, but for the sake of newbies, simple concise answers
will suffice, eg. Q8 => A8: .rb is a Ruby executable file. Using the
command "ruby filename.rb" we run the file.)
Q0: To Nitro? or Not to Nitro? (in Vitro...)
Q1: What is Nitro in one sentence?
Q2: What could it be used for? Show me an example (URL?).
Q3: What programming language was it written with?
Q4: What should I know in order to be able to use Nitro? (Ruby? Html? Xml?
Xsl? SQL? General Web application developing?)
Q5: Could you point me in a basic tutorial, or quick reference for each of
the previously mentioned prerequirements (URLs) [I will provide this by
myslef ;-)]
Q6: Where do I start: Download, Install, Check Install.
Q7: Walk me through the nitro package. What is each directory needed for?
Are directory names specifics? Could I change them?
Q8: What is an .rb file? What is .xhtml .xsl ? Which ones do I use?
Q9: HelloWorld? Is there an example?
Q10: Ok! I see the example, I run it, but I do not understand what is
happening. Could you explain the execution cycle of a small application
like the HelloWorld? E.g when I do: "ruby run.rb" what happens?
Q0: is a rhetorical question.
A0: The answer is of course "To Nitro" ;-)
G. waiting for your feedback.
Ps. And this is merely the beginning...
Emmanouil Piperakis (epiperak at cs.ntua.gr)
{To explore is Human, to Create is Devine,
To teach is Primal, to Rule is Sin}
From paulha at aracnet.com Thu Apr 7 01:28:01 2005
From: paulha at aracnet.com (PAUL HANCHETT)
Date: Wed, 06 Apr 2005 22:28:01 -0700
Subject: [Nitro] Trouble opening MySQL database on Win32
In-Reply-To: <4254B722.9000408@neurogami.com>
References: <42549119.6040006@aracnet.com> <4254B722.9000408@neurogami.com>
Message-ID: <4254C4E1.9080505@aracnet.com>
Thanks James, that did the trick. The URL's aren't quite right anymore
though...
James Britt wrote:
> PAUL HANCHETT wrote:
> > When I try to install the mysql gem, I get the following error:
> >
> > C:\Documents and Settings\phanchet\Desktop>gem install mysql
> >junk.txt
> > ERROR: While executing gem ... (RuntimeError)
> > ERROR: Failed to build gem native extension.
>
>
> The gem expects to find a complier so it can compile C code into some
> native binary.
>
> You may be better off just using the pure-Ruby MySQL lib.
>
> See
>
> http://rubyurl.com/LA3Yv
>
> AKA
> http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/136505
>
> James
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050407/a4c24240/attachment.html
From kostas at nasis.com Thu Apr 7 01:31:51 2005
From: kostas at nasis.com (Kostas Nasis)
Date: Thu, 07 Apr 2005 01:31:51 -0400
Subject: [Nitro] File adapter for Og
In-Reply-To: <4252FA90.6000909@neurogami.com>
References: <4252FA90.6000909@neurogami.com>
Message-ID: <4254C5C7.70300@nasis.com>
James Britt wrote:
> I'm slowly building up a Nitro tutorial. It starts from the
> snake-simple, gradually adding in more Nitro features. The premise is
> that one can start with mocked-out plain HTML, add in some templating,
> then actual Ruby code, and gradually get more complex, all based on
> the actual needs of the application. There is no de facto presumption
> of a database (or any storage, for that matter) until such time that a
> need is demonstrated.
I would like to help with this. Have you written something already that
you can send me? Perhaps we can divide the work, or I can at least serve
as a reviewer.
Kostas
From george.moschovitis at gmail.com Thu Apr 7 03:52:47 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Thu, 7 Apr 2005 10:52:47 +0300
Subject: [Nitro] Nitro domain
Message-ID:
Hello everyone,
I am about to register a domain for the homepage of Nitro. At the
moment, I am thinking of taking:
www.nitrohome.org
or
www.homeofnitro.org
Any suggestions for a better domain will be appreciated.
thanks,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Thu Apr 7 04:05:04 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Thu, 7 Apr 2005 11:05:04 +0300
Subject: Fwd: [Nitro] The Newbie! Q0-Q10
In-Reply-To:
References: <42549119.6040006@aracnet.com>
Message-ID:
Hello Emmanuel
> Q1: What is Nitro in one sentence?
Nitro is a web application platform. Nitro uses the Ruby language to inject
joy into web development. Nitro allows you to create scalable
applications. Scalability means:
- scalability on the server. Nitro will provide excellent support for
distributed applications. You will be able to simply add one more
server and see immediate performance gains.
- scalability of algorithms. We try to use O(1) algorithms as much as possible.
- scalability of development. Nitro allows you to start with a simple
application and scale this along your needs.
> Q2: What could it be used for? Show me an example (URL?).
Nitro sites will be available shortly. I plan to use it for sites similar to:
www.deviantart.com,
www.flicker.com
However Nitro is extremely useful for small intranet applications.
> Q3: What programming language was it written with?
Ruby, the programmers best friend.
> Q4: What should I know in order to be able to use Nitro? (Ruby? Html? Xml?
Ruby and Html are mandatory.
However it would be nice to be familiar with the following technologies:
CSS, XML, XHTML, Javascript, XSLT, etc...
> Q5: Could you point me in a basic tutorial, or quick reference for each of
> the previously mentioned prerequirements (URLs) [I will provide this by
> myslef ;-)]
A tutorial is coming soon. In the meantime, check out the Og tutorial
at www.rubygarden.com
> Q6: Where do I start: Download, Install, Check Install.
Simple:
Install Ruby
Install RubyGems (this is automatically installed on Windows)
run: gem install nitro
run: nitro
> Q7: Walk me through the nitro package. What is each directory needed for?
> Are directory names specifics? Could I change them?
You can use any directory structure you like.
> Q8: What is an .rb file? What is .xhtml .xsl ? Which ones do I use?
.rb contains ruby code.
.xhtml contains the server pages (the equivalent of php/asp/jsp)
.xsl (used to style your templates, this is optional, but really the most
powerful, elegant and standards compliant method to do templating.
Thanks to Nitro's implementation its is extremely efficient (in fact
it comes for free))
.css (the standard way to style html files)
> Q9: HelloWorld? Is there an example?
there are many examples. Checkout the examples directory.
> Q10: Ok! I see the example, I run it, but I do not understand what is
> happening. Could you explain the execution cycle of a small application
> like the HelloWorld? E.g when I do: "ruby run.rb" what happens?
I 'll come back with this one :)
-g.
--
http://nitro.rubyforge.org
http://www.joy.gr
--
http://nitro.rubyforge.org
http://www.joy.gr
From georgep at phaistosnetworks.gr Thu Apr 7 05:25:08 2005
From: georgep at phaistosnetworks.gr (George E. Papadakis)
Date: Thu, 07 Apr 2005 12:25:08 +0300
Subject: [Nitro] Nitro domain
In-Reply-To:
References:
Message-ID: <4254FC74.6080903@phaistosnetworks.gr>
www.nitrohq.com
gp
George Moschovitis wrote:
>Hello everyone,
>
>I am about to register a domain for the homepage of Nitro. At the
>moment, I am thinking of taking:
>
>www.nitrohome.org
>
>or
>
>www.homeofnitro.org
>
>Any suggestions for a better domain will be appreciated.
>
>thanks,
>George.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050407/9221ea8f/attachment.html
From ak at navel.gr Thu Apr 7 05:51:21 2005
From: ak at navel.gr (Anastasios Koutoumanos)
Date: Thu, 07 Apr 2005 12:51:21 +0300
Subject: [Nitro] Nitro domain
In-Reply-To: <4254FC74.6080903@phaistosnetworks.gr>
References:
<4254FC74.6080903@phaistosnetworks.gr>
Message-ID: <42550299.7020809@navel.gr>
George E. Papadakis wrote:
> www.nitrohq.com
>
> gp
>
>
> George Moschovitis wrote:
>
>>Hello everyone,
>>
>>I am about to register a domain for the homepage of Nitro. At the
>>moment, I am thinking of taking:
>>
>>www.nitrohome.org
>>
>>or
>>
>>www.homeofnitro.org
>>
>>Any suggestions for a better domain will be appreciated.
>>
>>thanks,
>>George.
>>
>>
>>
>------------------------------------------------------------------------
>
>_______________________________________________
>Nitro-general mailing list
>Nitro-general at rubyforge.org
>http://rubyforge.org/mailman/listinfo/nitro-general
>
>
www.nitroforge.org
www.nitroworld.org
www.nitroblast.org ;-)
www.gonitro.org
www.nitrolab.org
www.nitrodev.org
www.nitronet.org
www.nitro.eu
www.joyofnitro.org :-)
/ak
--
Navel Ltd
http://www.navel.gr - info at navel.gr - +30 210 6898050
Have fun: www.joy.gr/ and create: www.navel.gr/nitro
From gm at navel.gr Thu Apr 7 05:56:09 2005
From: gm at navel.gr (George Moschovitis)
Date: Thu, 07 Apr 2005 12:56:09 +0300
Subject: [Nitro] Nitro domain
In-Reply-To: <42550299.7020809@navel.gr>
References:
<4254FC74.6080903@phaistosnetworks.gr> <42550299.7020809@navel.gr>
Message-ID: <1112867770.3319.36.camel@slude.navel.gr>
> www.gonitro.org
www.go-nitro.org
i like that :) the .com is reserved though :(
-g.
--
web: http://www.navel.gr
tel: +30 210 6898050
fax: +30 210 6898437
From ak at navel.gr Thu Apr 7 05:58:15 2005
From: ak at navel.gr (Anastasios Koutoumanos)
Date: Thu, 07 Apr 2005 12:58:15 +0300
Subject: [Nitro] Nitro domain
In-Reply-To: <1112867770.3319.36.camel@slude.navel.gr>
References:
<4254FC74.6080903@phaistosnetworks.gr> <42550299.7020809@navel.gr>
<1112867770.3319.36.camel@slude.navel.gr>
Message-ID: <42550437.2040305@navel.gr>
George Moschovitis wrote:
>>www.gonitro.org
>>
>>
>
>www.go-nitro.org
>
>i like that :) the .com is reserved though :(
>
>-g.
>
>
go-nitro-go.com :-D
/ak
--
Navel Ltd
http://www.navel.gr - info at navel.gr - +30 210 6898050
Have fun: www.joy.gr/ and create: www.navel.gr/nitro
From ak at navel.gr Thu Apr 7 06:06:10 2005
From: ak at navel.gr (Anastasios Koutoumanos)
Date: Thu, 07 Apr 2005 13:06:10 +0300
Subject: [Nitro] should we direct replies to the list?
Message-ID: <42550612.5060604@navel.gr>
i suggest we use the mailman's feature to direct the replies to the
mailing list, instead to the original poster.
do you aggree?
/ak
--
Navel Ltd
http://www.navel.gr - info at navel.gr - +30 210 6898050
Have fun: www.joy.gr/ and create: www.navel.gr/nitro
From james_b at neurogami.com Thu Apr 7 08:34:30 2005
From: james_b at neurogami.com (James Britt)
Date: Thu, 07 Apr 2005 05:34:30 -0700
Subject: [Nitro] should we direct replies to the list?
In-Reply-To: <42550612.5060604@navel.gr>
References: <42550612.5060604@navel.gr>
Message-ID: <425528D6.9000303@neurogami.com>
Anastasios Koutoumanos wrote:
> i suggest we use the mailman's feature to direct the replies to the
> mailing list, instead to the original poster.
>
> do you agree?
Yes.
I've been through multiple discussions on other lists over "reply-to
munging considered harmful", and while I think I understand the rational
for having replies, by default, sent to the original poster rather than
the list, 99.99% of the time I want to reply to the list, and have
responses to my postings also go to the list.
In my mind, I am not receiving messages from George, Mike, per se, but
from nitro-general at rubyforge.org, so that is where I want my replies sent.
Thanks,
James
From james_b at neurogami.com Thu Apr 7 08:36:20 2005
From: james_b at neurogami.com (James Britt)
Date: Thu, 07 Apr 2005 05:36:20 -0700
Subject: [Nitro] File adapter for Og
In-Reply-To: <4254C5C7.70300@nasis.com>
References: <4252FA90.6000909@neurogami.com> <4254C5C7.70300@nasis.com>
Message-ID: <42552944.3060809@neurogami.com>
Kostas Nasis wrote:
> James Britt wrote:
>
>> I'm slowly building up a Nitro tutorial. It starts from the
>> snake-simple, gradually adding in more Nitro features. The premise is
>> that one can start with mocked-out plain HTML, add in some templating,
>> then actual Ruby code, and gradually get more complex, all based on
>> the actual needs of the application. There is no de facto presumption
>> of a database (or any storage, for that matter) until such time that a
>> need is demonstrated.
>
>
>
> I would like to help with this. Have you written something already that
> you can send me? Perhaps we can divide the work, or I can at least serve
> as a reviewer.
I've sent a first draft to George. I want to be sure what I have is at
least technically correct. After he has a had a chance to comment, I
can pass it on for review.
Thanks,
James
From ilias at lazaridis.com Fri Apr 8 11:43:50 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Fri, 08 Apr 2005 18:43:50 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
Message-ID:
http://www.rubygarden.org/index.cgi/Libraries/og_tutorial.rdoc
-
On a windows XP machine, i get this:
"
P:\ruby\jamlang>gem install og
P:\ruby\jamlang>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install og
Attempting local installation of 'og'
Local gem file not found: og*.gem
Attempting remote installation of 'og'
Updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Errno::ECONNREFUSED)
??? ???? ?????? ? ?????????? ????????, ?????? ? ???????????
?????????? ??? ???????? ??????. - connect(2)
"
Any suggestions?
.
--
http://lazaridis.com
From george.moschovitis at gmail.com Sat Apr 9 00:54:47 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Sat, 9 Apr 2005 07:54:47 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
In-Reply-To:
References:
Message-ID:
Seems like there is a problem with your network connection.
Try again.
regards,
George.
On Apr 8, 2005 6:43 PM, Ilias Lazaridis wrote:
> http://www.rubygarden.org/index.cgi/Libraries/og_tutorial.rdoc
>
> -
>
> On a windows XP machine, i get this:
>
> "
> P:\ruby\jamlang>gem install og
>
> P:\ruby\jamlang>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install og
> Attempting local installation of 'og'
> Local gem file not found: og*.gem
> Attempting remote installation of 'og'
> Updating Gem source index for: http://gems.rubyforge.org
> ERROR: While executing gem ... (Errno::ECONNREFUSED)
> ??? ???? ?????? ? ?????????? ????????, ?????? ? ???????????
> ?????????? ??? ???????? ??????. - connect(2)
> "
>
> Any suggestions?
>
> .
>
> --
> http://lazaridis.com
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
--
http://nitro.rubyforge.org
http://www.joy.gr
From james_b at neurogami.com Sat Apr 9 01:36:57 2005
From: james_b at neurogami.com (James Britt)
Date: Fri, 08 Apr 2005 22:36:57 -0700
Subject: [Nitro] Infinite loop rendering template
Message-ID: <425769F9.2080301@neurogami.com>
I have a form page, generated straight from a template, that has the
action set to action='/post_entry'
When i submit the form, it hits the post_entry method on the default
controller class (Blog), and then tries to render the matching template
file, post_entry.xhtml. So far so goo, no?
But it goes into an infinite loop:
DEBUG: Transforming 'public/index.xhtml'
DEBUG: Compiling action 'public/'
DEBUG: Transforming 'public/index.xhtml'
DEBUG: Compiling action 'public/'
DEBUG: Transforming 'public/index.xhtml'
DEBUG: Compiling action 'public/'
DEBUG: Transforming 'public/index.xhtml'
DEBUG: Compiling action 'public/'
Any ideas on what causes this?
The method is this
def post_entry
STDERR.puts( "-- post_entry ")
entry = Entry.new( Time.now, request['content'] )
end
And the template does little more than include another template for a
header, and render properties of the entry variable.
I'm puzzled.
James
From james_b at neurogami.com Sat Apr 9 01:52:56 2005
From: james_b at neurogami.com (James Britt)
Date: Fri, 08 Apr 2005 22:52:56 -0700
Subject: [Nitro] Infinite loop rendering template
In-Reply-To: <425769F9.2080301@neurogami.com>
References: <425769F9.2080301@neurogami.com>
Message-ID: <42576DB8.2060801@neurogami.com>
James Britt wrote:
> I have a form page, generated straight from a template, that has the
> action set to action='/post_entry'
>
> When i submit the form, it hits the post_entry method on the default
> controller class (Blog), and then tries to render the matching template
> file, post_entry.xhtml. So far so goo, no?
>
> But it goes into an infinite loop:
>
>
> DEBUG: Transforming 'public/index.xhtml'
> DEBUG: Compiling action 'public/'
> DEBUG: Transforming 'public/index.xhtml'
> DEBUG: Compiling action 'public/'
> DEBUG: Transforming 'public/index.xhtml'
> DEBUG: Compiling action 'public/'
> DEBUG: Transforming 'public/index.xhtml'
> DEBUG: Compiling action 'public/'
>
I've fixed what was , I think, causing the problem; my template called a
non-existent variable. I changed 'entry' to '@entry' in the post_entry
method, and made sure I used that same var in the template.
But that such an error can result in an infinite loop could be a problem
anyway.
James
From ilias at lazaridis.com Sat Apr 9 11:04:09 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Sat, 09 Apr 2005 18:04:09 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
In-Reply-To:
References:
Message-ID:
George Moschovitis wrote:
> On Apr 8, 2005 6:43 PM, Ilias Lazaridis wrote:
>
>>http://www.rubygarden.org/index.cgi/Libraries/og_tutorial.rdoc
>>
>>-
>>
>>On a windows XP machine, i get this:
>>
>>"
>>P:\ruby\jamlang>gem install og
>>
>>P:\ruby\jamlang>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install og
>>Attempting local installation of 'og'
>>Local gem file not found: og*.gem
>>Attempting remote installation of 'og'
>>Updating Gem source index for: http://gems.rubyforge.org
>>ERROR: While executing gem ... (Errno::ECONNREFUSED)
>> ??? ???? ?????? ? ?????????? ????????, ?????? ? ???????????
>>?????????? ??? ???????? ??????. - connect(2)
>>"
>>
>>Any suggestions?
> Seems like there is a problem with your network connection.
> Try again.
I've tried again, but i've the feeling that i've not install OG:
"
P:\ruby\jamlang>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install og
Attempting local installation of 'og'
Local gem file not found: og*.gem
Attempting remote installation of 'og'
Updating Gem source index for: http://gems.rubyforge.org
Successfully installed production_log_analyzer, version 1.1.0
Installing RDoc documentation for production_log_analyzer-1.1.0...
"
what now?
.
--
http://lazaridis.com
From george.moschovitis at gmail.com Sat Apr 9 12:49:19 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Sat, 9 Apr 2005 19:49:19 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
In-Reply-To:
References:
Message-ID:
> I've tried again, but i've the feeling that i've not install OG:
>
> "
> P:\ruby\jamlang>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install og
> Attempting local installation of 'og'
> Local gem file not found: og*.gem
> Attempting remote installation of 'og'
> Updating Gem source index for: http://gems.rubyforge.org
> Successfully installed production_log_analyzer, version 1.1.0
> Installing RDoc documentation for production_log_analyzer-1.1.0...
> "
>
This looks very strange. Seems that you installed
production_log_analyzer instead of og.
I will have to ask Chad Fowler about this. In the meantime, why dont you try:
P:\ruby\jamlang> "c:\ruby\bin\gem" install og
or even better
P:\ruby\jamlang> gem install og
thanks,
George,
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Sat Apr 9 12:53:07 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Sat, 9 Apr 2005 19:53:07 +0300
Subject: [Nitro] Infinite loop rendering template
In-Reply-To: <42576DB8.2060801@neurogami.com>
References: <425769F9.2080301@neurogami.com> <42576DB8.2060801@neurogami.com>
Message-ID:
> I've fixed what was , I think, causing the problem; my template called a
> non-existent variable. I changed 'entry' to '@entry' in the post_entry
Yeap, only @xxx variables are passed around. (This may change before the 0.16.0
release though).
> But that such an error can result in an infinite loop could be a problem
> anyway.
I dont understand why you got the infinite loop. I 'll try to recreate
the problem and fix this,
thanks for pointing this out to me.
regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From ilias at lazaridis.com Sat Apr 9 13:03:56 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Sat, 09 Apr 2005 20:03:56 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
In-Reply-To:
References:
Message-ID:
George Moschovitis wrote:
>>I've tried again, but i've the feeling that i've not install OG:
>>
>>"
>>P:\ruby\jamlang>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install og
>>Attempting local installation of 'og'
>>Local gem file not found: og*.gem
>>Attempting remote installation of 'og'
>>Updating Gem source index for: http://gems.rubyforge.org
>>Successfully installed production_log_analyzer, version 1.1.0
>>Installing RDoc documentation for production_log_analyzer-1.1.0...
>>"
>>
>
> This looks very strange. Seems that you installed
> production_log_analyzer instead of og.
> I will have to ask Chad Fowler about this. In the meantime, why dont you try:
>
> P:\ruby\jamlang> "c:\ruby\bin\gem" install og
>
> or even better
>
> P:\ruby\jamlang> gem install og
I had typed exactly this (which led to the above execution).
> thanks,
> George,
.
--
http://lazaridis.com
From ilias at lazaridis.com Sun Apr 10 05:49:50 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Sun, 10 Apr 2005 12:49:50 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
In-Reply-To:
References:
Message-ID:
Ilias Lazaridis wrote:
> http://www.rubygarden.org/index.cgi/Libraries/og_tutorial.rdoc
>
> -
>
> On a windows XP machine, i get this:
>
> "
> P:\ruby\jamlang>gem install og
>
> P:\ruby\jamlang>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install og
> Attempting local installation of 'og'
> Local gem file not found: og*.gem
> Attempting remote installation of 'og'
> Updating Gem source index for: http://gems.rubyforge.org
> ERROR: While executing gem ... (Errno::ECONNREFUSED)
> ??? ???? ?????? ? ?????????? ????????, ?????? ? ???????????
> ?????????? ??? ???????? ??????. - connect(2)
> "
>
> Any suggestions?
I've tried "nitro"
"
P:\ruby\navel>gem install nitro
P:\ruby\navel>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install nitro
Attempting local installation of 'nitro'
Local gem file not found: nitro*.gem
Attempting remote installation of 'nitro'
Updating Gem source index for: http://gems.rubyforge.org
Install required dependency glue? [Yn] y
Install required dependency extensions? [Yn] y
Install required dependency flexmock? [Yn] y
Install required dependency og? [Yn] y
Install required dependency ruby-breakpoint? [Yn] y
Install required dependency extensions? [Yn] y
Install required dependency flexmock? [Yn] y
Successfully installed nitro, version 0.15.0
c:/ruby/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:32: warning: already
initialized constant EXPR_BEG
c:/ruby/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:33: warning: already
initialized constant EXPR_MID
c:/ruby/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:34: warning: already
initialized constant EXPR_END
c:/ruby/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:35: warning: already
initialized constant EXPR_ARG
c:/ruby/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:36: warning: already
initialized constant EXPR_FNAME
c:/ruby/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:37: warning: already
initialized constant EXPR_DOT
c:/ruby/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:38: warning: already
initialized constant EXPR_CLASS
c:/ruby/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:263: warning: already
initialized constant TokenDefinitions
c:/ruby/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:268: warning: already
initialized constant TkReading2Token
c:/ruby/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:269: warning: already
initialized constant TkSymbol2Token
ERROR: While executing gem ... (NameError)
uninitialized constant RubyToken::AlreadyDefinedToken
"
-
Still not sure if I got OG correctly.
-
Can I manyally download "OG" somewhere (standalone, means *not* bundled
with nitro)?
.
--
http://lazaridis.com
From george.moschovitis at gmail.com Sun Apr 10 12:10:49 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Sun, 10 Apr 2005 19:10:49 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
In-Reply-To:
References:
Message-ID:
This seems to work, better. Perhaps you are not using the latest
version of Ruby?
Have you installed 1.8.2 ? This is the first time I see those
warnings. But it seems like nitro is installed. Have a look at the
gems directory to find the gems.
BTW, the next version of Nitro/Og will have improved gem distributions
with less dependencies.
regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From ilias at lazaridis.com Sun Apr 10 12:41:15 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Sun, 10 Apr 2005 19:41:15 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
In-Reply-To:
References:
Message-ID:
George Moschovitis wrote:
> This seems to work, better. Perhaps you are not using the latest
> version of Ruby?
> Have you installed 1.8.2 ?
yes (1.8.2-14)
> This is the first time I see those
> warnings. But it seems like nitro is installed. Have a look at the
> gems directory to find the gems.
I don't like to use gems.
I just want to get "OG".
"Can I manyally download "OG" somewhere (standalone, means *not* bundled
with nitro)?"
> BTW, the next version of Nitro/Og will have improved gem distributions
> with less dependencies.
ok.
what is the minimals effort download (not via GEM) to be able to
evaluate "OG" (independent of Nitro)?
> regards,
> George.
.
--
http://lazaridis.com
From craig-duncan at earthlink.net Sun Apr 10 13:19:35 2005
From: craig-duncan at earthlink.net (craig duncan)
Date: Sun, 10 Apr 2005 13:19:35 -0400
Subject: [Nitro] Nitro domain
In-Reply-To:
References:
<4258BEC5.10303@earthlink.net>
Message-ID: <42596027.3070509@earthlink.net>
George Moschovitis wrote:
> Hmm how can I buy nitro.org? Any info appreciated.
>
> thanks,
> George.
>
>
>>nitro.org and nitro.net are both squatted on but not really in use. Did you consider
>>it likely to be too expensive to try to buy one of those or is the existence of
>>nitro.com the impediment?
>>
>>craig
Speaking of the mailing list defaults... i accidentally sent my response (above) only
to George. Anyway, i've emailed the contact person for both nitro.org & nitro.net
inquiring about their availability and will let you know what the response is.
From george.moschovitis at gmail.com Sun Apr 10 13:23:25 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Sun, 10 Apr 2005 20:23:25 +0300
Subject: [Nitro] Nitro domain
In-Reply-To: <42596027.3070509@earthlink.net>
References:
<4258BEC5.10303@earthlink.net>
<42596027.3070509@earthlink.net>
Message-ID:
> Speaking of the mailing list defaults... i accidentally sent my response (above) only
> to George. Anyway, i've emailed the contact person for both nitro.org & nitro.net
> inquiring about their availability and will let you know what the response is.
Ok, thanks! About the mailing list defaults, Tasos will fix this tommorow.
regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Sun Apr 10 13:25:29 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Sun, 10 Apr 2005 20:25:29 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
In-Reply-To:
References:
Message-ID:
> what is the minimals effort download (not via GEM) to be able to
> evaluate "OG" (independent of Nitro)?
The minimal effort download uses Gems:
gem install og
You can also download the .zip version
og-0.15.0.zip + glue-0.15.0.zip and follow the instuctions
in INSTALL.
but you *really* should try the gem.
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From ilias at lazaridis.com Sun Apr 10 14:30:57 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Sun, 10 Apr 2005 21:30:57 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
In-Reply-To:
References:
Message-ID:
George Moschovitis wrote:
>>what is the minimals effort download (not via GEM) to be able to
>>evaluate "OG" (independent of Nitro)?
>
>
> The minimal effort download uses Gems:
>
> gem install og
>
> You can also download the .zip version
>
> og-0.15.0.zip + glue-0.15.0.zip and follow the instuctions
> in INSTALL.
ok
http://rubyforge.org/frs/?group_id=418
> but you *really* should try the gem.
I have tried it - and provided you with the error messages.
You should now fix the problem.
> George.
.
--
http://lazaridis.com
From ilias at lazaridis.com Sun Apr 10 16:58:47 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Sun, 10 Apr 2005 23:58:47 +0300
Subject: [Nitro] [OG] - Making it work with SQLite
Message-ID:
Which are the steps to make OG work with SQLite?
http://www.sqlite.org/
-
I would like to be able to keep everything within one folder:
http://lazaridis.com/case/persist/index.html#installation
How can this be achieved?
.
--
http://lazaridis.com
From craig-duncan at earthlink.net Mon Apr 11 10:04:43 2005
From: craig-duncan at earthlink.net (craig duncan)
Date: Mon, 11 Apr 2005 10:04:43 -0400
Subject: [Nitro] Nitro domain
In-Reply-To: <42596027.3070509@earthlink.net>
References: <4258BEC5.10303@earthlink.net>
<42596027.3070509@earthlink.net>
Message-ID: <425A83FB.9080202@earthlink.net>
craig duncan wrote:
> George Moschovitis wrote:
>
>> Hmm how can I buy nitro.org? Any info appreciated.
>>
>> thanks,
>> George.
>>
>>
>>> nitro.org and nitro.net are both squatted on but not really in use.
>>> Did you consider it likely to be too expensive to try to buy one of
>>> those or is the existence of nitro.com the impediment?
>>>
>>> craig
I quote: "I think it would be too expensive for you. " from the person who owns the
nitro.net name. I really don't (didn't) know anything about the relative price
levels of those who play the squatting game. But i think i conveyed to him the idea
that we could pay something but not a lot (without mentioning any numbers: ~$100
might be at the outer limits of feasibility but certainly not hundreds of dollars).
And so his response indicates, to me, that these sort of people are looking for a
return on their investment of maybe 500% or better.
Never got a response from nitro.org. Maybe there are actual plans for doing
something with that site. Or maybe they don't even bother to respond to someone who
isn't talking real money. :-)
craig
From george.moschovitis at gmail.com Mon Apr 11 10:13:52 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Mon, 11 Apr 2005 17:13:52 +0300
Subject: [Nitro] Nitro domain
In-Reply-To: <425A83FB.9080202@earthlink.net>
References:
<4258BEC5.10303@earthlink.net>
<42596027.3070509@earthlink.net> <425A83FB.9080202@earthlink.net>
Message-ID:
Never mind, www.nitrohq.com is ok for the purpose :) Thanks for trying anyway :)
-g.
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Mon Apr 11 10:16:33 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Mon, 11 Apr 2005 17:16:33 +0300
Subject: [Nitro] AOP with nitro
Message-ID:
Hello everyone,
I am trying to introduce some AOP concepts in the next version of
Nitro. Any suggestion for a good AOP library for ruby?
regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From ilias at lazaridis.com Mon Apr 11 12:18:03 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Mon, 11 Apr 2005 19:18:03 +0300
Subject: [Nitro] AOP with nitro
In-Reply-To:
References:
Message-ID:
George Moschovitis wrote:
> Hello everyone,
>
> I am trying to introduce some AOP concepts in the next version of
> Nitro. Any suggestion for a good AOP library for ruby?
I've the impression, that ruby does not need any AOP libraries, as it's
supports AOP naturally.
-
Please stabelize/productize the current state of:
* OG
* Nitro
before going on with critical extensions like AOP.
This includes the simplification of installation etc.
.
> regards,
> George.
.
--
http://lazaridis.com
From ak at navel.gr Mon Apr 11 12:24:19 2005
From: ak at navel.gr (Anastasios Koutoumanos)
Date: Mon, 11 Apr 2005 19:24:19 +0300
Subject: [Nitro] AOP with nitro
In-Reply-To:
References:
Message-ID: <425AA4B3.6010409@navel.gr>
George Moschovitis wrote:
>Hello everyone,
>
>I am trying to introduce some AOP concepts in the next version of
>Nitro. Any suggestion for a good AOP library for ruby?
>
>regards,
>George.
>
>
>
My opinion is that rather than new features/concepts/etc. we need to
freeze the Nitro features, fix the documentation, and only write new
code for absolutely necessary missing parts!
Tasos
--
Navel Ltd
http://www.navel.gr - info at navel.gr - +30 210 6898050
Have fun: www.joy.gr/ and create: www.navel.gr/nitro
From george.moschovitis at gmail.com Mon Apr 11 12:26:34 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Mon, 11 Apr 2005 19:26:34 +0300
Subject: [Nitro] AOP with nitro
In-Reply-To:
References:
Message-ID:
> Please stabelize/productize the current state of:
> ...
> before going on with critical extensions like AOP.
this will help the stabilization. It will re-factor existing code and
allow for more code reuse
between Nitro + Og.
> This includes the simplification of installation etc.
Working on this. Regarding installation, just entering
gem install nitro
works for me. But I am investigating your problems, just be patient.
The next version
will be much easier to install.
-g.
--
http://nitro.rubyforge.org
http://www.joy.gr
From james_b at neurogami.com Mon Apr 11 12:42:11 2005
From: james_b at neurogami.com (James Britt)
Date: Mon, 11 Apr 2005 09:42:11 -0700
Subject: [Nitro] Concerns over Og mandating the form of initialize
Message-ID: <425AA8E2.7000204@neurogami.com>
Hi all,
While trying to get the Og FileSystem adapter working to my liking, I
noticed that the other database adapters were making an interesting
assumption about client code.
There is a method common to all adapters, read_all, that is given a
result set 'res' and a class 'klass'.
The code (at least in the mysql and sqlite case) does this:
obj = klass.new
obj.og_read(res)
So, if you have a blog application and have marked the BlogEntry class
for persistence by Og, the BlogEntry constructor cannot have any
mandatory arguments, else read_all fails.
I can understand the need to for this; general-purpose code cannot know
the arity and details of each and every constructor. But I am unhappy
with this solution for two reasons.
The first is that part of the appeal og Nitro/Og is that you can build
up an application without having to make design decisions based on
unknown future needs, or based on the demands and quirks of the
framework. I like the idea that I can start with a set of vanilla HTML
pages and migrate them to use templates, server code, and a database. I
don't have to plan for all that well before I've determined actual
business needs. I would much prefer to be able to take a business
object class, switch the attr_* calls to prop_* calls, and magically get
Og goodness. Being required to define a particular form of 'initialize'
method, even when it does not fit in with a preferred design scheme,
feels cumbersome.
The second objection is that having a constructor that allows for no
arguments may mean one can create an object with invalid state. For
example, a BlogEntry instance is meaningless and perhaps disruptive if
it does not contain, say some content and a date.
Ironically, on my first pass at adding code to the filesys adapter I
simply used YAML::load to convert the serialized objects back to Ruby.
There was no need to invoke a constructor. It was only after looking at
how the other adapters did this that I tried the kalss.new approach, and
my code broke. The (arguably) weakest adapter has the best tool for
object revival.
One thought then was that load_all (and similar methods) could take the
database results and use them to create a YAML representation of the
object, then call YAML::load.
I believe that YAML uses binary code under the hood to actually do this,
so mimicking the technique may be a problem. But I hope someone can
prove me wrong. (Might be worth asking this in the ruby-musing list,
where extreme metaprogramming seems to be the norm.)
Thoughts? Is it a reasonable concession to ask of developers that
Og-persisted objects have to have a certain style of constructor?
On a side note, it is of course possible to write a "have it both ways"
constructor, which is not a bad idea in itself, but maybe not something
people should be forced to do in order to have both Og persistence and
argument checking.
#---------------------------------------------
class BlogEntry
attr_accessor :content, :time , :title
def initialize( content = nil, time = nil , title = nil )
@content, @time , @title = content, time , title
yield self unless (content || time || title )
raise "All args are required" unless (@content || @time || @title )
end
end
be = BlogEntry.new( 'This is my entry', Time.now, "Test" )
be2 = BlogEntry.new { |entry|
entry.content = "Content"
entry.time = Time.now
entry.title = "Testing"
}
def make_it( res, klass )
obj = klass.new { |k|
res.each { |prop, val| k.send( "#{prop}=", val) }
}
end
res = { 'content' => "Content",
'time' => Time.now,
'title' => "Testing"
}
be3 = make_it( res, BlogEntry )
#---------------------------------------------
If there is a requirement that the constructor have no mandatory
arguments, perhaps there can also be a requirement that the constructor
yield self so that og_read can dynamically set object properties while
the initialize method still has an opportunity to do internal validity
checks.
James
From james_b at neurogami.com Mon Apr 11 12:47:52 2005
From: james_b at neurogami.com (James Britt)
Date: Mon, 11 Apr 2005 09:47:52 -0700
Subject: [Nitro] AOP with nitro
In-Reply-To: <425AA4B3.6010409@navel.gr>
References:
<425AA4B3.6010409@navel.gr>
Message-ID: <425AAA38.6000801@neurogami.com>
Anastasios Koutoumanos wrote:
> George Moschovitis wrote:
>
>> Hello everyone,
>>
>> I am trying to introduce some AOP concepts in the next version of
>> Nitro. Any suggestion for a good AOP library for ruby?
>>
>> regards,
>> George.
>>
>>
>>
> My opinion is that rather than new features/concepts/etc. we need to
> freeze the Nitro features, fix the documentation, and only write new
> code for absolutely necessary missing parts!
I'm tempted to agree with this, but now is better than later for getting
in any worthwhile additions with the least concern for breaking things.
If AOP can help simplify the API and object model, such that adding more
features does not require API changes, that would be worth waiting for.
Depending, of course, and just how long is the wait.
I'd would ask, though, that certain naming conventions be nailed down,
even if APIs may change. I think, for example, that both Component and
Controller classes are really the same thing, and that they may both end
up being called something else. And the template file extension names,
too, need clarification.
James
From ilias at lazaridis.com Mon Apr 11 12:43:49 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Mon, 11 Apr 2005 19:43:49 +0300
Subject: [Nitro] [OG] - Making it work with SQLite
In-Reply-To:
References:
Message-ID:
Ilias Lazaridis wrote:
> Which are the steps to make OG work with SQLite?
>
> http://www.sqlite.org/
can I please have some inforamtion on this?
> I would like to be able to keep everything within one folder:
>
> http://lazaridis.com/case/persist/index.html#installation
>
> How can this be achieved?
>
> .
>
--
http://lazaridis.com
From ilias at lazaridis.com Mon Apr 11 12:47:12 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Mon, 11 Apr 2005 19:47:12 +0300
Subject: [Nitro] AOP with nitro
In-Reply-To:
References:
Message-ID:
George Moschovitis wrote:
>>Please stabelize/productize the current state of:
>>...
>>before going on with critical extensions like AOP.
>
> this will help the stabilization. It will re-factor existing code and
> allow for more code reuse between Nitro + Og.
You should postpone the refactoring, which is a problem source.
please freeze and make a product.
e.g. "gem install og" fails.
it is an essential step for the og installation.
>>This includes the simplification of installation etc.
>
> Working on this. Regarding installation, just entering
>
> gem install nitro
>
> works for me. But I am investigating your problems, just be patient.
> The next version will be much easier to install.
I'm waiting already 3 days.
But for sure I cannot wait until the next version.
> -g.
.
--
http://lazaridis.com
From james_b at neurogami.com Mon Apr 11 13:15:00 2005
From: james_b at neurogami.com (James Britt)
Date: Mon, 11 Apr 2005 10:15:00 -0700
Subject: *****SPAM***** Re: [Nitro] AOP with nitro
In-Reply-To:
References:
Message-ID: <425AB094.4@neurogami.com>
Ilias Lazaridis wrote:
>
> e.g. "gem install og" fails.
>
> it is an essential step for the og installation.
What version of gems are you using? On what OS?
"gem install og" works fine for me on Win3k, with the ruby 1-click, and
gems 0.8.6.
Have you tried
gem install nitro ?
James
From ilias at lazaridis.com Mon Apr 11 13:36:28 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Mon, 11 Apr 2005 20:36:28 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
In-Reply-To:
References:
Message-ID:
Ilias Lazaridis wrote:
[...]
> I've tried again, but i've the feeling that i've not install OG:
>
> "
> P:\ruby\jamlang>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install og
> Attempting local installation of 'og'
> Local gem file not found: og*.gem
> Attempting remote installation of 'og'
> Updating Gem source index for: http://gems.rubyforge.org
> Successfully installed production_log_analyzer, version 1.1.0
> Installing RDoc documentation for production_log_analyzer-1.1.0...
> "
>
> what now?
James Britt within another thread:
> What version of gems are you using?
0.8.3 (just installed ruby 182-14 bundle)
> On what OS?
xp pro
> "gem install og" works fine for me on Win3k, with the ruby 1-click, and gems 0.8.6.
>
> Have you tried
> gem install nitro ?
yes, see within this thread.
but: I need "gem install og".
.
--
http://lazaridis.com
From ilias at lazaridis.com Mon Apr 11 13:38:00 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Mon, 11 Apr 2005 20:38:00 +0300
Subject: *****SPAM***** Re: [Nitro] AOP with nitro
In-Reply-To: <425AB094.4@neurogami.com>
References: <425AB094.4@neurogami.com>
Message-ID:
James Britt wrote:
> Ilias Lazaridis wrote:
>
>>
>> e.g. "gem install og" fails.
>>
>> it is an essential step for the og installation.
>
>
> What version of gems are you using? On what OS?
>
> "gem install og" works fine for me on Win3k, with the ruby 1-click, and
> gems 0.8.6.
>
> Have you tried
> gem install nitro ?
see my answer within thread:
"[Nitro] [OG] - Problems with GEM installation"
.
--
http://lazaridis.com
From kostas at nasis.com Mon Apr 11 14:09:54 2005
From: kostas at nasis.com (Kostas Nasis)
Date: Mon, 11 Apr 2005 18:09:54 +0000
Subject: [Nitro] [OG] - Problems with GEM installation
Message-ID: <425abd72599685.74209126@reply.gr>
> I've tried again, but i've the feeling that i've not install OG:
I've confirmed that "gem install og" does in fact not work with 0.8.3.
Do this:
cd c:\ruby\bin
gem install rubygems-update
cd c:\ruby\lib\ruby\gems\1.8\gems\rubygems-update-0.8.10\
ruby setup.rb
cd c:\ruby\bin
gem -v
(You should see 0.8.10)
gem install og
Og should now be installed.
Kostas
From ilias at lazaridis.com Mon Apr 11 14:58:09 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Mon, 11 Apr 2005 21:58:09 +0300
Subject: [Nitro] [OG] - Problems with GEM installation
In-Reply-To: <425abd72599685.74209126@reply.gr>
References: <425abd72599685.74209126@reply.gr>
Message-ID:
Kostas Nasis wrote:
>>I've tried again, but i've the feeling that i've not install OG:
>
>
> I've confirmed that "gem install og" does in fact not work with 0.8.3.
>
> Do this:
[steps corrected to minimal neccessary]
> gem install rubygems-update
>
> cd c:\ruby\lib\ruby\gems\1.8\gems\rubygems-update-0.8.10\
>
> ruby setup.rb
> gem -v
> (You should see 0.8.10)
>
> gem install og
>
> Og should now be installed.
yes, it is.
thanks for the precise info.
> Kostas
.
--
http://lazaridis.com
From ilias at lazaridis.com Mon Apr 11 15:16:01 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Mon, 11 Apr 2005 22:16:01 +0300
Subject: [Nitro] [WEBSITE] - Google Ads on Project Website
Message-ID:
http://nitro.rubyforge.org/
you should better remove the google ads on the project website.
visitors should focus on nitro.
.
--
http://lazaridis.com
From ilias at lazaridis.com Mon Apr 11 16:31:01 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Mon, 11 Apr 2005 23:31:01 +0300
Subject: [Nitro] [OG] - Making it work with SQLite
In-Reply-To:
References:
Message-ID:
Ilias Lazaridis wrote:
> Ilias Lazaridis wrote:
>
>> Which are the steps to make OG work with SQLite?
>>
>> http://www.sqlite.org/
>
> can I please have some inforamtion on this?
The steps were simple (but why has none answered?):
download and install sqlite from www.sqlite.org
install ruby-sqlite binding:
gem install sqlite3 [select latest version from list]
-
change code from tutorial:
db = Og::Database.new(
:database => 'test',
:adapter => 'sqlite', # was 'psql',
:user => 'postgres',
:password => 'navelrulez'
)
>> I would like to be able to keep everything within one folder:
>>
>> http://lazaridis.com/case/persist/index.html#installation
>>
>> How can this be achieved?
?
.
--
http://lazaridis.com
From epiperak at softlab.ece.ntua.gr Mon Apr 11 21:31:13 2005
From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis)
Date: Tue, 12 Apr 2005 04:31:13 +0300 (EEST)
Subject: [Nitro] AOP with nitro
In-Reply-To: <425AA4B3.6010409@navel.gr>
Message-ID:
> >
> My opinion is that rather than new features/concepts/etc. we need to
> freeze the Nitro features, fix the documentation, and only write new
> code for absolutely necessary missing parts!
>
> Tasos
I agree 100% with Tasos. We should make a combined effort. This effort
should of course start from G. You should put a bit more documentation on
the API (the latest one) and we will start reading the code... I do not
see another way... We split the code or something, work in pairs...
I believe Tasos is really good at organizing teams and people for
cooperative tasks...
Emmanouil Piperakis (epiperak at cs.ntua.gr)
{To explore is Human, to Create is Devine,
To teach is Primal, to Rule is Sin}
From epiperak at softlab.ece.ntua.gr Mon Apr 11 21:38:43 2005
From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis)
Date: Tue, 12 Apr 2005 04:38:43 +0300 (EEST)
Subject: *****SPAM***** Re: [Nitro] AOP with nitro
In-Reply-To: <425AB094.4@neurogami.com>
Message-ID:
> >
> > e.g. "gem install og" fails.
> >
> > it is an essential step for the og installation.
>
> What version of gems are you using? On what OS?
>
> "gem install og" works fine for me on Win3k, with the ruby 1-click, and
> gems 0.8.6.
>
> Have you tried
> gem install nitro ?
>
gem install nitro
and
gem install og
work fine on Debian too... (just in case...anybody is asking...)
Emmanouil Piperakis (epiperak at cs.ntua.gr)
{To explore is Human, to Create is Devine,
To teach is Primal, to Rule is Sin}
From james_b at neurogami.com Mon Apr 11 22:59:14 2005
From: james_b at neurogami.com (James Britt)
Date: Mon, 11 Apr 2005 19:59:14 -0700
Subject: [Nitro] AOP with nitro
In-Reply-To:
References:
Message-ID: <425B3982.4050700@neurogami.com>
Emmanuel Piperakis wrote:
>
> gem install nitro
> and
> gem install og
> work fine on Debian too... (just in case...anybody is asking...)
I think the issue all along was that an older version of rubygems was
too eager with regex matching on gem names, hooking the wrong gem in the
process, with no confirmation or offer of alternatives,
James
From george.moschovitis at gmail.com Tue Apr 12 00:56:25 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Tue, 12 Apr 2005 07:56:25 +0300
Subject: [Nitro] AOP with nitro
In-Reply-To: <425AAA38.6000801@neurogami.com>
References:
<425AA4B3.6010409@navel.gr> <425AAA38.6000801@neurogami.com>
Message-ID:
> I'm tempted to agree with this, but now is better than later for getting
> in any worthwhile additions with the least concern for breaking things.
Exactly, and I think this AOP thing will be worth the extra effort.
> If AOP can help simplify the API and object model, such that adding more
> features does not require API changes, that would be worth waiting for.
> Depending, of course, and just how long is the wait.
I 'll send you later today some code for review. I have a simple
implementation ready.
> I'd would ask, though, that certain naming conventions be nailed down,
> even if APIs may change. I think, for example, that both Component and
> ...
> too, need clarification.
You are right, trying extra hard to nail these things down. Regarding
the template name I don't like .sx after all. It implies [S]erver side
and [X]ml, neither of which is mandatory. For example, templates are
used by the Mailer subsystem and may not use XML. Any other ideas? How
about .t and .ti ?
About the Controller-Component thing, it will stay as Controller.
regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Tue Apr 12 01:01:19 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Tue, 12 Apr 2005 08:01:19 +0300
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To: <425AA8E2.7000204@neurogami.com>
References: <425AA8E2.7000204@neurogami.com>
Message-ID:
Hello James,
the problem is not that serious (as you said you *can* use a
constructor with arguments, they should just default to null).
However, I 'll try to find a better solution. Of course I 'll really
appreciate a patch for this :)
best regards,
George.
On Apr 11, 2005 7:42 PM, James Britt wrote:
>
> Hi all,
>
> While trying to get the Og FileSystem adapter working to my liking, I
> ...
> the initialize method still has an opportunity to do internal validity
> checks.
--
http://nitro.rubyforge.org
http://www.joy.gr
From paulha at aracnet.com Tue Apr 12 01:21:17 2005
From: paulha at aracnet.com (PAUL HANCHETT)
Date: Mon, 11 Apr 2005 22:21:17 -0700
Subject: [Nitro] AOP with nitro
In-Reply-To:
References: <425AA4B3.6010409@navel.gr>
<425AAA38.6000801@neurogami.com>
Message-ID: <425B5ACD.6060204@aracnet.com>
George Moschovitis wrote:
>You are right, trying extra hard to nail these things down. Regarding
>the template name I don't like .sx after all. It implies [S]erver side
>and [X]ml, neither of which is mandatory. For example, templates are
>used by the Mailer subsystem and may not use XML. Any other ideas? How
>about .t and .ti ?
>
>
Forgive a dumb question-- What is wrong with the current .xhtml? Will
it need to go to a different template processor, or are you just trying
to make sure it can be configured to choose the right one?
I get confused by a million different extensions, most of them really
being the same thing with really minor differences. Babel!
Paul
From james_b at neurogami.com Tue Apr 12 01:50:31 2005
From: james_b at neurogami.com (James Britt)
Date: Mon, 11 Apr 2005 22:50:31 -0700
Subject: [Nitro] AOP with nitro
In-Reply-To: <425B5ACD.6060204@aracnet.com>
References: <425AA4B3.6010409@navel.gr> <425AAA38.6000801@neurogami.com>
<425B5ACD.6060204@aracnet.com>
Message-ID: <425B61A7.2020808@neurogami.com>
PAUL HANCHETT wrote:
>>
> Forgive a dumb question-- What is wrong with the current .xhtml? Will
> it need to go to a different template processor, or are you just trying
> to make sure it can be configured to choose the right one?
My concern is that there is no requirement that the files actually be
XHTML. They can be anything. The XHTML lead me to think that Nitro was
doing something special with regards to XHTML; it doesn't, really,
though it will do XSLT transformations given XML.
James
--
http://www.ruby-doc.org
http://www.rubyxml.com
http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com
From james_b at neurogami.com Tue Apr 12 02:17:03 2005
From: james_b at neurogami.com (James Britt)
Date: Mon, 11 Apr 2005 23:17:03 -0700
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To:
References: <425AA8E2.7000204@neurogami.com>
Message-ID: <425B67DF.10203@neurogami.com>
George Moschovitis wrote:
> Hello James,
>
> the problem is not that serious (as you said you *can* use a
> constructor with arguments, they should just default to null).
But then your constructor has no way to ensure that the object i ever
correctly initialized. That's my concern.
The "yield self from initialize" version at least gives the option of
coding some validity checks during initialization.
> However, I 'll try to find a better solution. Of course I 'll really
> appreciate a patch for this :)
Ah, well, of course.
How abut something like this, for initializing objects:
def object_init( klass, vals = {} )
obj = klass.new do |o|
until vals.empty?
prop, val = *(vals.shift )
o.send( "#{prop}=", val )
end
end
return obj if vals.empty?
vals.each do |prop, val|
obj.send( "#{prop}=", val )
end
obj
end
It first tries to populate an object that yields self from 'new'
If the block if never called, then the current Og approach is used.
This way, existing apps still work, and new apps have the option of
using constructors that yield self.
James
From george.moschovitis at gmail.com Tue Apr 12 08:46:56 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Tue, 12 Apr 2005 15:46:56 +0300
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To: <425B67DF.10203@neurogami.com>
References: <425AA8E2.7000204@neurogami.com>
<425B67DF.10203@neurogami.com>
Message-ID:
Hmm, I am not sure, how to integrate this code snippet in Og.
Can you please explain this a little bit better? I 'll also try to
think on this later today (very difficult to work on nitro/think in
the office).
regards,
George.
From james_b at neurogami.com Tue Apr 12 09:54:49 2005
From: james_b at neurogami.com (James Britt)
Date: Tue, 12 Apr 2005 06:54:49 -0700
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To:
References: <425AA8E2.7000204@neurogami.com> <425B67DF.10203@neurogami.com>
Message-ID: <425BD329.2010809@neurogami.com>
George Moschovitis wrote:
> Hmm, I am not sure, how to integrate this code snippet in Og.
>
> Can you please explain this a little bit better? I 'll also try to
> think on this later today (very difficult to work on nitro/think in
> the office).
In the assorted Og adapters, when read_all is called, the code
instantiates an instance of the serialized object, the calls obj.og_read
(which sets object properties)
res.each do |row|
obj = klass.new
obj.og_read(row)
objects << obj
end
Perhaps this could be replaced with something that first tries to
populate the object by passing a block to klass.new.
James
From ilias at lazaridis.com Tue Apr 12 10:41:10 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Tue, 12 Apr 2005 17:41:10 +0300
Subject: [Nitro] AOP with nitro
In-Reply-To:
References: <425AA4B3.6010409@navel.gr>
Message-ID:
Emmanuel Piperakis wrote:
>>My opinion is that rather than new features/concepts/etc. we need to
>>freeze the Nitro features, fix the documentation, and only write new
>>code for absolutely necessary missing parts!
>>
>>Tasos
>
>
> I agree 100% with Tasos. We should make a combined effort. This effort
> should of course start from G.
No exactly.
This should of course start from the project-manager, who decides
independently if the core developer is in an activity-trap.
> You should put a bit more documentation on
> the API (the latest one) and we will start reading the code... I do not
> see another way... We split the code or something, work in pairs...
Splitting the code has benefits, like allowing the team to document,
whilst not mindering developers creativity.
But I brings some other problems, like the need to merge the branches etc.
> I believe Tasos is really good at organizing teams and people for
> cooperative tasks...
.
--
http://lazaridis.com
From ak at navel.gr Tue Apr 12 11:45:00 2005
From: ak at navel.gr (Anastasios Koutoumanos)
Date: Tue, 12 Apr 2005 18:45:00 +0300
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To: <425BD329.2010809@neurogami.com>
References: <425AA8E2.7000204@neurogami.com> <425B67DF.10203@neurogami.com>
<425BD329.2010809@neurogami.com>
Message-ID: <425BECFC.7070409@navel.gr>
James Britt wrote:
> George Moschovitis wrote:
>
>> Hmm, I am not sure, how to integrate this code snippet in Og.
>> Can you please explain this a little bit better? I 'll also try to
>> think on this later today (very difficult to work on nitro/think in
>> the office).
>
>
>
> In the assorted Og adapters, when read_all is called, the code
> instantiates an instance of the serialized object, the calls
> obj.og_read (which sets object properties)
>
> res.each do |row|
> obj = klass.new
> obj.og_read(row)
> objects << obj
> end
>
>
> Perhaps this could be replaced with something that first tries to
> populate the object by passing a block to klass.new.
Now, that's a great idea, I think it's straight-forward to implement.
The only issue that may arise is a performance penalty for first trying
to pass the block and then fall back to the original techique. Since
nitro is for speed (among other things), we should "join forces" for
using the right way of implementing your idea, minimizing this
performance penalty.
Regards,
Tasos
>
> James
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
--
Navel Ltd
http://www.navel.gr - info at navel.gr - +30 210 6898050
Have fun: www.joy.gr/ and create: www.navel.gr/nitro
From james_b at neurogami.com Tue Apr 12 12:29:06 2005
From: james_b at neurogami.com (James Britt)
Date: Tue, 12 Apr 2005 09:29:06 -0700
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To: <425BECFC.7070409@navel.gr>
References: <425AA8E2.7000204@neurogami.com> <425B67DF.10203@neurogami.com> <425BD329.2010809@neurogami.com>
<425BECFC.7070409@navel.gr>
Message-ID: <425BF752.5090202@neurogami.com>
Anastasios Koutoumanos wrote:
> James Britt wrote:
...
>>
>> Perhaps this could be replaced with something that first tries to
>> populate the object by passing a block to klass.new.
>
>
> Now, that's a great idea, I think it's straight-forward to implement.
> The only issue that may arise is a performance penalty for first trying
> to pass the block and then fall back to the original techique. Since
> nitro is for speed (among other things), we should "join forces" for
> using the right way of implementing your idea, minimizing this
> performance penalty.
In the example code (object_init) , the first part assumes the method
takes a block. If that is not true, the block is never called, though
the object is created (which has to happen either way).
If the block *is* called, the method exits before trying the non-block
version. Otherwise, the accessors are invoked on the object.
I don't think this is an expensive test; actually, I don't see any extra
overhead at all, other than using hash.shift (which may be marginally
more expensive than a non-destructive iteration over the hash).
It's not as though the block is executed on every call If 'initialize'
never calls yield, the block is never executed.
So, read_all, in each adapter, might have:
res.each do |row|
obj = object_init( klass, row )
end
Each adapter may have to implement object_init, because each database
has a different way of defining a 'row'.
James
From paulha at aracnet.com Tue Apr 12 12:47:25 2005
From: paulha at aracnet.com (PAUL HANCHETT)
Date: Tue, 12 Apr 2005 09:47:25 -0700
Subject: [Nitro] AOP with nitro
In-Reply-To: <425B61A7.2020808@neurogami.com>
References: <425AA4B3.6010409@navel.gr> <425AAA38.6000801@neurogami.com> <425B5ACD.6060204@aracnet.com>
<425B61A7.2020808@neurogami.com>
Message-ID: <425BFB9D.1070800@aracnet.com>
Oh, you mean there's no requirement that the files for Nitro be
xhtml... I see. But the expectation is that processing the file will
result in an html document, right? When I saw xhtml I knew I was
looking at an XML style document that should result in html for viewing.
I don't think I'd be too quick to abandon that unless there is some
*misleading* understanding it creates...
Paul
James Britt wrote:
> PAUL HANCHETT wrote:
>
>>>
>> Forgive a dumb question-- What is wrong with the current .xhtml?
>> Will it need to go to a different template processor, or are you just
>> trying to make sure it can be configured to choose the right one?
>
>
> My concern is that there is no requirement that the files actually be
> XHTML. They can be anything. The XHTML lead me to think that Nitro
> was doing something special with regards to XHTML; it doesn't, really,
> though it will do XSLT transformations given XML.
>
> James
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050412/852e5ef5/attachment.html
From paulha at aracnet.com Tue Apr 12 12:51:32 2005
From: paulha at aracnet.com (PAUL HANCHETT)
Date: Tue, 12 Apr 2005 09:51:32 -0700
Subject: [Nitro] AOP with nitro
In-Reply-To:
References: <425AA4B3.6010409@navel.gr>
Message-ID: <425BFC94.3090504@aracnet.com>
So, who's doing what? I'll take the position of "Interested Observer
Who Doesn't Know Much (IOWKoM)". ;-)
Ilias Lazaridis wrote:
> Emmanuel Piperakis wrote:
>
>>> My opinion is that rather than new features/concepts/etc. we need to
>>> freeze the Nitro features, fix the documentation, and only write new
>>> code for absolutely necessary missing parts!
>>>
>>> Tasos
>>
>>
>>
>> I agree 100% with Tasos. We should make a combined effort. This effort
>> should of course start from G.
>
>
> No exactly.
>
> This should of course start from the project-manager, who decides
> independently if the core developer is in an activity-trap.
>
>> You should put a bit more documentation on
>> the API (the latest one) and we will start reading the code... I do not
>> see another way... We split the code or something, work in pairs...
>
>
> Splitting the code has benefits, like allowing the team to document,
> whilst not mindering developers creativity.
>
> But I brings some other problems, like the need to merge the branches
> etc.
>
>> I believe Tasos is really good at organizing teams and people for
>> cooperative tasks...
>
>
> .
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050412/b66fc41a/attachment.html
From paulha at aracnet.com Tue Apr 12 12:55:11 2005
From: paulha at aracnet.com (PAUL HANCHETT)
Date: Tue, 12 Apr 2005 09:55:11 -0700
Subject: [Nitro] AOP?
Message-ID: <425BFD6F.1050209@aracnet.com>
I'm missing something-- AOP == "Aspect Oriented Programming"? Or
something else?
Looking for a pointer...
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050412/069236f9/attachment.html
From james_b at neurogami.com Tue Apr 12 13:08:22 2005
From: james_b at neurogami.com (James Britt)
Date: Tue, 12 Apr 2005 10:08:22 -0700
Subject: [Nitro] AOP with nitro
In-Reply-To: <425BFB9D.1070800@aracnet.com>
References: <425AA4B3.6010409@navel.gr> <425AAA38.6000801@neurogami.com> <425B5ACD.6060204@aracnet.com> <425B61A7.2020808@neurogami.com>
<425BFB9D.1070800@aracnet.com>
Message-ID: <425C0086.3010406@neurogami.com>
PAUL HANCHETT wrote:
> Oh, you mean there's no requirement that the files for Nitro be
> xhtml... I see. But the expectation is that processing the file will
> result in an html document, right? When I saw xhtml I knew I was
> looking at an XML style document that should result in html for viewing.
>
> I don't think I'd be too quick to abandon that unless there is some
> *misleading* understanding it creates...
There is no assurance that what you'll get is (X)HTML; it all depends on
what you happen to put in the template. There is no actual connection
to XHTML or HTML, really; it's just text templating.
James
From paulha at aracnet.com Tue Apr 12 13:27:28 2005
From: paulha at aracnet.com (PAUL HANCHETT)
Date: Tue, 12 Apr 2005 10:27:28 -0700
Subject: [Nitro] AOP with nitro
In-Reply-To: <425C0086.3010406@neurogami.com>
References: <425AA4B3.6010409@navel.gr> <425AAA38.6000801@neurogami.com> <425B5ACD.6060204@aracnet.com> <425B61A7.2020808@neurogami.com> <425BFB9D.1070800@aracnet.com>
<425C0086.3010406@neurogami.com>
Message-ID: <425C0500.1060902@aracnet.com>
Exactly. Most template based generation is like that, right? I'll vote
for xhtml then. :-)
James Britt wrote:
> PAUL HANCHETT wrote:
>
>> Oh, you mean there's no requirement that the files for Nitro be
>> xhtml... I see. But the expectation is that processing the file
>> will result in an html document, right? When I saw xhtml I knew I
>> was looking at an XML style document that should result in html for
>> viewing.
>>
>> I don't think I'd be too quick to abandon that unless there is some
>> *misleading* understanding it creates...
>
>
>
> There is no assurance that what you'll get is (X)HTML; it all depends
> on what you happen to put in the template. There is no actual
> connection to XHTML or HTML, really; it's just text templating.
>
> James
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050412/813511c0/attachment.html
From james_b at neurogami.com Tue Apr 12 13:51:36 2005
From: james_b at neurogami.com (James Britt)
Date: Tue, 12 Apr 2005 10:51:36 -0700
Subject: [Nitro] AOP with nitro
In-Reply-To: <425C0500.1060902@aracnet.com>
References: <425AA4B3.6010409@navel.gr> <425AAA38.6000801@neurogami.com> <425B5ACD.6060204@aracnet.com> <425B61A7.2020808@neurogami.com> <425BFB9D.1070800@aracnet.com>
<425C0086.3010406@neurogami.com> <425C0500.1060902@aracnet.com>
Message-ID: <425C0AA8.3010901@neurogami.com>
PAUL HANCHETT wrote:
> Exactly. Most template based generation is like that, right? I'll
> vote for xhtml then. :-)
I'll leave it to you, then, to explain to the puzzled (such as myself)
why the .xhtml source files are not XHTML, nor do they result in XHTML,
and appear to have no actual relation to XHTML.
Most general-purpose templating systems use a neutral file extension
(e.g. .PHP, .ASP), intended to identify the processing application
rather than than any arbitrary output format.
James
From george.moschovitis at gmail.com Tue Apr 12 14:48:34 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Tue, 12 Apr 2005 21:48:34 +0300
Subject: [Nitro] AOP?
In-Reply-To: <425BFD6F.1050209@aracnet.com>
References: <425BFD6F.1050209@aracnet.com>
Message-ID:
yeap.
On Apr 12, 2005 7:55 PM, PAUL HANCHETT wrote:
> I'm missing something-- AOP == "Aspect Oriented Programming"? Or something
> else?
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Tue Apr 12 14:51:12 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Tue, 12 Apr 2005 21:51:12 +0300
Subject: [Nitro] AOP with nitro
In-Reply-To: <425C0AA8.3010901@neurogami.com>
References:
<425AA4B3.6010409@navel.gr> <425AAA38.6000801@neurogami.com>
<425B5ACD.6060204@aracnet.com> <425B61A7.2020808@neurogami.com>
<425BFB9D.1070800@aracnet.com> <425C0086.3010406@neurogami.com>
<425C0500.1060902@aracnet.com> <425C0AA8.3010901@neurogami.com>
Message-ID:
I tend to agree with James. I think using .xhtml as the extension was
a bit unfortunate.
On the positive side, we can still change this to something more neutral :)
-g.
On Apr 12, 2005 8:51 PM, James Britt wrote:
> PAUL HANCHETT wrote:
> > Exactly. Most template based generation is like that, right? I'll
> > vote for xhtml then. :-)
>
> I'll leave it to you, then, to explain to the puzzled (such as myself)
> why the .xhtml source files are not XHTML, nor do they result in XHTML,
> and appear to have no actual relation to XHTML.
>
> Most general-purpose templating systems use a neutral file extension
> (e.g. .PHP, .ASP), intended to identify the processing application
> rather than than any arbitrary output format.
>
> James
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
--
http://nitro.rubyforge.org
http://www.joy.gr
From paulha at aracnet.com Tue Apr 12 16:39:01 2005
From: paulha at aracnet.com (PAUL HANCHETT)
Date: Tue, 12 Apr 2005 13:39:01 -0700
Subject: [Nitro] AOP with nitro
In-Reply-To:
References: <425AA4B3.6010409@navel.gr>
<425AAA38.6000801@neurogami.com> <425B5ACD.6060204@aracnet.com>
<425B61A7.2020808@neurogami.com> <425BFB9D.1070800@aracnet.com>
<425C0086.3010406@neurogami.com> <425C0500.1060902@aracnet.com>
<425C0AA8.3010901@neurogami.com>
Message-ID: <425C31E5.9050206@aracnet.com>
I bow to my elders! :-)
George Moschovitis wrote:
>I tend to agree with James. I think using .xhtml as the extension was
>a bit unfortunate.
>On the positive side, we can still change this to something more neutral :)
>
>-g.
>
>On Apr 12, 2005 8:51 PM, James Britt wrote:
>
>
>>PAUL HANCHETT wrote:
>>
>>
>>> Exactly. Most template based generation is like that, right? I'll
>>>vote for xhtml then. :-)
>>>
>>>
>>I'll leave it to you, then, to explain to the puzzled (such as myself)
>>why the .xhtml source files are not XHTML, nor do they result in XHTML,
>>and appear to have no actual relation to XHTML.
>>
>>Most general-purpose templating systems use a neutral file extension
>>(e.g. .PHP, .ASP), intended to identify the processing application
>>rather than than any arbitrary output format.
>>
>>James
>>_______________________________________________
>>Nitro-general mailing list
>>Nitro-general at rubyforge.org
>>http://rubyforge.org/mailman/listinfo/nitro-general
>>
>>
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050412/1782a72f/attachment.html
From james_b at neurogami.com Tue Apr 12 16:56:02 2005
From: james_b at neurogami.com (James Britt)
Date: Tue, 12 Apr 2005 13:56:02 -0700
Subject: [Nitro] AOP with nitro
In-Reply-To: <425C31E5.9050206@aracnet.com>
References: <425AA4B3.6010409@navel.gr> <425AAA38.6000801@neurogami.com> <425B5ACD.6060204@aracnet.com> <425B61A7.2020808@neurogami.com> <425BFB9D.1070800@aracnet.com> <425C0086.3010406@neurogami.com> <425C0500.1060902@aracnet.com> <425C0AA8.3010901@neurogami.com>
<425C31E5.9050206@aracnet.com>
Message-ID: <425C35E2.6050706@neurogami.com>
PAUL HANCHETT wrote:
> I bow to my elders! :-)
Watch your step, you whippersnapper!
Damn kids today ...
James
From george.moschovitis at gmail.com Wed Apr 13 05:16:23 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 13 Apr 2005 12:16:23 +0300
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To: <425BD329.2010809@neurogami.com>
References: <425AA8E2.7000204@neurogami.com>
<425B67DF.10203@neurogami.com>
<425BD329.2010809@neurogami.com>
Message-ID:
> Perhaps this could be replaced with something that first tries to
> populate the object by passing a block to klass.new.
ok, but where does this block come from?
when reading (deserializing) an object from the store (rdbms) I dont want
to call the constructor at all. Perhaps there is a method to allocate the object
without calling klass.new. I think this was added in 1.8.2
I 'll investigate.
-g.
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Wed Apr 13 05:27:47 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 13 Apr 2005 12:27:47 +0300
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To:
References: <425AA8E2.7000204@neurogami.com>
<425B67DF.10203@neurogami.com>
<425BD329.2010809@neurogami.com>
Message-ID:
> I 'll investigate.
Not much to investigate:
ri Class#allocate
--------------------------------------------------------- Class#allocate
class.allocate() => obj
------------------------------------------------------------------------
Allocates space for a new object of _class_'s class. The returned
object must be an instance of _class_.
so i replaced klass.new with klass.allocate and the initialize method
is not called.
the object gets correctly restored by og_read, and there are no
restirction for your initialize method. What do you think James? I
think this solves your problem nicely.
regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From james_b at neurogami.com Wed Apr 13 09:35:00 2005
From: james_b at neurogami.com (James Britt)
Date: Wed, 13 Apr 2005 06:35:00 -0700
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To:
References: <425AA8E2.7000204@neurogami.com> <425B67DF.10203@neurogami.com> <425BD329.2010809@neurogami.com>
Message-ID: <425D2004.6080802@neurogami.com>
George Moschovitis wrote:
>>Perhaps this could be replaced with something that first tries to
>>populate the object by passing a block to klass.new.
>
>
> ok, but where does this block come from?
In the Og code, as part of the routing that creates an object. The
current code lops over a hash of properties/values and uses that to set
object values. That assignment can happen in a block.
>
> when reading (deserializing) an object from the store (rdbms) I dont want
> to call the constructor at all. Perhaps there is a method to allocate the object
> without calling klass.new. I think this was added in 1.8.2
YAML and Marshal can deserialize without calling the constructor. But
there is the question of whether serialization is meant to preserve
specific objects, or a set of values, and if deserialzation is meant to
recreate previous objects, or create new objects with pre-existing values.
If new objects are to be created, then calling initialize is perhaps the
better path because it allows for the object to create any required
internal state as well as do a sanity check on on the data used.
If pre-existing objects are to be used, then one has to guard against
other processes altering the database.
James
From george.moschovitis at gmail.com Wed Apr 13 09:41:40 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 13 Apr 2005 16:41:40 +0300
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To: <425D2004.6080802@neurogami.com>
References: <425AA8E2.7000204@neurogami.com>
<425B67DF.10203@neurogami.com>
<425BD329.2010809@neurogami.com>
<425D2004.6080802@neurogami.com>
Message-ID:
> If pre-existing objects are to be used, then one has to guard against
> other processes altering the database.
I think the constructor should not be called when deserializing the
object. An object that is serialized in the database is allready
intialized and in the correct state. I think using klass.allocate is
the 'right thing',
-g.
--
http://nitro.rubyforge.org
http://www.joy.gr
From james_b at neurogami.com Wed Apr 13 09:45:16 2005
From: james_b at neurogami.com (James Britt)
Date: Wed, 13 Apr 2005 06:45:16 -0700
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To:
References: <425AA8E2.7000204@neurogami.com> <425B67DF.10203@neurogami.com> <425BD329.2010809@neurogami.com>
Message-ID: <425D226C.7090708@neurogami.com>
George Moschovitis wrote:
>>I 'll investigate.
>
>
> Not much to investigate:
>
> ri Class#allocate
>
> --------------------------------------------------------- Class#allocate
> class.allocate() => obj
> ------------------------------------------------------------------------
> Allocates space for a new object of _class_'s class. The returned
> object must be an instance of _class_.
>
>
> so i replaced klass.new with klass.allocate and the initialize method
> is not called.
> the object gets correctly restored by og_read, and there are no
> restirction for your initialize method. What do you think James? I
> think this solves your problem nicely.
Class Foo
attr_accessors :x, :y
def initialize( x=nil, y=nil )
@x=x
@y=y
@tstamp = Time.now
end
def create_date
@tstamp
end
end
Question: If you do not call Foo.new, how is @tstamp initialized to the
time of creation?
My main point is that 'initialize' is where an object makes sure it is
starting life on the right foot. It is the best place to assure that it
has correct, complete, consistent data. If you override calling 'new',
then an object may be created with invalid state.
James
From george.moschovitis at gmail.com Wed Apr 13 09:48:16 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 13 Apr 2005 16:48:16 +0300
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To: <425D226C.7090708@neurogami.com>
References: <425AA8E2.7000204@neurogami.com>
<425B67DF.10203@neurogami.com>
<425BD329.2010809@neurogami.com>
<425D226C.7090708@neurogami.com>
Message-ID:
> Question: If you do not call Foo.new, how is @tstamp initialized to the
> time of creation?
No, I call Foo.new when the object is created:
f = Foo.new
f.save
oid = f.oid
then when I reload f:
fr = Foo[oid]
the read method in Og should NOT call initialize again...
It should call Foo.allocate and the fill in the serialized attributes
using og_read.
This is the correct behaviour I think.
-g.
--
http://nitro.rubyforge.org
http://www.joy.gr
From james_b at neurogami.com Wed Apr 13 10:35:42 2005
From: james_b at neurogami.com (James Britt)
Date: Wed, 13 Apr 2005 07:35:42 -0700
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To:
References: <425AA8E2.7000204@neurogami.com> <425B67DF.10203@neurogami.com> <425BD329.2010809@neurogami.com> <425D2004.6080802@neurogami.com>
Message-ID: <425D2E3E.2060101@neurogami.com>
George Moschovitis wrote:
>>If pre-existing objects are to be used, then one has to guard against
>>other processes altering the database.
>
>
> I think the constructor should not be called when deserializing the
> object. An object that is serialized in the database is allready
> intialized and in the correct state. I think using klass.allocate is
> the 'right thing',
Say I have an application, a blog, and I'm saving BlogEntries to a
database. The Nitro application itself may read and write to tables
(via Og). But so can other applications; in fact, I want other
applications to be able to create or alter data. I see this as a feature.
But this open access means potentially invalid data can get in there.
When my Nitro app reads data and creates objects, I want to be sure the
created objects are well-constructed.
What would be the overhead of saving an object's properties as simple
data, but also using an extra field to store a YAML serialization, and
having a means where client code can either create new objects based on
values in the database, or revive existing objects from the saved
serialization?
I can see where saving whole objects, intact, internal state and all,
can be very handy. So far, though, I've been thinking in terms of
creating objects when needed, based on stored data. If, in my blog app,
I select a set of entries based on date or content, I do not expect to
be getting back the same objects as previously created.
There are important differences in an application when it's "objects
created from table data" versus "objects revived from serialization".
James
>
> -g.
>
--
http://www.ruby-doc.org
http://www.rubyxml.com
http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://ooo4r.rubyforge.com
http://www.jamesbritt.com
From james_b at neurogami.com Wed Apr 13 10:43:56 2005
From: james_b at neurogami.com (James Britt)
Date: Wed, 13 Apr 2005 07:43:56 -0700
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To:
References: <425AA8E2.7000204@neurogami.com> <425B67DF.10203@neurogami.com> <425BD329.2010809@neurogami.com> <425D226C.7090708@neurogami.com>
Message-ID: <425D302C.40700@neurogami.com>
George Moschovitis wrote:
>>Question: If you do not call Foo.new, how is @tstamp initialized to the
>>time of creation?
>
>
> No, I call Foo.new when the object is created:
>
> f = Foo.new
> f.save
> oid = f.oid
>
> then when I reload f:
>
> fr = Foo[oid]
>
> the read method in Og should NOT call initialize again...
> It should call Foo.allocate and the fill in the serialized attributes
> using og_read.
> This is the correct behaviour I think.
That will not restore or set private variables.
f = Foo.allocate
p f.create_date # nil
James
From ilias at lazaridis.com Wed Apr 13 11:35:15 2005
From: ilias at lazaridis.com (Ilias Lazaridis)
Date: Wed, 13 Apr 2005 18:35:15 +0300
Subject: [Nitro] [OG] - Please Make a Product / Project Website
Message-ID:
2 months before I was here to evaluate nitro, but I stopped the evaluation.
Now I'm basicly here for OG.
But still I'm not confident, if I should even evaluate it.
I saw some people from www.navel.gr joining here, but none cares that
the companies website is not up to date (2 years).
OG has not even a simple product webpage.
Everything seems a little like "fuzzy development" - and I'm not sure if
this is the right way to produce a critical software-core, which should
handle large amounts of data.
Please:
* Productize OG (e.g.: own project on rubyforge, website (or section))
* Use user feedback, especially the critical one
* Take evaluators "by their hand" and guide them thrugh a evaluation
.
--
http://lazaridis.com
From daniel at bovensiepen.net Wed Apr 13 12:35:53 2005
From: daniel at bovensiepen.net (Daniel Bovensiepen)
Date: Wed, 13 Apr 2005 18:35:53 +0200
Subject: [Nitro] is there a 'is_valid_property?' in og?
Message-ID:
Hi together,
I'm searching a valid method which check a given value. I don't want to add
the value to the og-object first. what I'm looking for is a method like:
myOgObject.is_valid_name?('daniel')
=> true
of course it returns only true if the validate_format from the property
'name' is similarly to /^[\w]{1,20}$/
is there some method which can do this already? or is the only way to check
a value calling the 'valid?' method?
Mfg
daniel
From george.moschovitis at gmail.com Wed Apr 13 15:16:48 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 13 Apr 2005 22:16:48 +0300
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To: <425D2E3E.2060101@neurogami.com>
References: <425AA8E2.7000204@neurogami.com>
<425B67DF.10203@neurogami.com>
<425BD329.2010809@neurogami.com>
<425D2004.6080802@neurogami.com>
<425D2E3E.2060101@neurogami.com>
Message-ID:
> applications to be able to create or alter data. I see this as a feature.
ok...
> When my Nitro app reads data and creates objects, I want to be sure the
> created objects are well-constructed.
you can add a og post-read callback to validate the object. (In the
next version this will be much easier and powerful, thanks to the
aspects).
> What would be the overhead of saving an object's properties as simple
> data, but also using an extra field to store a YAML serialization, and
> ...
> values in the database, or revive existing objects from the saved
> serialization?
this feels wrong. You are duplicating the data. Plus there is another
problem. If you attach a yaml representation to every DBMS row, you
cant have constant length records (which are much faster to traverse
by the DBMS system).
BTW, I think it is wrong to call the initialize method when an object
is deserialized. In the initialize method I may put code that should
be called when the object is initialized, ie created for the first
time. For example I could have code for reference counting in the
constructor:
def initialize
Statistics.num_of_blogs += 1
end
It would be bad to force this code executed every time the object was
deserialised.
If you want to ensure a valid state for your object you could do the
following (some 0.16.0 concepts here):
class MyObject
# 0.16.0 aspect to intercept lifecycle callback
post :make_valid, :on => og_read
def initialize(...)
...
make_valid
...
end
def make_valid
# ensure a valid state for the object
end
end
then make_valid is called after (post) each object is deserialized (read) from
the DBMS.
does this make sense to you?
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Wed Apr 13 15:17:45 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 13 Apr 2005 22:17:45 +0300
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To: <425D302C.40700@neurogami.com>
References: <425AA8E2.7000204@neurogami.com>
<425B67DF.10203@neurogami.com>
<425BD329.2010809@neurogami.com>
<425D226C.7090708@neurogami.com>
<425D302C.40700@neurogami.com>
Message-ID:
> f = Foo.allocate
> p f.create_date # nil
og_read restores f.create_data so it is NOT nil.
-g.
--
http://nitro.rubyforge.org
http://www.joy.gr
From george.moschovitis at gmail.com Wed Apr 13 15:20:48 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Wed, 13 Apr 2005 22:20:48 +0300
Subject: [Nitro] is there a 'is_valid_property?' in og?
In-Reply-To:
References:
Message-ID:
> myOgObject.is_valid_name?('daniel')
> => true
Hmm even though the existing .valid? function works great in practice,
I 'll try to add the methods you suggest. Thanks for the tip.
regards,
George.
--
http://nitro.rubyforge.org
http://www.joy.gr
From james_b at neurogami.com Wed Apr 13 17:04:59 2005
From: james_b at neurogami.com (James Britt)
Date: Wed, 13 Apr 2005 14:04:59 -0700
Subject: [Nitro] Concerns over Og mandating the form of initialize
In-Reply-To:
References: <425AA8E2.7000204@neurogami.com>