From petr at dkf.ics.muni.cz Fri Jul 1 02:27:48 2005 From: petr at dkf.ics.muni.cz (Petr =?iso-8859-2?B?S2924fg=?=) Date: Fri, 1 Jul 2005 08:27:48 +0200 Subject: [Nitro] Og: Strange behavior whith many_to_many Message-ID: <20050701062748.GA32212@dkf.ics.muni.cz> Hi, I'm beginner with Og and maybe I'm doing something wrong. I'll show you my problem on example: class MyClass property :name many_to_many :classes, MyClass def initialize(name=nil) @name = name end end c1 = MyClass.create('c1') c2 = MyClass.create('c2') c3 = MyClass.create('c3') c1.classes << c2 c2.classes << c3 p c1.classes[0].name NoMethodError: undefined method `name' for nil:NilClass p c2.classes[0].name "c1" => nil p c3.classes[0].name "c2" => nil So, I was trying create hiearchy c1 -> c2 -> c3, but I get hiearchy c3 -> c2 -> c1. As store I'm using psql and when i look to the database everything looks ok: ogmyclass database: name oid --- c1 1 --- c2 2 --- c3 3 jogmyclassogmyclass database: oid key1 key2 18278 1 2 18279 2 3 Tables created by Og looks good. Is it now possible to create hiearchy where each object keeps track of his children and track of his parents? -- Petr Kovar From george.moschovitis at gmail.com Fri Jul 1 04:50:50 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 1 Jul 2005 11:50:50 +0300 Subject: [Nitro] Og: Strange behavior whith many_to_many In-Reply-To: <20050701062748.GA32212@dkf.ics.muni.cz> References: <20050701062748.GA32212@dkf.ics.muni.cz> Message-ID: Hello Petr, this is saddly a bug. This will be fixed in the forthcoming release. In the meantime please change the following code in lib/og/store/sql.rb: 110: def join_table(class1, class2, postfix = nil) 111: if class1.to_s <= class2.to_s <------------------------ add a '=' 112: return "j#{table(class1)}#{table(class2)}#{postfix}", 1, 2 after this change, the following self-join example works: require 'og' class MyClass property :name, String many_to_many :classes, MyClass def initialize(name=nil) @name = name end end Og.setup(:store => :sqlite, :name => 'tog', :destroy => true) c1 = MyClass.create('c1') c2 = MyClass.create('c2') c1.classes << c2 p c1.classes[0].name thanks for the bug report. -g. -- http://www.nitrohq.com http://www.joy.gr From george.moschovitis at gmail.com Fri Jul 1 05:30:34 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 1 Jul 2005 12:30:34 +0300 Subject: [Nitro] Og: Strange behavior whith many_to_many In-Reply-To: <20050701062748.GA32212@dkf.ics.muni.cz> References: <20050701062748.GA32212@dkf.ics.muni.cz> Message-ID: > property :name Please note that this should be: property :name, String if you leave just property :name Og automatically assigns an Object class and saves the name field using YAML, this is why you get '--- name' instead of 'name'. regards, George. -- http://www.nitrohq.com http://www.joy.gr From mneumann at ntecs.de Fri Jul 1 06:10:14 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Fri, 01 Jul 2005 12:10:14 +0200 Subject: [Nitro] Re: Wee+Nitro status In-Reply-To: References: <42C3F120.30903@ntecs.de> Message-ID: <42C51686.8030602@ntecs.de> George Moschovitis wrote: > Hello Michael > > >>I've made some progress on merging Wee and Nitro. >>I can now handle a Wee Component as a Nitro Controller. > > > This is really exciting news ;-) > > >> session[:components]['pager'] = ... >> # or >> session[:components].delete('pager') > Hm, I get now very strange things with sessions. Try out the following controller: class TestController < Nitro::Controller def index p session session['hallo'] = 'test' @out << "hallo leute\n" end end Every time the index action is rendered, it prints out {:FLASH=>{}}. But shouldn't 'session' include the 'hallo' key as well? Even more strange, yesterday it seemed to work :-( I'm using Nitro 0.19.0. Regards, Michael From george.moschovitis at gmail.com Fri Jul 1 07:46:54 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 1 Jul 2005 14:46:54 +0300 Subject: [Nitro] Re: Wee+Nitro status In-Reply-To: <42C51686.8030602@ntecs.de> References: <42C3F120.30903@ntecs.de> <42C51686.8030602@ntecs.de> Message-ID: Hello Michael, I tried the following: require 'nitro' class HelloWorld def index p session session['hallo'] = 'test' print "hallo leute\n" end end App.run(HelloWorld) and it works correctly. Perhaps there is something else missing? Can you send me the full source code? George PS: This example runs under the forthcoming nitro 0.20.0. As you can see the new version allows you to publish ANY Ruby class (like CherryPy and/or Catapult). Only the custom defined public methods are actually exposed. To have advanced functionality (like aspects, scaffolding, etc) you still have to extend from Controller or manually include the required modules. -- http://www.nitrohq.com http://www.joy.gr From mneumann at ntecs.de Fri Jul 1 08:16:05 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Fri, 01 Jul 2005 14:16:05 +0200 Subject: [Nitro] Re: Wee+Nitro status In-Reply-To: References: <42C3F120.30903@ntecs.de> <42C51686.8030602@ntecs.de> Message-ID: <42C53405.8010207@ntecs.de> George Moschovitis wrote: > Hello Michael, > > I tried the following: > > require 'nitro' > > class HelloWorld > def index > p session > session['hallo'] = 'test' > print "hallo leute\n" > end > end > > App.run(HelloWorld) > > and it works correctly. Perhaps there is something else missing? Can > you send me the full source code? I found the bug. I had two versions of Nitro installed... Another question: How can I get the controller-path from the context? /test/index context.action_name # => /test/index But I'd like to have this: context.controller_name # => /test Regards, Michael From george.moschovitis at gmail.com Fri Jul 1 08:50:36 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 1 Jul 2005 15:50:36 +0300 Subject: [Nitro] Re: Wee+Nitro status In-Reply-To: <42C53405.8010207@ntecs.de> References: <42C3F120.30903@ntecs.de> <42C51686.8030602@ntecs.de> <42C53405.8010207@ntecs.de> Message-ID: > I found the bug. I had two versions of Nitro installed... Ok :) > > > Another question: > > How can I get the controller-path from the context? > > /test/index > > context.action_name # => /test/index > > But I'd like to have this: > > context.controller_name # => /test For the moment make the following change in lib/nitro/render.rb: 278:# The name of the current controller. attr_accessor :controller_name <-------------------- # Initialize the render. # # [+context+] # A parent render/controller acts as the context. def initialize(context, base = nil) @request = @response = @context = context @controller_name = base <-------------------------------------- @out = context.out end Some remarks: - i dont like controller_name, generally the usage of the word 'controller' will be scaled down in future versions of Nitro. I think the final name will be base_url or something. However use this small patch in the meantime to advance the nitro-wee integration. - If you are on a main action for this request (ie not in a subaction) you can use @controller_name or controller_name instead of context.controller_name. best regards, George. -- http://www.nitrohq.com http://www.joy.gr From george.moschovitis at gmail.com Fri Jul 1 08:52:50 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 1 Jul 2005 15:52:50 +0300 Subject: [Nitro] Nitro Wiki In-Reply-To: References: <42C2BA04.9060304@neurogami.com> <42C33F90.3070504@neurogami.com> Message-ID: James, I made some small changes to your first 3 chapters and added some scaffolding text in the fourth chapter, perhaps you could take some time to transform my 'scaffolding' text to a nice little chapter to go with the others? I 'll try to add some more stuff in the coming days. regards, George. PS: to all other members of this list: have a look at this tutorial! On 6/30/05, George Moschovitis wrote: > Oh, I see you uploaded some stuff on the Wiki ;-) Thanks a lot. > I would suggest to the other members of this list to take a look at your text! > > regards, > George. > > -- > http://www.nitrohq.com > http://www.joy.gr > -- http://www.nitrohq.com http://www.joy.gr From james_b at neurogami.com Fri Jul 1 09:21:03 2005 From: james_b at neurogami.com (James Britt) Date: Fri, 01 Jul 2005 06:21:03 -0700 Subject: [Nitro] Nitro Wiki In-Reply-To: References: <42C2BA04.9060304@neurogami.com> <42C33F90.3070504@neurogami.com> Message-ID: <42C5433F.2090507@neurogami.com> George Moschovitis wrote: > James, > > I made some small changes to your first 3 chapters and added some > scaffolding text in the fourth chapter, perhaps you could take some > time to transform my 'scaffolding' text to a nice little chapter to go > with the others? OK. > > I 'll try to add some more stuff in the coming days. Thanks. Jame -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From mneumann at ntecs.de Fri Jul 1 09:47:47 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Fri, 01 Jul 2005 15:47:47 +0200 Subject: [Nitro] Re: Wee+Nitro status In-Reply-To: References: <42C3F120.30903@ntecs.de> <42C51686.8030602@ntecs.de> <42C53405.8010207@ntecs.de> Message-ID: <42C54983.50202@ntecs.de> George Moschovitis wrote: >>I found the bug. I had two versions of Nitro installed... > > > Ok :) Nope... strange! It's occuring again :-((( Regards, Michael From george.moschovitis at gmail.com Fri Jul 1 09:52:35 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 1 Jul 2005 16:52:35 +0300 Subject: [Nitro] Re: Wee+Nitro status In-Reply-To: <42C54983.50202@ntecs.de> References: <42C3F120.30903@ntecs.de> <42C51686.8030602@ntecs.de> <42C53405.8010207@ntecs.de> <42C54983.50202@ntecs.de> Message-ID: hmm... very strange indeed, can you investigate this a little bit? Moreover, please email me privately your exact code I 'll try to reproduce this over the weekend. -g. On 7/1/05, Michael Neumann wrote: > George Moschovitis wrote: > >>I found the bug. I had two versions of Nitro installed... > > > > > > Ok :) > > Nope... strange! It's occuring again :-((( > > Regards, > > Michael > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com http://www.joy.gr From nitro at tcb.mailworks.org Sun Jul 3 15:56:49 2005 From: nitro at tcb.mailworks.org (Timothy Brown) Date: Sun, 03 Jul 2005 15:56:49 -0400 Subject: [Nitro] Og vs Active Record Message-ID: <1120420609.1305.237670619@webmail.messagingengine.com> Can someone cleanly define the differences in Og vs Active Record? I'm trying to explain it to a client, I heard there was already such a document or mailing list post available... From james_b at neurogami.com Sun Jul 3 16:09:03 2005 From: james_b at neurogami.com (James Britt) Date: Sun, 03 Jul 2005 13:09:03 -0700 Subject: [Nitro] Og vs Active Record In-Reply-To: <1120420609.1305.237670619@webmail.messagingengine.com> References: <1120420609.1305.237670619@webmail.messagingengine.com> Message-ID: <42C845DF.8040107@neurogami.com> Timothy Brown wrote: > Can someone cleanly define the differences in Og vs Active Record? ActiveRecord puts the database and tables first, with classes and objects derived from table schema Og puts objects first, with table and database schema derived from the object model. (I'm sure there are other differences as well, but this is the main one in my eyes.) James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From Aleksi.Niemela at cs.helsinki.fi Sun Jul 3 16:35:03 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Sun, 03 Jul 2005 23:35:03 +0300 Subject: [Nitro] More checking for sql.rb's type_for_class Message-ID: <42C84BF7.2020302@cs.helsinki.fi> I think there should be more checking in type_for_class for case when there's no mapping for type needed. I was bit by writing property :creation_date, DateTime instead of just Time (or Date), which led to table creation with CREATE TABLE foo (..., body text, creation_date , ...) failing due no type specified for field creation_date. (I had also add 'puts sql' into psql.rb's method create_table exception handling to see what was the problem as the postgres' error message wasn't all that helpful by not including the failing SQL.) - Aleksi From Aleksi.Niemela at cs.helsinki.fi Sun Jul 3 17:00:30 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Mon, 04 Jul 2005 00:00:30 +0300 Subject: [Nitro] Simple message board solution? Message-ID: <42C851EE.2060706@cs.helsinki.fi> What is the right way to do simple message board? Should I use messages having parent field for indicating they're comment messages? (I wouldn't create two classes Message and Comment just because they differ only that 1. comments are written as a reply for specific messages (or comments) and 2. perhaps they don't have title). How should I then find (efficiently) all the messages to show in one page? If I use simple parent field like in code below, it's not possible to check if a message is a beginning of new thread like example message m should be by class Message def beginning_thread(m) not m.parent end end as that will incur SQL execution with incorrect SQL if there's no parent defined (like for example's message root at the end of the mail). Therefore straightforward code like forum_messages = @forum.messages.to_ary.find_all do |msg| # find all messages starting a new thread not msg.parent end.sort do |a,b| a.creation_date <=> b.creation_date end messages_to_show = forum_messages[page*threads_per_page, threads_per_page] wouldn't work. Besides not working it has another great problem of efficiency. That will fetch all single forums messages for each page refresh, finding of root messages and sorting them where we actually want to show only few. Perhaps a better approach would be to use #find's options something akin to forum_messages = Message.find(:condition => "parent = #{root_message_oid} and forum_oid = #{@forum.oid}", :order => 'creation_date asc', :offset => page*threads_per_page, :limit => threads_per_page) but now I'm writing most of the SQL by hand and I fear quite a lot that this kind of solution won't endure as the schema changes and so on. It has also one problem I couldn't solve without adding a special "root" message, namely I didn't know how to find all messages without a parent defined. (Testing with parent = NULL etc. didn't succeed for integer value having undefined value.) I hope I haven't bored you with couple of possible solution I've come up with and you have still energy to envision the right way to do this. At the end of the mail you can find example schema to go forward from. - Aleksi class User property :name, String property :password, String property :email, String property :creation_date has_many :written_messages, Message def initialize(name, password, email) @name, @password, @email = name, password, email end end class Forum property :name, String has_many :messages, Message def initialize(name) @name = name end end class Message property :title, String property :body, String property :creation_date, Time property :latest_reply, Time belongs_to :author, User belongs_to :forum, Forum has_one :parent, Message def initialize(title, body, author_, forum_, parent_ = nil) @title, @body = title, body @creation_date, @latest_reply = Time.now, nil self.author = author_ if author_ self.forum = forum_ if forum_ self.parent = parent_ if parent_ end end u = User.create("Foo", "Bar", "foo at bar.com") v = Forum.create("V") root = Message.create("Root of all messages", "", nil, nil, nil) m = Message.create("Message 1", "body", u, v, root) m_c1 = Message.create(nil, "comment body for Message 1", u, v, m) From george.moschovitis at gmail.com Sun Jul 3 17:11:23 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 4 Jul 2005 00:11:23 +0300 Subject: [Nitro] Og vs Active Record In-Reply-To: <42C845DF.8040107@neurogami.com> References: <1120420609.1305.237670619@webmail.messagingengine.com> <42C845DF.8040107@neurogami.com> Message-ID: AR maps Relational schema to objects (R->O) OG maps objects to relational schema (O->R). Please note that O->R implies R->O as well (IE Og maps again the relational schema to objects when de-serializing). In this sense Og is a super set of AR. At the moment, AR is more mature, but Og is catching up fast. regards, George. -- http://www.nitrohq.com http://www.joy.gr From george.moschovitis at gmail.com Sun Jul 3 17:15:55 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 4 Jul 2005 00:15:55 +0300 Subject: [Nitro] More checking for sql.rb's type_for_class In-Reply-To: <42C84BF7.2020302@cs.helsinki.fi> References: <42C84BF7.2020302@cs.helsinki.fi> Message-ID: good point, I 'll add better error reporting and add DateTime support. Any other comono types that should be added? -g. On 7/3/05, Aleksi Niemela wrote: > I think there should be more checking in type_for_class for case when > there's no mapping for type needed. > > I was bit by writing > > property :creation_date, DateTime > > instead of just Time (or Date), which led to table creation with > > CREATE TABLE foo (..., body text, creation_date , ...) > > failing due no type specified for field creation_date. > > (I had also add 'puts sql' into psql.rb's method create_table exception > handling to see what was the problem as the postgres' error message > wasn't all that helpful by not including the failing SQL.) > > - Aleksi > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com http://www.joy.gr From george.moschovitis at gmail.com Mon Jul 4 04:02:26 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 4 Jul 2005 11:02:26 +0300 Subject: [Nitro] Simple message board solution? In-Reply-To: <42C851EE.2060706@cs.helsinki.fi> References: <42C851EE.2060706@cs.helsinki.fi> Message-ID: Have you seen the Hierarchical/NestedSets OgMixins? have a look at lib/og/mixin/hierarchical.rb regards, George. -- http://www.nitrohq.com http://www.joy.gr From dcorbin at machturtle.com Mon Jul 4 07:28:39 2005 From: dcorbin at machturtle.com (David Corbin) Date: Mon, 4 Jul 2005 07:28:39 -0400 Subject: [Nitro] Mock Persistence Message-ID: <200507040728.39281.dcorbin@machturtle.com> What support, if any, does Og have for mocking out the persistence to support unit tests? David From dcorbin at machturtle.com Mon Jul 4 09:04:35 2005 From: dcorbin at machturtle.com (David Corbin) Date: Mon, 4 Jul 2005 09:04:35 -0400 Subject: [Nitro] Nitro vs. Rails Message-ID: <200507040904.35267.dcorbin@machturtle.com> After the recent (short) thread comparing persistence frameworks, I'm curious as to how Nitro differs from Rails, other than Og/AR. David From mneumann at ntecs.de Mon Jul 4 09:26:20 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Mon, 04 Jul 2005 15:26:20 +0200 Subject: [Nitro] Nitro vs. Rails In-Reply-To: <200507040904.35267.dcorbin@machturtle.com> References: <200507040904.35267.dcorbin@machturtle.com> Message-ID: <42C938FC.50809@ntecs.de> David Corbin wrote: > After the recent (short) thread comparing persistence frameworks, I'm curious > as to how Nitro differs from Rails, other than Og/AR. Rails is a framework (Hollywood principle: "don't call us, we call you"). It does a lot for you, and you just have to insert files in the right place. It assumes that several files are in special directories. As long as you don't need to change this, this is a good thing. Nitro is much more configurable, AFAIK, and is less a framework in the above sense as Rails is. From a technical point of view, Nitro is more advanced. It has shaders, that allow you for example to emit XML from your renderer, and transform the XML to HTML (or other formats). AFAIK, you can stack shaders as you like. Nitro is more generic, but probably Rails is a bit easier to use and start with. And Rails has a much broader community, better documentation and is more mature than Nitro. Regards, Michael From george.moschovitis at gmail.com Mon Jul 4 10:05:53 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 4 Jul 2005 17:05:53 +0300 Subject: [Nitro] Mock Persistence In-Reply-To: <200507040728.39281.dcorbin@machturtle.com> References: <200507040728.39281.dcorbin@machturtle.com> Message-ID: An earlier version provided some mocking capabilities using the flexmock gem. In the current version this support is removed. I have designed a clean testing architecture that 'reuses' the memory/file store for fixtures, but haven't yet found time to implement this :( Strong testing support is DEFINITELY in my to do list, be patient. regards, George. -- http://www.nitrohq.com http://www.joy.gr From george.moschovitis at gmail.com Mon Jul 4 10:13:06 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 4 Jul 2005 17:13:06 +0300 Subject: [Nitro] Nitro vs. Rails In-Reply-To: <42C938FC.50809@ntecs.de> References: <200507040904.35267.dcorbin@machturtle.com> <42C938FC.50809@ntecs.de> Message-ID: The main difference is that Nitro does not force a design to the developer. You don't have to use a specific directory structure, there are many ways to do the same thing, etc, etc. I like to think that Nitro is similar in philosophy to Ruby and Rails is similar in philosophy to Python ;-) -g. PS: Btw, I like to call Nitro a 'Web Engine' instead of framework. PS2: It is true that Rails is quite more mature at the moment, but we aim to change that ;-) -- http://www.nitrohq.com http://www.joy.gr From george.moschovitis at gmail.com Mon Jul 4 10:47:57 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 4 Jul 2005 17:47:57 +0300 Subject: [Nitro] Tabs or spaces Message-ID: Hello all, I have seen that most ruby projects use spaces instead of tabs in the source files. Nitro/Og use tabs for the moment (use tab=2). However, as I am working with Michael on better Nitro-Wee integration I am thinking about switching to spaces. I would like to hear your opinion, what are the cons and pros ? regards, George. -- http://www.nitrohq.com http://www.joy.gr From dcorbin at machturtle.com Mon Jul 4 10:48:53 2005 From: dcorbin at machturtle.com (David Corbin) Date: Mon, 4 Jul 2005 10:48:53 -0400 Subject: [Nitro] Mock Persistence In-Reply-To: References: <200507040728.39281.dcorbin@machturtle.com> Message-ID: <200507041048.53547.dcorbin@machturtle.com> On Monday 04 July 2005 10:05 am, George Moschovitis wrote: > An earlier version provided some mocking capabilities using the > flexmock gem. In the current version this support is removed. I have > designed a clean testing architecture that 'reuses' the memory/file > store for fixtures, but haven't yet found time to implement this :( > > Strong testing support is DEFINITELY in my to do list, be patient. > I will be. I find it incredibly frustrating that all testing in Rails (out of the box) requires a database. From dcorbin at machturtle.com Mon Jul 4 11:07:21 2005 From: dcorbin at machturtle.com (David Corbin) Date: Mon, 4 Jul 2005 11:07:21 -0400 Subject: [Nitro] Tabs or spaces In-Reply-To: References: Message-ID: <200507041107.21157.dcorbin@machturtle.com> On Monday 04 July 2005 10:47 am, George Moschovitis wrote: > Hello all, > > I have seen that most ruby projects use spaces instead of tabs in the > source files. Nitro/Og use tabs for the moment (use tab=2). However, > as I am working with Michael on better Nitro-Wee integration I am > thinking about switching to spaces. I would like to hear your opinion, > what are the cons and pros ? > Sounds like a call to war:) I'm a big fan of tabs, primarily because of the stupidity of various editors. If I press to indent, then when I press it should put me back where I started, but they seldom do. TAB Pros: a) Each user can control the indent the way they like, by adjusting their editors tabs. b) BS works correctly (see above) TAB Cons: c) Every tool has have set the tab size (I don't print much, but for those that do...) d) If you line up 'things' other than at the left-edge indent, spaces tend to work better. I've been working with a team in my day job that uses spaces instead of tabs for 18 months, and you do learn to adapt fairly easily. From james_b at neurogami.com Mon Jul 4 11:56:48 2005 From: james_b at neurogami.com (James Britt) Date: Mon, 04 Jul 2005 08:56:48 -0700 Subject: [Nitro] Nitro vs. Rails In-Reply-To: References: <200507040904.35267.dcorbin@machturtle.com> <42C938FC.50809@ntecs.de> Message-ID: <42C95C40.9030609@neurogami.com> George Moschovitis wrote: > The main difference is that Nitro does not force a design to the > developer. You don't have to use a specific directory structure, there > are many ways to do the same thing, etc, etc. > > I like to think that Nitro is similar in philosophy to Ruby and Rails > is similar in philosophy to Python ;-) Funny; I've gotten a similar impression. It's interesting how many Pythonesque things are popular in the Ruby world. YAML, for instance. Significant indentation is evil in code, but a Great Thing, apparently, in data markup. Similarly, Python removes many choices from the developer, on the belief (as I understand it) that allowing needless latitude just makes things harder for a community of developers to understand. E.g., code formating is dictated (much as Rails dictates directory layout) and there is only one way to do do common tasks (e.g. loops, conditionals). I've seen people compare the use of the phrase "The Ruby Way" as being too similar to "There's Only One Way To Do It." They are not quite equivalent, but I'd prefer people to talk of *a* Ruby Way do things, given the freedom Ruby offers. On some blog thread someplace I was chastised for encouraging people to consider Nitro and Wee as alternatives to Rails; apparently, there is a Great Fear of fragmentation, and people should not bother with "runner-up" toolkits when there is already a perfectly good one (Rails) available. Which, to my ears, sounded like a good argument to learn Python instead of Ruby, as Python has (or had, at least) a bigger community,`more mature libraries, and greater corporate mind share. I appreciate that Rails allows for the quick construction of certain types of Web apps precisely because it makes decisions for you. This may also make it easier for others to pitch in and create new modules, generators, and so on, But I think, over time, this sort of control hinders fluid development. I'm sketching out a Nitro application that functions something like a big cork board. People can post short messages that are all visible at the same time; there's some JavaScript and CSS at work to create the impression of overlapping notes, which one can reposition for easier reading. (BTW, check out Walter Zorn's DHTML library. It looks remarkably similar to stuff at Scriptactulous, but his work came first. And it actually works for me.) Now, I want to be able to send an E-mail when someone registers, and as far as I can tell that is not built into Nitro (as it is in Rails). On the other hand, I expect that when I am done my app will have roughly 5 files total; which is about how many configuration files are part of a default Rails app. BTW, has anyone used ActionMailer with Nitro? I may go take a look. No reason to waste a perfectly good library ... > > > -g. > > > PS: Btw, I like to call Nitro a 'Web Engine' instead of framework. Interesting. James http://www.walterzorn.com/dragdrop/commands_e.htm -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From fabian at oggu.de Mon Jul 4 16:14:50 2005 From: fabian at oggu.de (Fabian Buch) Date: Mon, 4 Jul 2005 22:14:50 +0200 Subject: [Nitro] Elements Message-ID: <1880d71204fcbcc4d06378fe107abed8@oggu.de> hi, just played around with the ElementsShader. I made a class like the following (simplified here): class Entry < Nitro::Element attr :oid def content @oid end end and in an xhtml I wanted to use it as follows: This doesn't work. It takes "#{oid}" as string, not resolving the variable. If I do it works perfectly. Did I miss something? Maybe my problem has nothing to do with Elements? Any way to do this? Fabian From epiperak at softlab.ece.ntua.gr Tue Jul 5 00:10:46 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 5 Jul 2005 07:10:46 +0300 (EEST) Subject: [Nitro] Tutorial Notes In-Reply-To: <1880d71204fcbcc4d06378fe107abed8@oggu.de> References: <1880d71204fcbcc4d06378fe107abed8@oggu.de> Message-ID: Dear Friends, I am not sure how to add notes to the Tutorial (is it permitted to?). I am editing the text and changing typos and adding linux case notes. If this is not desireable please let me know. James I believe you did a very good job, not only by writing something, but the whole approach of the tutorial is excactly what most people (including myself) needed. I have built a big web app in rails, and as I promised to my friend G. I am porting my version 2.0 to Nitro/Og. I work on Debian Sarge and latest Nitro/Og so I believe my app, once completed would be a very nice Nitro example case. Do you remember the first Java books/Manuals that used to have kind of 2 versions each (for newbies to Java, and for people moving from C++ to Java). I suggest to do the same... e.g. How to approach Nitro from scratch and Nitro/Og for Rails users. I can be of help in the later. Please tell me your opinion. 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 Tue Jul 5 01:30:57 2005 From: james_b at neurogami.com (James Britt) Date: Mon, 04 Jul 2005 22:30:57 -0700 Subject: [Nitro] Tutorial Notes In-Reply-To: References: <1880d71204fcbcc4d06378fe107abed8@oggu.de> Message-ID: <42CA1B11.6030204@neurogami.com> Emmanuel Piperakis wrote: > Dear Friends, > I am not sure how to add notes to the Tutorial (is it permitted to?). I > am editing the text and changing typos and adding linux case notes. If > this is not desireable please let me know. There should be an Edit link on the page that allows you to edit the wiki text. Comments are welcome; readers should know that I wrote most of the text a few months ago. It worked at the time, but the Nitro API has changed. I tried to keep up, but decided to just leave it until George decided to go on vacation or something and stop writing code. :) So the the tasks now are: I have to put up the remaining chapters (there about 9 so far, ending up where Og is just introduced), and I and others need to read and test the code and text, and change the tutorial to reflect the current state of Nitro. > > James I believe you did a very good job, not only by writing something, > but the whole approach of the tutorial is excactly what most people > (including myself) needed. I started writing it as a way to learn Nitro. George had already written up some tutorials for Og, but I had a hard time finding anything simple enough on Nitro that would help me get started. So I decided to start super-simple and just work my way through an application, slowly adding features and explaining the basics, writing down what I learned, trying to track the little things that one forgets after using a tool for a while. It's hard to capture that "beginner's mind." > > I have built a big web app in rails, and as I promised to my friend G. I > am porting my version 2.0 to Nitro/Og. I work on Debian Sarge and latest > Nitro/Og so I believe my app, once completed would be a very nice Nitro > example case. Excellent. > > Do you remember the first Java books/Manuals that used to have kind of 2 > versions each (for newbies to Java, and for people moving from C++ to > Java). I suggest to do the same... e.g. How to approach Nitro from > scratch and Nitro/Og for Rails users. I can be of help in the later. It's helpful to show the same basic concepts from multiple angles. My examples are likely not going to be what a more experienced developer might do, because I don;t want the text to get obscured by anything too sophisticated. So I just omit what others may feel are obvious optimizations or code reductions. The ideas it get something that does the job, and in way that is easy to follow from chapter to chapter. More polished and complex examples are needed so that people can appreciate the full range of options in Nitro. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From epiperak at softlab.ece.ntua.gr Tue Jul 5 02:33:42 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 5 Jul 2005 09:33:42 +0300 (EEST) Subject: [Nitro] Tutorial Notes In-Reply-To: References: <1880d71204fcbcc4d06378fe107abed8@oggu.de> Message-ID: Ignore my previous email. I just hope I did not overdo it... I added my notes as __Note by epiperak__ James please check them, just in case I am mistaken :-) George, the next step is a page about scaffolding and controllers. Shall we? Emmanouil > Dear Friends, > I am not sure how to add notes to the Tutorial (is it permitted to?). I am > editing the text and changing typos and adding linux case notes. If this is > not desireable please let me know. > > James I believe you did a very good job, not only by writing something, but > the whole approach of the tutorial is excactly what most people (including > myself) needed. > > I have built a big web app in rails, and as I promised to my friend G. I am > porting my version 2.0 to Nitro/Og. I work on Debian Sarge and latest > Nitro/Og so I believe my app, once completed would be a very nice Nitro > example case. > > Do you remember the first Java books/Manuals that used to have kind of 2 > versions each (for newbies to Java, and for people moving from C++ to Java). > I suggest to do the same... e.g. How to approach Nitro from scratch and > Nitro/Og for Rails users. I can be of help in the later. > > Please tell me your opinion. > > 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 > 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 Tue Jul 5 02:35:28 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jul 2005 09:35:28 +0300 Subject: [Nitro] Elements In-Reply-To: <1880d71204fcbcc4d06378fe107abed8@oggu.de> References: <1880d71204fcbcc4d06378fe107abed8@oggu.de> Message-ID: Hello, > just played around with the ElementsShader. > I made a class like the following (simplified here): > ... > Elements are resolved at compile time to avoid the performance penalty. The interpolation of oid happens at Runtime, so this cannot work. Please note that Nitro allows you to have compile time interpolation and/or dynamic code. Just use the #[] marker instead of #{}. ie: This script was compiled at #[Time.now]. I am not sure if is useful for you. In any case I realize that what you are trying to do makes sense, I 'll investigate how I can improve the implementation to provide this feature. Any ideas appreciated. regards, George. PS: some other 'interpolators' apart from #{} and #[], are: #(..) = just like #{}, useful in xslt. {{..}} = Applies markup (typically redcloth/santize) [[..]] = Applies localization rules for auto translated strings. and probably some more... -- http://www.nitrohq.com From george.moschovitis at gmail.com Tue Jul 5 02:39:45 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jul 2005 09:39:45 +0300 Subject: [Nitro] Tutorial Notes In-Reply-To: <42CA1B11.6030204@neurogami.com> References: <1880d71204fcbcc4d06378fe107abed8@oggu.de> <42CA1B11.6030204@neurogami.com> Message-ID: > George decided to go on vacation or something and stop writing code. :) Well, I ve been in vacations ;-) But I always have my laptop with me ;-) > So the the tasks now are: I have to put up the remaining chapters (there > .. > reflect the current state of Nitro. Hmm, I 'll probably upload the new nitro-based NitroHQ wiki tommorow. So perhaps it would be best if you waited 1-2 days. > More polished and complex examples are needed so that people can > appreciate the full range of options in Nitro. Noticed ;-) regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Tue Jul 5 02:48:32 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jul 2005 09:48:32 +0300 Subject: [Nitro] Nitro vs. Rails In-Reply-To: <42C95C40.9030609@neurogami.com> References: <200507040904.35267.dcorbin@machturtle.com> <42C938FC.50809@ntecs.de> <42C95C40.9030609@neurogami.com> Message-ID: Hello James, > Now, I want to be able to send an E-mail when someone registers, and as > far as I can tell that is not built into Nitro (as it is in Rails). On > ... > files total; which is about how many configuration files are part of a > default Rails app. You are wrong, please have a look at the file lib/nitro/mail.rb. This actually quite similar to ActionMailer (In fact this is soo similar, that got DHH quite nervous ;-)). For example usage, please have a look at the blog example. I really have to add some documentation, people keep missing Nitro's features ;-) > BTW, has anyone used ActionMailer with Nitro? I may go take a look. No > reason to waste a perfectly good library ... I tried to use ActionMailer but you have to include ActionPack, ActiveSupport and the full stack to make this work. ARRGGHHHH! regards, George. -- http://www.nitrohq.com From epiperak at softlab.ece.ntua.gr Tue Jul 5 02:57:57 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 5 Jul 2005 09:57:57 +0300 (EEST) Subject: [Nitro] Just a simple one... In-Reply-To: References: <200507040904.35267.dcorbin@machturtle.com> <42C938FC.50809@ntecs.de> <42C95C40.9030609@neurogami.com> Message-ID: Hi all, my run.rb is: require 'nitro' require 'og' Nitro.run do |conf| Og.setup( :store => 'mysql', :name => 'weezv2', :user => 'weezv2', :password => 'testing' ) conf.dispatcher = Dispatcher.new( :root => ReportingController ) conf.set( :name => 'WEEZ Online Reporting', :host => '192.168.100.220', :port => 3000 end I run % ruby -rubygems run.rb and get the following!! Ps. I created the user weezv2 in mysql and I gave him/her !!! full access... what is the problem? (I am using Debian Sarge and latest Nitro/Og) /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store.rb:24:in `for_name': /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store/mysql.rb:18:in `alias_method': undefined method `fetch_row' for class `Mysql::Result' (NameError) from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store/mysql.rb:18 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' from (eval):2:in `for_name' from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/manager.rb:43:in `eval' from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store.rb:24:in `for_name' from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/manager.rb:43:in `initialize' from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/manager.rb:192:in `new' from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/manager.rb:192:in `setup' from run.rb:17 from run.rb:10:in `run' from run.rb:10 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 Tue Jul 5 03:09:06 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jul 2005 10:09:06 +0300 Subject: [Nitro] Nitro vs. Rails In-Reply-To: <42C95C40.9030609@neurogami.com> References: <200507040904.35267.dcorbin@machturtle.com> <42C938FC.50809@ntecs.de> <42C95C40.9030609@neurogami.com> Message-ID: > > PS: Btw, I like to call Nitro a 'Web Engine' instead of framework. > Interesting. Similar in concept to 3d/game engines. regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Tue Jul 5 03:53:34 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jul 2005 10:53:34 +0300 Subject: [Nitro] Elements In-Reply-To: <1880d71204fcbcc4d06378fe107abed8@oggu.de> References: <1880d71204fcbcc4d06378fe107abed8@oggu.de> Message-ID: > def content > @oid > end Please , also note that you should define 'render' and NOT content. Content is an internal method that traverses all children elements (and html) of the enclosing Element. regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Tue Jul 5 05:36:15 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jul 2005 12:36:15 +0300 Subject: [Nitro] Have a first look ath new nitro wiki Message-ID: Hello all, As suggested by James, I took the time and created a little nitro-powered wiki to replace the PHP wiki on www.nitrohq.com. You can preview this wiki on www.rubyignited.com. Give it a try and if you find bugs or have any suggestions (about features, design, standards compliance etc) let me know. If everything goes well, I plan to to deploy this wiki on next Monday. regards, George. PS: just for fun, I added my picture. It would be interesting to see the faces of the people on this list, so if you feel like it, go ahead, add a photo of yours. All the dummy content and the pictures will be removed when this is deployed. -- http://www.nitrohq.com From james_b at neurogami.com Tue Jul 5 10:23:43 2005 From: james_b at neurogami.com (James Britt) Date: Tue, 05 Jul 2005 07:23:43 -0700 Subject: [Nitro] Nitro vs. Rails In-Reply-To: References: <200507040904.35267.dcorbin@machturtle.com> <42C938FC.50809@ntecs.de> <42C95C40.9030609@neurogami.com> Message-ID: <42CA97EF.904@neurogami.com> George Moschovitis wrote: > Hello James, > > >>Now, I want to be able to send an E-mail when someone registers, and as >>far as I can tell that is not built into Nitro (as it is in Rails). On >>... >>files total; which is about how many configuration files are part of a >>default Rails app. > > > You are wrong, please have a look at the file lib/nitro/mail.rb. This > actually quite similar to ActionMailer (In fact this is soo similar, > that got DHH quite nervous ;-)). For example usage, please have a look > at the blog example. Oh, OK, nice. I really have to dig through the code more to make sure I'm taking advantage of all that's there. > > I really have to add some documentation, people keep missing Nitro's > features ;-) Yeah! Knock off the coding! > > >>BTW, has anyone used ActionMailer with Nitro? I may go take a look. No >>reason to waste a perfectly good library ... > > > I tried to use ActionMailer but you have to include ActionPack, > ActiveSupport and the full stack to make this work. ARRGGHHHH! Really? I've got all that anyway because I'm running various Rails apps on the same server, but it's this sort of endless chain of dependency that annoys me. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From george.moschovitis at gmail.com Tue Jul 5 10:46:04 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jul 2005 17:46:04 +0300 Subject: [Nitro] Nitro vs. Rails In-Reply-To: <42CA97EF.904@neurogami.com> References: <200507040904.35267.dcorbin@machturtle.com> <42C938FC.50809@ntecs.de> <42C95C40.9030609@neurogami.com> <42CA97EF.904@neurogami.com> Message-ID: > Yeah! Knock off the coding! There is a lot more stuff to add. But I am working on docs too (really). > Really? I've got all that anyway because I'm running various Rails apps > on the same server, but it's this sort of endless chain of dependency > that annoys me. The real problem was that you had to use Erb for templates. I would like to use Nitro's great templating system. regards, George. -- http://www.nitrohq.com From james_b at neurogami.com Tue Jul 5 10:56:11 2005 From: james_b at neurogami.com (James Britt) Date: Tue, 05 Jul 2005 07:56:11 -0700 Subject: [Nitro] Have a first look ath new nitro wiki In-Reply-To: References: Message-ID: <42CA9F8B.3040900@neurogami.com> George Moschovitis wrote: > Hello all, > > As suggested by James, I took the time and created a little > nitro-powered wiki to replace the PHP wiki on www.nitrohq.com. > > You can preview this wiki on www.rubyignited.com. Give it a try and if > you find bugs or have any suggestions (about features, design, > standards compliance etc) let me know. If everything goes well, I plan > to to deploy this wiki on next Monday. Looks nice. The RSS feed seems sparse, though. And is it possible to get an RSS feed for specific pages? (That would be quite helpful for another project on my list.) > > regards, > George. > > PS: just for fun, I added my picture. It would be interesting to see > the faces of the people on this list, so if you feel like it, go > ahead, add a photo of yours. All the dummy content and the pictures > will be removed when this is deployed. I added a shot from my recent trip to Santa Fe, New Mexico. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From george.moschovitis at gmail.com Tue Jul 5 11:09:15 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jul 2005 18:09:15 +0300 Subject: [Nitro] Have a first look ath new nitro wiki In-Reply-To: <42CA9F8B.3040900@neurogami.com> References: <42CA9F8B.3040900@neurogami.com> Message-ID: > Looks nice. The RSS feed seems sparse, though. And is it possible to > get an RSS feed for specific pages? (That would be quite helpful for > another project on my list.) There was a caching problem, fixed it. RSS per page? Why is that useful? You mean return all revisions for a specific page as RSS? I can add this, but why is this useful? -g. -- http://www.nitrohq.com From james_b at neurogami.com Tue Jul 5 12:03:27 2005 From: james_b at neurogami.com (James Britt) Date: Tue, 05 Jul 2005 09:03:27 -0700 Subject: [Nitro] Have a first look ath new nitro wiki In-Reply-To: References: <42CA9F8B.3040900@neurogami.com> Message-ID: <42CAAF4F.1080409@neurogami.com> George Moschovitis wrote: >>Looks nice. The RSS feed seems sparse, though. And is it possible to >>get an RSS feed for specific pages? (That would be quite helpful for >>another project on my list.) > > > There was a caching problem, fixed it. > > RSS per page? Why is that useful? You mean return all revisions for a > specific page as RSS? No, as an RSS feed with a single item, with the page content. Or add page content to the items in the main feed, but that seems like it might get large. Might not be so important, if the pages are indeed proper XHTML. > I can add this, but why is this useful? I mainly want to ensure that I can fetch valid XML from a wiki for manipulation in the browser using JavaScript. Anyway, assuming you release the source, this is something I can hack myself for my own use. Oh, one other thing, a major peeve of mine: please remove the access keys, or limit them to key combinations that do not conflict with standard or common browser shortcuts. I use alt+d all the time to jump to the address bar, and this is default behavior in both Firefox and IE (at least on Windows). But on the wiki this seems to trigger some sort "diff view", impeding normal navigation. Thanks, James > > -g. > -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From james_b at neurogami.com Tue Jul 5 12:09:06 2005 From: james_b at neurogami.com (James Britt) Date: Tue, 05 Jul 2005 09:09:06 -0700 Subject: [Nitro] Have a first look ath new nitro wiki In-Reply-To: <42CAAF4F.1080409@neurogami.com> References: <42CA9F8B.3040900@neurogami.com> <42CAAF4F.1080409@neurogami.com> Message-ID: <42CAB0A2.4010205@neurogami.com> James Britt wrote: > George Moschovitis wrote: > >>> Looks nice. The RSS feed seems sparse, though. And is it possible to >>> get an RSS feed for specific pages? (That would be quite helpful for >>> another project on my list.) >> >> >> >> There was a caching problem, fixed it. >> >> RSS per page? Why is that useful? You mean return all revisions for a >> specific page as RSS? > > > No, as an RSS feed with a single item, with the page content. > > Or add page content to the items in the main feed, but that seems like > it might get large. > > Might not be so important, if the pages are indeed proper XHTML. But, sadly, they are not. :( The W3C validation page has some unknown issue with the declared encoding. http://validator.w3.org/check?verbose=1&uri=http%3A//www.rubyignited.com/ Also, the "meta" elements are not correct. The pages have but it should be (note the syntax for an empty element) James From george.moschovitis at gmail.com Tue Jul 5 16:33:14 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jul 2005 23:33:14 +0300 Subject: [Nitro] Have a first look ath new nitro wiki In-Reply-To: <42CAB0A2.4010205@neurogami.com> References: <42CA9F8B.3040900@neurogami.com> <42CAAF4F.1080409@neurogami.com> <42CAB0A2.4010205@neurogami.com> Message-ID: > But, sadly, they are not. :( > >.. > (note the syntax for an empty element) Ok, ok will fix this ;-) remember this is alpha software (in fact I worked on it for hours). -g. -- http://www.nitrohq.com From george.moschovitis at gmail.com Tue Jul 5 16:34:33 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jul 2005 23:34:33 +0300 Subject: [Nitro] Have a first look ath new nitro wiki In-Reply-To: <42CAAF4F.1080409@neurogami.com> References: <42CA9F8B.3040900@neurogami.com> <42CAAF4F.1080409@neurogami.com> Message-ID: > I use alt+d all the time to jump to the address bar, and this is default > behavior in both Firefox and IE (at least on Windows). But on the wiki > this seems to trigger some sort "diff view", impeding normal navigation. Oh I use alt+l to jump to the address bar. Ok I 'll change the alt+d accesskey. Thanks for pointing this out. I 'll also try to improve the rss feed. -g. -- http://www.nitrohq.com From kostas at nasis.com Tue Jul 5 17:27:28 2005 From: kostas at nasis.com (Kostas Nasis) Date: Tue, 05 Jul 2005 17:27:28 -0400 Subject: [Nitro] Have a first look ath new nitro wiki In-Reply-To: References: <42CA9F8B.3040900@neurogami.com> <42CAAF4F.1080409@neurogami.com> Message-ID: <42CAFB40.6040400@nasis.com> >Oh I use alt+l to jump to the address bar. Ok I 'll change the alt+d >accesskey. Thanks for pointing this out. > > Alt-L is bad too.... that's the shortcut for the LiveHTTPHeaders plugin in Firefox :) Sometimes hotkeys cause more problems than they're worth. The worst offenders for me are Freashmeat and Wikipedia, which map Alt-F to the search field. Alt-F of course, is the universal shortcut for the File menu in Windows. Kostas From ak at navel.gr Wed Jul 6 03:59:10 2005 From: ak at navel.gr (Anastasios Koutoumanos) Date: Wed, 06 Jul 2005 10:59:10 +0300 Subject: [Nitro] Just a simple one... In-Reply-To: References: <200507040904.35267.dcorbin@machturtle.com> <42C938FC.50809@ntecs.de> <42C95C40.9030609@neurogami.com> Message-ID: <42CB8F4E.4050301@navel.gr> Emmanuel Piperakis wrote: > Hi all, > my run.rb is: > > ... > Emmanuel, try to post your messages to a new thread when you open a new item. Do not respond to existing ones - it breaks the thread view of my mailer ;-) Regards! Tasos -- Navel, Greece http://www.navel.gr @@ +30 210 6898050 Navel does not accept liability for any errors, viruses or omissions in the contents of this message, which arise as a result of e-mail transmission. The full corporate policy is available on our web site. ____________________________________ Did you joy today? www.JOY.GR !!! From bernd at bdebl.de Wed Jul 6 16:07:53 2005 From: bernd at bdebl.de (Martin Bernd Schmeil) Date: Wed, 06 Jul 2005 22:07:53 +0200 Subject: [Nitro] Doc: Is there anything else but README and the Nitro / Og tutorials Message-ID: <42CC3A19.3060107@bdebl.de> Hi all, yesterday i stumbled across the Agile Web Development With Rails Book Review on Slashdot (again) and found out about Nitro / Og. Having very little experience with Ruby and none with Rails (yet) I wanted to know about the differences between Nitro and Rails. I got directed to this list read a bit in the archives, the above mentioned documents and took a look at the API docs (which seems to be almost none existent). Am I missing something? Can someone point me to the magic URL where I can download The Big Picture / Architecture / Overview of all Nitro components to send it to the printer in one piece? Don't get me wrong, what I read was quite impressive (especially Og), but I need to make a decision soon on what to use for some bigger web project and I fear that I would be lost without at least an overview. I still didn't find a comparison between Rails and Nitro / Og. If something like that exists can you please point me to it. I'm also interested to hear why people have converted from Rails to Nitro (if that ever happened) and what these people might be missing besides extensive documentation, books and hype. TIA! - Bernd From Aleksi.Niemela at cs.helsinki.fi Wed Jul 6 16:24:19 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Wed, 06 Jul 2005 23:24:19 +0300 Subject: [Nitro] Doc: Is there anything else but README and the Nitro / Og tutorials In-Reply-To: <42CC3A19.3060107@bdebl.de> References: <42CC3A19.3060107@bdebl.de> Message-ID: <42CC3DF3.1010206@cs.helsinki.fi> Martin Bernd Schmeil wrote: > yesterday i stumbled across the Agile Web Development With Rails Book > Review on Slashdot (again) and found out about Nitro / Og. Having very > little experience with Ruby and none with Rails (yet) I wanted to know > about the differences between Nitro and Rails. I got directed to this > list read a bit in the archives, the above mentioned documents and > took a look at the API docs (which seems to be almost none existent). > Am I missing something? Can someone point me to the magic URL where I > can download The Big Picture / Architecture / Overview of all Nitro > components to send it to the printer in one piece? > > > I still didn't find a comparison between Rails and Nitro / Og. If > something like that exists can you please point me to it. I'm also > interested to This one is quite recent thread. http://rubyforge.org/pipermail/nitro-general/2005-July/000524.html > Don't get me wrong, what I read was quite impressive (especially Og), but I need to make a > decision soon on what to use for some bigger web project and I fear that I would be lost > without at least an overview. Michael summarizes it well on that thread: Nitro is more generic, but probably Rails is a bit easier to use and start with. And Rails has a much broader community, better documentation and is more mature than Nitro. If I'd be you, starting a new big web project, I'd choose a tool I'm comfortable with. I'd take a stab on new ones in smaller projects or in prototyping or perhaps in dedicated "let's check if this tool is for us and where are the boundaries" job. But if you're really not afraid trying out new things in brand new projects there's probably nothing to stop you from using Nitro either. Except perhaps the docs you're after. And maturity of the frameworks (in which case I'd skip both). Let us hear how it went, whichever framework you choosed to take on. - Aleksi From Aleksi.Niemela at cs.helsinki.fi Wed Jul 6 16:34:06 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Wed, 06 Jul 2005 23:34:06 +0300 Subject: [Nitro] Simple message board solution? (patch for hierarchical.rb) In-Reply-To: References: <42C851EE.2060706@cs.helsinki.fi> Message-ID: <42CC403E.4020801@cs.helsinki.fi> George Moschovitis wrote: >Have you seen the Hierarchical/NestedSets OgMixins? >have a look at > >lib/og/mixin/hierarchical.rb > > Yes, I've noticed it. It seems not to be quite ready, but I suppose there's some interesting and working functionality in there if I'm able to decipher it. The problem was that it didn't work for me like the docs said. Code like class Message property :title, String ... include Hierarchical, :method => :nested_sets ... gave $ ruby test_hierarchy.rb /usr/lib/ruby/gems/1.8/gems/facets-0.7.2/lib/facet/macro.rb:68:in `include': undefined method `append_dynamic_features' for :Hierarchical:Symbol (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/facets-0.7.2/lib/facet/macro.rb:67:in `each' from /usr/lib/ruby/gems/1.8/gems/facets-0.7.2/lib/facet/macro.rb:67:in `include' from test_hierarchy.rb:18 and I was at loss what's going on. Then I figured out it should have been include Og::Hierarchical... (or include for module Og beforehand for right namespace). At first I was mislead by the error message (NoMethodError) so I suggest you could add some errorchecking to facets, if it's possible. Anyway, here's first patch for it. I didn't see #parent so I figured out a workaround, namely parent = Message[msg.message_oid]. But with this it's much easier. - Aleksi Aleksi at domor /lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/mixin $ diff -u hierarchical.rb~ hierarchical.rb --- hierarchical.rb~ 2005-07-03 22:48:15.222375000 +0300 +++ hierarchical.rb 2005-07-06 23:28:01.812500000 +0300 @@ -59,6 +59,14 @@ def child? (@#{parent} && @#{parent} != 0) && (@#{left} > 1) && (@#{right} > @#{left}) end + + def parent + if root? + nil + else + #{base}[@#{parent}] + end + end def #{children}_count return (@#{right} - @#{left} - 1)/2 From epiperak at softlab.ece.ntua.gr Wed Jul 6 22:42:56 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 7 Jul 2005 05:42:56 +0300 (EEST) Subject: [Nitro] Doc: Is there anything else but README and the Nitro / Og tutorials In-Reply-To: <42CC3A19.3060107@bdebl.de> References: <42CC3A19.3060107@bdebl.de> Message-ID: > like that exists can you please point me to it. I'm also interested to hear > why people have converted from Rails to Nitro (if that ever happened) and > what these people might be missing besides extensive documentation, books and > hype. I have converted from Rails to Nitro. If your application requires a lot of custom design, and it is not just a blog/CRUD type of web appli, then Nitro/Og is a better solution. All the difficult stuff I had to do for my v1.0 of my app had to be done in java, so what is the point of using a framework/web engine (as G. prefares to call it) if you must mix up your code so much. I also found the restrictiveness of Rails a bit tiring. Yet the documentation is good, examples are perfect for getting you started, and the #rubyonrails has some incredible people who help at any time! (G. shall we open #nitro channel?) Give us some details about the requirements of your app, and the use of it and we can tell you if Nitro/Og suffices... I am using it for Real Estate Investment Online Reporting system. (Does that sound important?) I also trust in G. to provide any custom, under the hood, advanced features, that the Nitro community requires. I am not sure that if you ask for something specific in Rails, if you will be heard... :-) 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 Thu Jul 7 03:14:30 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 7 Jul 2005 10:14:30 +0300 Subject: [Nitro] Doc: Is there anything else but README and the Nitro / Og tutorials In-Reply-To: <42CC3A19.3060107@bdebl.de> References: <42CC3A19.3060107@bdebl.de> Message-ID: > Don't get me wrong, what I read was quite impressive (especially Og), > but I need to make a decision soon on what to use for some bigger web > project and I fear that I would be lost without at least an overview. Hello Martin, thanks for joining the list! Here is the quick answer to your question: Rails is a lot more mature at the moment, but I would advice you to keep an eye on Nitro. The Rails framework is more or less finalised. With Nitro you still have the chance to influence the direction of the API. As more and more people start experimenting with Nitro the code will get better and more bugs will be revealed and fixed. It may be easier to work with Rails due to the larger amount of documentation, but I am helping every developer that uses Nitro and typically reported bugs are fixed and patches provided ASAP. Still, the lack of documentation issue is on top of my priorities. I hope this will be resolved real soon now! For some more help you can have a look at: - nitro/doc/RELEASES.txt in the nitro distribution - The beginning of a Nitro tutorial (for beginners) by James Britt (www.nitrohq.com) And stay tuned for a revamped nitrohq.com community site that will be deployed early next week. regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Thu Jul 7 03:20:56 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 7 Jul 2005 10:20:56 +0300 Subject: [Nitro] Simple message board solution? (patch for hierarchical.rb) In-Reply-To: <42CC403E.4020801@cs.helsinki.fi> References: <42C851EE.2060706@cs.helsinki.fi> <42CC403E.4020801@cs.helsinki.fi> Message-ID: Ok thanks for the patch. Btw, in the future there will be an improved hierarchical implementation based on the Nested Intervals pattern (instead of nested sets). There is some experimental code in the mixin directory if you want to play with this (tree.rb) regards, George. On 7/6/05, Aleksi Niemela wrote: > George Moschovitis wrote: > > >Have you seen the Hierarchical/NestedSets OgMixins? > >have a look at > > > >lib/og/mixin/hierarchical.rb > > > > > Yes, I've noticed it. It seems not to be quite ready, but I suppose > there's some interesting and working functionality in there if I'm able > to decipher it. The problem was that it didn't work for me like the docs > said. Code like > > class Message > property :title, String > ... > include Hierarchical, :method => :nested_sets > ... > > gave > > $ ruby test_hierarchy.rb > /usr/lib/ruby/gems/1.8/gems/facets-0.7.2/lib/facet/macro.rb:68:in > `include': undefined method `append_dynamic_features' > for :Hierarchical:Symbol (NoMethodError) > from > /usr/lib/ruby/gems/1.8/gems/facets-0.7.2/lib/facet/macro.rb:67:in `each' > from > /usr/lib/ruby/gems/1.8/gems/facets-0.7.2/lib/facet/macro.rb:67:in `include' > from test_hierarchy.rb:18 > > and I was at loss what's going on. Then I figured out it should have > been include Og::Hierarchical... (or include for module Og beforehand > for right namespace). At first I was mislead by the error message > (NoMethodError) so I suggest you could add some errorchecking to facets, > if it's possible. > > Anyway, here's first patch for it. I didn't see #parent so I figured out > a workaround, namely parent = Message[msg.message_oid]. But with this > it's much easier. > > - Aleksi > > > Aleksi at domor /lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/mixin > $ diff -u hierarchical.rb~ hierarchical.rb > --- hierarchical.rb~ 2005-07-03 22:48:15.222375000 +0300 > +++ hierarchical.rb 2005-07-06 23:28:01.812500000 +0300 > @@ -59,6 +59,14 @@ > def child? > (@#{parent} && @#{parent} != 0) && > (@#{left} > 1) && (@#{right} > @#{left}) > end > + > + def parent > + if root? > + nil > + else > + #{base}[@#{parent}] > + end > + end > > def #{children}_count > return (@#{right} - @#{left} - 1)/2 > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From bernd at bdebl.de Thu Jul 7 03:24:58 2005 From: bernd at bdebl.de (Martin Bernd Schmeil) Date: Thu, 07 Jul 2005 09:24:58 +0200 Subject: [Nitro] Docs? Thanks! Message-ID: <42CCD8CA.6070609@bdebl.de> Hi Aleksi. hi Emmanuel, thanks for replying. As I said I read quite a bit in this mailing list to figure out what it is all about Nitro. I read the Nitro / Og tutorials and the 4 days on Ruby tutorial. What I want to do is to build a "spare time" comunity, starting with just the basic web application stuff and an event calendar, then extending the whole thing with a lot of extra services around this. I'm planning this for many years now and made attempts with PHP, ACS (see http://www.openacs.org, i have been working for ArsDigita) and also have been little experiences with Java Web and persistence frameworks, basically the Red Hat Java "port" of ACS (whatever this is called now) and our own framework which glues Echo / EchoPoint with Hibernate. Again, I'm not an considering myself an expert on the technical side. I can design and write working applications, but I don't know about the terms and techniques in detail and i doubt i have been using them in the best way. A former collegue convinced me about a year ago, that Java developent costs too much time, Ruby is cool and Rails is great. Since I have been very busy the last month i didn't start and now I'm waiting for this pragmatic book, because this will lead me the way through all the stuff. But I am concerned about having not enough flexibility to extend such a thing and about performance and scalability. For Nitro I would be concerned about documentation and stability. Security i an issue too. From what I read it seems to me like Rails offers me fast development, but few or none flexibility. I don't need to have a high level framework that does everything on a mouse click. I'm used to build an application bottom up, i.e. starting with the datamodel. Og seems to be nice though and if there's not too much pain in migrating data after changing an objects properties, I would be happy to use it. Speaking about docs. The last time I suffered from a wrong decision was when I tried to do a Python / wxPhython / TWAIN project learning all of the parts at once and have almost none documentation for the later two (at least the wxPython mailing list was great). That made the effort at least two times as big and the result mediocre. I would like to avoid that. If you guys would help me understanding the many pieces of Nitro I'm willing to write that missing overview. Once the new Wiki is set up we might do that in a colloboratice way. Thanks again. Bernd From george.moschovitis at gmail.com Thu Jul 7 03:50:44 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 7 Jul 2005 10:50:44 +0300 Subject: [Nitro] Docs? Thanks! In-Reply-To: <42CCD8CA.6070609@bdebl.de> References: <42CCD8CA.6070609@bdebl.de> Message-ID: > From what I read it seems to me like Rails offers me fast development, Nitro offers *considerally* faster development than Rails. What may slow you down at the moment is lack of docs, and perhaps some unknown bugs. -g. -- http://www.nitrohq.com From epiperak at softlab.ece.ntua.gr Thu Jul 7 04:51:29 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 7 Jul 2005 11:51:29 +0300 (EEST) Subject: [Nitro] Not Solved Message-ID: I thought my debian was overeacting... So I installed Ruby, Nitro and Og on my windowsxp and mysql 4.1.12 Btw: in debian I unistalled older versions of Og/Nitro and I only had one.. This is what I get... ERROR: Ruby-Mysql bindings are not installed! ERROR: No such file to load -- mysql (LoadError) c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' c:/ruby/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store/mysql.rb:2 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 Thu Jul 7 05:19:27 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 7 Jul 2005 12:19:27 +0300 (EEST) Subject: [Nitro] Not Solved In-Reply-To: References: Message-ID: Just for reference. Even in the blog example I get the folloring error (in debian) www-weez at hercules:/home/www-weez/nitro/Examples/blog$ ruby -rubygems run.rb /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store.rb:24:in `for_name': /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store/mysql.rb:18:in `alias_method': undefined method `fetch_row' for class `Mysql::Result' (NameError) Any ideas? > I thought my debian was overeacting... So I installed Ruby, Nitro and Og on > my windowsxp and mysql 4.1.12 > > Btw: in debian I unistalled older versions of Og/Nitro and I only had one.. > > This is what I get... > > ERROR: Ruby-Mysql bindings are not installed! > ERROR: No such file to load -- mysql (LoadError) > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' > c:/ruby/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store/mysql.rb:2 > > 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 > 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 Thu Jul 7 05:34:49 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 7 Jul 2005 12:34:49 +0300 Subject: [Nitro] Not Solved In-Reply-To: References: Message-ID: Have you installed the mysql gem? gem install mysql -g. On 7/7/05, Emmanuel Piperakis wrote: > I thought my debian was overeacting... So I installed Ruby, Nitro and Og > on my windowsxp and mysql 4.1.12 > > Btw: in debian I unistalled older versions of Og/Nitro and I only had > one.. > > This is what I get... > > ERROR: Ruby-Mysql bindings are not installed! > ERROR: No such file to load -- mysql (LoadError) > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require__' > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' > c:/ruby/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store/mysql.rb:2 > > 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 > -- http://www.nitrohq.com From george.moschovitis at gmail.com Thu Jul 7 05:37:30 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 7 Jul 2005 12:37:30 +0300 Subject: [Nitro] Loosing connection to DB In-Reply-To: References: Message-ID: The new Mysql-Ruby 2.6 gem fixes this. Justed added a reconnect option in the MysqlStore. this will be available in the next release but you can manually patch this for the moment: lib/og/store/mysql.rb: def initialize ... options[:reconnect] = true unless options.has_key?(:reconnect) @conn.reconnect = options[:reconnect] end -g. On 6/22/05, George Moschovitis wrote: > Hello, > > > It sounds like the mysql db connection is not being closed after it is used. > > this might be the problem, I remember a similar problem with the sqlite adapter. > thanks for pointing out! > > -g. > > -- > http://nitro.rubyforge.org > http://www.joy.gr > -- http://www.nitrohq.com From epiperak at softlab.ece.ntua.gr Thu Jul 7 05:51:12 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 7 Jul 2005 12:51:12 +0300 (EEST) Subject: [Nitro] Not Solved In-Reply-To: References: Message-ID: Yes... C:\>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install mysql Attempting local installation of 'mysql' Local gem file not found: mysql*.gem Attempting remote installation of 'mysql' Building native extensions. This could take a while... 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.6 for 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.6/gem_make.out for windows.... and for debian the installation of the mysql gem succeeds but then ... www-weez at hercules:/home/www-weez/nitro/rep$ ruby -rubygems run.rb /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store.rb:24:in `for_name': /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store/mysql.rb:18:in `alias_method': undefined method `fetch_row' for class `Mysql::Result' (NameError) from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store/mysql.rb:18 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' from (eval):2:in `for_name' from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/manager.rb:43:in `eval' from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store.rb:24:in `for_name' from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/manager.rb:43:in `initialize' from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/manager.rb:192:in `new' from /usr/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/manager.rb:192:in `setup' from run.rb:23 from run.rb:16:in `run' from run.rb:16 Also, even if I take the Og. init part out of the run.rb it can not find any of the other classes, eg Localization, Dispatcher (even though I require them) > Have you installed the mysql gem? > > gem install mysql > > -g. > > On 7/7/05, Emmanuel Piperakis wrote: >> I thought my debian was overeacting... So I installed Ruby, Nitro and Og >> on my windowsxp and mysql 4.1.12 >> >> Btw: in debian I unistalled older versions of Og/Nitro and I only had >> one.. >> >> This is what I get... >> >> ERROR: Ruby-Mysql bindings are not installed! >> ERROR: No such file to load -- mysql (LoadError) >> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in >> `require__' >> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' >> c:/ruby/lib/ruby/gems/1.8/gems/og-0.19.0/lib/og/store/mysql.rb:2 >> >> 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 >> > > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > 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 Thu Jul 7 06:04:50 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 7 Jul 2005 13:04:50 +0300 Subject: [Nitro] the new wiki Message-ID: I 've started copying the content of the old wiki to the new one. Please feel free to add new stuff to the new wiki at www.rubyignited.com. On Monday I 'll change the DNS so that nitrohq.com points to the new wiki. James, can you please add all chapters of your tutorial? -g. -- http://www.nitrohq.com From dcorbin at enttek.com Thu Jul 7 06:54:20 2005 From: dcorbin at enttek.com (David Corbin) Date: Thu, 7 Jul 2005 06:54:20 -0400 Subject: [Nitro] Docs? Thanks! In-Reply-To: References: <42CCD8CA.6070609@bdebl.de> Message-ID: <200507070654.21579.dcorbin@enttek.com> On Thursday 07 July 2005 03:50, George Moschovitis wrote: > > From what I read it seems to me like Rails offers me fast development, > > Nitro offers *considerally* faster development than Rails. Please elaborate on why it's consdierably faster than Rails? David From james_b at neurogami.com Thu Jul 7 09:33:38 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 07 Jul 2005 06:33:38 -0700 Subject: [Nitro] the new wiki In-Reply-To: References: Message-ID: <42CD2F32.3030709@neurogami.com> George Moschovitis wrote: > I 've started copying the content of the old wiki to the new one. > Please feel free to add new stuff to the new wiki at > www.rubyignited.com. On Monday I 'll change the DNS so that > nitrohq.com points to the new wiki. > > James, can you please add all chapters of your tutorial? Sure. James > > -g. > -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From james_b at neurogami.com Thu Jul 7 09:39:12 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 07 Jul 2005 06:39:12 -0700 Subject: [Nitro] Not Solved In-Reply-To: References: Message-ID: <42CD3080.9070304@neurogami.com> Emmanuel Piperakis wrote: > Yes... > > C:\>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" install mysql > Attempting local installation of 'mysql' > Local gem file not found: mysql*.gem > Attempting remote installation of 'mysql' > Building native extensions. This could take a while... > ERROR: While executing gem ... (RuntimeError) > ERROR: Failed to build gem native extension. This is not installed. I believe this gem expects to compile native code to build a binary extension. There is a pure-Ruby MySQL library, though I do not think it is a gem. This is what I've been using on Win2k and WinXP, as I've not been able to compile the native code. I believe Rails includes this pure-Ruby MySQL lib as part of ActiveRecord, and it may make sense to do the same with Og, possibly munging the Og code so that it tries to load the user's own MySQL lib, if installed, but falling back to the pure-Ruby version. See http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/136505 for general info. Note that the URL in the message has changed, so get the library code from http://www.tmtm.org/en/ruby/mysql/ I noticed that the page says " Currently, this cannot be used for MySQL 4.1.x." The lib distributed with Rails works fine with 4.1.x, and I *thought* they had ensured that the changes they added to the lib were ported back to the source distribution, but maybe not. Try it and see (assuming you have MySQL 4.1) and give a yell if you have trouble. (At worst I can probably just post or send the version included in Rails.) James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From george.moschovitis at gmail.com Thu Jul 7 10:10:24 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 7 Jul 2005 17:10:24 +0300 Subject: [Nitro] Not Solved In-Reply-To: <42CD3080.9070304@neurogami.com> References: <42CD3080.9070304@neurogami.com> Message-ID: Hello James, I tried to use the pure ruby mysql adapter from Rails and it gave me the followig error: ERROR: Ruby-Mysql bindings are not installed! ERROR: Trying to uses the pure-Ruby binding included in Og /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in `initialize': No such file or directory - /tmp/mysql.sock (Errno::ENOENT) from /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in `new' from /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in `real_connect' from /home/gmosx/public/og/lib/vendor/mysql.rb:91:in `initialize' from /home/gmosx/public/og/lib/vendor/mysql.rb:1084:in `new' from /home/gmosx/public/og/lib/vendor/mysql.rb:1084:in `connect' Any ideas? regards, George. -- http://www.nitrohq.com From alang at cronosys.com Thu Jul 7 10:14:07 2005 From: alang at cronosys.com (Alan Garrison) Date: Thu, 07 Jul 2005 10:14:07 -0400 Subject: [Nitro] the new wiki In-Reply-To: References: Message-ID: <42CD38AF.8080805@cronosys.com> George Moschovitis wrote: >I 've started copying the content of the old wiki to the new one. >Please feel free to add new stuff to the new wiki at >www.rubyignited.com. On Monday I 'll change the DNS so that >nitrohq.com points to the new wiki. > >James, can you please add all chapters of your tutorial? > >-g. > > > Not a big problem, but if you go just to "rubyignited.com" you get a 502 Bad Gateway error (at least I do). I guess I'll have to type out those four additional characters. ;) -- Alan Garrison Cronosys, LLC Phone: 216-221-4600 ext 308 From george.moschovitis at gmail.com Thu Jul 7 10:23:27 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 7 Jul 2005 17:23:27 +0300 Subject: [Nitro] the new wiki In-Reply-To: <42CD38AF.8080805@cronosys.com> References: <42CD38AF.8080805@cronosys.com> Message-ID: Ok, will have to fix this when changing back to www.nitrohq.com -g. On 7/7/05, Alan Garrison wrote: > George Moschovitis wrote: > > >I 've started copying the content of the old wiki to the new one. > >Please feel free to add new stuff to the new wiki at > >www.rubyignited.com. On Monday I 'll change the DNS so that > >nitrohq.com points to the new wiki. > > > >James, can you please add all chapters of your tutorial? > > > >-g. > > > > > > > > Not a big problem, but if you go just to "rubyignited.com" you get a 502 > Bad Gateway error (at least I do). I guess I'll have to type out those > four additional characters. ;) > > -- > Alan Garrison > Cronosys, LLC > Phone: 216-221-4600 ext 308 > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From james_b at neurogami.com Thu Jul 7 11:09:05 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 07 Jul 2005 08:09:05 -0700 Subject: [Nitro] Not Solved In-Reply-To: References: <42CD3080.9070304@neurogami.com> Message-ID: <42CD4591.7050700@neurogami.com> George Moschovitis wrote: > Hello James, > > I tried to use the pure ruby mysql adapter from Rails and it gave me > the followig error: > > ERROR: Ruby-Mysql bindings are not installed! > ERROR: Trying to uses the pure-Ruby binding included in Og > /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in `initialize': No > such file or directory - /tmp/mysql.sock (Errno::ENOENT) > from /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in `new' > from /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in `real_connect' > from /home/gmosx/public/og/lib/vendor/mysql.rb:91:in `initialize' > from /home/gmosx/public/og/lib/vendor/mysql.rb:1084:in `new' > from /home/gmosx/public/og/lib/vendor/mysql.rb:1084:in `connect' > > Any ideas? I *think* you may need to tell it where to find the MySQL socket file. For example, on my main server, the file lives at /var/lib/mysql/mysql.sock If your installation of mysql is not putting it in /tmp, then find out where it is and change (I think) the ruby mysql lib. Or make as symlink from /tmp/mysql.sock to the real location -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From bernd at bdebl.de Thu Jul 7 15:00:44 2005 From: bernd at bdebl.de (Martin Bernd Schmeil) Date: Thu, 07 Jul 2005 21:00:44 +0200 Subject: [Nitro] Doc: Is there anything else but README and the Nitro / Og tutorials Message-ID: <42CD7BDC.1040900@bdebl.de> Hi George, thanks for the warm welcome and offering for help in case I'd use Nitro / Og. But please call me Bernd, the Bernd! As I said I read all the available docs. I think I'll give Nitro a try, since I like the idea to participate in a project like this directly or indirectly. I'll read the Pragmatic Rails book too, since I like the writing style of the Pragmatic Bookshelf books and probably can benefit from some ideas, either to find similar features in Nitro too or at least knowing to ask how to do those things in Nitro. I'm not in a hurry with my project. I have a real 50 hours job. So I hope my project, experience and the docs will evolve over the time and as needed. Thanks! - Bernd From jlsysinc at alltel.net Thu Jul 7 18:47:30 2005 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Thu, 7 Jul 2005 18:47:30 -0400 Subject: [Nitro] Setup and/or configure parameters Message-ID: <009701c58345$db674f10$0200000a@agamemnon> I couldn't find any documention on this so I was looking at the test code and found the following: ------------------- =begin def test_kirby @og = Og.setup( :destroy => true, :store => :kirby, :name => 'test', :embedded => true ) features_test # conversions_test end =end =begin def test_psql @og = Og.setup( :destroy => true, :store => :psql, :name => 'test', :min_messages => 'ERROR', :user => 'postgres', :password => 'navelrulez' ) features_test conversions_test end =end =begin def test_mysql @og = Og.setup( :destroy => true, :store => :mysql, :name => 'test', :user => 'root', :table_type => 'InnoDB', :password => 'navelrulez' ) features_test # conversions_test end =end #=begin def test_sqlite @og = Og.setup( :destroy => true, :store => :sqlite, :name => 'test' ) features_test conversions_test end #=end =begin def test_memory @og = Og.setup( :store => :memory, :name => :test, :destroy => true ) features_test end =end ----------------------- What are the valid symbols for setup or do you use config now? Is :destroy like delete the entire database? tablespace? table? I'm especially interested in SQLite3. -- J Lambert From epiperak at softlab.ece.ntua.gr Thu Jul 7 22:11:01 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Fri, 8 Jul 2005 05:11:01 +0300 (EEST) Subject: [Nitro] Not Solved In-Reply-To: <42CD4591.7050700@neurogami.com> References: <42CD3080.9070304@neurogami.com> <42CD4591.7050700@neurogami.com> Message-ID: Solved! James your instructions were perfect! Nitro and Og work on winXP/SP2, mysql 4.1.12 perfectly, and on debian/sarge, mysql 4.0.23 At last! LET THE CODING BEGIN! If anybody needs details about the Debian installation contact me. > George Moschovitis wrote: >> Hello James, >> >> I tried to use the pure ruby mysql adapter from Rails and it gave me >> the followig error: >> >> ERROR: Ruby-Mysql bindings are not installed! >> ERROR: Trying to uses the pure-Ruby binding included in Og >> /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in `initialize': No >> such file or directory - /tmp/mysql.sock (Errno::ENOENT) >> from /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in `new' >> from /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in >> `real_connect' >> from /home/gmosx/public/og/lib/vendor/mysql.rb:91:in `initialize' >> from /home/gmosx/public/og/lib/vendor/mysql.rb:1084:in `new' >> from /home/gmosx/public/og/lib/vendor/mysql.rb:1084:in `connect' >> >> Any ideas? > > I *think* you may need to tell it where to find the MySQL socket file. > > For example, on my main server, the file lives at /var/lib/mysql/mysql.sock > > If your installation of mysql is not putting it in /tmp, then find out where > it is and change (I think) the ruby mysql lib. Or make as symlink from > /tmp/mysql.sock to the real location > > > > > > > > -- > > http://www.ruby-doc.org - The Ruby Documentation Site > http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML > http://www.rubystuff.com - The Ruby Store for Ruby Stuff > http://www.jamesbritt.com - Playing with Better Toys > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > 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 Fri Jul 8 02:34:15 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 8 Jul 2005 09:34:15 +0300 Subject: [Nitro] Not Solved In-Reply-To: References: <42CD3080.9070304@neurogami.com> <42CD4591.7050700@neurogami.com> Message-ID: nice to hear, I added automatic fallback to the pure ruby driver as well. Nice to hear this was resolved for you. -g. On 7/8/05, Emmanuel Piperakis wrote: > Solved! James your instructions were perfect! Nitro and Og work on > winXP/SP2, mysql 4.1.12 perfectly, and on debian/sarge, mysql 4.0.23 > > At last! LET THE CODING BEGIN! > > If anybody needs details about the Debian installation contact me. > > > George Moschovitis wrote: > >> Hello James, > >> > >> I tried to use the pure ruby mysql adapter from Rails and it gave me > >> the followig error: > >> > >> ERROR: Ruby-Mysql bindings are not installed! > >> ERROR: Trying to uses the pure-Ruby binding included in Og > >> /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in `initialize': No > >> such file or directory - /tmp/mysql.sock (Errno::ENOENT) > >> from /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in `new' > >> from /home/gmosx/public/og/lib/vendor/mysql411.rb:43:in > >> `real_connect' > >> from /home/gmosx/public/og/lib/vendor/mysql.rb:91:in `initialize' > >> from /home/gmosx/public/og/lib/vendor/mysql.rb:1084:in `new' > >> from /home/gmosx/public/og/lib/vendor/mysql.rb:1084:in `connect' > >> > >> Any ideas? > > > > I *think* you may need to tell it where to find the MySQL socket file. > > > > For example, on my main server, the file lives at /var/lib/mysql/mysql.sock > > > > If your installation of mysql is not putting it in /tmp, then find out where > > it is and change (I think) the ruby mysql lib. Or make as symlink from > > /tmp/mysql.sock to the real location > > > > > > > > > > > > > > > > -- > > > > http://www.ruby-doc.org - The Ruby Documentation Site > > http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML > > http://www.rubystuff.com - The Ruby Store for Ruby Stuff > > http://www.jamesbritt.com - Playing with Better Toys > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > 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 > -- http://www.nitrohq.com From dcorbin at machturtle.com Fri Jul 8 05:57:03 2005 From: dcorbin at machturtle.com (David Corbin) Date: Fri, 8 Jul 2005 05:57:03 -0400 Subject: [Nitro] properties Message-ID: <200507080557.03167.dcorbin@machturtle.com> Are properties also attributes, or are they stored "some other way", such as in a hash? David From george.moschovitis at gmail.com Fri Jul 8 07:23:20 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 8 Jul 2005 14:23:20 +0300 Subject: [Nitro] properties In-Reply-To: <200507080557.03167.dcorbin@machturtle.com> References: <200507080557.03167.dcorbin@machturtle.com> Message-ID: No, ulike AR, Nitro's properties are *standard Ruby attributes*. Nitro/Og handles 100% ruby objects, not 'objects' (in reality hashes) like AR. -g. On 7/8/05, David Corbin wrote: > Are properties also attributes, or are they stored "some other way", such as > in a hash? > > David > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Fri Jul 8 08:44:50 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 8 Jul 2005 15:44:50 +0300 Subject: [Nitro] New NitroHQ page. Message-ID: Hello all, as you can see I finally updated the nitrohq.com page. I would really appreciate it, if you could add a link to this site in your personal pages. Please, feel free to participate in this community site by adding bug reports, wish items, collaboratively work on documentation and anything Nitro/Og related. regards, George. -- http://www.nitrohq.com From james_b at neurogami.com Fri Jul 8 10:15:28 2005 From: james_b at neurogami.com (James Britt) Date: Fri, 08 Jul 2005 07:15:28 -0700 Subject: [Nitro] New NitroHQ page. In-Reply-To: References: Message-ID: <42CE8A80.6030007@neurogami.com> George Moschovitis wrote: > Hello all, > > as you can see I finally updated the nitrohq.com page. I would really > appreciate it, if you could add a link to this site in your personal > pages. Please, feel free to participate in this community site by > adding bug reports, wish items, collaboratively work on documentation > and anything Nitro/Og related. Ahhhh! Stop The Access Keys! :) Really, it's driving me nuts. I tried to jump to the address bar so I can copy and paste the URL in to a blog entry, and the page starts dancing on me when I use alt+d. Does anyone know how to turn these effin' things off in Firefox? Maybe I need a Greasemonkey script to just remove all access keys ... Hey, look: http://www.shlomifish.org/open-source/bits-and-bobs/greasemonkey/grease.html James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From james_b at neurogami.com Fri Jul 8 11:33:50 2005 From: james_b at neurogami.com (James Britt) Date: Fri, 08 Jul 2005 08:33:50 -0700 Subject: [Nitro] New NitroHQ page. In-Reply-To: References: Message-ID: <42CE9CDE.4080508@neurogami.com> George Moschovitis wrote: > Hello all, > > as you can see I finally updated the nitrohq.com page. I would really > appreciate it, if you could add a link to this site in your personal > pages. Please, feel free to participate in this community site by > adding bug reports, wish items, collaboratively work on documentation > and anything Nitro/Og related. I added the remaining Nitro Step-by-step chapters. Please note that this tutorial was started a few months ago, and put on hold while there were changes made to the Nitro/Og API, so read with caution. Please try to follow along, run the code, and add comments and corrections if you find something wrong. http://www.nitrohq.com/view/Nitro_Step_by_Step Thanks, James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From jpshack at gmail.com Fri Jul 8 11:57:23 2005 From: jpshack at gmail.com (John-Mason P. Shackelford) Date: Fri, 8 Jul 2005 10:57:23 -0500 Subject: [Nitro] New NitroHQ page. In-Reply-To: <42CE9CDE.4080508@neurogami.com> References: <42CE9CDE.4080508@neurogami.com> Message-ID: <83f770ff05070808577862c052@mail.gmail.com> What happened to the old nitro logo? -- John-Mason Shackelford Software Developer Pearson Educational Measurement 2510 North Dodge St. Iowa City, IA 52245 ph. 319-354-9200x6214 john-mason.shackelford at pearson.com http://pearsonedmeasurement.com From steven at lumos.us Fri Jul 8 16:26:40 2005 From: steven at lumos.us (Steven Lumos) Date: Fri, 08 Jul 2005 13:26:40 -0700 Subject: [Nitro] New NitroHQ page. References: <42CE8A80.6030007@neurogami.com> Message-ID: <86ackx2ge7.fsf@bitty.lumos.us> James Britt writes: > Really, it's driving me nuts. I tried to jump to the address bar so I > can copy and paste the URL in to a blog entry, and the page starts > dancing on me when I use alt+d. > > Does anyone know how to turn these effin' things off in Firefox? > Maybe I need a Greasemonkey script to just remove all access keys ... > > Hey, look: > http://www.shlomifish.org/open-source/bits-and-bobs/greasemonkey/grease.html If you want them off everywhere, setting ui.key.generalAccessKey = 0 seems to be a better solution. I like access keys, but I did't even know Firefox had default bindings that used alt. I use Control+L instead of Alt+D for example. Steve From james_b at neurogami.com Fri Jul 8 17:49:25 2005 From: james_b at neurogami.com (James Britt) Date: Fri, 08 Jul 2005 14:49:25 -0700 Subject: [Nitro] New NitroHQ page. In-Reply-To: <86ackx2ge7.fsf@bitty.lumos.us> References: <42CE8A80.6030007@neurogami.com> <86ackx2ge7.fsf@bitty.lumos.us> Message-ID: <42CEF4E5.1020901@neurogami.com> Steven Lumos wrote: > James Britt writes: > >>Really, it's driving me nuts. I tried to jump to the address bar so I >>can copy and paste the URL in to a blog entry, and the page starts >>dancing on me when I use alt+d. >> >>Does anyone know how to turn these effin' things off in Firefox? >>Maybe I need a Greasemonkey script to just remove all access keys ... >> >>Hey, look: >>http://www.shlomifish.org/open-source/bits-and-bobs/greasemonkey/grease.html > > > If you want them off everywhere, setting ui.key.generalAccessKey = 0 > seems to be a better solution. I like access keys, but I did't even > know Firefox had default bindings that used alt. I use Control+L > instead of Alt+D for example. Ah so. Thanks for the tip. I can hit alt+d with one hand, though, while ctrl+l is a stretch or 2-hander on my laptop (which has but one ctrl key) One advantage to the GM script is that I can target and/or exempt specific sites, allowing access keys where they be actually handy. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From george.moschovitis at gmail.com Sat Jul 9 00:50:06 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 9 Jul 2005 07:50:06 +0300 Subject: [Nitro] New NitroHQ page. In-Reply-To: <83f770ff05070808577862c052@mail.gmail.com> References: <42CE9CDE.4080508@neurogami.com> <83f770ff05070808577862c052@mail.gmail.com> Message-ID: > What happened to the old nitro logo? Both the old and the new logo are experimental. I am not satisfied with either of them. BTW, I would like to see suggestions for the logo if anyone on this list is artistically inclined ;-) -g. -- http://www.nitrohq.com From dcorbin at machturtle.com Sat Jul 9 07:45:57 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sat, 9 Jul 2005 07:45:57 -0400 Subject: [Nitro] New NitroHQ page. In-Reply-To: References: <83f770ff05070808577862c052@mail.gmail.com> Message-ID: <200507090745.57583.dcorbin@machturtle.com> On Saturday 09 July 2005 12:50 am, George Moschovitis wrote: > > What happened to the old nitro logo? > > Both the old and the new logo are experimental. I am not satisfied > with either of them. BTW, I would like to see suggestions for the logo > if anyone on this list is artistically inclined ;-) > > -g. Is the old logo visible somewhere? I can imagine a great logo for Og, though I'm not artistic enough to create it. Essentially, you create a directed graph of nodes where the graph spells Og. (or Object Graph), if you prefer. From dcorbin at machturtle.com Sat Jul 9 18:55:51 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sat, 9 Jul 2005 18:55:51 -0400 Subject: [Nitro] New NitroHQ page. In-Reply-To: References: Message-ID: <200507091855.51719.dcorbin@machturtle.com> On Friday 08 July 2005 08:44 am, George Moschovitis wrote: > Hello all, > > as you can see I finally updated the nitrohq.com page. I would really > appreciate it, if you could add a link to this site in your personal > pages. Please, feel free to participate in this community site by > adding bug reports, wish items, collaboratively work on documentation > and anything Nitro/Og related. > > regards, > George. I click on "Documentation" on the main page, and it takes me to an empty edit page. Not quite what I expected. Also, I noticed the title is always the same. From dcorbin at machturtle.com Sat Jul 9 19:41:03 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sat, 9 Jul 2005 19:41:03 -0400 Subject: [Nitro] Og::Database Message-ID: <200507091941.03214.dcorbin@machturtle.com> The tutorials indicate you should construct an Og::Database object to specify database connectivity details. Despite having required 'og', it doesn't seem to recognize the class Og::Database. Looking through the Og code, I can't find any place such a class exists. Pointers? David From Aleksi.Niemela at cs.helsinki.fi Sun Jul 10 02:28:09 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Sun, 10 Jul 2005 09:28:09 +0300 Subject: [Nitro] Og::Database In-Reply-To: <200507091941.03214.dcorbin@machturtle.com> References: <200507091941.03214.dcorbin@machturtle.com> Message-ID: <42D0BFF9.40202@cs.helsinki.fi> David Corbin wrote: >The tutorials indicate you should construct an Og::Database object to specify >database connectivity details. Despite having required 'og', it doesn't seem >to recognize the class Og::Database. Looking through the Og code, I can't >find any place such a class exists. > > David, things should work out like the tutorial points out. You need to 1) get the library loaded, 2) declare your data, 3) setup the classes to be managed and 4) start using them. I've just copied here the relevant parts, so you can see their connections: # 1) require 'og' # 2) class Comment property :body, String def initialize(body = nil) @body = body end def to_s return @body end end # 3) config = { :destroy => true, # destroy table created from earlier runs. :store => 'psql', :name => 'test', # name for the database to use :user => "postgres", :password => "navelrulez" } # 3) db = Og.setup(config) # 4) a1 = Article.new('Title1', 'Body1') a1.save --------- The step 3 does most of the magic. It finds out which classes should be managed, creates a Manager object to manage database related things and in turn finds out which Store object (in this case PsqlStore) should be created to handle real access to the database. So in essence you won't find just one class Database doing everything but it's responsibilities are divided between multiple classes (and nicely so) of which few most interesting ones are Manager, Store and it's specific implementation for each different database, like for Postgres that is PsqlStore. I wonder what exactly would you want to do with object of Database? - Aleksi From bernd at bdebl.de Sun Jul 10 05:23:08 2005 From: bernd at bdebl.de (Martin Bernd Schmeil) Date: Sun, 10 Jul 2005 11:23:08 +0200 Subject: [Nitro] require og / gems problem Message-ID: <42D0E8FC.30906@bdebl.de> Hi all, just tried to install Nitro / Og (on a freshly insalled Fedora Core 4) and ran into a problem which i probaly can solve myself, but you can save me a lot of time if you answer this. Also when I installed Nitro and Og with gem I got a few error messages related to RDoc and it would be nice if someone could confirm that I have everthing I need installed. Thanks. [schmeil at localhost bdebl]$ ruby test.rb test.rb:1:in `require': No such file to load -- og (LoadError) from test.rb:1 - and - [schmeil at localhost bdebl]$ gem list *** LOCAL GEMS *** facets (0.7.2) glue (0.19.0) nitro (0.19.0) og (0.19.0) RedCloth (3.0.3) ruby-breakpoint (0.5.0) sources (0.0.1) From nospam at lunacymaze.org Sun Jul 10 05:28:53 2005 From: nospam at lunacymaze.org (Ghislain Mary) Date: Sun, 10 Jul 2005 11:28:53 +0200 Subject: [Nitro] require og / gems problem In-Reply-To: <42D0E8FC.30906@bdebl.de> References: <42D0E8FC.30906@bdebl.de> Message-ID: <42D0EA55.1040006@lunacymaze.org> Hi, Martin Bernd Schmeil a ?crit : > Hi all, > > just tried to install Nitro / Og (on a freshly insalled Fedora Core 4) > and ran into a problem which i probaly can solve myself, but you can > save me a lot of time if you answer this. Also when I installed Nitro > and Og with gem I got a few error messages related to RDoc and it would > be nice if someone could confirm that I have everthing I need installed. > Thanks. > > [schmeil at localhost bdebl]$ ruby test.rb > test.rb:1:in `require': No such file to load -- og (LoadError) > from test.rb:1 > Your problem is that you installed nitro using rubygems, and so you must require 'rubygems' before requiring nitro or og. So you can do: $ ruby -rubygems test.rb Or, another solution is to define to put this option in the RUBYOPT environment variable. Assuming you're using bash, this gives: $ export RUBYOPT=-rubygems Hope that helps, Ghislain From arcatan at gmail.com Sun Jul 10 06:07:18 2005 From: arcatan at gmail.com (Miikka Koskinen) Date: Sun, 10 Jul 2005 03:07:18 -0700 Subject: [Nitro] Og and SQL injection Message-ID: <95f8063050710030714857f1d@mail.gmail.com> Hello everybody! I'm writing a little atom/rss aggregator using Og (and a web UI for it using Nitro). Now I'm wondering this: If I want to, say, find an entry from database which title is something and author is something and these variables are given by user, I've used this kind of code: Entry.find(:condition => "title = '#{title}' AND author = '#{author}'") Do I have to do some kind of escaping to title and author variables to prevent SQL injection attacks? By the way, thank you for developing Og, it's wonderful. I hate SQL. -- Miikka Koskinen aka arcatan From george.moschovitis at gmail.com Sun Jul 10 07:04:08 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 10 Jul 2005 14:04:08 +0300 Subject: [Nitro] Og and SQL injection In-Reply-To: <95f8063050710030714857f1d@mail.gmail.com> References: <95f8063050710030714857f1d@mail.gmail.com> Message-ID: Hello and welcome to the list! > Entry.find(:condition => "title = '#{title}' AND author = '#{author}'") > Do I have to do some kind of escaping to title and author variables to > prevent SQL injection attacks? At the moment you have to use the escape method of each store. However, you are right Og should probably automatically escape all interpolated sql queries. Unless, anyone has any valid objection, I am adding this new behaviour in the next version (scheduled for this week). > By the way, thank you for developing Og, it's wonderful. I hate SQL. Stay tuned for more cool features (and docs). -g. -- http://www.nitrohq.com From bernd at bdebl.de Sun Jul 10 07:11:49 2005 From: bernd at bdebl.de (Martin Bernd Schmeil) Date: Sun, 10 Jul 2005 13:11:49 +0200 Subject: [Nitro] require og / gems problem In-Reply-To: <42D0EA55.1040006@lunacymaze.org> References: <42D0E8FC.30906@bdebl.de> <42D0EA55.1040006@lunacymaze.org> Message-ID: <42D10275.8080203@bdebl.de> Hi, thanks a lot. A read about the -rubgems option somewhere but misinterpreted the meaning (thought it would be equal to calling gem). I also assumed there's a path or something environment variable. Thanks! - tB! From dcorbin at machturtle.com Sun Jul 10 07:28:47 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sun, 10 Jul 2005 07:28:47 -0400 Subject: [Nitro] Og::Database In-Reply-To: <42D0BFF9.40202@cs.helsinki.fi> References: <200507091941.03214.dcorbin@machturtle.com> <42D0BFF9.40202@cs.helsinki.fi> Message-ID: <200507100728.47460.dcorbin@machturtle.com> On Sunday 10 July 2005 02:28 am, Aleksi Niemela wrote: > David Corbin wrote: > >The tutorials indicate you should construct an Og::Database object to > > specify database connectivity details. Despite having required 'og', it > > doesn't seem to recognize the class Og::Database. Looking through the Og > > code, I can't find any place such a class exists. > > > # 3) > db = Og.setup(config) This is different than the tutorials. They show Og::Database.new(...). The tutorials I'm talking about are in the nitrohq.com wiki. David From james_b at neurogami.com Sun Jul 10 09:16:55 2005 From: james_b at neurogami.com (James Britt) Date: Sun, 10 Jul 2005 06:16:55 -0700 Subject: [Nitro] Og and SQL injection In-Reply-To: References: <95f8063050710030714857f1d@mail.gmail.com> Message-ID: <42D11FC7.5060001@neurogami.com> George Moschovitis wrote: > Hello and welcome to the list! > > >> Entry.find(:condition => "title = '#{title}' AND author = '#{author}'") >>Do I have to do some kind of escaping to title and author variables to >>prevent SQL injection attacks? > > > At the moment you have to use the escape method of each store. > However, you are right Og should probably automatically escape all > interpolated sql queries. Unless, anyone has any valid objection, I am > adding this new behaviour in the next version (scheduled for this > week). So long as there is a simple way to turn it off. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From nospam at lunacymaze.org Sun Jul 10 20:04:06 2005 From: nospam at lunacymaze.org (Ghislain Mary) Date: Mon, 11 Jul 2005 02:04:06 +0200 Subject: [Nitro] Nitro Tutorial and templating system Message-ID: <42D1B776.5080806@lunacymaze.org> Hi all, Just looking at the Nitro Step By Step tutorial, it is often said that when rendering a page Nitro starts by looking for an .html file, then for an .xhtml file and then for other magical stuffs. However, I can not figure out this behavior with Nitro 0.19.0. It doesn't look like nitro is looking for an .html file at all. This must have been the case before but is no longer true since an unknown version number. So, is it normal? Will this still be the case in future releases? Oh, I was forgetting. James, do you have the basic mockup your telling about at the end of the first chapter? Or should we take an extract from the blog example, that we could strip a little to give it a more tutorial like style (a more basic style)? Thanks, Ghislain From james_b at neurogami.com Sun Jul 10 20:30:16 2005 From: james_b at neurogami.com (James Britt) Date: Sun, 10 Jul 2005 17:30:16 -0700 Subject: [Nitro] Nitro Tutorial and templating system In-Reply-To: <42D1B776.5080806@lunacymaze.org> References: <42D1B776.5080806@lunacymaze.org> Message-ID: <42D1BD98.4060704@neurogami.com> Ghislain Mary wrote: > Hi all, > > Just looking at the Nitro Step By Step tutorial, it is often said that > when rendering a page Nitro starts by looking for an .html file, then > for an .xhtml file and then for other magical stuffs. However, I can not > figure out this behavior with Nitro 0.19.0. It doesn't look like nitro > is looking for an .html file at all. This must have been the case before > but is no longer true since an unknown version number. So, is it normal? > Will this still be the case in future releases? I think this may partly be a function of the Web server configuration; using an .htaccess file (or the same stuff inside httpd.conf) with Apache you can just serve back the plain html file, bypassing Nitro, if it exists. I just tried a basic app with WEBrick, and it will load either .html or .xhtml, and the .html first if both exist. > > Oh, I was forgetting. James, do you have the basic mockup your telling > about at the end of the first chapter? Or should we take an extract from > the blog example, that we could strip a little to give it a more > tutorial like style (a more basic style)? I have the source code for each chapter, but have not had a chance to go through it and see what still works and what is broken. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From george.moschovitis at gmail.com Mon Jul 11 02:53:48 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 11 Jul 2005 09:53:48 +0300 Subject: [Nitro] Og::Database In-Reply-To: <200507100728.47460.dcorbin@machturtle.com> References: <200507091941.03214.dcorbin@machturtle.com> <42D0BFF9.40202@cs.helsinki.fi> <200507100728.47460.dcorbin@machturtle.com> Message-ID: > This is different than the tutorials. They show Og::Database.new(...). The > tutorials I'm talking about are in the nitrohq.com wiki. Hello David, there is a disclaimer on top of the tutorial. They refer to a much older version of Og. There are TON's of features added since then. Until the tutorial is updated, I suggest that you have a look at the files: doc/RELEASES test/og/tc_store.rb for more information. -g. -- http://www.nitrohq.com From george.moschovitis at gmail.com Mon Jul 11 03:06:39 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 11 Jul 2005 10:06:39 +0300 Subject: [Nitro] Nitro Tutorial and templating system In-Reply-To: <42D1B776.5080806@lunacymaze.org> References: <42D1B776.5080806@lunacymaze.org> Message-ID: > Just looking at the Nitro Step By Step tutorial, it is often said that > when rendering a page Nitro starts by looking for an .html file, then > for an .xhtml file and then for other magical stuffs. However, I can not > figure out this behavior with Nitro 0.19.0. It doesn't look like nitro > is looking for an .html file at all. This must have been the case before > but is no longer true since an unknown version number. So, is it normal? > Will this still be the case in future releases? Nitro, still looks for .html first. If you are using Apache of Lighttpd you have to use an appropriate configuration file. Have a look at proto/conf for tips. -g. -- http://www.nitrohq.com From nospam at lunacymaze.org Mon Jul 11 03:17:33 2005 From: nospam at lunacymaze.org (Ghislain Mary) Date: Mon, 11 Jul 2005 09:17:33 +0200 Subject: [Nitro] Nitro Tutorial and templating system In-Reply-To: References: <42D1B776.5080806@lunacymaze.org> Message-ID: <42D21D0D.7000902@lunacymaze.org> > Nitro, still looks for .html first. If you are using Apache of > Lighttpd you have to use an appropriate configuration file. Have a > look at proto/conf for tips. > Trying the examples in the tutorial using WEBrick, I created an entry.html page and going to http://localhost:9999/entry gives me the error message: undefined method `entry_action' for # So it looks like Nitro have not found any .html or .xhtml file and is looking for an entry_action in the Controller. So, it's not working for me but if you say so, I trust you. Thanks, Ghislain From george.moschovitis at gmail.com Mon Jul 11 03:45:45 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 11 Jul 2005 10:45:45 +0300 Subject: [Nitro] Nitro Tutorial and templating system In-Reply-To: <42D21D0D.7000902@lunacymaze.org> References: <42D1B776.5080806@lunacymaze.org> <42D21D0D.7000902@lunacymaze.org> Message-ID: > So it looks like Nitro have not found any .html or .xhtml file and is > looking for an entry_action in the Controller. So, it's not working for > me but if you say so, I trust you. Ah I understand now. You have to enter the following url: http://localhost:9999/entry.html If you DON't enter an extension, nitro tries to call the action or the .xhtml template. You have to add the extension to bypass nitro and get the server to ...server the html file. regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Mon Jul 11 05:12:29 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 11 Jul 2005 12:12:29 +0300 Subject: [Nitro] nitrohq.com Message-ID: Dear devs, I have started copying some question/answer bits from the list archives over to the nitro wiki. If anyone can help me with this, I would appreciated. I am very busy adding the final touches to 0.20.0 at the moment (a very important release). regards, George. -- http://www.nitrohq.com From dcorbin at machturtle.com Mon Jul 11 05:31:54 2005 From: dcorbin at machturtle.com (David Corbin) Date: Mon, 11 Jul 2005 05:31:54 -0400 Subject: [Nitro] A Web Development Observation Message-ID: <200507110531.54129.dcorbin@machturtle.com> It's been almost two years since I've done any serious web-development in my day job. I recently started a project at home to play with Rails, and probably Og, if not Nitro. I've been reminded of what I hate most about web development, and why I think it is generally such a slow process. You cannot trust the input being given. Ever. I'm not just talking about basic form validation. I mean you can't rely on the order of a series of pages. You can't rely on cookies. You can't believe that URLs are unmodified. You can't assume that any given URL will only be clicked on once. It wears on you. I don't have any specific solution in mind, but if a framework were to eliminate this concern from the developer, THAT would be a 100x productivity boost. David From ak at navel.gr Mon Jul 11 06:25:12 2005 From: ak at navel.gr (Anastasios Koutoumanos) Date: Mon, 11 Jul 2005 13:25:12 +0300 Subject: [Nitro] nitrohq.com In-Reply-To: References: Message-ID: <42D24908.2020307@navel.gr> George Moschovitis wrote: >Dear devs, > >I have started copying some question/answer bits from the list >archives over to the nitro wiki. If anyone can help me with this, I >would appreciated. I am very busy adding the final touches to 0.20.0 >at the moment (a very important release). > >regards, >George. > > > I could help, provided that we aggree on a usage policy for the mailing list and the wiki. I propose you only use the list for announcements, etc. and we try to use the wiki for every other reason. If we really must, we would refer to a wiki's page for answering to a newcomers question addressed to the list, but we try to encourage people posting questions, suggestions, reports, etc. directly to the wiki. Tasos -- Did you joy today? www.JOY.GR !!! From mneumann at ntecs.de Mon Jul 11 06:31:04 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Mon, 11 Jul 2005 12:31:04 +0200 Subject: [Nitro] A Web Development Observation In-Reply-To: <200507110531.54129.dcorbin@machturtle.com> References: <200507110531.54129.dcorbin@machturtle.com> Message-ID: <42D24A68.6020708@ntecs.de> David Corbin wrote: > It's been almost two years since I've done any serious web-development in my > day job. I recently started a project at home to play with Rails, and > probably Og, if not Nitro. I've been reminded of what I hate most about web > development, and why I think it is generally such a slow process. > > You cannot trust the input being given. Ever. > > I'm not just talking about basic form validation. I mean you can't rely on > the order of a series of pages. You can't rely on cookies. You can't > believe that URLs are unmodified. You can't assume that any given URL will > only be clicked on once. It wears on you. > > I don't have any specific solution in mind, but if a framework were to > eliminate this concern from the developer, THAT would be a 100x productivity > boost. Hm, I think what you need is Wee ;-) Wee does not use URLs in the sense as other frameworks do. All state is kept on the server-side, so there's no way to modify the state from the client side. Actions (callbacks) are dynamic, that means, they can only be invoked after you have defined them, and only for that page for which they were defined. Example: r.anchor.callback { p "link clicked" }.with("click here") would display a click here tag. But you can only click on it from that page, where you register the callback above. A page is defined by the internal component state. Every time an action is performed, the component state is modified and as such a new page is created. In short: Callbacks are page-local. Or drop down lists: # select an object from these items items = [1, 2, "a string", {1 => 'hallo'}] # render it r.select_list(items).labels {|item| item.to_s}. callback {|choosen| p choosen} As 'items' is stored on the server-side, you can't malicously introduce any new values. Note that this way, you can use arbitrary objects from where you can choose from. What the user sees is given by #labels. This is truely one of Wee's strengths. http://rubyforge.org/projects/wee http://www.ntecs.de/viewcvs/viewcvs/*checkout*/Wee/trunk/doc/rdoc/index.html Regards, Michael From george.moschovitis at gmail.com Mon Jul 11 06:48:33 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 11 Jul 2005 13:48:33 +0300 Subject: [Nitro] A Web Development Observation In-Reply-To: <42D24A68.6020708@ntecs.de> References: <200507110531.54129.dcorbin@machturtle.com> <42D24A68.6020708@ntecs.de> Message-ID: > As 'items' is stored on the server-side, you can't malicously introduce > any new values. Note that this way, you can use arbitrary objects from > where you can choose from. What the user sees is given by #labels. Can you explain why the user cannot introduce new values? Why is this different than the following nitro code: or o.select('options') { o.options(items) } The items list is again stored on the server. thanks, George. -- http://www.nitrohq.com From mneumann at ntecs.de Mon Jul 11 06:58:50 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Mon, 11 Jul 2005 12:58:50 +0200 Subject: [Nitro] A Web Development Observation In-Reply-To: References: <200507110531.54129.dcorbin@machturtle.com> <42D24A68.6020708@ntecs.de> Message-ID: <42D250EA.10801@ntecs.de> George Moschovitis wrote: >>As 'items' is stored on the server-side, you can't malicously introduce >>any new values. Note that this way, you can use arbitrary objects from >>where you can choose from. What the user sees is given by #labels. > > > Can you explain why the user cannot introduce new values? > > Why is this different than the following nitro code: > > The user could construct a HTTP request that includes for example: ?...&options=new_value Voila! A new value has entered! In Wee, you can try this of course. But for the values: [1, 2, 3, "test", {1 => 'blah'}] Wee simply uses indices into the that array. So you can't introduce new values here! You can't select values not being rendered. Regards, Michael From james_b at neurogami.com Mon Jul 11 09:20:35 2005 From: james_b at neurogami.com (James Britt) Date: Mon, 11 Jul 2005 06:20:35 -0700 Subject: [Nitro] Nitro Tutorial and templating system In-Reply-To: References: <42D1B776.5080806@lunacymaze.org> <42D21D0D.7000902@lunacymaze.org> Message-ID: <42D27223.6040109@neurogami.com> George Moschovitis wrote: >>So it looks like Nitro have not found any .html or .xhtml file and is >>looking for an entry_action in the Controller. So, it's not working for >>me but if you say so, I trust you. > > > Ah I understand now. You have to enter the following url: > > http://localhost:9999/entry.html > > If you DON't enter an extension, nitro tries to call the action or the > .xhtml template. You have to add the extension to bypass nitro and get > the server to ...server the html file. But I believe that if you are using apache with a .htaccess file, one can use mod_rewrite to look first for the html file and load it directly. I find this behavior very useful, as I like to first work out a page using a simple *.html file, then add in templating items and change the file extension, without having to change much else or (most annoying) move the file to another directory. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From james_b at neurogami.com Mon Jul 11 09:49:07 2005 From: james_b at neurogami.com (James Britt) Date: Mon, 11 Jul 2005 06:49:07 -0700 Subject: [Nitro] nitrohq.com In-Reply-To: <42D24908.2020307@navel.gr> References: <42D24908.2020307@navel.gr> Message-ID: <42D278D3.2080803@neurogami.com> Anastasios Koutoumanos wrote: > George Moschovitis wrote: > >> Dear devs, >> >> I have started copying some question/answer bits from the list >> archives over to the nitro wiki. If anyone can help me with this, I >> would appreciated. I am very busy adding the final touches to 0.20.0 >> at the moment (a very important release). >> >> regards, >> George. >> >> >> > I could help, provided that we aggree on a usage policy for the mailing > list and the wiki. I propose you only use the list for announcements, > etc. and we try to use the wiki for every other reason. Oh, I strongly disagree. Wikis are awkward for threaded discussions and the inclusion of time-sensitive material. I prefer to see the wiki as a a distiled repository of the most useful information culled from the list. > If we really > must, we would refer to a wiki's page for answering to a newcomers > question addressed to the list, but we try to encourage people posting > questions, suggestions, reports, etc. directly to the wiki. Except this may make it harder to assess proposed solutions and answers. Better to hash out problems here, the copy over the main information to wiki. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From ak at navel.gr Mon Jul 11 10:02:45 2005 From: ak at navel.gr (Anastasios Koutoumanos) Date: Mon, 11 Jul 2005 17:02:45 +0300 Subject: [Nitro] nitrohq.com In-Reply-To: <42D278D3.2080803@neurogami.com> References: <42D24908.2020307@navel.gr> <42D278D3.2080803@neurogami.com> Message-ID: <42D27C05.6090702@navel.gr> James Britt wrote: > Anastasios Koutoumanos wrote: > >> George Moschovitis wrote: >> >>> Dear devs, >>> >>> I have started copying some question/answer bits from the list >>> archives over to the nitro wiki. If anyone can help me with this, I >>> would appreciated. I am very busy adding the final touches to 0.20.0 >>> at the moment (a very important release). >>> >>> regards, >>> George. >>> >>> >>> >> I could help, provided that we aggree on a usage policy for the >> mailing list and the wiki. I propose you only use the list for >> announcements, etc. and we try to use the wiki for every other reason. > > > Oh, I strongly disagree. Wikis are awkward for threaded discussions > and the inclusion of time-sensitive material. I prefer to see the > wiki as a a distiled repository of the most useful information culled > from the list. I knew this was coming, since I'm not confident myself that such a usage of the wiki could prove productive... However I'm reluctant in duplicating information in various places. could this be an incentive for working on the right features on wiki so as to make it useful for such a usage? For example, some such features could include: - rss (already there!) - email notifications (first we need users and user management...) - comment in existing pages, maybe threaded view (quite easy to implement) - email address for wiki, or wiki section, e.g posting to nitrowiki at nitrohq.com with subject "Wishlist" could append to the wishlist page, or add a new 'comment' to the page. - previous feature linked with rss, so we could add a "reply" link in the rss which would mail with correct subject and add the posting as a commnet to the originating wiki page. Tasos > >> If we really must, we would refer to a wiki's page for answering to a >> newcomers question addressed to the list, but we try to encourage >> people posting questions, suggestions, reports, etc. directly to the >> wiki. > > > Except this may make it harder to assess proposed solutions and > answers. Better to hash out problems here, the copy over the main > information to wiki. > > James -- Navel, Greece http://www.navel.gr @@ +30 210 6898050 Navel does not accept liability for any errors, viruses or omissions in the contents of this message, which arise as a result of e-mail transmission. The full corporate policy is available on our web site. ____________________________________ Did you joy today? www.JOY.GR !!! From Aleksi.Niemela at cs.helsinki.fi Mon Jul 11 14:25:15 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Mon, 11 Jul 2005 21:25:15 +0300 Subject: [Nitro] nitrohq.com In-Reply-To: <42D27C05.6090702@navel.gr> References: <42D24908.2020307@navel.gr> <42D278D3.2080803@neurogami.com> <42D27C05.6090702@navel.gr> Message-ID: <42D2B98B.2030209@cs.helsinki.fi> Anastasios Koutoumanos wrote: >>> I could help, provided that we aggree on a usage policy for the >>> mailing list and the wiki. I propose you only use the list for >>> announcements, etc. and we try to use the wiki for every other reason. >> >> Oh, I strongly disagree. Wikis are awkward for threaded discussions >> and the inclusion of time-sensitive material. I prefer to see the >> wiki as a a distiled repository of the most useful information culled >> from the list. > > > I knew this was coming, since I'm not confident myself that such a > usage of the wiki could prove productive... However I'm reluctant in > duplicating information in various places. I'm sure all are pro "write info only in one place" ideology. Still, email lists are quite established concept and as static information repositories web pages serve well. Wikis alter the staticness of information repository concept but it's quite hard for me to see how they'll be effective at handling discussions. For example C2.com is very hard for me to follow. And against wiki ideology it's full of outdated information how the partially edited discussions might have gone and a bit of fresh content here and there. Maybe it could be easier to see how wiki(like) system would prove to be better and more functional than plain old email list combined with static information repository (as doc files and web pages) if you could point out some places where this works. In the meanwhile grabbing relavant info from email archives and polishing it to some presentable state is probably useful thing to do. - Aleksi From Aleksi.Niemela at cs.helsinki.fi Mon Jul 11 14:36:09 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Mon, 11 Jul 2005 21:36:09 +0300 Subject: [Nitro] nitrohq.com In-Reply-To: References: Message-ID: <42D2BC19.6070707@cs.helsinki.fi> George Moschovitis wrote: >I have started copying some question/answer bits from the list >archives over to the nitro wiki. If anyone can help me with this, I > > For me on WinXP / Firefox 1.0.4 clicking Edit for page, writing a bit, changing name and clicking Save displays sometimes unaltered page. Refreshing browser helps. Server had taken the request anyway, and all chages got registered. - Aleksi From alang at cronosys.com Mon Jul 11 14:38:19 2005 From: alang at cronosys.com (Alan Garrison) Date: Mon, 11 Jul 2005 14:38:19 -0400 Subject: [Nitro] nitrohq.com In-Reply-To: <42D2B98B.2030209@cs.helsinki.fi> References: <42D24908.2020307@navel.gr> <42D278D3.2080803@neurogami.com> <42D27C05.6090702@navel.gr> <42D2B98B.2030209@cs.helsinki.fi> Message-ID: <42D2BC9B.4010403@cronosys.com> Aleksi Niemela wrote: > > Wikis alter the staticness of information repository concept but it's > quite hard for me to see how they'll be effective at handling > discussions. For example C2.com is very hard for me to follow. And > against wiki ideology it's full of outdated information how the > partially edited discussions might have gone and a bit of fresh > content here and there. +1. I also find C2 hard to follow with pages full of long camel-case names like "StructureAndInterpretationOfComputerPrograms" along with disjointed commentary layout that may as well be randomly placed. Maybe it's just not my cup of tea, but if you wanted threaded discussions, use forum software. Threads have dates attached, whereas blocks of info in wikis may not be easily dated without digging through the page history. > - Aleksi -- Alan Garrison Cronosys, LLC Phone: 216-221-4600 ext 308 From george.moschovitis at gmail.com Mon Jul 11 15:02:09 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 11 Jul 2005 22:02:09 +0300 Subject: [Nitro] nitrohq.com In-Reply-To: <42D2B98B.2030209@cs.helsinki.fi> References: <42D24908.2020307@navel.gr> <42D278D3.2080803@neurogami.com> <42D27C05.6090702@navel.gr> <42D2B98B.2030209@cs.helsinki.fi> Message-ID: > In the meanwhile grabbing relavant info from email archives and > polishing it to some presentable state is probably useful thing to do. +1 I agree with this, even though I understand Tasos's request. Lets stick with the mailing list + wiki compo for the time beeing. -g. -- http://www.nitrohq.com From nospam at lunacymaze.org Mon Jul 11 15:28:20 2005 From: nospam at lunacymaze.org (Ghislain Mary) Date: Mon, 11 Jul 2005 21:28:20 +0200 Subject: [Nitro] nitrohq.com In-Reply-To: References: <42D24908.2020307@navel.gr> <42D278D3.2080803@neurogami.com> <42D27C05.6090702@navel.gr> <42D2B98B.2030209@cs.helsinki.fi> Message-ID: <42D2C854.3040302@lunacymaze.org> George Moschovitis a ?crit : >>In the meanwhile grabbing relavant info from email archives and >>polishing it to some presentable state is probably useful thing to do. > > > +1 I agree with this, even though I understand Tasos's request. Lets > stick with the mailing list + wiki compo for the time beeing. > > -g. > I agree with this too. I think the wiki is a good way to summarize and make the information more accessible than with mailing-list archives. Such a thing is really necessary for new users to not be lost and know where to start without having to search or ask for help. Ghislain From nospam at lunacymaze.org Mon Jul 11 17:36:39 2005 From: nospam at lunacymaze.org (Ghislain Mary) Date: Mon, 11 Jul 2005 23:36:39 +0200 Subject: [Nitro] nitrohq.com In-Reply-To: <42D2BC19.6070707@cs.helsinki.fi> References: <42D2BC19.6070707@cs.helsinki.fi> Message-ID: <42D2E667.7040702@lunacymaze.org> Hi, Aleksi Niemela a ?crit : > For me on WinXP / Firefox 1.0.4 clicking Edit for page, writing a bit, > changing name and clicking Save displays sometimes unaltered page. > Refreshing browser helps. Server had taken the request anyway, and all > chages got registered. > I already have reported this problem in the http://nitrohq.com/view/Wiki_bug_reports page. If you find other bug in the wiki don't heasitate to list them there in order to have George fix them :) Ghislain From nospam at lunacymaze.org Mon Jul 11 18:58:15 2005 From: nospam at lunacymaze.org (Ghislain Mary) Date: Tue, 12 Jul 2005 00:58:15 +0200 Subject: [Nitro] Nitro Tutorial and templating system In-Reply-To: References: <42D1B776.5080806@lunacymaze.org> <42D21D0D.7000902@lunacymaze.org> Message-ID: <42D2F987.9040804@lunacymaze.org> Hi, George Moschovitis a ?crit : > Ah I understand now. You have to enter the following url: > > http://localhost:9999/entry.html > > If you DON't enter an extension, nitro tries to call the action or the > .xhtml template. You have to add the extension to bypass nitro and get > the server to ...server the html file. > > regards, > George. > Here is a little patch to the WEBrick adapter that redirects to the html file if it exists before trying to render the xhtml file. So we have the same that with mod_rewrite on apache. --- webrick.rb Mon Jul 11 23:39:24 2005 +++ /usr/local/lib/ruby/gems/1.8/gems/nitro-0.19.0/lib/nitro/adapter/webrick.rb Tue Jul 12 00:45:47 2005 @@ -32,10 +32,18 @@ refererlog = STDERR end + request_callback = Proc.new { |req, res| + if File.exist?(File.join(conf.dispatcher.public_root, req.path_info + '.html')) + Logger.debug "Rendering '#{req.path_info}.html'." if $DBG + res.set_redirect(WEBrick::HTTPStatus::Found, req.path_info + '.html') + end + } + @server = WEBrick::HTTPServer.new( :BindAddress => conf.host, :Port => conf.port, :DocumentRoot => conf.dispatcher.public_root, + :RequestCallback => request_callback, :AccessLog => [ [accesslog, WEBrick::AccessLog::COMMON_LOG_FORMAT], [refererlog, WEBrick::AccessLog::REFERER_LOG_FORMAT] So for example, if you have an entry.html file in your public directory (as in the tutorial) and that you point your browser to http://localhost:9999/entry you will be redirected to http://localhost:9999/entry.html Ghislain From james_b at neurogami.com Mon Jul 11 19:23:20 2005 From: james_b at neurogami.com (James Britt) Date: Mon, 11 Jul 2005 16:23:20 -0700 Subject: [Nitro] Nitro Tutorial and templating system In-Reply-To: <42D2F987.9040804@lunacymaze.org> References: <42D1B776.5080806@lunacymaze.org> <42D21D0D.7000902@lunacymaze.org> <42D2F987.9040804@lunacymaze.org> Message-ID: <42D2FF68.2010501@neurogami.com> Ghislain Mary wrote: > Hi, > > George Moschovitis a ?crit : > >> Ah I understand now. You have to enter the following url: >> >> http://localhost:9999/entry.html >> >> If you DON't enter an extension, nitro tries to call the action or the >> .xhtml template. You have to add the extension to bypass nitro and get >> the server to ...server the html file. >> >> regards, >> George. My preferred way of working is to first set up some simple *.html pages and work out basic navigation. Gradually I'll see where I can use dynamic rendering or other server-side calls and replace the .html file with a .xhtml file. This works well if Nitro always looks first for the .html file, and then the .xhtml file, regardless of whether an extension is given. Once can do this with Apache and mod_rewrite, and that's probably good enough for me, though a server-independent method would be nice. >> > > Here is a little patch to the WEBrick adapter that redirects to the html > file if it exists before trying to render the xhtml file. So we have the > same that with mod_rewrite on apache. Thanks; this could be quite the thing. Side question for George (or whomever can answer this): Is there a way to tell Nitro to use a different file extension as templates? I was pondering writing an RDoc template that would embed Nitro calls for some more dynamic behavior. I can get the template code to emit files with the xhtml extension, but it's simpler if I'm hacking on an existing template and just want to add some extra markup. Sot it would be nice to tell Nitro to treat .html files as if they were .xhtml files. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From dcorbin at machturtle.com Mon Jul 11 19:35:52 2005 From: dcorbin at machturtle.com (David Corbin) Date: Mon, 11 Jul 2005 19:35:52 -0400 Subject: [Nitro] A Web Development Observation In-Reply-To: <42D24A68.6020708@ntecs.de> References: <200507110531.54129.dcorbin@machturtle.com> <42D24A68.6020708@ntecs.de> Message-ID: <200507111935.52322.dcorbin@machturtle.com> On Monday 11 July 2005 06:31 am, Michael Neumann wrote: > David Corbin wrote: > > It's been almost two years since I've done any serious web-development in > > my day job. I recently started a project at home to play with Rails, and > > probably Og, if not Nitro. I've been reminded of what I hate most about > > web development, and why I think it is generally such a slow process. > > > > You cannot trust the input being given. Ever. > > > > I'm not just talking about basic form validation. I mean you can't rely > > on the order of a series of pages. You can't rely on cookies. You can't > > believe that URLs are unmodified. You can't assume that any given URL > > will only be clicked on once. It wears on you. > > > > I don't have any specific solution in mind, but if a framework were to > > eliminate this concern from the developer, THAT would be a 100x > > productivity boost. > > Hm, I think what you need is Wee ;-) > Thanks. I'll take a look at it, but I'd be it would also need to support certain "direct" entry points, which might be in an email or bookmarkable. > > Regards, > > Michael From dcorbin at machturtle.com Mon Jul 11 19:59:58 2005 From: dcorbin at machturtle.com (David Corbin) Date: Mon, 11 Jul 2005 19:59:58 -0400 Subject: [Nitro] A Web Development Observation In-Reply-To: <200507110531.54129.dcorbin@machturtle.com> References: <200507110531.54129.dcorbin@machturtle.com> Message-ID: <200507111959.59031.dcorbin@machturtle.com> On Monday 11 July 2005 05:31 am, David Corbin wrote: > I don't have any specific solution in mind, but if a framework were to > eliminate this concern from the developer, > I had a thought that would begin to address this. This is just some off the cuff thoughts about this. Please give me feedback. One problem I have with AR, (and I think to a lesser degree, Og), is the assumption that forms and data models are so tightly tied (that is parallel in one-to-one way). Now, this is a very common and easy way to develop an application, but in my experience, the better user interfaces are not done this way. The solution (that I'm thinking of at the moment) is the introduction of a Form object. Each action would have a Form that defines all the input params and validation rules (even though it may not come from a
). For those wanting a one-to-one DB-UI mapping, a particular Form class would provide business rules based on the Data model. Because the Form has all the validation rules incorporated into it, by the type the action/controller gets a control, all the input data is validated. Now, of course, the developer is still responsible for defining the validation rules, but I think a very reusuable framework could grow up to make this short and sweet. The controller would need to declare the Form to be used for any given URL/action. The form, of course, could also be used to populate in the view. Then the controller's job would be one of translating from Forms into Models (and back), and it wouldn't be directly responsible for input validation. Thoughts? David From george.moschovitis at gmail.com Tue Jul 12 02:50:34 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 12 Jul 2005 09:50:34 +0300 Subject: [Nitro] nitrohq.com In-Reply-To: <42D2E667.7040702@lunacymaze.org> References: <42D2BC19.6070707@cs.helsinki.fi> <42D2E667.7040702@lunacymaze.org> Message-ID: I know about this bug. There must be a problem with the apache configuration. I 'll ask Tasos to have a look at this. -g. On 7/12/05, Ghislain Mary wrote: > Hi, > > Aleksi Niemela a ?crit : > > For me on WinXP / Firefox 1.0.4 clicking Edit for page, writing a bit, > > changing name and clicking Save displays sometimes unaltered page. > > Refreshing browser helps. Server had taken the request anyway, and all > > chages got registered. > > > > I already have reported this problem in the > http://nitrohq.com/view/Wiki_bug_reports page. If you find other bug in > the wiki don't heasitate to list them there in order to have George fix > them :) > > Ghislain > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From ak at navel.gr Tue Jul 12 02:58:25 2005 From: ak at navel.gr (Anastasios Koutoumanos) Date: Tue, 12 Jul 2005 09:58:25 +0300 Subject: [Nitro] nitrohq.com In-Reply-To: <42D2C854.3040302@lunacymaze.org> References: <42D24908.2020307@navel.gr> <42D278D3.2080803@neurogami.com> <42D27C05.6090702@navel.gr> <42D2B98B.2030209@cs.helsinki.fi> <42D2C854.3040302@lunacymaze.org> Message-ID: <42D36A11.7050306@navel.gr> Ghislain Mary wrote: > George Moschovitis a ?crit : > >>> In the meanwhile grabbing relavant info from email archives and >>> polishing it to some presentable state is probably useful thing to do. >> >> >> >> +1 I agree with this, even though I understand Tasos's request. Lets >> stick with the mailing list + wiki compo for the time beeing. >> >> -g. >> > > I agree with this too. I think the wiki is a good way to summarize and > make the information more accessible than with mailing-list archives. > Such a thing is really necessary for new users to not be lost and know > where to start without having to search or ask for help. Let me put it right (hopefully) this time: it's not that i disagree to the effectiveness of the mailing list for its purpose. But I also suggest that it would be nice if we could only have to post ideas, bug reports, comments, etc. in one place. Since this is a common wish for many, my proposal was to try to identify ways that we could make the nitro wiki efficient for this. Remember, it's a system under construction, built with nitro, hence (should be) easy to implement and test out various ideas and, could prove a nice way to attract more attention to nitro itself (the way instiki did for rails). I hope i'll have the time to better describe the use cases i'm thinking of and implement some of them. Till then, i aggree: let's stick to the list! Tasos > Ghislain > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general ____________________________________ Did you joy today? www.JOY.GR !!! From george.moschovitis at gmail.com Tue Jul 12 02:58:51 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 12 Jul 2005 09:58:51 +0300 Subject: [Nitro] A Web Development Observation In-Reply-To: <200507111959.59031.dcorbin@machturtle.com> References: <200507110531.54129.dcorbin@machturtle.com> <200507111959.59031.dcorbin@machturtle.com> Message-ID: Hello David, can you explain a little better the benefits of having an intermediate Form object? thanks, George. -- http://www.nitrohq.com From ak at navel.gr Tue Jul 12 03:00:57 2005 From: ak at navel.gr (Anastasios Koutoumanos) Date: Tue, 12 Jul 2005 10:00:57 +0300 Subject: [Nitro] nitrohq.com In-Reply-To: <42D2E667.7040702@lunacymaze.org> References: <42D2BC19.6070707@cs.helsinki.fi> <42D2E667.7040702@lunacymaze.org> Message-ID: <42D36AA9.5070904@navel.gr> Ghislain Mary wrote: > Hi, > > Aleksi Niemela a ?crit : > >> For me on WinXP / Firefox 1.0.4 clicking Edit for page, writing a >> bit, changing name and clicking Save displays sometimes unaltered >> page. Refreshing browser helps. Server had taken the request anyway, >> and all chages got registered. >> > > I already have reported this problem in the > http://nitrohq.com/view/Wiki_bug_reports page. If you find other bug > in the wiki don't heasitate to list them there in order to have George > fix them :) ;-) that's what i was talking of... Ghislain did the obvious, reported the bug to the relevant wiki's page. However, we got no notification of this, could not discuss on this, etc. Arghhhh, i need to find some time to help G. with the functionality i'm thinking of! Tasos > > Ghislain > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From mneumann at ntecs.de Tue Jul 12 04:15:02 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Tue, 12 Jul 2005 10:15:02 +0200 Subject: [Wee-talk] Re: [Nitro] A Web Development Observation In-Reply-To: References: <200507110531.54129.dcorbin@machturtle.com> <42D24A68.6020708@ntecs.de> Message-ID: <42D37C06.8030304@ntecs.de> Curt Sampson wrote: > On Mon, 11 Jul 2005, Michael Neumann wrote: > >> Wee does not use URLs in the sense as other frameworks do. > > > While the ability to look more like a local application is one of Wee's > strengths, one of its weaknesses is that it more or less destroys > the concept of a URI. The Universal Resource Identifier no longer > universally identifies a resource. One of the side effects of this is > that bookmarks no longer work. Correct. > I've been wondering if there's some way to fix this while still > preserving Wee's strong points. I.e., if I have an application keeping > track of items from a catalogue, is it possible to make wee work such > that the URI > > /catalogue/item/171323 > > will always display the current information for item 171323 (or whatever > it's allowed to display about item 171323 given the authorization > available from whatever authentication credentials I've previously > presented)? Ideally, this would even be displayed in the location bar. In Wee 0.9.0 this is possible! But then, you're limited to more or less one "main" component per page, as the URI is only able to give some information to one component. It works like shown below: class CatalogComponent < Wee::Component attr_accessor :item_no ... end disp = Wee::ComponentDispatcher.new disp.add_rule /catalogue\/item\/(\d+)/, CatalogComponent.new do |c, md| c.item_no = Integer(md[1]) end # add further rules here... Keep in mind, that now, your anchor tags within CatalogComponent should look like: r.anchor.info("catalogue/item/#{ new_item_no }").callback .... By default, all links will leave the current URI as is. > Does it even make sense to do this? Or do you just not write > applications like that in wee? A few guys are just trying to do that with Wee. I've some other ideas to do this in a more transparent way, so that you don't have to modify all your links. Basically, each component would have a method: def collect_for_url(params) params['item_no'] = @item_no end And the resulting hash would then be converted into an URL by a central method. In the same way, a fetch_from_url method would be called, where each component can take some state from the URL (the central method would in the same way extract the hash from the URL). Regards, Michael From fabian at oggu.de Tue Jul 12 06:33:45 2005 From: fabian at oggu.de (Fabian Buch) Date: Tue, 12 Jul 2005 12:33:45 +0200 Subject: [Nitro] wiki map (-bug) Message-ID: <2bf5f1768f96a08807e7783615ae3f4b@oggu.de> hi, small wiki bug: just noticed that the links on the Map site of the Wiki still link to www.rubyignited.com instead of www.nitrohq.com Fabian From dcorbin at machturtle.com Tue Jul 12 06:43:37 2005 From: dcorbin at machturtle.com (David Corbin) Date: Tue, 12 Jul 2005 06:43:37 -0400 Subject: [Nitro] A Web Development Observation In-Reply-To: References: <200507110531.54129.dcorbin@machturtle.com> <200507111959.59031.dcorbin@machturtle.com> Message-ID: <200507120643.37382.dcorbin@machturtle.com> On Tuesday 12 July 2005 02:58 am, George Moschovitis wrote: > Hello David, > > can you explain a little better the benefits of having an intermediate > Form object? Two fold, I think. 1) input validation becomes substantially declarative, and takes place before the action/controller "gets control". Error handling is consistent across all actions/controllers, probably better factored (thought that could be my imagination). 2) Seperation of the UI structure from the Modle structure. What if I have a model that is "Person has_many Address". But, he's required to have one, so your Create Person form contains all the elements of Person and Address as one entity. Now from what I've seen of AR (little) and Og (only reading), with the validation in the "object model", this requires me to populate Person and Address (potentially with invalid data), and then validate each of them seperately. If we carry this example into the absurd (let's say we want to prevent people with last names beginning with Mc or Mac from having London addressess), there is no place that I can see where this verification should happen. A more common example of #2 is where you have a larger object model, but only certain portions are changed in certain combinations. Or, I have a Project, and now I have an add a task. If there is a project_id in the form (a hidden field, or part of the URI), who validates that that id legitamate and belongs to a real project. From george.moschovitis at gmail.com Tue Jul 12 07:01:47 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 12 Jul 2005 14:01:47 +0300 Subject: [Nitro] [ANN] Nitro + Og 0.20.0, AJAX, Wee, Configuration, Docs, more Message-ID: Dear devs, new versions of Nitro + Og were just released. Another superb release! State of the art AJAX/Javascript support, Wee components / programmatic renderer integration, a beginners tutorial, self documenting configuration and many important bug fixes. * Superb behaviour, prototype, scriptaculous integration (PREVIEW) * Controller mixins and auto helpers * Nitro-Wee integrations * Self documenting configuration (PREVIEW) * New examples * CherryPy-style published objects * CherryPy-style dispatcher setup * Og fallbacks to pure ruby drivers for easier setup * Improved pager * Many bug fixes enjoy, George Moschovitis -- http://www.nitrohq.com From ak at navel.gr Tue Jul 12 07:09:48 2005 From: ak at navel.gr (Anastasios Koutoumanos) Date: Tue, 12 Jul 2005 14:09:48 +0300 Subject: [Nitro] nitrohq.com In-Reply-To: <42D2B98B.2030209@cs.helsinki.fi> References: <42D24908.2020307@navel.gr> <42D278D3.2080803@neurogami.com> <42D27C05.6090702@navel.gr> <42D2B98B.2030209@cs.helsinki.fi> Message-ID: <42D3A4FC.7030806@navel.gr> Aleksi Niemela wrote: > Anastasios Koutoumanos wrote: > >>>> I could help, provided that we aggree on a usage policy for the >>>> mailing list and the wiki. I propose you only use the list for >>>> announcements, etc. and we try to use the wiki for every other reason. >>> >>> >>> Oh, I strongly disagree. Wikis are awkward for threaded discussions >>> and the inclusion of time-sensitive material. I prefer to see the >>> wiki as a a distiled repository of the most useful information >>> culled from the list. >> >> >> >> I knew this was coming, since I'm not confident myself that such a >> usage of the wiki could prove productive... However I'm reluctant in >> duplicating information in various places. > > > I'm sure all are pro "write info only in one place" ideology. Still, > email lists are quite established concept and as static information > repositories web pages serve well. Wikis alter the staticness of > information repository concept but it's quite hard for me to see how > they'll be effective at handling discussions. For example C2.com is > very hard for me to follow. And against wiki ideology it's full of > outdated information how the partially edited discussions might have > gone and a bit of fresh content here and there. something relevant, have a look: http://snipsnap.org/space/SnipSnap+Mailing+Lists > > Maybe it could be easier to see how wiki(like) system would prove to > be better and more functional than plain old email list combined with > static information repository (as doc files and web pages) if you > could point out some places where this works. > > In the meanwhile grabbing relavant info from email archives and > polishing it to some presentable state is probably useful thing to do. > > - Aleksi > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From george.moschovitis at gmail.com Tue Jul 12 07:57:49 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 12 Jul 2005 14:57:49 +0300 Subject: [Nitro] Re: [ANN] Nitro + Og 0.20.0, AJAX, Wee, Configuration, Docs, more In-Reply-To: References: Message-ID: There is a small problems in the released gems :( Some errors are reported when generating RDoc documentation. An updated Gem will be available on the nitrohq.com site later today and released next Week. regards, George. On 7/12/05, George Moschovitis wrote: > Dear devs, > > new versions of Nitro + Og were just released. > > Another superb release! State of the art AJAX/Javascript support, Wee > components / programmatic renderer integration, a beginners tutorial, > self documenting configuration and many important bug fixes. > > * Superb behaviour, prototype, scriptaculous integration (PREVIEW) > * Controller mixins and auto helpers > * Nitro-Wee integrations > * Self documenting configuration (PREVIEW) > * New examples > * CherryPy-style published objects > * CherryPy-style dispatcher setup > * Og fallbacks to pure ruby drivers for easier setup > * Improved pager > * Many bug fixes > > enjoy, > George Moschovitis > > -- > http://www.nitrohq.com > -- http://www.nitrohq.com From aglarond at gmail.com Wed Jul 13 07:44:22 2005 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Wed, 13 Jul 2005 13:44:22 +0200 Subject: [Nitro] Component in Nitro 0.20.0 Message-ID: <55c107bf05071304449f91594@mail.gmail.com> Hello, Just starting to learn Nitro here, and I'm working through the "Nitro Step by Step" Tutorial. I've gotten to Chapter 5 (http://www.nitrohq.com/view/NSBS_Page_Generation_with_Class) before running into a problem. I've followed the code examples 1-1, and get the following error: uninitialized constant Component (NameError) Where is Component defined? Is it no longer a part of Nitro 0.20.0? Can anybody shed a little light on the subject? I would update the wiki, but I don't have a solution. Thanks, - Dimitri P.S. My installation is ruby 1.8.2 on linux, using nitro from gems. Commandline to start the app was 'ruby -rubygems run.rb'. From mneumann at ntecs.de Wed Jul 13 07:47:02 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Wed, 13 Jul 2005 13:47:02 +0200 Subject: [Nitro] [Og] Misc questions Message-ID: <42D4FF36.7060405@ntecs.de> Hi, Following example: class Account < Og::Entity has_many :profile_hits, ProfileHit end # ProfileHit is defined here acc = Account.create 1. Question ----------- Is: acc.profile_hits << ProfileHit.new(...) equivalent to: acc.add_profile_hit(ProfileHit.new(...)) Is the only difference that add_profile_hit can be called with block? 2. Question ----------- acc.profile_hits_count seems no longer work with Og 0.20.0. Should I now use instead: acc.profile_hits.size Isn't that slow? Regards, Michael From progrium at gmail.com Wed Jul 13 08:00:20 2005 From: progrium at gmail.com (Jeff Lindsay) Date: Wed, 13 Jul 2005 05:00:20 -0700 Subject: [Nitro] Dojo Toolkit Message-ID: Some of the people at JotSpot are working on a javascript widget framework called Dojo. Prototype and scriptaculous are great, but this is some serious Ajax/richer-client stuff. It's still early, but worth looking into. http://dojotoolkit.com/ -Jeff From george.moschovitis at gmail.com Wed Jul 13 08:02:22 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 13 Jul 2005 15:02:22 +0300 Subject: [Nitro] Component in Nitro 0.20.0 In-Reply-To: <55c107bf05071304449f91594@mail.gmail.com> References: <55c107bf05071304449f91594@mail.gmail.com> Message-ID: > Where is Component defined? Is it no longer a part of Nitro 0.20.0? > Can anybody shed a little light on the subject? I would update the > wiki, but I don't have a solution. You should use Controller instead of Component. Let me have a look at that Chapter, thanks for pointing out. -g. -- http://www.nitrohq.com From george.moschovitis at gmail.com Wed Jul 13 08:07:51 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 13 Jul 2005 15:07:51 +0300 Subject: [Nitro] Dojo Toolkit In-Reply-To: References: Message-ID: > http://dojotoolkit.com/ Will have a look, thanks! Btw, I added a Links page on the Wiki. If anyone has any other interesting links, please add them on the Wiki. -g. -- http://www.nitrohq.com From aglarond at gmail.com Wed Jul 13 08:29:35 2005 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Wed, 13 Jul 2005 14:29:35 +0200 Subject: [Nitro] Component in Nitro 0.20.0 In-Reply-To: References: <55c107bf05071304449f91594@mail.gmail.com> Message-ID: <55c107bf0507130529722575ca@mail.gmail.com> On 7/13/05, George Moschovitis wrote: > > Where is Component defined? Is it no longer a part of Nitro 0.20.0? > > Can anybody shed a little light on the subject? I would update the > > wiki, but I don't have a solution. > > You should use Controller instead of Component. Let me have a look at > that Chapter, thanks for pointing out. > Ah, thank you. Now it gives me: DEBUG: Rendering '/feeds/ompl'. DEBUG: Compiling action 'public/feeds__ompl' ERROR: Error while handling '/feeds/ompl'. ERROR: undefined method `feeds__ompl_action' for # When I try to access the URL. My guess is that the API has changed such that the class as written no longer works. I'll take a look at the examples, and see if I can work out the details and update the wiki. - Dimitri From bizilan at laposte.net Wed Jul 13 08:54:12 2005 From: bizilan at laposte.net (bizilan) Date: Wed, 13 Jul 2005 14:54:12 +0200 (CEST) Subject: [Nitro] [PATCH] for little og/store/sql.rb bug Message-ID: <35048.127.0.0.1.1121259252.squirrel@localhost> hi, sqlite don't like "OFFSET x LIMIT y". It prefers "LIMIT y OFFSET x". Here is a fix --- og-0.20.1/lib/og/store/sql.rb.orig 2005-07-13 14:46:45.000000000 +0200 +++ og-0.20.1/lib/og/store/sql.rb 2005-07-13 14:42:05.000000000 +0200 @@ -648,14 +648,14 @@ sql << " ORDER BY #{order}" end - if offset = options[:offset] - sql << " OFFSET #{offset}" - end - if limit = options[:limit] sql << " LIMIT #{limit}" end + if offset = options[:offset] + sql << " OFFSET #{offset}" + end + if extra = options[:extra] sql << " #{extra}" end thanks From george.moschovitis at gmail.com Wed Jul 13 09:01:40 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 13 Jul 2005 16:01:40 +0300 Subject: [Nitro] [PATCH] for little og/store/sql.rb bug In-Reply-To: <35048.127.0.0.1.1121259252.squirrel@localhost> References: <35048.127.0.0.1.1121259252.squirrel@localhost> Message-ID: Thanks, I 'll integrate the patch! -g. On 7/13/05, bizilan wrote: > hi, > > sqlite don't like "OFFSET x LIMIT y". It prefers "LIMIT y OFFSET x". Here > is a fix > --- og-0.20.1/lib/og/store/sql.rb.orig 2005-07-13 14:46:45.000000000 +0200 > +++ og-0.20.1/lib/og/store/sql.rb 2005-07-13 14:42:05.000000000 +0200 > @@ -648,14 +648,14 @@ > sql << " ORDER BY #{order}" > end > > - if offset = options[:offset] > - sql << " OFFSET #{offset}" > - end > - > if limit = options[:limit] > sql << " LIMIT #{limit}" > end > > + if offset = options[:offset] > + sql << " OFFSET #{offset}" > + end > + > if extra = options[:extra] > sql << " #{extra}" > end > > thanks > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From progrium at gmail.com Wed Jul 13 09:06:19 2005 From: progrium at gmail.com (Jeff Lindsay) Date: Wed, 13 Jul 2005 06:06:19 -0700 Subject: [Nitro] App, Parts Message-ID: Maybe it's because I'm new to Ruby, but I'm trying to figure out what App is in run.rb of some of the examples. The more complicated examples will run Nitro::run, but the simpler ones use App.run. I'm trying to figure out where that is! Also, no info on Parts yet? It sounds really awesome. And who is Navel? Thanks! From george.moschovitis at gmail.com Wed Jul 13 09:18:46 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 13 Jul 2005 16:18:46 +0300 Subject: [Nitro] App, Parts In-Reply-To: References: Message-ID: > Maybe it's because I'm new to Ruby, but I'm trying to figure out what > App is in run.rb of some of the examples. The more complicated > examples will run Nitro::run, but the simpler ones use App.run. I'm > trying to figure out where that is! App.run (an alias for Nitro::Server.run) will be the prefered way in the next versions. I am workin on cleaning up and refactoring Nitro. I hope to make the source code much easier to understand. > Also, no info on Parts yet? Parts are a feature of a high level framework that I am building on top of Nitro (at the moment called Plasma). This is very promising but probably will not be relased as open source. I am using it for internal projects (especially for a forthcoming BIG site ;-)) > It sounds really awesome. And who is Navel? Our company. -g. -- http://www.nitrohq.com From james_b at neurogami.com Wed Jul 13 14:44:33 2005 From: james_b at neurogami.com (James Britt) Date: Wed, 13 Jul 2005 11:44:33 -0700 Subject: [Nitro] A Web Development Observation In-Reply-To: <200507120643.37382.dcorbin@machturtle.com> References: <200507110531.54129.dcorbin@machturtle.com> <200507111959.59031.dcorbin@machturtle.com> <200507120643.37382.dcorbin@machturtle.com> Message-ID: <42D56111.1070807@neurogami.com> David Corbin wrote: > On Tuesday 12 July 2005 02:58 am, George Moschovitis wrote: > >>Hello David, >> >>can you explain a little better the benefits of having an intermediate >>Form object? > > > Two fold, I think. > > 1) input validation becomes substantially declarative, and takes place before > the action/controller "gets control". Error handling is consistent across > all actions/controllers, probably better factored (thought that could be my > imagination). I've been working on a production Rails application, and have been facing to problem of coordinating client and server-side data validation. First, I've been using Rails for about four months or so. Maybe longer, in a "playing around" mode, but not much longer. Given the jumbled and occasionally contradictory state of on-line Rails docs I have assurance that how I do things is at all the recommended way. Rails may offer a better way than I've constructed to solve my problem, but I've not heard of it. When a user posts a form, an action gets the post data and (typically) goes about creating assorted objects and saving or updating records. Some of validation is business logic: If the client data is submitted with contact data, then create a user object, but if you cannot save both then don't save either one. But much of the validation is basic sanity checks: user names must be at leas 3 characters long, but not more than 50, and so on. I wanted a way to declare the validation rues for each posted form field so that it was easy to see what as being checked, so I assembled a process where I dynamically create a set of Proc objects that are matched to posted field names. So I have code like this: LoginConditions = { "param.size > 4" => "The log-in name is too short", "param.size < 45" => "The log-in name is too long" } EmailAddressConditions = { "param =~ /@/" => "Malformed E-mail address" } $user_tests = Hash.new( Proc.new { |param| nil } ) $user_tests[ 'login' ] = validation_proc LoginConditions $user_tests[ 'email_address' ] = validation_proc EmailAddressConditions Each condition is a hash that maps a test to an error message; condition hashes are then assembled in another hash keyed on parameter names. Behind the scenes, those conditions are converted in procs so that if a posted parameter matches a condition key, there are a set of methods applied to parameter value for validation. This has worked well enough; this code is called in model classes, so that prior to creating an object the class can check that the parameters are reasonable. But it could just as well be called in a controller action, too. Meanwhile, in the client, I have some number of forms that collect this data. I wanted something similar, where I can declare that an input field is subject to some client-side validation. I began with a simple hack: Use a class attribute value to encode the validation requirement. For example indicates that this is a required filed and that the value must be between 3 and 10 characters long. (The encoding syntax is likely not the most clever; it was what I got to work off the top of my head, so I was happy.) There is some javascript that loops over all input elements, grabs those that have a class attribute containing /required/, and munges those class attribute values to extract the names of javascript functions to apply to the field values. I have about five validation functions, stored in a hash. So, the class value of required.size_within.3_10 becomes this call something like: params = '3_10' err_msg = validation_funcs[ 'size_within' ]( input_field_id, params ) And if err_msg.length > 0, the message is shown and the user directed back to the offending input field. This, too, worked fine. A downside was that the error messages were in the .js file, so friendly field-specific messages were awkward to construct. I decide to add a global JavaScript hash variable, keyed off of the input field ID, to hold error messages. And I added a Rails helper class to generate the required markup for the input field and the message hash assignment. So, now I have Ruby code that declares validation conditions for object instantiation, and Ruby code that creates HTML containing (encoded) validation requirements. So of course I'm wanting to unite these things so that I can define validation requirements in one place and have both client and server perform the same checks. I believe (or hope) I can restructure things such that the same declarative code that defines the object creation validation can be used to construct JavaScript functions for inclusion in the client. Having said all this, I do not have any code I can release quite yet. Mostly this is because it is a bit tangled up with other code, and probably application/Rails specific. But, if this approach sounds useful to people, I can see about putting together something. I'm focused on releasing an application on a tight schedule, so free time is small. My main motivation for cleaning up code and refactoring to produce a better product, not extract libraries for distribution. This is the sort of thing that really should not be this hard, but I've yet to see a framework that makes it simple to declare data validation conditions in one place and apply them both on the the client and server, so I would like to spin off something here for Nitro if I can. Seems that a lot of effort gets put into snazzy drag-n-drop, fading, glowing, "Wow! We're Web 2.0!" effects, but little in the way of actual application logic for the browser. (And please someone correct me if I'm wrong here. And, no, I do not want to make an XMLHttpRequest call to the server if it can avoided.) In the meantime I'd be interested in knowing what others have done for data validation in Web applications. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From progrium at gmail.com Wed Jul 13 18:12:14 2005 From: progrium at gmail.com (Jeff Lindsay) Date: Wed, 13 Jul 2005 15:12:14 -0700 Subject: [Nitro] App, Parts In-Reply-To: References: Message-ID: Well the concept sounds great, so it would be nice if at least the Parts API was available. I'm guessing that's what you were planning? I just came from PHP developing a loose framework of libraries to solve problems in the PHP world that Ruby and frameworks like these already do very well. It included a concept that seems similar to Parts, so it would be nice to see something like that available. : ) How big is Navel? -Jeff On 7/13/05, George Moschovitis wrote: > > Maybe it's because I'm new to Ruby, but I'm trying to figure out what > > App is in run.rb of some of the examples. The more complicated > > examples will run Nitro::run, but the simpler ones use App.run. I'm > > trying to figure out where that is! > > App.run (an alias for Nitro::Server.run) will be the prefered way in > the next versions. I am workin on cleaning up and refactoring Nitro. I > hope to make the source code much easier to understand. > > > Also, no info on Parts yet? > > Parts are a feature of a high level framework that I am building on > top of Nitro (at the moment called Plasma). This is very promising but > probably will not be relased as open source. I am using it for > internal projects (especially for a forthcoming BIG site ;-)) > > > It sounds really awesome. And who is Navel? > > Our company. > > -g. > > > -- > http://www.nitrohq.com > From george.moschovitis at gmail.com Thu Jul 14 02:16:17 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 14 Jul 2005 09:16:17 +0300 Subject: [Nitro] App, Parts In-Reply-To: References: Message-ID: > Well the concept sounds great, so it would be nice if at least the > Parts API was available. I'm guessing that's what you were planning? The great thing is that thank's to Nitro's intelligent design, no API is needed. Have a look at a recent post in the Rails mailing list about how to productize your application. That was just a workaround over Rail's flawed design (copying files to each application). I 'll probably release some parts examples soon, stay tuned :) -g. -- http://www.nitrohq.com From george.moschovitis at gmail.com Thu Jul 14 03:10:14 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 14 Jul 2005 10:10:14 +0300 Subject: [Nitro] A Web Development Observation In-Reply-To: <42D56111.1070807@neurogami.com> References: <200507110531.54129.dcorbin@machturtle.com> <200507111959.59031.dcorbin@machturtle.com> <200507120643.37382.dcorbin@machturtle.com> <42D56111.1070807@neurogami.com> Message-ID: Hello James, thanks for the informative post. > Having said all this, I do not have any code I can release quite yet. > ... > server, so I would like to spin off something here for Nitro if I can. The javascript validation method you describe is relatively common. It would be great if you could prepare something useful for inclusion in Nitro. > Seems that a lot of effort gets put into snazzy drag-n-drop, fading, > .. > the server if it can avoided.) Apart from eye candy, AJAX has another useful side-effect. It allows you to code simpler user interfaces. Simpler from the programmer perspective. I find it much harder to keep state between administration screens without some async requests. -g. PS: hmm my english is pretty bad :( I 'll try to rewrite the last paragraph in another post, to make it easier to understand my point. -- http://www.nitrohq.com From progrium at gmail.com Thu Jul 14 03:26:43 2005 From: progrium at gmail.com (Jeff Lindsay) Date: Thu, 14 Jul 2005 00:26:43 -0700 Subject: [Nitro] A Web Development Observation In-Reply-To: References: <200507110531.54129.dcorbin@machturtle.com> <200507111959.59031.dcorbin@machturtle.com> <200507120643.37382.dcorbin@machturtle.com> <42D56111.1070807@neurogami.com> Message-ID: > PS: hmm my english is pretty bad :( I 'll try to rewrite the last > paragraph in another post, to make it easier to understand my point. Your english really isn't that bad. -jeff From dcorbin at machturtle.com Thu Jul 14 05:54:57 2005 From: dcorbin at machturtle.com (David Corbin) Date: Thu, 14 Jul 2005 05:54:57 -0400 Subject: [Nitro] A Web Development Observation In-Reply-To: <42D56111.1070807@neurogami.com> References: <200507110531.54129.dcorbin@machturtle.com> <200507120643.37382.dcorbin@machturtle.com> <42D56111.1070807@neurogami.com> Message-ID: <200507140554.57978.dcorbin@machturtle.com> On Wednesday 13 July 2005 02:44 pm, James Britt wrote: > This has worked well enough; this code is called in model classes, so > that prior to creating an object the class can check that the parameters > are reasonable. But it could just as well be called in a controller > action, too. That sounds like a pretty good start, though I think I'd like to simplify the syntax of it. And, what I really want, I think, is for that validation to be called automatically, 'in front of' the controller. Technically, it would be part of the controller in the MVC sense, but it would be done automatically and the controller/action wouldn't even be called if validation wasn't passed. > Meanwhile, in the client, I have some number of forms that collect this > data. I wanted something similar, where I can declare that an input > field is subject to some client-side validation. Better client-side validation is another benefit of the declaraitve Form that I hadn't considered, if it is also used for "view generation." David From ak at navel.gr Thu Jul 14 06:47:09 2005 From: ak at navel.gr (Anastasios Koutoumanos) Date: Thu, 14 Jul 2005 13:47:09 +0300 Subject: [Nitro] A Web Development Observation In-Reply-To: <42D56111.1070807@neurogami.com> References: <200507110531.54129.dcorbin@machturtle.com> <200507111959.59031.dcorbin@machturtle.com> <200507120643.37382.dcorbin@machturtle.com> <42D56111.1070807@neurogami.com> Message-ID: <42D642AD.8040100@navel.gr> James Britt wrote: > David Corbin wrote: > >> On Tuesday 12 July 2005 02:58 am, George Moschovitis wrote: >> >>> Hello David, >>> >>> can you explain a little better the benefits of having an intermediate >>> Form object? >> >> >> >> Two fold, I think. >> >> 1) input validation becomes substantially declarative, and takes >> place before the action/controller "gets control". Error handling is >> consistent across all actions/controllers, probably better factored >> (thought that could be my imagination). > > > I've been working on a production Rails application, and have been > facing to problem of coordinating client and server-side data validation. > > First, I've been using Rails for about four months or so. Maybe > longer, in a "playing around" mode, but not much longer. Given the > jumbled and occasionally contradictory state of on-line Rails docs I > have assurance that how I do things is at all the recommended way. > Rails may offer a better way than I've constructed to solve my > problem, but I've not heard of it. > > When a user posts a form, an action gets the post data and (typically) > goes about creating assorted objects and saving or updating records. > > Some of validation is business logic: If the client data is submitted > with contact data, then create a user object, but if you cannot save > both then don't save either one. But much of the validation is basic > sanity checks: user names must be at leas 3 characters long, but not > more than 50, and so on. > > I wanted a way to declare the validation rues for each posted form > field so that it was easy to see what as being checked, so I assembled > a process where I dynamically create a set of Proc objects that are > matched to posted field names. > > So I have code like this: > > LoginConditions = { > "param.size > 4" => "The log-in name is too short", > "param.size < 45" => "The log-in name is too long" > } > > EmailAddressConditions = { > "param =~ /@/" => "Malformed E-mail address" > } > > $user_tests = Hash.new( Proc.new { |param| nil } ) > $user_tests[ 'login' ] = validation_proc LoginConditions > $user_tests[ 'email_address' ] = validation_proc EmailAddressConditions > > > Each condition is a hash that maps a test to an error message; > condition hashes are then assembled in another hash keyed on parameter > names. > > Behind the scenes, those conditions are converted in procs so that if > a posted parameter matches a condition key, there are a set of > methods applied to parameter value for validation. > > This has worked well enough; this code is called in model classes, so > that prior to creating an object the class can check that the > parameters are reasonable. But it could just as well be called in a > controller action, too. > > Meanwhile, in the client, I have some number of forms that collect > this data. I wanted something similar, where I can declare that an > input field is subject to some client-side validation. > > I began with a simple hack: Use a class attribute value to encode the > validation requirement. For example > > > > indicates that this is a required filed and that the value must be > between 3 and 10 characters long. (The encoding syntax is likely not > the most clever; it was what I got to work off the top of my head, so > I was happy.) > > There is some javascript that loops over all input elements, grabs > those that have a class attribute containing /required/, and munges > those class attribute values to extract the names of javascript > functions to apply to the field values. I have about five validation > functions, stored in a hash. So, the class value of > required.size_within.3_10 becomes this call something like: > params = '3_10' > err_msg = validation_funcs[ 'size_within' ]( input_field_id, params ) > > And if err_msg.length > 0, the message is shown and the user directed > back to the offending input field. > > This, too, worked fine. A downside was that the error messages were > in the .js file, so friendly field-specific messages were awkward to > construct. I decide to add a global JavaScript hash variable, keyed > off of the input field ID, to hold error messages. And I added a > Rails helper class to generate the required markup for the input field > and the message hash assignment. > > So, now I have Ruby code that declares validation conditions for > object instantiation, and Ruby code that creates HTML containing > (encoded) validation requirements. So of course I'm wanting to unite > these things so that I can define validation requirements in one place > and have both client and server perform the same checks. I believe > (or hope) I can restructure things such that the same declarative code > that defines the object creation validation can be used to construct > JavaScript functions for inclusion in the client. > > Having said all this, I do not have any code I can release quite yet. > Mostly this is because it is a bit tangled up with other code, and > probably application/Rails specific. But, if this approach sounds > useful to people, I can see about putting together something. I'm > focused on releasing an application on a tight schedule, so free time > is small. My main motivation for cleaning up code and refactoring to > produce a better product, not extract libraries for distribution. James, that was indeed a interesting post! Even more interesting is the fact that i've used a similar approach for a recent project. Indeed the javascript hack you describe was almost identical to my implementation. The code can not be released, it was just a hack among other hacks for a prototype, but working on it raised interesting issues and ideas. > > This is the sort of thing that really should not be this hard, but > I've yet to see a framework that makes it simple to declare data > validation conditions in one place and apply them both on the the > client and server, so I would like to spin off something here for > Nitro if I can. I would very much like to help integrate the functionality you describe in Nitro, or perhaps as a Form Part. BTW, do you think is worth it looking in the XForms spec and try using it? We have recently built an InfoPath application and there were similar issues there (how to specify error rules, conditions, messages, etc.) and probably some parts of the XF spec would fit nicely with the design of this Form Part... > > Seems that a lot of effort gets put into snazzy drag-n-drop, fading, > glowing, "Wow! We're Web 2.0!" effects, but little in the way of > actual application logic for the browser. (And please someone correct > me if I'm wrong here. Couldn't aggree more with you here! > And, no, I do not want to make an XMLHttpRequest call to the server if > it can avoided.) > > In the meantime I'd be interested in knowing what others have done for > data validation in Web applications. > > James > Tasos From progrium at gmail.com Thu Jul 14 07:33:44 2005 From: progrium at gmail.com (Jeff Lindsay) Date: Thu, 14 Jul 2005 04:33:44 -0700 Subject: [Nitro] A Web Development Observation In-Reply-To: <42D56111.1070807@neurogami.com> References: <200507110531.54129.dcorbin@machturtle.com> <200507111959.59031.dcorbin@machturtle.com> <200507120643.37382.dcorbin@machturtle.com> <42D56111.1070807@neurogami.com> Message-ID: I was thinking about the way you encode the validation requirements in the HTML. I like the idea, and I know you weren't going for elegance, but this might be a more elegant way to implement client side validation requirements: Or at least that's the general idea. You can use the validator span's title field for the error message. Obviously it gets tricky when you have multiple validators. Here's an alternative: Now you can use the validator span as an actual placeholder for where you display the error message. You can easily just put the title into the body of the span. You can now style all validation errors with the validator class as well as the specific validators. Using style for the validation parameters is the only thing that bugs me, but I think this is a little better than using the class attribute of the input tag. :P Inspired by PHP5's PRADO validators: http://xisc.com/wiki/index.php/A_tutorial_for_using_validators On 7/13/05, James Britt wrote: > David Corbin wrote: > > On Tuesday 12 July 2005 02:58 am, George Moschovitis wrote: > > > >>Hello David, > >> > >>can you explain a little better the benefits of having an intermediate > >>Form object? > > > > > > Two fold, I think. > > > > 1) input validation becomes substantially declarative, and takes place before > > the action/controller "gets control". Error handling is consistent across > > all actions/controllers, probably better factored (thought that could be my > > imagination). > > I've been working on a production Rails application, and have been > facing to problem of coordinating client and server-side data validation. > > First, I've been using Rails for about four months or so. Maybe longer, > in a "playing around" mode, but not much longer. Given the jumbled and > occasionally contradictory state of on-line Rails docs I have assurance > that how I do things is at all the recommended way. Rails may offer a > better way than I've constructed to solve my problem, but I've not heard > of it. > > When a user posts a form, an action gets the post data and (typically) > goes about creating assorted objects and saving or updating records. > > Some of validation is business logic: If the client data is submitted > with contact data, then create a user object, but if you cannot save > both then don't save either one. But much of the validation is basic > sanity checks: user names must be at leas 3 characters long, but not > more than 50, and so on. > > I wanted a way to declare the validation rues for each posted form field > so that it was easy to see what as being checked, so I assembled a > process where I dynamically create a set of Proc objects that are > matched to posted field names. > > So I have code like this: > > LoginConditions = { > "param.size > 4" => "The log-in name is too short", > "param.size < 45" => "The log-in name is too long" > } > > EmailAddressConditions = { > "param =~ /@/" => "Malformed E-mail address" > } > > $user_tests = Hash.new( Proc.new { |param| nil } ) > $user_tests[ 'login' ] = validation_proc LoginConditions > $user_tests[ 'email_address' ] = validation_proc EmailAddressConditions > > > > Each condition is a hash that maps a test to an error message; > condition hashes are then assembled in another hash keyed on parameter > names. > > Behind the scenes, those conditions are converted in procs so that if a > posted parameter matches a condition key, there are a set of methods > applied to parameter value for validation. > > This has worked well enough; this code is called in model classes, so > that prior to creating an object the class can check that the parameters > are reasonable. But it could just as well be called in a controller > action, too. > > Meanwhile, in the client, I have some number of forms that collect this > data. I wanted something similar, where I can declare that an input > field is subject to some client-side validation. > > I began with a simple hack: Use a class attribute value to encode the > validation requirement. For example > > > > indicates that this is a required filed and that the value must be > between 3 and 10 characters long. (The encoding syntax is likely not the > most clever; it was what I got to work off the top of my head, so I was > happy.) > > There is some javascript that loops over all input elements, grabs those > that have a class attribute containing /required/, and munges those > class attribute values to extract the names of javascript functions to > apply to the field values. I have about five validation functions, > stored in a hash. So, the class value of required.size_within.3_10 > becomes this call something like: > params = '3_10' > err_msg = validation_funcs[ 'size_within' ]( input_field_id, params ) > > And if err_msg.length > 0, the message is shown and the user directed > back to the offending input field. > > This, too, worked fine. A downside was that the error messages were in > the .js file, so friendly field-specific messages were awkward to > construct. I decide to add a global JavaScript hash variable, keyed off > of the input field ID, to hold error messages. And I added a Rails > helper class to generate the required markup for the input field and the > message hash assignment. > > So, now I have Ruby code that declares validation conditions for object > instantiation, and Ruby code that creates HTML containing (encoded) > validation requirements. So of course I'm wanting to unite these things > so that I can define validation requirements in one place and have both > client and server perform the same checks. I believe (or hope) I can > restructure things such that the same declarative code that defines the > object creation validation can be used to construct JavaScript functions > for inclusion in the client. > > Having said all this, I do not have any code I can release quite yet. > Mostly this is because it is a bit tangled up with other code, and > probably application/Rails specific. But, if this approach sounds > useful to people, I can see about putting together something. I'm > focused on releasing an application on a tight schedule, so free time is > small. My main motivation for cleaning up code and refactoring to > produce a better product, not extract libraries for distribution. > > This is the sort of thing that really should not be this hard, but I've > yet to see a framework that makes it simple to declare data validation > conditions in one place and apply them both on the the client and > server, so I would like to spin off something here for Nitro if I can. > > Seems that a lot of effort gets put into snazzy drag-n-drop, fading, > glowing, "Wow! We're Web 2.0!" effects, but little in the way of actual > application logic for the browser. (And please someone correct me if > I'm wrong here. And, no, I do not want to make an XMLHttpRequest call to > the server if it can avoided.) > > In the meantime I'd be interested in knowing what others have done for > data validation in Web applications. > > James > > -- > > http://www.ruby-doc.org - The Ruby Documentation Site > http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML > http://www.rubystuff.com - The Ruby Store for Ruby Stuff > http://www.jamesbritt.com - Playing with Better Toys > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From james_b at neurogami.com Thu Jul 14 09:31:05 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 14 Jul 2005 06:31:05 -0700 Subject: [Nitro] A Web Development Observation In-Reply-To: References: <200507110531.54129.dcorbin@machturtle.com> <200507111959.59031.dcorbin@machturtle.com> <200507120643.37382.dcorbin@machturtle.com> <42D56111.1070807@neurogami.com> Message-ID: <42D66919.4080500@neurogami.com> George Moschovitis wrote: > Hello James, > > thanks for the informative post. > > >>Having said all this, I do not have any code I can release quite yet. >>... >>server, so I would like to spin off something here for Nitro if I can. > > > The javascript validation method you describe is relatively common. Really? I've never come across anyone using an associative array of functions to key-off field validation code. I must travel in the wrong circles. :) > It > would be great if you could prepare something useful for inclusion in > Nitro. Yes, and as things settle down I see what I can get out. > > >>Seems that a lot of effort gets put into snazzy drag-n-drop, fading, >>.. >>the server if it can avoided.) > > > Apart from eye candy, AJAX has another useful side-effect. It allows > you to code simpler user interfaces. Simpler from the programmer > perspective. I find it much harder to keep state between > administration screens without some async requests. > > -g. > > PS: hmm my english is pretty bad :( I 'll try to rewrite the last > paragraph in another post, to make it easier to understand my point. > > Oh, I think I understood it well enough, and the use of remote scripting to pass state back to the server is very helpful. I was referring to strictly client-size flashiness. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys \ From james_b at neurogami.com Thu Jul 14 09:57:40 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 14 Jul 2005 06:57:40 -0700 Subject: [Nitro] A Web Development Observation In-Reply-To: <200507140554.57978.dcorbin@machturtle.com> References: <200507110531.54129.dcorbin@machturtle.com> <200507120643.37382.dcorbin@machturtle.com> <42D56111.1070807@neurogami.com> <200507140554.57978.dcorbin@machturtle.com> Message-ID: <42D66F54.5070005@neurogami.com> David Corbin wrote: > On Wednesday 13 July 2005 02:44 pm, James Britt wrote: > > > >>This has worked well enough; this code is called in model classes, so >>that prior to creating an object the class can check that the parameters >>are reasonable. But it could just as well be called in a controller >>action, too. > > > That sounds like a pretty good start, though I think I'd like to simplify the > syntax of it. And, what I really want, I think, is for that validation to > be called automatically, 'in front of' the controller. Technically, it would > be part of the controller in the MVC sense, but it would be done > automatically and the controller/action wouldn't even be called if validation > wasn't passed. Right. At the moment, I use the validation Proc-set method inside the model code to ensure that, no matter who is trying to create an object, the data are reasonable. But for tying something like this into the client and server, the validation should perhaps be associated with the action that is receiving the form post. So, given an action name create_client, the might a Form or Validation method named validate_create_client. Nitro would automagically decide that, prior to invoking create_client, it should pass the parameters through validate_create_client. Meanwhile, the view that rendered the form needs a hook into validate_create_client as well, so that it can be populated with the corresponding validation JavaScript for the matching fields without the designer having to explicitly code for this. One thought I had was to use a single registry of field names and validation code. One would need to use unique names across all forms (or, really, use the same name for any item that matched a given controller/action/parameter). So, parameters posted to the controller.action "Foo.bar" would be registered under "foo.bar.some_name", "foo.bar.some_other_name", and soon. And form fields in templates would then have matching IDs. The framework would then look at each template being rendered and add the validation JavaScript for any field with a matching ID, and intercept calls back to controller/action to preproess any matching parameters. Once the registry is created, a developer would not have to do any more coding to invoke validation. Or something. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From james_b at neurogami.com Thu Jul 14 10:19:08 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 14 Jul 2005 07:19:08 -0700 Subject: [Nitro] A Web Development Observation In-Reply-To: References: <200507110531.54129.dcorbin@machturtle.com> <200507111959.59031.dcorbin@machturtle.com> <200507120643.37382.dcorbin@machturtle.com> <42D56111.1070807@neurogami.com> Message-ID: <42D6745C.9090604@neurogami.com> Jeff Lindsay wrote: > I was thinking about the way you encode the validation requirements in > the HTML. I like the idea, and I know you weren't going for elegance, > but this might be a more elegant way to implement client side > validation requirements: > > ... /> I'd prefer not to have to include any markup other than the specific input field, but one nice advantage to using an enclosing element is that it makes highlighting the area of concern a little easier and nicer. In may application, if there is a form field error, the focus is set back to the offending input field, and the yellow fade technique is applied. But the fade occurs in the form field, not label or general area around it, which would likely look better (and be easier to see). But, yes, introducing additional markup offers greater flexibility for encoding validation commands. > > Or at least that's the general idea. You can use the validator span's > title field for the error message. Obviously it gets tricky when you > have multiple validators. Here's an alternative: > > style="username, 3, 10" title="You must enter a name between 3 and 10 > characters."> > > Now you can use the validator span as an actual placeholder for where > you display the error message. Ah so. I think Basecamp has something like that, where the page does not throw up a JavaScript alert box, but changes the color of the input area and shows a brief error message next to the field. I'm thinking of swiping that, but also an indicator to show when a field has an acceptable entry so that the user is immediately encouraged to look for entry confirmation. > You can easily just put the title into > the body of the span. You can now style all validation errors with the > validator class as well as the specific validators. Using style for > the validation parameters is the only thing that bugs me, but I think > this is a little better than using the class attribute of the input > tag. :P I think the class usage is a little less of a hack, as the content could at least be used as a CSS selector name (assuming valid CSS naming syntax is used, which I haven't really bothered with here). Other options for abuse may be title, alt, and src. > > Inspired by PHP5's PRADO validators: > http://xisc.com/wiki/index.php/A_tutorial_for_using_validators I'll have a look. Thanks > James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From dcorbin at machturtle.com Thu Jul 14 19:56:57 2005 From: dcorbin at machturtle.com (David Corbin) Date: Thu, 14 Jul 2005 19:56:57 -0400 Subject: [Nitro] A Web Development Observation In-Reply-To: <42D66F54.5070005@neurogami.com> References: <200507110531.54129.dcorbin@machturtle.com> <200507140554.57978.dcorbin@machturtle.com> <42D66F54.5070005@neurogami.com> Message-ID: <200507141956.57450.dcorbin@machturtle.com> On Thursday 14 July 2005 09:57 am, James Britt wrote: > > But for tying something like this into the client and server, the > validation should perhaps be associated with the action that is > receiving the form post. > > So, given an action name create_client, the might a Form or Validation > method named validate_create_client. Nitro would automagically decide > that, prior to invoking create_client, it should pass the parameters > through validate_create_client. I'd much prefer an object rather than a method. Obviously, there'd need to be a tie - in somehow. One idea might be the class name for PersonController#create could be PersonCreateForm. And in the controller, you could say form :create, AlternatePersonCreateForm > > Meanwhile, the view that rendered the form needs a hook into > validate_create_client as well, so that it can be populated with the > corresponding validation JavaScript for the matching fields without the > designer having to explicitly code for this. In this case, I'd encourage the form-tag-generating 'helper' could take a Form object. > One thought I had was to use a single registry of field names and > validation code. One would need to use unique names across all forms > (or, really, use the same name for any item that matched a given > controller/action/parameter). Bad idea. Global data is bad. :) From james_b at neurogami.com Thu Jul 14 22:50:14 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 14 Jul 2005 19:50:14 -0700 Subject: [Nitro] A Web Development Observation In-Reply-To: <200507141956.57450.dcorbin@machturtle.com> References: <200507110531.54129.dcorbin@machturtle.com> <200507140554.57978.dcorbin@machturtle.com> <42D66F54.5070005@neurogami.com> <200507141956.57450.dcorbin@machturtle.com> Message-ID: <42D72466.6080405@neurogami.com> David Corbin wrote: > On Thursday 14 July 2005 09:57 am, James Britt wrote: > ... >>One thought I had was to use a single registry of field names and >>validation code. One would need to use unique names across all forms >>(or, really, use the same name for any item that matched a given >>controller/action/parameter). > > > Bad idea. Global data is bad. :) Yeah, I'm not thrilled with that part, but I like the idea that if essentially the same data is entered on different forms (say, an email-address) or sent to different objects then one should be able to apply some common validation both in the client and in the controller or model without duplicating stuff. James From ak at navel.gr Fri Jul 15 01:17:09 2005 From: ak at navel.gr (Anastasios Koutoumanos) Date: Fri, 15 Jul 2005 08:17:09 +0300 Subject: [Nitro] A Web Development Observation In-Reply-To: <42D72466.6080405@neurogami.com> References: <200507110531.54129.dcorbin@machturtle.com> <200507140554.57978.dcorbin@machturtle.com> <42D66F54.5070005@neurogami.com> <200507141956.57450.dcorbin@machturtle.com> <42D72466.6080405@neurogami.com> Message-ID: <42D746D5.8060408@navel.gr> James Britt wrote: > David Corbin wrote: > >> On Thursday 14 July 2005 09:57 am, James Britt wrote: >> ... >> >>> One thought I had was to use a single registry of field names and >>> validation code. One would need to use unique names across all forms >>> (or, really, use the same name for any item that matched a given >>> controller/action/parameter). >> >> >> >> Bad idea. Global data is bad. :) > > > Yeah, I'm not thrilled with that part, but I like the idea that if > essentially the same data is entered on different forms (say, an > email-address) or sent to different objects then one should be able to > apply some common validation both in the client and in the controller > or model without duplicating stuff. this sounds like a superclass - subclass design to me. i would go with the object / class approach david suggests. Tasos > > James > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From ihs_369 at yahoo.com Fri Jul 15 02:35:17 2005 From: ihs_369 at yahoo.com (IRFAN SHEIKH) Date: Thu, 14 Jul 2005 23:35:17 -0700 (PDT) Subject: [Nitro] IDE ! Message-ID: <20050715063517.32754.qmail@web50107.mail.yahoo.com> Goodday fellows! First of all, Congratulations on divising the web-solution of the future; the near-perfect solution. My question: " Would it not be wonderful if Nitro would also provide an IDE-for-Nitro in order to provide RAD facility?" Success to you, Irfan, Lahore, Pakistan. __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 From ak at navel.gr Fri Jul 15 02:52:41 2005 From: ak at navel.gr (Anastasios Koutoumanos) Date: Fri, 15 Jul 2005 09:52:41 +0300 Subject: [Nitro] IDE ! In-Reply-To: <20050715063517.32754.qmail@web50107.mail.yahoo.com> References: <20050715063517.32754.qmail@web50107.mail.yahoo.com> Message-ID: <42D75D39.8060100@navel.gr> IRFAN SHEIKH wrote: > Goodday fellows! > First of all, Congratulations on >divising the web-solution of the future; the >near-perfect solution. > My question: " Would it not be wonderful if >Nitro would also provide an IDE-for-Nitro in order to >provide RAD facility?" > > Success to you, > > Irfan, > Lahore, Pakistan. > > > > Why would you want an(other) IDE when you can have vi? Now, that's a topic for the wiki - go ahaid, start the Nitro IDE page on nitrohq.com! Tasos From epiperak at softlab.ece.ntua.gr Fri Jul 15 03:11:53 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Fri, 15 Jul 2005 10:11:53 +0300 (EEST) Subject: [Nitro] Some questions Message-ID: Hello everybody, I have some questions: 1) When we have 1 controller, eg src/controller.rb dispatched from run.rb then in the .xhtml file the "hohoho" refers to a function on the controller.rb. If I want to point to a different controller what do I have to do? My app has more or less 10 CRUD type pages, and some more complicated ones. I believe it would be bad designing to put all of the controlling in 1 controller, don't you think? 2) In the template of the page, I would like to have a Heading, a Toolbar (just under the heading) and the rest of the page below the Toolbar. The toolbar is an image map. Forgive the newbie question but the following code does not show an image. The toolbar.gif is in the public/media directory and it is an optimized for web gif file def toolbar %~
Toolbar [[executives]] | [[areas]] | [[language]]: \#{session[:LOCALE] || :en} ([[toggle_locales]])
~ end 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 Fri Jul 15 03:38:34 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 15 Jul 2005 10:38:34 +0300 Subject: [Nitro] Cleanup Message-ID: Dear devs, I am trying to cleanup/simplify the template/rendering architecture of Nitro, smoothing rough edges, polishing the code and fixing 'small things'. In the process I am removing some 'cool' features that proved error prone in the practice. One example is the automatic redirect on action. As you may know, If at the end of the action the output buffer is empty, Nitro automatically redirects to the referer. This helps make the code slightly shorter, but has proven error prone, so unless there is an objection I am removing this. regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Fri Jul 15 03:41:55 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 15 Jul 2005 10:41:55 +0300 Subject: [Nitro] Some questions In-Reply-To: References: Message-ID: > 1) When we have 1 controller, eg src/controller.rb dispatched from run.rb > then in the .xhtml file the "hohoho" refers to a > ... > to put all of the controlling in 1 controller, don't you think? easy: hahah > 2) In the template of the page, I would like to have a Heading, a Toolbar > (just under the heading) and the rest of the page below the Toolbar. The > toolbar is an image map. Forgive the newbie question but the following > code does not show an image. The toolbar.gif is in the public/media > directory and it is an optimized for web gif file Have you set the base href? -g. -- http://www.nitrohq.com From epiperak at softlab.ece.ntua.gr Fri Jul 15 04:07:28 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Fri, 15 Jul 2005 11:07:28 +0300 (EEST) Subject: [Nitro] Some questions In-Reply-To: References: Message-ID: > > easy: hahah Thanx > Have you set the base href? > I never studied... Base href? 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 Fri Jul 15 04:10:01 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Fri, 15 Jul 2005 11:10:01 +0300 (EEST) Subject: [Nitro] Some questions In-Reply-To: References: Message-ID: One other kind of stupid question: How do I make the link text NOT underlined? Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From rblists at gmail.com Fri Jul 15 05:56:31 2005 From: rblists at gmail.com (Raphael Bauduin) Date: Fri, 15 Jul 2005 11:56:31 +0200 Subject: [Nitro] Cleanup In-Reply-To: References: Message-ID: On 7/15/05, George Moschovitis wrote: > Dear devs, > > I am trying to cleanup/simplify the template/rendering architecture of > Nitro, smoothing rough edges, polishing the code and fixing 'small > things'. In the process I am removing some 'cool' features that proved > error prone in the practice. > > One example is the automatic redirect on action. As you may know, If > at the end of the action the output buffer is empty, Nitro > automatically redirects to the referer. This helps make the code > slightly shorter, but has proven error prone, so unless there is an > objection I am removing this. > Couldn't this be a configuration item, turned off by default? Raph > regards, > George. > > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From dcorbin at machturtle.com Fri Jul 15 06:01:42 2005 From: dcorbin at machturtle.com (David Corbin) Date: Fri, 15 Jul 2005 06:01:42 -0400 Subject: [Nitro] A Web Development Observation In-Reply-To: <42D72466.6080405@neurogami.com> References: <200507110531.54129.dcorbin@machturtle.com> <200507141956.57450.dcorbin@machturtle.com> <42D72466.6080405@neurogami.com> Message-ID: <200507150601.42405.dcorbin@machturtle.com> On Thursday 14 July 2005 10:50 pm, James Britt wrote: > David Corbin wrote: > > On Thursday 14 July 2005 09:57 am, James Britt wrote: > > ... > > > >>One thought I had was to use a single registry of field names and > >>validation code. One would need to use unique names across all forms > >>(or, really, use the same name for any item that matched a given > >>controller/action/parameter). > > > > Bad idea. Global data is bad. :) > > Yeah, I'm not thrilled with that part, but I like the idea that if > essentially the same data is entered on different forms (say, an > email-address) or sent to different objects then one should be able to > apply some common validation both in the client and in the controller or > model without duplicating stuff. > > James That's why the Form class would have something like this email_field :destination_email Then each place you're using that form, it's consistent. If you want to have multiple forms with different email fields, they all get the same validation logic, but you're not overly coupled. David > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From fabian at oggu.de Fri Jul 15 06:05:16 2005 From: fabian at oggu.de (Fabian Buch) Date: Fri, 15 Jul 2005 12:05:16 +0200 Subject: [Nitro] Some questions In-Reply-To: References: Message-ID: Am 15.07.2005 um 10:10 schrieb Emmanuel Piperakis: > One other kind of stupid question: > How do I make the link text NOT underlined? This has nothing to do with Nitro, use CSS, for example like this: a:link { text-decoration: none; } Fabian PS: google for more if needed or ask in a CSS related forum From bizilan at laposte.net Fri Jul 15 11:02:50 2005 From: bizilan at laposte.net (bizilan) Date: Fri, 15 Jul 2005 17:02:50 +0200 (CEST) Subject: [Nitro] og callbacks bug ? Message-ID: <21598.82.230.198.5.1121439770.squirrel@moumar.dnsalias.org> hi, i've got problems with callbacks described in the Og tutorial require "og" class User prop :name, String def og_post_insert puts("og_post_insert called") end end Og.setup(:store => 'sqlite', :name => 'test') User.new.save never print "og_post_insert called". Any ideas? thanks From george.moschovitis at gmail.com Fri Jul 15 11:18:09 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 15 Jul 2005 18:18:09 +0300 Subject: [Nitro] og callbacks bug ? In-Reply-To: <21598.82.230.198.5.1121439770.squirrel@moumar.dnsalias.org> References: <21598.82.230.198.5.1121439770.squirrel@moumar.dnsalias.org> Message-ID: Yeap, this tutorial refers to an older version of Og. The callbacks were replaced with a more powerful and flexible mechanism, Aspects (Aspect oriented programming). Using aspects you can intercept any method in the Og lifecycle. For more examples have a look at: glue/lib/glue/aspects.rb glue/test/glue/tc_aspects.rb For an example usage have a look at the Timestamped mixin: og/lib/og/mixin/timestamped.rb (please note that this mixin uses the most optimized (and less ruby-like) method of aspect injection) Exactly the same aspects system is used to implement 'controller filters' in Nitro. In the forthcomimng 0.21.0 version aspects (or even simpler, method overloading) are again used to implement 'shaders'. Hope this makes sense to you, If not let me know and I 'll try to explain better. regards, George. On 7/15/05, bizilan wrote: > hi, > > i've got problems with callbacks described in the Og tutorial > > > require "og" > class User > prop :name, String > def og_post_insert > puts("og_post_insert called") > end > end > > Og.setup(:store => 'sqlite', :name => 'test') > User.new.save > > > never print "og_post_insert called". Any ideas? > > thanks > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From sourcery at alltel.net Thu Jul 7 18:42:19 2005 From: sourcery at alltel.net (Tyche) Date: Thu, 7 Jul 2005 18:42:19 -0400 Subject: [Nitro] setup and/or comfigure parameters Message-ID: <007301c58345$228327d0$0200000a@agamemnon> I couldn't find any documention on this so I was looking at the test code and found the following: ------------------- =begin def test_kirby @og = Og.setup( :destroy => true, :store => :kirby, :name => 'test', :embedded => true ) features_test # conversions_test end =end =begin def test_psql @og = Og.setup( :destroy => true, :store => :psql, :name => 'test', :min_messages => 'ERROR', :user => 'postgres', :password => 'navelrulez' ) features_test conversions_test end =end =begin def test_mysql @og = Og.setup( :destroy => true, :store => :mysql, :name => 'test', :user => 'root', :table_type => 'InnoDB', :password => 'navelrulez' ) features_test # conversions_test end =end #=begin def test_sqlite @og = Og.setup( :destroy => true, :store => :sqlite, :name => 'test' ) features_test conversions_test end #=end =begin def test_memory @og = Og.setup( :store => :memory, :name => :test, :destroy => true ) features_test end =end ----------------------- What are the valid symbols for setup or do you use config now? Is :destroy like delete the entire database? tablespace? table? I'm especially interested in SQLite3. -- J Lambert From paul.hanchett at gmail.com Mon Jul 4 17:42:44 2005 From: paul.hanchett at gmail.com (Paul Hanchett) Date: Mon, 04 Jul 2005 14:42:44 -0700 Subject: [Nitro] Tabs or spaces In-Reply-To: References: Message-ID: <42C9AD54.6010606@gmail.com> George Moschovitis wrote: >Hello all, > >I have seen that most ruby projects use spaces instead of tabs in the >source files. Nitro/Og use tabs for the moment (use tab=2). However, >as I am working with Michael on better Nitro-Wee integration I am >thinking about switching to spaces. I would like to hear your opinion, >what are the cons and pros ? > >regards, >George. > > > > > I have a personal preference for tabs, but many people prefer spaces, evidently because code is always "properly" formatted regardless of the editors tab setting. I prefer tabs because I can change someone else's indenting preference just by changing the tab setting. Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050704/4fc36ead/attachment.html From paul.hanchett at gmail.com Fri Jul 15 15:58:04 2005 From: paul.hanchett at gmail.com (Paul Hanchett) Date: Fri, 15 Jul 2005 12:58:04 -0700 Subject: [Nitro] nitrohq.com In-Reply-To: <42D27C05.6090702@navel.gr> References: <42D24908.2020307@navel.gr> <42D278D3.2080803@neurogami.com> <42D27C05.6090702@navel.gr> Message-ID: <42D8154C.2010707@gmail.com> Anastasios Koutoumanos wrote: > James Britt wrote: > >> Anastasios Koutoumanos wrote: >> >>> George Moschovitis wrote: >>> >>>> Dear devs, >>>> >>>> I have started copying some question/answer bits from the list >>>> archives over to the nitro wiki. If anyone can help me with this, I >>>> would appreciated. I am very busy adding the final touches to 0.20.0 >>>> at the moment (a very important release). >>>> >>>> regards, >>>> George. >>>> >>>> >>>> >>> I could help, provided that we aggree on a usage policy for the >>> mailing list and the wiki. I propose you only use the list for >>> announcements, etc. and we try to use the wiki for every other reason. >> >> >> >> Oh, I strongly disagree. Wikis are awkward for threaded discussions >> and the inclusion of time-sensitive material. I prefer to see the >> wiki as a a distiled repository of the most useful information culled >> from the list. > > > I knew this was coming, since I'm not confident myself that such a > usage of the wiki could prove productive... However I'm reluctant in > duplicating information in various places. > > could this be an incentive for working on the right features on wiki > so as to make it useful for such a usage? For example, some such > features could include: > - rss (already there!) > - email notifications (first we need users and user management...) > - comment in existing pages, maybe threaded view (quite easy to > implement) > - email address for wiki, or wiki section, e.g posting to > nitrowiki at nitrohq.com with subject "Wishlist" could append to the > wishlist page, or add a new 'comment' to the page. > - previous feature linked with rss, so we could add a "reply" link in > the rss which would mail with correct subject and add the posting as a > commnet to the originating wiki page. > > Tasos > >> >>> If we really must, we would refer to a wiki's page for answering to >>> a newcomers question addressed to the list, but we try to encourage >>> people posting questions, suggestions, reports, etc. directly to the >>> wiki. >> >> >> >> Except this may make it harder to assess proposed solutions and >> answers. Better to hash out problems here, the copy over the main >> information to wiki. >> >> James > > > > May I suggest coWiki (www.coWiki.org) as a good start? :-) It has a lot of the features you want, including threaded commenting on pages. It also has a security model that allows you to lock down some pages so they can't be changed without authorization. Current weaknesses include inability upload documents or images to the wiki server for inclusion in pages. I also really don't care to write documentation or discussion documents in Wiki markup. :-( Paul Hanchett Maintainer, the coWiki project. :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20050715/2066364b/attachment.html From cjs at cynic.net Mon Jul 11 21:42:06 2005 From: cjs at cynic.net (Curt Sampson) Date: Tue, 12 Jul 2005 10:42:06 +0900 (JST) Subject: [Wee-talk] Re: [Nitro] A Web Development Observation In-Reply-To: <42D24A68.6020708@ntecs.de> References: <200507110531.54129.dcorbin@machturtle.com> <42D24A68.6020708@ntecs.de> Message-ID: On Mon, 11 Jul 2005, Michael Neumann wrote: > Wee does not use URLs in the sense as other frameworks do. While the ability to look more like a local application is one of Wee's strengths, one of its weaknesses is that it more or less destroys the concept of a URI. The Universal Resource Identifier no longer universally identifies a resource. One of the side effects of this is that bookmarks no longer work. I've been wondering if there's some way to fix this while still preserving Wee's strong points. I.e., if I have an application keeping track of items from a catalogue, is it possible to make wee work such that the URI /catalogue/item/171323 will always display the current information for item 171323 (or whatever it's allowed to display about item 171323 given the authorization available from whatever authentication credentials I've previously presented)? Ideally, this would even be displayed in the location bar. Does it even make sense to do this? Or do you just not write applications like that in wee? cjs -- Curt Sampson +81 90 7737 2974 http://www.NetBSD.org Make up enjoying your city life...produced by BIC CAMERA From guillaume.pierronnet at laposte.net Fri Jul 15 12:04:46 2005 From: guillaume.pierronnet at laposte.net (Guillaume Pierronnet) Date: Fri, 15 Jul 2005 18:04:46 +0200 (CEST) Subject: [Nitro] og callbacks bug ? In-Reply-To: References: <21598.82.230.198.5.1121439770.squirrel@moumar.dnsalias.org> Message-ID: <21635.82.230.198.5.1121443486.squirrel@moumar.dnsalias.org> ok thanks, i'll try to update the wiki with these useful informations. regards > Yeap, > > this tutorial refers to an older version of Og. The callbacks were > replaced with a more powerful and flexible mechanism, Aspects (Aspect > oriented programming). Using aspects you can intercept any method in > the Og lifecycle. For more examples have a look at: > > glue/lib/glue/aspects.rb > glue/test/glue/tc_aspects.rb > > For an example usage have a look at the Timestamped mixin: > > og/lib/og/mixin/timestamped.rb > > (please note that this mixin uses the most optimized (and less > ruby-like) method of aspect injection) > > Exactly the same aspects system is used to implement 'controller > filters' in Nitro. In the forthcomimng 0.21.0 version aspects (or even > simpler, method overloading) are again used to implement 'shaders'. > > Hope this makes sense to you, If not let me know and I 'll try to > explain better. > > regards, > George. > > > On 7/15/05, bizilan wrote: >> hi, >> >> i've got problems with callbacks described in the Og tutorial >> >> >> require "og" >> class User >> prop :name, String >> def og_post_insert >> puts("og_post_insert called") >> end >> end >> >> Og.setup(:store => 'sqlite', :name => 'test') >> User.new.save >> >> >> never print "og_post_insert called". Any ideas? >> >> thanks >> >> >> _______________________________________________ >> Nitro-general mailing list >> Nitro-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/nitro-general >> > > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > From george.moschovitis at gmail.com Sun Jul 17 12:56:39 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 17 Jul 2005 19:56:39 +0300 Subject: [Nitro] setup and/or comfigure parameters In-Reply-To: <007301c58345$228327d0$0200000a@agamemnon> References: <007301c58345$228327d0$0200000a@agamemnon> Message-ID: > What are the valid symbols for setup or do you use config now? > Is :destroy like delete the entire database? tablespace? table? > I'm especially interested in SQLite3. :destroy deletes the database. -g. -- http://www.nitrohq.com From progrium at gmail.com Sun Jul 17 12:58:31 2005 From: progrium at gmail.com (Jeff Lindsay) Date: Sun, 17 Jul 2005 09:58:31 -0700 Subject: [Nitro] nitrohq.com In-Reply-To: <42D8154C.2010707@gmail.com> References: <42D24908.2020307@navel.gr> <42D278D3.2080803@neurogami.com> <42D27C05.6090702@navel.gr> <42D8154C.2010707@gmail.com> Message-ID: Or, you know, we could switch to Subversion and then use Trac. This project seems better suited to tigris.org anyway, maybe we should consider it? -Jeff On 7/15/05, Paul Hanchett wrote: > Anastasios Koutoumanos wrote: > James Britt wrote: > > > Anastasios Koutoumanos wrote: > > > George Moschovitis wrote: > > > Dear devs, > > I have started copying some question/answer bits from the list > archives over to the nitro wiki. If anyone can help me with this, I > would appreciated. I am very busy adding the final touches to 0.20.0 > at the moment (a very important release). > > regards, > George. > > > > I could help, provided that we aggree on a usage policy for the mailing > list and the wiki. I propose you only use the list for announcements, etc. > and we try to use the wiki for every other reason. > > Oh, I strongly disagree. Wikis are awkward for threaded discussions and > the inclusion of time-sensitive material. I prefer to see the wiki as a a > distiled repository of the most useful information culled from the list. > > I knew this was coming, since I'm not confident myself that such a usage of > the wiki could prove productive... However I'm reluctant in duplicating > information in various places. > > could this be an incentive for working on the right features on wiki so as > to make it useful for such a usage? For example, some such features could > include: > - rss (already there!) > - email notifications (first we need users and user management...) > - comment in existing pages, maybe threaded view (quite easy to implement) > - email address for wiki, or wiki section, e.g posting to > nitrowiki at nitrohq.com with subject "Wishlist" could append to the wishlist > page, or add a new 'comment' to the page. > - previous feature linked with rss, so we could add a "reply" link in the > rss which would mail with correct subject and add the posting as a commnet > to the originating wiki page. > > Tasos > > > > > If we really must, we would refer to a wiki's page for answering to a > newcomers question addressed to the list, but we try to encourage people > posting questions, suggestions, reports, etc. directly to the wiki. > > > Except this may make it harder to assess proposed solutions and answers. > Better to hash out problems here, the copy over the main information to > wiki. > > James > > > > May I suggest coWiki (www.coWiki.org) as a good start? :-) It has a lot > of the features you want, including threaded commenting on pages. It also > has a security model that allows you to lock down some pages so they can't > be changed without authorization. > > Current weaknesses include inability upload documents or images to the wiki > server for inclusion in pages. I also really don't care to write > documentation or discussion documents in Wiki markup. :-( > > Paul Hanchett > Maintainer, the coWiki project. :-) > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > From mneumann at ntecs.de Sun Jul 17 13:59:54 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Sun, 17 Jul 2005 19:59:54 +0200 Subject: [Nitro] Tabs or spaces In-Reply-To: <42C9AD54.6010606@gmail.com> References: <42C9AD54.6010606@gmail.com> Message-ID: <42DA9C9A.7010007@ntecs.de> Paul Hanchett wrote: > George Moschovitis wrote: > >>Hello all, >> >>I have seen that most ruby projects use spaces instead of tabs in the >>source files. Nitro/Og use tabs for the moment (use tab=2). However, >>as I am working with Michael on better Nitro-Wee integration I am >>thinking about switching to spaces. I would like to hear your opinion, >>what are the cons and pros ? >> >>regards, >>George. >> >> >> >> >> > I have a personal preference for tabs, but many people prefer spaces, > evidently because code is always "properly" formatted regardless of the > editors tab setting. I prefer tabs because I can change someone else's > indenting preference just by changing the tab setting. One big problem I see with tabs is when you do 'diff's of files. Your editor knows that 1 TAB = 2 spaces, the diff util or your shell don't! I'm sure there is a global environment variable for that... but I haven't found it yet. Regards, Michael From dcorbin at machturtle.com Sun Jul 17 15:40:17 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sun, 17 Jul 2005 15:40:17 -0400 Subject: [Nitro] Tabs or spaces In-Reply-To: <42DA9C9A.7010007@ntecs.de> References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> Message-ID: <200507171540.18076.dcorbin@machturtle.com> > One big problem I see with tabs is when you do 'diff's of files. Your > editor knows that 1 TAB = 2 spaces, the diff util or your shell don't! > I'm sure there is a global environment variable for that... but I > haven't found it yet. That's only a problem when you change from one to other. If you're uniformly tabs for indents, it's not an issue. From mneumann at ntecs.de Sun Jul 17 15:51:32 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Sun, 17 Jul 2005 21:51:32 +0200 Subject: [Nitro] Tabs or spaces In-Reply-To: <200507171540.18076.dcorbin@machturtle.com> References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> <200507171540.18076.dcorbin@machturtle.com> Message-ID: <42DAB6C4.8010904@ntecs.de> David Corbin wrote: >>One big problem I see with tabs is when you do 'diff's of files. Your >>editor knows that 1 TAB = 2 spaces, the diff util or your shell don't! >>I'm sure there is a global environment variable for that... but I >>haven't found it yet. > > > That's only a problem when you change from one to other. If you're uniformly > tabs for indents, it's not an issue. Ah thanks. I forgot. My vim does not use TABS... so I inserted spaces accidentally and the diff looked ugly. You're right, that should not be a problem at all. Regards, Michael From neokolor at gmx.de Sun Jul 17 17:32:13 2005 From: neokolor at gmx.de (Jan-Felix Wittmann) Date: Sun, 17 Jul 2005 23:32:13 +0200 Subject: [Nitro] Show model validation errors! Message-ID: <42DACE5D.6080502@gmx.de> Hello. I played some with the Nitro Framework. As basis I used the blog code. I wanted to show og validation errors in my output forms. I tried this: Is this a good way ? or has someone a better idea ? What i don't like is that my view form now not any longer xml compliant. #Controller ... def new_entry entry = request.fill(PlaceEntry.new) unless entry.valid? session[:errors]=entry.errors redirect_referer '#new_entry' end entry.save! end ... private def get_errors if errors = session.delete(:errors) @errors = errors end end #View Form ... ... # ElementsShader class FormError < Nitro::Element def id @id end def render %~ \#{@errors.on(:#{id}).to_s} ~ end end regards, Felix From vanek at acd.net Sun Jul 17 20:32:12 2005 From: vanek at acd.net (Lou Vanek) Date: Sun, 17 Jul 2005 20:32:12 -0400 Subject: [Nitro] Tabs or spaces In-Reply-To: <42DA9C9A.7010007@ntecs.de> References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> Message-ID: diff -b or diff -w ignores white space. i prefer tabs for two reasons: 1. i use vim and ruby-mode vim automatically inserts tabs. 2. people can quickly change the indent level by just resetting their tabstop to whatever floats their boat. (E.g., some people prefer 1-char indents, but I prefer 4.) -lv Michael Neumann wrote: > Paul Hanchett wrote: > >> George Moschovitis wrote: >> >>> Hello all, >>> >>> I have seen that most ruby projects use spaces instead of tabs in the >>> source files. Nitro/Og use tabs for the moment (use tab=2). However, >>> as I am working with Michael on better Nitro-Wee integration I am >>> thinking about switching to spaces. I would like to hear your opinion, >>> what are the cons and pros ? >>> >>> regards, >>> George. >>> >>> >>> >>> >>> >> I have a personal preference for tabs, but many people prefer spaces, >> evidently because code is always "properly" formatted regardless of >> the editors tab setting. I prefer tabs because I can change someone >> else's indenting preference just by changing the tab setting. > > > One big problem I see with tabs is when you do 'diff's of files. Your > editor knows that 1 TAB = 2 spaces, the diff util or your shell don't! > I'm sure there is a global environment variable for that... but I > haven't found it yet. > > Regards, > > Michael From vanek at acd.net Sun Jul 17 20:36:53 2005 From: vanek at acd.net (Lou Vanek) Date: Sun, 17 Jul 2005 20:36:53 -0400 Subject: [Nitro] gem versions Message-ID: fyi, the gem versions are different: 0.20.0 on rubyforge, and 0.20.1 on nitrohq.com. I guess it's all moot when 0.21 comes out though. BTW, nice work. -lv From deb at ysabel.org Sun Jul 17 21:31:31 2005 From: deb at ysabel.org (Ysabel) Date: Sun, 17 Jul 2005 19:31:31 -0600 Subject: [Nitro] Tabs or spaces In-Reply-To: References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> Message-ID: <1DD87E27215F4C35EDAC8F63@[10.19.0.236]> The biggest problem I have with tabs is that it means when you use tools like, oh, less (which I often use to just quickly browse through something) you're stuck with 8-space indentation. At least for me, I find it easier to assume that a tab is 8 spaces, since there are so many general tools for dealing with text out there that make the same assumption, and use spaces for indentation. It's been a long time since I haven't had a tool available to just reindent everything however I like if I'm wanting to see different indentation than whatever the original author used. Some of this is that I care about being able to just browse through sources using things like less. I understand this is archaic and everyone has full refactoring browsers for all their code these days. *grin* -- [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] From george.moschovitis at gmail.com Mon Jul 18 02:32:17 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jul 2005 09:32:17 +0300 Subject: [Nitro] gem versions In-Reply-To: References: Message-ID: The gems in nitrohq.com contain a bug fix. welcome to the list :) -g. On 7/18/05, Lou Vanek wrote: > fyi, the gem versions are different: > 0.20.0 on rubyforge, and > 0.20.1 on nitrohq.com. > I guess it's all moot when 0.21 comes out though. > BTW, nice work. > -lv > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Mon Jul 18 02:34:42 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jul 2005 09:34:42 +0300 Subject: [Nitro] Show model validation errors! In-Reply-To: <42DACE5D.6080502@gmx.de> References: <42DACE5D.6080502@gmx.de> Message-ID: I am thinking about making the Elements system more xhtml compliant. Something like: ... instead of ... what is the opinion of the list? regards, George -- http://www.nitrohq.com From george.moschovitis at gmail.com Mon Jul 18 02:36:41 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jul 2005 09:36:41 +0300 Subject: [Nitro] Tabs or spaces In-Reply-To: <1DD87E27215F4C35EDAC8F63@10.19.0.236> References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> <1DD87E27215F4C35EDAC8F63@10.19.0.236> Message-ID: Yeah, the problem with less bugs me too :( But since we haven't reached a consensus I 'll leave the tabs for the moment. -g. > The biggest problem I have with tabs is that it means when you use tools > ... > -- http://www.nitrohq.com From dcorbin at machturtle.com Mon Jul 18 05:18:47 2005 From: dcorbin at machturtle.com (David Corbin) Date: Mon, 18 Jul 2005 05:18:47 -0400 Subject: [Nitro] Show model validation errors! In-Reply-To: References: <42DACE5D.6080502@gmx.de> Message-ID: <200507180518.47281.dcorbin@machturtle.com> On Monday 18 July 2005 02:34 am, George Moschovitis wrote: > I am thinking about making the > Elements system more xhtml compliant. Something like: > > ... > > instead of > > ... > > what is the opinion of the list? Is that really more compliant? Or simply more consistent? From mneumann at ntecs.de Mon Jul 18 05:56:06 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Mon, 18 Jul 2005 11:56:06 +0200 Subject: [Nitro] Tabs or spaces In-Reply-To: References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> Message-ID: <42DB7CB6.7040309@ntecs.de> Lou Vanek wrote: > diff -b > or > diff -w > ignores white space. > > i prefer tabs for two reasons: > 1. i use vim and ruby-mode vim automatically inserts tabs. > 2. people can quickly change the indent level by just resetting their > tabstop to whatever floats their boat. (E.g., some people prefer 1-char > indents, but I prefer 4.) But it's hard for those people who actually develop their files with spaces. They have to switch their .vimrc each time they work on a project that uses tabs. And most of Ruby code uses spaces AFAIK. Regards, Michael From wolfgang.klinger at gmail.com Mon Jul 18 07:20:49 2005 From: wolfgang.klinger at gmail.com (Wolfgang Klinger) Date: Mon, 18 Jul 2005 13:20:49 +0200 Subject: [Nitro] Tabs or spaces In-Reply-To: <42DB7CB6.7040309@ntecs.de> References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> <42DB7CB6.7040309@ntecs.de> Message-ID: <20050718112049.GH804@STFL-THINKPAD> Hi! On Mon, 18 Jul 2005, Michael Neumann wrote the following: > But it's hard for those people who actually develop their files with > spaces. They have to switch their .vimrc each time they work on a > project that uses tabs. And most of Ruby code uses spaces AFAIK. +1 Regards Wolfgang From alang at cronosys.com Mon Jul 18 08:24:27 2005 From: alang at cronosys.com (Alan Garrison) Date: Mon, 18 Jul 2005 08:24:27 -0400 Subject: [Nitro] Tabs or spaces In-Reply-To: <20050718112049.GH804@STFL-THINKPAD> References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> <42DB7CB6.7040309@ntecs.de> <20050718112049.GH804@STFL-THINKPAD> Message-ID: <42DB9F7B.6040102@cronosys.com> Wolfgang Klinger wrote: > Hi! > > On Mon, 18 Jul 2005, Michael Neumann wrote the following: > > >>But it's hard for those people who actually develop their files with >>spaces. They have to switch their .vimrc each time they work on a >>project that uses tabs. And most of Ruby code uses spaces AFAIK. >> >> > > +1 > > Regards > Wolfgang > > > I generally prefer spaces just because "It Just Works" (tm), but I'd go a step farther and suggest a coding standards document for a given project. I've worked on various open source projects, and the ones that have strict coding standards makes submitting and viewing patches much nicer than "everyone just do it the way you normally would". I'm hacking a PHP open source project currently and the wreckless formatting, along with a hodgepodge of tabs/spaces that it's a royal pain to even look at. Granted, Ruby's overall syntax isn't as token-heavy as PHP, but if there is an expected formatting standard then it (theoritically) makes everyone's life easier. -- Alan Garrison Cronosys, LLC Phone: 216-221-4600 ext 308 From george.moschovitis at gmail.com Mon Jul 18 08:28:18 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jul 2005 15:28:18 +0300 Subject: [Nitro] Tabs or spaces In-Reply-To: <42DB9F7B.6040102@cronosys.com> References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> <42DB7CB6.7040309@ntecs.de> <20050718112049.GH804@STFL-THINKPAD> <42DB9F7B.6040102@cronosys.com> Message-ID: Is there a way to automatically convert Nitro's source code to spaces ? A unix utility perhaps? -g. -- http://www.nitrohq.com From mneumann at ntecs.de Mon Jul 18 08:39:28 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Mon, 18 Jul 2005 14:39:28 +0200 Subject: [Nitro] Tabs or spaces In-Reply-To: References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> <42DB7CB6.7040309@ntecs.de> <20050718112049.GH804@STFL-THINKPAD> <42DB9F7B.6040102@cronosys.com> Message-ID: <42DBA300.6050404@ntecs.de> George Moschovitis wrote: > Is there a way to automatically convert Nitro's source code to spaces > ? A unix utility perhaps? for filename in list_of_filesnames do s = File.read(filename).gsub("\t", " "*2) File.open(filename, "w+") {|f| f << s} end Regards, Michael From george.moschovitis at gmail.com Mon Jul 18 08:48:05 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jul 2005 15:48:05 +0300 Subject: [Nitro] moving stuff to Glue Message-ID: Hello all, In the process of cleaning up Nitro, I am moving some utility files over to Glue. For example the localization and (improved) markup support. Glue will contain Nitro/Og utilities, and I will try to work with Tom to move all general utilities in Glue over to Facets. Perhaps some members of this list could help with porting useful utilities from ActiveSupport over to facets, for the benefit of Nitro and other Ruby projects. If you have any comments/suggestions on this let me know. regards, George. -- http://www.nitrohq.com From mneumann at ntecs.de Mon Jul 18 10:26:28 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Mon, 18 Jul 2005 16:26:28 +0200 Subject: [Nitro] [Og] Active collections pro/contra Message-ID: <42DBBC14.1040807@ntecs.de> Hi all, Initially I liked active collections very much, but then realized that they might do more harm than good. Example: class Account < Og::Entity has_many Mail end class Mail < Og::Entity belongs_to Account end a1 = Account.create m1 = Mail.create a1.mails << m1 a2 = Account.all.first a1.delete(m1) p a1.mails # => [] p a2.mails # => [m1] # or if you call "m1.delete!", the active collection would be # out of sync, too. The problem is that you can get very quickly out of sync, as active collections are per entity object. A solution would be to reuse entity objects, i.e. there'd be only ever one Entity object of oid X. Or to observe the objects. This is not so much of a problem in Nitro, as it fetches the objects for each request, but in Wee, where objects might live across requests, this introduces a few problems. Any ideas? Regards, Michael From george.moschovitis at gmail.com Mon Jul 18 10:39:33 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jul 2005 17:39:33 +0300 Subject: [Nitro] [Og] Active collections pro/contra In-Reply-To: <42DBBC14.1040807@ntecs.de> References: <42DBBC14.1040807@ntecs.de> Message-ID: You could use: a1.mails(:reload => true) or a1.mails(true) to reload the collection. Perhaps I should add an option to dissable 'session'-caching (this will cause performance degradation). Any other ideas? -g. On 7/18/05, Michael Neumann wrote: > Hi all, > > Initially I liked active collections very much, but then realized that > they might do more harm than good. Example: > > class Account < Og::Entity > has_many Mail > end > > class Mail < Og::Entity > belongs_to Account > end > > a1 = Account.create > m1 = Mail.create > > a1.mails << m1 > > a2 = Account.all.first > a1.delete(m1) > > p a1.mails # => [] > p a2.mails # => [m1] > > # or if you call "m1.delete!", the active collection would be > # out of sync, too. > > The problem is that you can get very quickly out of sync, as active > collections are per entity object. A solution would be to reuse entity > objects, i.e. there'd be only ever one Entity object of oid X. Or to > observe the objects. > > This is not so much of a problem in Nitro, as it fetches the objects > for each request, but in Wee, where objects might live across requests, > this introduces a few problems. > > Any ideas? > > Regards, > > Michael > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Mon Jul 18 10:39:33 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jul 2005 17:39:33 +0300 Subject: [Nitro] [Og] Active collections pro/contra In-Reply-To: <42DBBC14.1040807@ntecs.de> References: <42DBBC14.1040807@ntecs.de> Message-ID: You could use: a1.mails(:reload => true) or a1.mails(true) to reload the collection. Perhaps I should add an option to dissable 'session'-caching (this will cause performance degradation). Any other ideas? -g. On 7/18/05, Michael Neumann wrote: > Hi all, > > Initially I liked active collections very much, but then realized that > they might do more harm than good. Example: > > class Account < Og::Entity > has_many Mail > end > > class Mail < Og::Entity > belongs_to Account > end > > a1 = Account.create > m1 = Mail.create > > a1.mails << m1 > > a2 = Account.all.first > a1.delete(m1) > > p a1.mails # => [] > p a2.mails # => [m1] > > # or if you call "m1.delete!", the active collection would be > # out of sync, too. > > The problem is that you can get very quickly out of sync, as active > collections are per entity object. A solution would be to reuse entity > objects, i.e. there'd be only ever one Entity object of oid X. Or to > observe the objects. > > This is not so much of a problem in Nitro, as it fetches the objects > for each request, but in Wee, where objects might live across requests, > this introduces a few problems. > > Any ideas? > > Regards, > > Michael > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Mon Jul 18 10:39:33 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jul 2005 17:39:33 +0300 Subject: [Nitro] [Og] Active collections pro/contra In-Reply-To: <42DBBC14.1040807@ntecs.de> References: <42DBBC14.1040807@ntecs.de> Message-ID: You could use: a1.mails(:reload => true) or a1.mails(true) to reload the collection. Perhaps I should add an option to dissable 'session'-caching (this will cause performance degradation). Any other ideas? -g. On 7/18/05, Michael Neumann wrote: > Hi all, > > Initially I liked active collections very much, but then realized that > they might do more harm than good. Example: > > class Account < Og::Entity > has_many Mail > end > > class Mail < Og::Entity > belongs_to Account > end > > a1 = Account.create > m1 = Mail.create > > a1.mails << m1 > > a2 = Account.all.first > a1.delete(m1) > > p a1.mails # => [] > p a2.mails # => [m1] > > # or if you call "m1.delete!", the active collection would be > # out of sync, too. > > The problem is that you can get very quickly out of sync, as active > collections are per entity object. A solution would be to reuse entity > objects, i.e. there'd be only ever one Entity object of oid X. Or to > observe the objects. > > This is not so much of a problem in Nitro, as it fetches the objects > for each request, but in Wee, where objects might live across requests, > this introduces a few problems. > > Any ideas? > > Regards, > > Michael > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From neokolor at gmx.de Mon Jul 18 11:18:07 2005 From: neokolor at gmx.de (Jan-Felix Wittmann) Date: Mon, 18 Jul 2005 17:18:07 +0200 Subject: [Nitro] Show model validation errors! In-Reply-To: <200507180518.47281.dcorbin@machturtle.com> References: <42DACE5D.6080502@gmx.de> Message-ID: <5.2.0.9.0.20050718170804.03ac40a8@mail.gmx.net> At 11:18 18.07.2005, you wrote: > > I am thinking about making the > > Elements system more xhtml compliant. Something like: > > > > ... > > > > instead of > > > > ... > > > > what is the opinion of the list? I like it. " will become class name "AbcdeAbcde...." ? for "" i prefer "" because it's an Element regards, Felix From george.moschovitis at gmail.com Mon Jul 18 11:16:34 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jul 2005 18:16:34 +0300 Subject: [Nitro] Show model validation errors! In-Reply-To: <5.2.0.9.0.20050718170804.03ac40a8@mail.gmx.net> References: <42DACE5D.6080502@gmx.de> <200507180518.47281.dcorbin@machturtle.com> <5.2.0.9.0.20050718170804.03ac40a8@mail.gmx.net> Message-ID: > I like it. > " will become class name "AbcdeAbcde...." ? > for "" i prefer "" because it's an Element exactly! x: is a placeholder we can decide the prefix to use :) -g. -- http://www.nitrohq.com From vanek at acd.net Mon Jul 18 12:04:50 2005 From: vanek at acd.net (Lou Vanek) Date: Mon, 18 Jul 2005 12:04:50 -0400 Subject: [Nitro] Tabs or spaces In-Reply-To: <1DD87E27215F4C35EDAC8F63@[10.19.0.236]> References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> <1DD87E27215F4C35EDAC8F63@[10.19.0.236]> Message-ID: less -x8 Ysabel wrote: > The biggest problem I have with tabs is that it means when you use tools > like, oh, less (which I often use to just quickly browse through > something) you're stuck with 8-space indentation. > > At least for me, I find it easier to assume that a tab is 8 spaces, > since there are so many general tools for dealing with text out there > that make the same assumption, and use spaces for indentation. It's > been a long time since I haven't had a tool available to just reindent > everything however I like if I'm wanting to see different indentation > than whatever the original author used. > > Some of this is that I care about being able to just browse through > sources using things like less. I understand this is archaic and > everyone has full refactoring browsers for all their code these days. > *grin* > From vanek at acd.net Mon Jul 18 12:08:57 2005 From: vanek at acd.net (Lou Vanek) Date: Mon, 18 Jul 2005 12:08:57 -0400 Subject: [Nitro] Tabs or spaces In-Reply-To: References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> <42DB7CB6.7040309@ntecs.de> <20050718112049.GH804@STFL-THINKPAD> <42DB9F7B.6040102@cronosys.com> Message-ID: cat foo_tab.rb | sed -e 's/\t/ /' > foo_space.rb George Moschovitis wrote: > Is there a way to automatically convert Nitro's source code to spaces > ? A unix utility perhaps? > > -g. > > From deb at ysabel.org Mon Jul 18 12:51:50 2005 From: deb at ysabel.org (Ysabel) Date: Mon, 18 Jul 2005 10:51:50 -0600 Subject: [Nitro] Tabs or spaces In-Reply-To: References: <42C9AD54.6010606@gmail.com> <42DA9C9A.7010007@ntecs.de> <1DD87E27215F4C35EDAC8F63@[10.19.0.236]> Message-ID: <4F50D8AE794B818A8EE696D0@[10.19.0.236]> --On Monday, July 18, 2005 12:04 PM -0400 Lou Vanek wrote: > Ysabel wrote: >> The biggest problem I have with tabs is that it means when you use tools >> like, oh, less (which I often use to just quickly browse through >> something) you're stuck with 8-space indentation. > > less -x8 Yes, it's solvable with less. My point is more that there are a lot of text-processing tools out there that make assumptions about tabs that make dealing with tab-indented text annoying. It's not that none of those are fixable, it's that personally any time that I really care about 2-space vs. 4-space indentation, I'm already in an editor that can re-indent the entire file trivially, whereas I often use text tools that show tabs as 8 spaces to browse through code. Re standards, I'll note that it's not that difficult to set up a preprocessor on most CM tools (CVS and SVN included, I believe) that forces a particular code formatting on the way in. Good for requiring a particular standard, even if people have put in tabs or too many or too few spaces while working. -- [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] From jeff.darklight at gmail.com Mon Jul 18 13:29:27 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 18 Jul 2005 10:29:27 -0700 Subject: [Nitro] Og ... NameError: uninitialized constant Og::Database Message-ID: I just setup a fresh install of Ruby ... Added Gems Added mysql Added nitro ( and all dependancies ) Tested that mysql is connecting to my database and having no troubles returning data. Provided the following as a script: #!/usr/bin/env ruby require 'rubygems' require 'og' class Object1 prop_accessor :name, String end class Object2 prop_accessor :name, String end db = Og::Database.new( :database => 'my_test', :store => 'mysql', :user => 'test_user', :password => '********' ) a = Object1.new a.name = "test1" db << a end-of-script ... I chmod +x 'd the script and ran it ./test.rb I'm getting: ./test.rb:14: uninitialized constant Og::Database (NameError) I don't know what's wrong ... I get the same error trying to step through things in irb... pops at the same spot. Your help is appreciated. j. -- "So long, and thanks for all the fish" From nospam at lunacymaze.org Mon Jul 18 13:39:23 2005 From: nospam at lunacymaze.org (Ghislain Mary) Date: Mon, 18 Jul 2005 19:39:23 +0200 Subject: [Nitro] Og ... NameError: uninitialized constant Og::Database In-Reply-To: References: Message-ID: <42DBE94B.3080302@lunacymaze.org> Hi, See the thread about this issue from a week before: http://rubyforge.org/pipermail/nitro-general/2005-July/000589.html HTH, Ghislain From jeff.darklight at gmail.com Mon Jul 18 14:05:54 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 18 Jul 2005 11:05:54 -0700 Subject: [Nitro] Og ... NameError: uninitialized constant Og::Database In-Reply-To: <42DBE94B.3080302@lunacymaze.org> References: <42DBE94B.3080302@lunacymaze.org> Message-ID: Thank you very much, that was it. There are a NUMBER of places where the tutorials show the way I tried to do it... Those should probably get updated... Other than that, thank you all very much for such a wonderful tool. j. On 7/18/05, Ghislain Mary wrote: > Hi, > > See the thread about this issue from a week before: > > http://rubyforge.org/pipermail/nitro-general/2005-July/000589.html > > HTH, > > Ghislain > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- "So long, and thanks for all the fish" Jeff Wood From george.moschovitis at gmail.com Mon Jul 18 15:57:35 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jul 2005 22:57:35 +0300 Subject: [Nitro] Og ... NameError: uninitialized constant Og::Database In-Reply-To: References: <42DBE94B.3080302@lunacymaze.org> Message-ID: The tutorial refers to an older version, have a look at doc/RELEASES for more information. regards, George. On 7/18/05, Jeff Wood wrote: > Thank you very much, that was it. > > There are a NUMBER of places where the tutorials show the way I tried > to do it... > > Those should probably get updated... > > Other than that, thank you all very much for such a wonderful tool. > > j. > > On 7/18/05, Ghislain Mary wrote: > > Hi, > > > > See the thread about this issue from a week before: > > > > http://rubyforge.org/pipermail/nitro-general/2005-July/000589.html > > > > HTH, > > > > Ghislain > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > -- > "So long, and thanks for all the fish" > > Jeff Wood > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From jforeman at hark.org Mon Jul 18 16:16:04 2005 From: jforeman at hark.org (Jason Foreman) Date: Mon, 18 Jul 2005 15:16:04 -0500 Subject: [Nitro] stabilizing the API Message-ID: <34379194-9060-4D4F-9317-D9494B7BE8E1@hark.org> I'm just getting a change to do some work with Nitro, and the most frustrating thing for me is that it seems like the API changes significantly in every version. I don't like the idea of developing an app using 0.20.0 and having to rewrite much of it when 0.21.0 comes out. This is reflected in the fact that none of the documentation or tutorials seem to reflect the current API. Can I expect this trend to continue or is there a plan to stabilize the API or at least maintain backwards compatibility in some form? Jason From Aleksi.Niemela at cs.helsinki.fi Mon Jul 18 16:58:04 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Mon, 18 Jul 2005 23:58:04 +0300 Subject: [Nitro] stabilizing the API In-Reply-To: <34379194-9060-4D4F-9317-D9494B7BE8E1@hark.org> References: <34379194-9060-4D4F-9317-D9494B7BE8E1@hark.org> Message-ID: <42DC17DC.30708@cs.helsinki.fi> Jason Foreman wrote: > I'm just getting a change to do some work with Nitro, and the most > frustrating thing for me is that it seems like the API changes > significantly in every version. I don't like the idea of developing > an app using 0.20.0 and having to rewrite much of it when 0.21.0 > comes out. > Jason, this is the way versioning usually works. Refer to for example http://en.wikipedia.org/wiki/Version There will be _lots_ of changes for Nitro and Og before it hits 0.25, or 0.5, but at some point things start to get fixture on top of them to the point version 1.0 will be looming. Still API might change a bit for 1.1, but 1.01 is probably quite close to 1.0. Don't interpret the version number to be 2.0. It isn't that mature yet. Things change! And I'm personally very happy George doesn't let version number to hinder him too much while developing. I greet new versions with joy! OTOH, there's no production level like code I have to port over to new version every now and then. You know there's not always reason to upgrade, so do yourself a favor and if you can cope with the version you're using don't take newer versions. You can always do it when you need the new features and then you must commit yourself to change your code anyway. > This is reflected in the fact that none of the documentation or > tutorials seem to reflect the current API. > Sadly, this is the downside (among others) of fast changing APIs. Documentation and tutorials don't keep up with the pace. I'm sure we others can help George on this and let him churn out mostly bug free code. I'm sure you can see some community effort on Wiki, albeit there's not too much force behind (yet). > Can I expect this trend to continue or is there a plan to stabilize > the API or at least maintain backwards compatibility in some form? I'm not responding for George, but in general I'd say you can expect things to stabilize little by little, but even major revamps of all the APIs might be due, maybe even few times before we see 1.0. So bewarned of the dangers of bleeding edge (and all the versions of all the software mankind has produced below 1.2)! - Aleksi From Aleksi.Niemela at cs.helsinki.fi Mon Jul 18 19:20:47 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Tue, 19 Jul 2005 02:20:47 +0300 Subject: [Nitro] mixin/orderable broken in Og 0.20.0 Message-ID: <42DC394F.2030009@cs.helsinki.fi> Or at least I can't make it run. For some reason #move_higher induced #increment_position induced call update(:position) doesn't work out in SQL generating part. But I can't see what's the problem there. Perhaps a fix is due. Or a fix for a misleading test case. - Aleksi $ ruby -I ../../../lib -I /lib/ruby/gems/1.8/gems/glue-0.20.0/lib/ -I /lib/ruby/gems/1.8/gems/facets-0.7.2/lib -I /lib/ ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/ -r postgres tc_orderable.rb dropdb: could not connect to database template1: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? Loaded suite tc_orderable Started INFO: Created table 'ogtestcaseogorderable_article'. INFO: Created table 'ogtestcaseogorderable_comment'. ERROR: Error in transaction ERROR: undefined method `[]' for :position:Symbol (NoMethodError) ../../../lib/og/store/sql.rb:234:in `update' ../../../lib/og/entity.rb:26:in `update' (eval):84:in `increment_position' (eval):10:in `move_higher' (eval):9:in `transaction' ../../../lib/og/entity.rb:124:in `transaction' (eval):9:in `move_higher' tc_orderable.rb:59:in `test_all' /usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' /usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' /usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' /usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' /usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite' /usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediator' /usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start' /usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run' /usr/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' /usr/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' /usr/lib/ruby/1.8/test/unit.rb:285 /usr/lib/ruby/1.8/test/unit.rb:283 ERROR: ["../../../lib/og/store/sql.rb:234:in `update'", "../../../lib/og/entity.rb:26:in `update'", "(eval):84:in `incre ment_position'", "(eval):10:in `move_higher'", "(eval):9:in `transaction'", "../../../lib/og/entity.rb:124:in `transacti on'", "(eval):9:in `move_higher'", "tc_orderable.rb:59:in `test_all'", "/usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `_ _send__'", "/usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `run'", "/usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'" , "/usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each'", "/usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run'", "/usr /lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'", "/usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each'", "/usr/lib/ru by/1.8/test/unit/testsuite.rb:31:in `run'", "/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite'", "/ usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediator'", "/usr/lib/ruby/1.8/test/unit/ui/console/tes trunner.rb:39:in `start'", "/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run'", "/usr/lib/ruby/1.8/test/ unit/autorunner.rb:194:in `run'", "/usr/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run'", "/usr/lib/ruby/1.8/test/unit. rb:285", "/usr/lib/ruby/1.8/test/unit.rb:283"] F Finished in 1.076 seconds. 1) Failure: test_all(TestCaseOgOrderable) [tc_orderable.rb:67]: <2> expected but was <3>. 1 tests, 5 assertions, 1 failures, 0 errors From epiperak at softlab.ece.ntua.gr Mon Jul 18 21:45:28 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 19 Jul 2005 04:45:28 +0300 (EEST) Subject: [Nitro] Some questions In-Reply-To: References: Message-ID: >> One other kind of stupid question: >> How do I make the link text NOT underlined? > > This has nothing to do with Nitro, use CSS, for example like this: > > a:link { text-decoration: none; } > > Fabian > > PS: google for more if needed or ask in a CSS related forum > Thanx 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 Jul 18 22:09:41 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 19 Jul 2005 05:09:41 +0300 (EEST) Subject: [Nitro] Show model validation errors! In-Reply-To: References: <42DACE5D.6080502@gmx.de> Message-ID: I have one big request: Backward compatiblity! I know that Nitro/Og are still beta, but it is important that when we upgrade our application still functions. In case something has to change, it would be nice if it is explained first, how to change our code to the new version "way"... > I am thinking about making the > Elements system more xhtml compliant. Something like: > > ... > > instead of > > ... > > what is the opinion of the list? > > regards, > George > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > 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 Tue Jul 19 03:10:08 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 19 Jul 2005 10:10:08 +0300 Subject: [Nitro] stabilizing the API In-Reply-To: <34379194-9060-4D4F-9317-D9494B7BE8E1@hark.org> References: <34379194-9060-4D4F-9317-D9494B7BE8E1@hark.org> Message-ID: Hello Jason On 7/18/05, Jason Foreman wrote: > I'm just getting a change to do some work with Nitro, and the most sounds great :) > frustrating thing for me is that it seems like the API changes > significantly in every version. I don't like the idea of developing > an app using 0.20.0 and having to rewrite much of it when 0.21.0 > comes out. I can understand your concerns. I am afraid that there will be some API refactorings and changes for quite some time. Remember, we want to take some time to get things right before stabilising the API. However, I believe that updating your code to the latest version is relatively easy, and I am always prepared to help anyone that maintains a nitro application to update to the latest version. Just mail your problem and I (or someone else on this list) will be glad to help you. > Can I expect this trend to continue or is there a plan to stabilize > the API or at least maintain backwards compatibility in some form? Yeah, we will try extra hard to stabilize the API, but please be a little more patient. regards, George. PS: for any other problem or for extra help don't hesitate to post to the list. -- http://www.nitrohq.com From george.moschovitis at gmail.com Tue Jul 19 03:12:44 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 19 Jul 2005 10:12:44 +0300 Subject: [Nitro] stabilizing the API In-Reply-To: <42DC17DC.30708@cs.helsinki.fi> References: <34379194-9060-4D4F-9317-D9494B7BE8E1@hark.org> <42DC17DC.30708@cs.helsinki.fi> Message-ID: > Documentation and tutorials don't keep up with the pace. I'm sure we > others can help George on this and let him churn out mostly bug free > code. I'm sure you can see some community effort on Wiki, albeit there's > not too much force behind (yet). Yeah, help from the community is really needed to drive this project forward. The Wiki is a first step, other steps will follow, but really, even more help in the form of patches and/or documentation/evangelising is needed from the members of the list. regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Tue Jul 19 03:13:45 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 19 Jul 2005 10:13:45 +0300 Subject: [Nitro] mixin/orderable broken in Og 0.20.0 In-Reply-To: <42DC394F.2030009@cs.helsinki.fi> References: <42DC394F.2030009@cs.helsinki.fi> Message-ID: Hmm, very strange. Thanks for reporting, I 'll investigate. -g. On 7/19/05, Aleksi Niemela wrote: > Or at least I can't make it run. For some reason #move_higher induced > #increment_position induced call update(:position) doesn't work out in > SQL generating part. But I can't see what's the problem there. > > Perhaps a fix is due. Or a fix for a misleading test case. > > - Aleksi > > > $ ruby -I ../../../lib -I /lib/ruby/gems/1.8/gems/glue-0.20.0/lib/ -I > /lib/ruby/gems/1.8/gems/facets-0.7.2/lib -I /lib/ > ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/ -r postgres tc_orderable.rb > dropdb: could not connect to database template1: could not connect to > server: No such file or directory > Is the server running locally and accepting > connections on Unix domain socket "/tmp/.s.PGSQL.5432"? > Loaded suite tc_orderable > Started > INFO: Created table 'ogtestcaseogorderable_article'. > INFO: Created table 'ogtestcaseogorderable_comment'. > ERROR: Error in transaction > ERROR: undefined method `[]' for :position:Symbol (NoMethodError) > ../../../lib/og/store/sql.rb:234:in `update' > ../../../lib/og/entity.rb:26:in `update' > (eval):84:in `increment_position' > (eval):10:in `move_higher' > (eval):9:in `transaction' > ../../../lib/og/entity.rb:124:in `transaction' > (eval):9:in `move_higher' > tc_orderable.rb:59:in `test_all' > /usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' > /usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > /usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > /usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > /usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite' > /usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediator' > /usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start' > /usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run' > /usr/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' > /usr/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' > /usr/lib/ruby/1.8/test/unit.rb:285 > /usr/lib/ruby/1.8/test/unit.rb:283 > ERROR: ["../../../lib/og/store/sql.rb:234:in `update'", > "../../../lib/og/entity.rb:26:in `update'", "(eval):84:in `incre > ment_position'", "(eval):10:in `move_higher'", "(eval):9:in > `transaction'", "../../../lib/og/entity.rb:124:in `transacti > on'", "(eval):9:in `move_higher'", "tc_orderable.rb:59:in `test_all'", > "/usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `_ > _send__'", "/usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `run'", > "/usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'" > , "/usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each'", > "/usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run'", "/usr > /lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'", > "/usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each'", "/usr/lib/ru > by/1.8/test/unit/testsuite.rb:31:in `run'", > "/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite'", "/ > usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in > `start_mediator'", "/usr/lib/ruby/1.8/test/unit/ui/console/tes > trunner.rb:39:in `start'", > "/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run'", > "/usr/lib/ruby/1.8/test/ > unit/autorunner.rb:194:in `run'", > "/usr/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run'", > "/usr/lib/ruby/1.8/test/unit. > rb:285", "/usr/lib/ruby/1.8/test/unit.rb:283"] > F > Finished in 1.076 seconds. > > 1) Failure: > test_all(TestCaseOgOrderable) [tc_orderable.rb:67]: > <2> expected but was > <3>. > > 1 tests, 5 assertions, 1 failures, 0 errors > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From progrium at gmail.com Tue Jul 19 03:26:29 2005 From: progrium at gmail.com (Jeff Lindsay) Date: Tue, 19 Jul 2005 00:26:29 -0700 Subject: [Nitro] Nitro wiki Message-ID: One of my first things I added to the Nitro wishlist was to port the wiki to Trac (http://www.edgewall.com/trac/), an integrated SCM and project management open source project written in Python. That was before I realized the wiki was written in Nitro. I'm glad it is. There's some hints at spinning it off to its own open source project. Has this been done yet? There's some great stuff in the wiki wishlist and it would be great if we could contribute actual code to the wiki. -Jeff From george.moschovitis at gmail.com Tue Jul 19 03:35:30 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 19 Jul 2005 10:35:30 +0300 Subject: [Nitro] Nitro wiki In-Reply-To: References: Message-ID: Yeap, the wiki code will be released as an open source project, just after nitro 0.21.0 is released (beginning of next week). I hope to see significant contributions to this little project :) regards, George. On 7/19/05, Jeff Lindsay wrote: > One of my first things I added to the Nitro wishlist was to port the > wiki to Trac (http://www.edgewall.com/trac/), an integrated SCM and > project management open source project written in Python. That was > before I realized the wiki was written in Nitro. I'm glad it is. > > There's some hints at spinning it off to its own open source project. > Has this been done yet? There's some great stuff in the wiki wishlist > and it would be great if we could contribute actual code to the wiki. > > -Jeff > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From bizilan at laposte.net Tue Jul 19 09:12:42 2005 From: bizilan at laposte.net (bizilan) Date: Tue, 19 Jul 2005 15:12:42 +0200 (CEST) Subject: [Nitro] strange "hello world" behaviour Message-ID: <33415.127.0.0.1.1121778762.squirrel@localhost> i ran the hello example and tried to access pages as described in comments. /math?val1=xxx;val2=yyy works fine but /math/xxx/yyy gives me : DEBUG: Rendering '/math/xxx/yyy'. DEBUG: Compiling action 'public/math__xxx__yyy' ERROR: Error while handling '/math/xxx/yyy'. ERROR: undefined method `math__xxx__yyy_action' for # /usr/lib/ruby/gems/1.8/gems/nitro-0.20.1/lib/nitro/controller.rb:173:in `method_missing' /usr/lib/ruby/gems/1.8/gems/nitro-0.20.1/lib/nitro/render.rb:314:in `send' /usr/lib/ruby/gems/1.8/gems/nitro-0.20.1/lib/nitro/render.rb:314:in `render' /usr/lib/ruby/gems/1.8/gems/nitro-0.20.1/lib/nitro/adapter/webrick.rb:128:in `do_GET' /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `__send__' /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib/ruby/1.8/webrick/server.rb:172:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:161:in `start' /usr/lib/ruby/1.8/webrick/server.rb:161:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/lib/ruby/gems/1.8/gems/nitro-0.20.1/lib/nitro/adapter/webrick.rb:48:in `start' /usr/lib/ruby/gems/1.8/gems/nitro-0.20.1/lib/nitro/server.rb:68:in `start' /usr/lib/ruby/gems/1.8/gems/nitro-0.20.1/lib/nitro/server.rb:83:in `run' run.rb:19 LOGGED FROM: /usr/lib/ruby/gems/1.8/gems/nitro-0.20.1/lib/nitro/render.rb:362:in `log_error' does i have missed something ? From george.moschovitis at gmail.com Tue Jul 19 09:28:15 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 19 Jul 2005 16:28:15 +0300 Subject: [Nitro] strange "hello world" behaviour In-Reply-To: <33415.127.0.0.1.1121778762.squirrel@localhost> References: <33415.127.0.0.1.1121778762.squirrel@localhost> Message-ID: > /math?val1=xxx;val2=yyy works fine > but /math/xxx/yyy gives me : you have to do add some routing tips for this to work for the moment :( Have a look at the why_wiki example for an ...example. It goes something like this def index .. end action :index, :route => %r{math/(.*)/(.*)} I am working on a more clever dispatcher that will take care of this automatically, and also allow for namespace based routing (like Catalyst). Stay tuned. -g. -- http://www.nitrohq.com From jeff.darklight at gmail.com Tue Jul 19 10:10:50 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 19 Jul 2005 07:10:50 -0700 Subject: [Nitro] Nitro wiki In-Reply-To: References: Message-ID: So, what changes can we expect in 0.21? From what I've been seeing on the list, there seems to be quite a few "heavy" changes ... I understand it's early, but I am trying to write production software with this stuff ... I know it may be too early ... but, really, unless there's a great reason, APIs should stabilize. j. On 7/19/05, George Moschovitis wrote: > Yeap, the wiki code will be released as an open source project, just > after nitro 0.21.0 is released (beginning of next week). I hope to see > significant contributions to this little project :) > > regards, > George. > > > > On 7/19/05, Jeff Lindsay wrote: > > One of my first things I added to the Nitro wishlist was to port the > > wiki to Trac (http://www.edgewall.com/trac/), an integrated SCM and > > project management open source project written in Python. That was > > before I realized the wiki was written in Nitro. I'm glad it is. > > > > There's some hints at spinning it off to its own open source project. > > Has this been done yet? There's some great stuff in the wiki wishlist > > and it would be great if we could contribute actual code to the wiki. > > > > -Jeff > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- "So long, and thanks for all the fish" Jeff Wood From jeff.darklight at gmail.com Tue Jul 19 10:16:25 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 19 Jul 2005 07:16:25 -0700 Subject: [Nitro] stabilizing the API In-Reply-To: References: <34379194-9060-4D4F-9317-D9494B7BE8E1@hark.org> <42DC17DC.30708@cs.helsinki.fi> Message-ID: I'm still relatively *young* in my Ruby ... but, I'm more than happy to help with the project. There is SO much power in what you've developed... I'm still getting past the learning curve... but, I'm already in love with things... I understand that some projects "percolate" their API to a "best-case" solution and I don't mind that ... I'm just trying to use this for real-world projects ... And, it does make it hard to gain any traction with my team when things are as unstable ( constantly changing ) as they are. Anyways, I'm not complaining ... just voicing my opinion ... you've got to support your community and help them make things that work ... otherwise there isn't much of a value proposition for people trying to use things for the real world. j. On 7/19/05, George Moschovitis wrote: > > Documentation and tutorials don't keep up with the pace. I'm sure we > > others can help George on this and let him churn out mostly bug free > > code. I'm sure you can see some community effort on Wiki, albeit there's > > not too much force behind (yet). > > Yeah, help from the community is really needed to drive this project > forward. The Wiki is a first step, other steps will follow, but > really, even more help in the form of patches and/or > documentation/evangelising is needed from the members of the list. > > regards, > George. > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- "So long, and thanks for all the fish" Jeff Wood From deb at ysabel.org Tue Jul 19 13:54:32 2005 From: deb at ysabel.org (Ysabel) Date: Tue, 19 Jul 2005 11:54:32 -0600 Subject: [Nitro] nitro-auth package (was Re: Nitro wiki) In-Reply-To: References: Message-ID: <8CCB86AA51DDC681071C576A@[10.19.0.236]> --On Tuesday, July 19, 2005 10:35 AM +0300 George Moschovitis wrote: > Yeap, the wiki code will be released as an open source project, just > after nitro 0.21.0 is released (beginning of next week). I hope to see > significant contributions to this little project :) I'm shooting for managing to get a first pass of the Nitro authentication stuff I've been working on concurrent with this (or at least shortly afterward, as I should probably make sure it works with the 0.21.0 release...). I don't know if I'll have challenge-response working by then as having a simple example seems more important, and I also have a couple of Og patches I'd really like to see make it into 0.21.0. But we'll see. If anyone has input, feel free to stop by http://www.nitrohq.com/view/Authentication_and_Authorization and comment, or drop me an email, or both. You can peek at the rdoc for its state as of last night at http://www.ysabel.org/ruby/doc/nitro-auth/ as well, if you're interested. (Obviously, as a pre-0.1.0 state, the API isn't even close to fixed yet, though it is (intentionally) simple enough that I hope to maintain some level of backwards compatibility as much as possible.) -- [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] From alang at cronosys.com Tue Jul 19 14:07:04 2005 From: alang at cronosys.com (Alan Garrison) Date: Tue, 19 Jul 2005 14:07:04 -0400 Subject: [Nitro] nitro-auth package (was Re: Nitro wiki) In-Reply-To: <8CCB86AA51DDC681071C576A@[10.19.0.236]> References: <8CCB86AA51DDC681071C576A@[10.19.0.236]> Message-ID: <42DD4148.9090209@cronosys.com> Ysabel wrote: > --On Tuesday, July 19, 2005 10:35 AM +0300 George Moschovitis > wrote: > >> Yeap, the wiki code will be released as an open source project, just >> after nitro 0.21.0 is released (beginning of next week). I hope to see >> significant contributions to this little project :) > > > I'm shooting for managing to get a first pass of the Nitro > authentication stuff I've been working on concurrent with this (or at > least shortly afterward, as I should probably make sure it works with > the 0.21.0 release...). I don't know if I'll have challenge-response > working by then as having a simple example seems more important, and I > also have a couple of Og patches I'd really like to see make it into > 0.21.0. But we'll see. > > If anyone has input, feel free to stop by > http://www.nitrohq.com/view/Authentication_and_Authorization and > comment, or drop me an email, or both. You can peek at the rdoc for > its state as of last night at > http://www.ysabel.org/ruby/doc/nitro-auth/ as well, if you're > interested. (Obviously, as a pre-0.1.0 state, the API isn't even > close to fixed yet, though it is (intentionally) simple enough that I > hope to maintain some level of backwards compatibility as much as > possible.) > Is there any way you could make the "backend" pluggable? The software I'm used to dealing with has a general Auth object, with the actual guts of the authentication set up as a simple factory pattern with different classes based on its auth type (sql table, LDAP, backend text file, etc). The first app I want to (try to) write using Nitro needs authentication, so I'll see if I can help out with patches when I get the chance. -- Alan Garrison Cronosys, LLC Phone: 216-221-4600 ext 308 From deb at ysabel.org Tue Jul 19 14:16:03 2005 From: deb at ysabel.org (Ysabel) Date: Tue, 19 Jul 2005 12:16:03 -0600 Subject: [Nitro] nitro-auth package (was Re: Nitro wiki) In-Reply-To: <42DD4148.9090209@cronosys.com> References: <8CCB86AA51DDC681071C576A@[10.19.0.236]> <42DD4148.9090209@cronosys.com> Message-ID: <067F210C73C10676FFC0DF86@[10.19.0.236]> --On Tuesday, July 19, 2005 2:07 PM -0400 Alan Garrison wrote: > Is there any way you could make the "backend" pluggable? The software > I'm used to dealing with has a general Auth object, with the actual guts > of the authentication set up as a simple factory pattern with different > classes based on its auth type (sql table, LDAP, backend text file, etc). I'm guessing by 'backend' you mean 'storage of user ids and credentials' as opposed to 'encryption mechanism'? If so, yes, that's definitely a goal, though it's lower on my list right now. But part of the point of splitting out what the auth system needs to identify a user from the application's concept of a user is to allow exactly that sort of thing. I can put taking a first shot at what the storage api would look like on my todo list. -- [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] From jforeman at hark.org Tue Jul 19 19:58:38 2005 From: jforeman at hark.org (Jason Foreman) Date: Tue, 19 Jul 2005 18:58:38 -0500 Subject: [Nitro] stabilizing the API In-Reply-To: References: <34379194-9060-4D4F-9317-D9494B7BE8E1@hark.org> Message-ID: <0732BF5E-CEB3-43AE-B7E6-C149CB350C18@hark.org> On Jul 19, 2005, at 2:10 AM, George Moschovitis wrote: > Hello Jason > > On 7/18/05, Jason Foreman wrote: > >> I'm just getting a change to do some work with Nitro, and the most >> > > sounds great :) I'm starting with the obligatory blog application. So far Nitro seems pretty straightforward, while remaining incredibly flexible. It is slightly more work than Rails to get going, but along with that comes the freedom of not having a cookie-cutter application. I've found myself creating a very Rails-like directory layout during my first attempts, but I'm sure that habit will dissipate. >> frustrating thing for me is that it seems like the API changes >> significantly in every version. I don't like the idea of developing >> an app using 0.20.0 and having to rewrite much of it when 0.21.0 >> comes out. >> > > I can understand your concerns. I am afraid that there will be some > API > refactorings and changes for quite some time. Remember, we want to > take > some time to get things right before stabilising the API. Understandable. I am looking forward to what new and exciting things will come in the future. >> Can I expect this trend to continue or is there a plan to stabilize >> the API or at least maintain backwards compatibility in some form? >> > > Yeah, we will try extra hard to stabilize the API, but please be a > little more patient. I will try! Thanks, Jason From epiperak at softlab.ece.ntua.gr Tue Jul 19 21:28:09 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Wed, 20 Jul 2005 04:28:09 +0300 (EEST) Subject: [Nitro] Mental note...(webrick issue) Message-ID: I just found out, after relocating my server, changing IP, provider, firewalls routers, etc etc that webrick did not work! It could not bind the IP. After a bit of experimentation I found out that in the run.rb file the :host => '199.199.199.199' (where 199.199.199.199 is the servers' IP), does not work, and the :host => '127.0.0.1' make the Nitro app accessible from the localhost (as expected). :host => '0.0.0.0' worked fine. Suggestion: ship Nitro with default IP in the run.rb example files set to 0.0.0.0 and not localhost. 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 Jul 20 03:30:45 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 20 Jul 2005 10:30:45 +0300 Subject: [Nitro] stabilizing the API In-Reply-To: <0732BF5E-CEB3-43AE-B7E6-C149CB350C18@hark.org> References: <34379194-9060-4D4F-9317-D9494B7BE8E1@hark.org> <0732BF5E-CEB3-43AE-B7E6-C149CB350C18@hark.org> Message-ID: > I will try! Even though minimal changes will be required to migrate your app to 0.21.0 (mainly in run.rb) I 'll document the changes in doc/MIGRATION to make this easier for you. regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Wed Jul 20 03:32:36 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 20 Jul 2005 10:32:36 +0300 Subject: [Nitro] Mental note...(webrick issue) In-Reply-To: References: Message-ID: This was the default IP for earlier versions, but I think it has problems with Windows so I made 127.0.0.1 the default. Anybody knows if Windows have problems with 0.0.0.0 ? -g. -- http://www.nitrohq.com From aglarond at gmail.com Wed Jul 20 09:45:23 2005 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Wed, 20 Jul 2005 15:45:23 +0200 Subject: [Nitro] tutorial update Message-ID: <55c107bf050720064516acfcfb@mail.gmail.com> Hey all, I've tried to update the tutorial as best I could, to reflect the current versions of Nitro and Og. Take a look at Chapters 5-8 of "Nitro Step by Step" and see if they work/make sense. I might have forgotten something in my experimentation that didn't make it onto the wiki. - Dimitri P.S. I couldn't edit http://www.nitrohq.com/edit/NSBS_Shaping_Things_Up (as has already been reported by others), but a few things need to be added there: Title
after the New entry in add.xhtml and an #{@entry.title}: before the #{@entry.content} in post_entry.xhtml From george.moschovitis at gmail.com Wed Jul 20 11:25:01 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 20 Jul 2005 18:25:01 +0300 Subject: [Nitro] tutorial update In-Reply-To: <55c107bf050720064516acfcfb@mail.gmail.com> References: <55c107bf050720064516acfcfb@mail.gmail.com> Message-ID: Thanks, I 'll have a look at it! -g. On 7/20/05, Dimitri Aivaliotis wrote: > Hey all, > > I've tried to update the tutorial as best I could, to reflect the > current versions of Nitro and Og. Take a look at Chapters 5-8 of > "Nitro Step by Step" and see if they work/make sense. I might have > forgotten something in my experimentation that didn't make it onto the > wiki. > > - Dimitri > > P.S. I couldn't edit > http://www.nitrohq.com/edit/NSBS_Shaping_Things_Up (as has already > been reported by others), but a few things need to be added there: > > Title >
> > after the New entry in add.xhtml > > and an > > #{@entry.title}: > > before the #{@entry.content} in post_entry.xhtml > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From Aleksi.Niemela at cs.helsinki.fi Wed Jul 20 16:07:23 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Wed, 20 Jul 2005 23:07:23 +0300 Subject: [Nitro] Inconsistent data with refers_to Message-ID: <42DEAEFB.7070102@cs.helsinki.fi> In case following text is bit hard to read, please read it while simultaneously going through the lines of code at the example at the end of mail. I'm a bit at loss how to use refers_to. This is my example and a small test for the behavior. I expect code f.active_bar = b2 to change f's refers_to field @active_bar_oid to b2.oid *but also* refresh f.active_bar to point to b2. You can see from included output of datastructures that f.active_bar_oid is correctly updated but even reloading f doesn't help on wrong pointer to object b (instead of b2). What should I do? BTW. I'm unable to reproduce the bug I'm actually experiencing in my program. In that I state basically same thing f.active_bar = b2 but neither @active_bar_oid nor @active_bar pointer itself change in any way effectively doing nothing on that assignment. Both of these cases lead me to believe I misuse refers_to accessor or there's a bug somewhere. - Aleksi $LOAD_PATH << "/lib/ruby/gems/1.8/gems/og-0.20.0/lib" $LOAD_PATH << "/lib/ruby/gems/1.8/gems/glue-0.20.0/lib" $LOAD_PATH << "/lib/ruby/gems/1.8/gems/facets-0.7.2/lib" $LOAD_PATH << "/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib" require 'postgres' require 'og' require 'pp' module Tester class Foo property :prop1, String refers_to :active_bar, Bar def initialize(prop1) @prop1 = prop1 end end class Bar property :bar_prop, String belongs_to :foo, Foo def initialize(n = 1) @bar_prop = "bar #{n}" end end end config = { :address => "localhost", :destroy => false, :name => "testing", :store => "psql", :user => "aleksi", :password => "password", :connection_count => 1, } db = Og::setup(config) f = Tester::Foo.create("foo1") b = Tester::Bar.create f.active_bar = b f.save! pp f, f.active_bar # #, # @active_bar_oid=1, # @oid=1, # @prop1="foo1"> # # b2 = Tester::Bar.create(2) f.active_bar = b2 # leads to inconsistent @active_bar and @active_bar_oid f.save! pp f, f.active_bar #, # @active_bar_oid=2, # @oid=1, # @prop1="foo1"> # # f.reload # doesn't help pp f, f.active_bar #, # @active_bar_oid=2, # @oid=1, # @prop1="foo1"> # # From Aleksi.Niemela at cs.helsinki.fi Wed Jul 20 17:22:39 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Thu, 21 Jul 2005 00:22:39 +0300 Subject: [Nitro] Inconsistent data with refers_to fixed In-Reply-To: <42DEAEFB.7070102@cs.helsinki.fi> References: <42DEAEFB.7070102@cs.helsinki.fi> Message-ID: <42DEC09F.20804@cs.helsinki.fi> Aleksi Niemela wrote: > I expect code f.active_bar = b2 to change f's refers_to field > @active_bar_oid to b2.oid *but also* refresh f.active_bar to point to b2. Actually I fixed this to subversion. I added test case for tc_relation which demonstrates the problem. Few notes, however: 1) If auto-reloading of incorrect references when accessing refers_to objects _is not wanted behavior_, my fix should be partially rewritten. This fix reloads referred object if 1) it's forced, ie. obj.refers_to_accessor(true) is issued, or 2) if it's the first time accessor is called. I added also third case which is a reload if referred object in memory is not the same as one referred at store. 2) Even if auto-reloading of incorrect references is not wanted, previous version of refers_to doesn't reload if forced, so there's a bug to be fixed. (It's easy for me to rip the above mentioned third case away, and the bug stays fixed.) 3) memory.rb og_update did have only one argument version, but two argument style with options is used at store.rb. I fixed og_update enchantment but didn't touch the rest of memory.rb. 4) I also added a require statement for BelongsTo in has_many.rb. It would be helpful if you, George, would be able to write down few lines of current reloading policy into docs (or at wiki). Now at least I am confused should reloading be requested by user or should it be semi-automatic. - Aleksi From george.moschovitis at gmail.com Thu Jul 21 02:54:51 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 21 Jul 2005 09:54:51 +0300 Subject: [Nitro] Inconsistent data with refers_to fixed In-Reply-To: <42DEC09F.20804@cs.helsinki.fi> References: <42DEAEFB.7070102@cs.helsinki.fi> <42DEC09F.20804@cs.helsinki.fi> Message-ID: > 2) Even if auto-reloading of incorrect references is not wanted, > previous version of refers_to doesn't reload if forced, so there's a bug > to be fixed. (It's easy for me to rip the above mentioned third case > away, and the bug stays fixed.) please, remove the third case, i think that autoreloading of incorrect references is not wanted by default (i 'll add an Og option for this). > It would be helpful if you, George, would be able to write down few > lines of current reloading policy into docs (or at wiki). Now at least I > am confused should reloading be requested by user or should it be > semi-automatic. Will, do. -- http://www.nitrohq.com From guillaume.pierronnet at laposte.net Thu Jul 21 11:33:36 2005 From: guillaume.pierronnet at laposte.net (Guillaume Pierronnet) Date: Thu, 21 Jul 2005 17:33:36 +0200 (CEST) Subject: [Nitro] condition key overriding Message-ID: <58336.127.0.0.1.1121960016.squirrel@localhost> here is a patch for what i'm considering as violating the least surprise principle, i.e overriding the :condition key on a query. "joins_many.rb" is impacted too. Nevertheless it's maybe a wanted behaviour. --- og-0.20.1/lib/og/relation/has_many.rb.orig 2005-07-21 16:38:54.000000000 +0200 +++ og-0.20.1/lib/og/relation/has_many.rb 2005-07-21 17:11:17.000000000 +0200 @@ -46,7 +46,7 @@ owner_class.module_eval %{ attr_accessor :#{target_plural_name} - def #{target_plural_name}(options = nil) + def #{target_plural_name}(options = {}) unless @#{target_plural_name} @#{target_plural_name} = HasManyCollection.new( self, @@ -71,10 +71,9 @@ end def find_#{target_plural_name}(options = {}) - find_options = { - :condition => "#{foreign_key} = \#\{@#{owner_pk}\}" - } - find_options.update(options) if options + find_options = options.dup + find_options[:condition] = "#{foreign_key} = \#\{@#{owner_pk}\}" + find_options.update(:condition => options[:condition] + " AND " + find_options[:condition]) if options[:condition] #{"find_options.update(:order => #{options[:order].inspect})" if options[:order]} #{target_class}.find(find_options) end From deb at ysabel.org Thu Jul 21 14:33:35 2005 From: deb at ysabel.org (Ysabel) Date: Thu, 21 Jul 2005 12:33:35 -0600 Subject: [Nitro] Controller inheritance and template searching Message-ID: So, I have one controller than inherits from another controller. The parent controller uses a number of .xhtml files; the child wants to override just one and use the parent's for the rest. I can override @template_root in the child controller, and that works in that Nitro will then find the overridden template xhtml file just fine. However, it doesn't find the others. >From putting debugging statements in, it's clear that compile_action isn't actually searching the parent controller's template_root anymore. This appears to be because of lines commented like so: # don't search in parent template roots if an # action is defined. break if valid As far as I can tell, valid is in fact true because the parent controller has an action defined, but compile_action hasn't found it, so it breaks out without finding anything. Is this a bug, or am I doing something wrong, or am I missing something that'll do want I want? Concrete example: lib/parent/controller.rb: require 'nitro' def ParentController < Nitro::Controller @template_root = "lib/parent/view" def simple [do stuff] end def complex [do stuff] end end lib/parent/view/simple.xhtml and lib/parent/view/complex.xhtml exist. src/child_controller.rb: require 'nitro' require 'parent/controller' def ChildController < ParentController @template_root = "public" end public/complex.xhtml exists. Assuming that /child is dispatched to ChildController, /child/complex will work but /child/simple will fail to find a template and puke. -- [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] From george.moschovitis at gmail.com Fri Jul 22 05:01:39 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 22 Jul 2005 12:01:39 +0300 Subject: [Nitro] Controller inheritance and template searching In-Reply-To: References: Message-ID: This is one of the 'little' things I want to improve in 0.21.0. I 'll work over this. regards, George. On 7/21/05, Ysabel wrote: > So, I have one controller than inherits from another controller. The > parent controller uses a number of .xhtml files; the child wants to > override just one and use the parent's for the rest. > > I can override @template_root in the child controller, and that works in > that Nitro will then find the overridden template xhtml file just fine. > However, it doesn't find the others. > > >From putting debugging statements in, it's clear that compile_action isn't > actually searching the parent controller's template_root anymore. This > appears to be because of lines commented like so: > > # don't search in parent template roots if an > # action is defined. > break if valid > > As far as I can tell, valid is in fact true because the parent controller > has an action defined, but compile_action hasn't found it, so it breaks out > without finding anything. > > Is this a bug, or am I doing something wrong, or am I missing something > that'll do want I want? > > Concrete example: > > lib/parent/controller.rb: > require 'nitro' > def ParentController < Nitro::Controller > @template_root = "lib/parent/view" > > def simple > [do stuff] > end > > def complex > [do stuff] > end > end > > lib/parent/view/simple.xhtml and lib/parent/view/complex.xhtml exist. > > src/child_controller.rb: > require 'nitro' > require 'parent/controller' > def ChildController < ParentController > @template_root = "public" > end > > public/complex.xhtml exists. > > Assuming that /child is dispatched to ChildController, /child/complex will > work but /child/simple will fail to find a template and puke. > > -- > [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Fri Jul 22 05:21:27 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 22 Jul 2005 12:21:27 +0300 Subject: [Nitro] condition key overriding In-Reply-To: <58336.127.0.0.1.1121960016.squirrel@localhost> References: <58336.127.0.0.1.1121960016.squirrel@localhost> Message-ID: This patch is corrupted in gmail, can you explain what this fixes? thanks On 7/21/05, Guillaume Pierronnet wrote: > here is a patch for what i'm considering as violating the least surprise > principle, i.e overriding the :condition key on a query. "joins_many.rb" > is impacted too. > > Nevertheless it's maybe a wanted behaviour. > > --- og-0.20.1/lib/og/relation/has_many.rb.orig 2005-07-21 > 16:38:54.000000000 +0200 > +++ og-0.20.1/lib/og/relation/has_many.rb 2005-07-21 > 17:11:17.000000000 +0200 > @@ -46,7 +46,7 @@ > owner_class.module_eval %{ > attr_accessor :#{target_plural_name} > > - def #{target_plural_name}(options = nil) > + def #{target_plural_name}(options = {}) > unless @#{target_plural_name} > @#{target_plural_name} = > HasManyCollection.new( > self, > @@ -71,10 +71,9 @@ > end > > def find_#{target_plural_name}(options = {}) > - find_options = { > - :condition => "#{foreign_key} = > \#\{@#{owner_pk}\}" > - } > - find_options.update(options) if options + > find_options = options.dup > + find_options[:condition] = "#{foreign_key} > = \#\{@#{owner_pk}\}" > + find_options.update(:condition => > options[:condition] + " AND " + find_options[:condition]) if > options[:condition] > #{"find_options.update(:order => > #{options[:order].inspect})" if > options[:order]} > #{target_class}.find(find_options) > end > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From guillaume.pierronnet at laposte.net Fri Jul 22 08:10:17 2005 From: guillaume.pierronnet at laposte.net (Guillaume Pierronnet) Date: Fri, 22 Jul 2005 14:10:17 +0200 (CEST) Subject: [Nitro] condition key overriding In-Reply-To: References: <58336.127.0.0.1.1121960016.squirrel@localhost> Message-ID: <49048.127.0.0.1.1122034217.squirrel@localhost> hi, i'll try to attach the patch to this mail. This patch fixes the overwritting on the :condition key on a "find" query in order to keep the join condition. for example Artist.first.find_albums(:condition => "name = '#{info.album}'") without the patch, the query will be SELECT * FROM ogalbum WHERE name = 'The best of' with the patch SELECT * FROM ogalbum WHERE name = 'The best of' AND artist_oid = 1 thanks. > This patch is corrupted in gmail, can you explain what this fixes? > thanks > > On 7/21/05, Guillaume Pierronnet wrote: >> here is a patch for what i'm considering as violating the least surprise >> principle, i.e overriding the :condition key on a query. "joins_many.rb" >> is impacted too. >> >> Nevertheless it's maybe a wanted behaviour. >> -------------- next part -------------- A non-text attachment was scrubbed... Name: patch Type: application/octet-stream Size: 1014 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20050722/c92befe0/attachment.obj From george.moschovitis at gmail.com Fri Jul 22 12:23:16 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 22 Jul 2005 19:23:16 +0300 Subject: [Nitro] Nitro/Og 0.21.0 preview Message-ID: Dear devs, I just uploaded 0.21.0 preview gems on www.nitrohq.com. You can download them from the Homepage. I plan to release this new version during the weekend. I would really appreciate if you could download the gems and report any problems back to me, before the release. I am sure you will enjoy this release! -g. PS: Many thanks to all contributors: Michael, Ysabel, Aleksi, Guile and the rest... -- http://www.nitrohq.com From george.moschovitis at gmail.com Fri Jul 22 11:39:30 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 22 Jul 2005 18:39:30 +0300 Subject: [Nitro] Controller inheritance and template searching In-Reply-To: References: Message-ID: Ok, I recoded this bit in 0.21.0 now it works perfectly. Plus Nitro initializes dynamically reasonable template_roots for all controllers. thanks, George. On 7/22/05, George Moschovitis wrote: > This is one of the 'little' things I want to improve in 0.21.0. I 'll > work over this. > > regards, > George. > > On 7/21/05, Ysabel wrote: > > So, I have one controller than inherits from another controller. The > > parent controller uses a number of .xhtml files; the child wants to > > override just one and use the parent's for the rest. > > > > I can override @template_root in the child controller, and that works in > > that Nitro will then find the overridden template xhtml file just fine. > > However, it doesn't find the others. > > > > >From putting debugging statements in, it's clear that compile_action isn't > > actually searching the parent controller's template_root anymore. This > > appears to be because of lines commented like so: > > > > # don't search in parent template roots if an > > # action is defined. > > break if valid > > > > As far as I can tell, valid is in fact true because the parent controller > > has an action defined, but compile_action hasn't found it, so it breaks out > > without finding anything. > > > > Is this a bug, or am I doing something wrong, or am I missing something > > that'll do want I want? > > > > Concrete example: > > > > lib/parent/controller.rb: > > require 'nitro' > > def ParentController < Nitro::Controller > > @template_root = "lib/parent/view" > > > > def simple > > [do stuff] > > end > > > > def complex > > [do stuff] > > end > > end > > > > lib/parent/view/simple.xhtml and lib/parent/view/complex.xhtml exist. > > > > src/child_controller.rb: > > require 'nitro' > > require 'parent/controller' > > def ChildController < ParentController > > @template_root = "public" > > end > > > > public/complex.xhtml exists. > > > > Assuming that /child is dispatched to ChildController, /child/complex will > > work but /child/simple will fail to find a template and puke. > > > > -- > > [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > -- > http://www.nitrohq.com > -- http://www.nitrohq.com From vanek at acd.net Fri Jul 22 15:02:24 2005 From: vanek at acd.net (Lou Vanek) Date: Fri, 22 Jul 2005 15:02:24 -0400 Subject: [Nitro] Nitro/Og 0.21.0 preview In-Reply-To: References: Message-ID: Congrats. I would sure like to see either the Releas Notes on http://www.nitrohq.com/ updated, or a list of changes listed on this ML. Thank you, -lv George Moschovitis wrote: > Dear devs, > > I just uploaded 0.21.0 preview gems on www.nitrohq.com. You can > download them from the Homepage. I plan to release this new version > during the weekend. I would really appreciate if you could download > the gems and report any problems back to me, before the release. > > I am sure you will enjoy this release! > -g. > > PS: Many thanks to all contributors: Michael, Ysabel, Aleksi, Guile > and the rest... > From george.moschovitis at gmail.com Fri Jul 22 16:09:04 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 22 Jul 2005 23:09:04 +0300 Subject: [Nitro] Nitro/Og 0.21.0 preview In-Reply-To: References: Message-ID: Download the gems from www.nitrohq.com, and read the file: doc/RELEASES don't forget to report any problems :) -g. On 7/22/05, Lou Vanek wrote: > Congrats. > I would sure like to see either the Releas Notes on > http://www.nitrohq.com/ updated, or a list of changes listed on this ML. > > Thank you, > -lv > > George Moschovitis wrote: > > Dear devs, > > > > I just uploaded 0.21.0 preview gems on www.nitrohq.com. You can > > download them from the Homepage. I plan to release this new version > > during the weekend. I would really appreciate if you could download > > the gems and report any problems back to me, before the release. > > > > I am sure you will enjoy this release! > > -g. > > > > PS: Many thanks to all contributors: Michael, Ysabel, Aleksi, Guile > > and the rest... > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From nospam at lunacymaze.org Fri Jul 22 19:14:26 2005 From: nospam at lunacymaze.org (Ghislain Mary) Date: Sat, 23 Jul 2005 01:14:26 +0200 Subject: [Nitro] Server name patch Message-ID: <42E17DD2.6040005@lunacymaze.org> Hi, Here is a very little patch to enable the developpers to change the name of the application directly from the configuration. Currently the name must be passed to the constructor of the Server and therefore when using the Server.run method, the name of the application can not be changed (as far as I have understood it). With this patch, you could put: Server.name = "My Beautiful Application" in the 'conf/debug.rb' file and the application name would no longer be "Nitro". --- server.rb.orig Sat Jul 23 01:03:52 2005 +++ server.rb Sat Jul 23 01:04:45 2005 @@ -6,6 +6,10 @@ class Server + # The application name. + + setting :name, :default => 'Nitro', :doc => 'The application name' + # The server listening address. #-- # 0.0.0.0 may be a better default? @@ -58,8 +62,8 @@ attr_accessor :options - def initialize(name = 'Nitro', options = {}) - @name = name + def initialize(options = {}) + @name = self.class.name @map = self.class.map.dup @address, @port = self.class.address, self.class.port @public_root = self.class.public_root From deb at ysabel.org Fri Jul 22 21:31:11 2005 From: deb at ysabel.org (Ysabel) Date: Fri, 22 Jul 2005 19:31:11 -0600 Subject: [Nitro] Nitro/Og 0.21.0 preview In-Reply-To: References: Message-ID: <5C6AF6B83407CFEE31F7AE91@[10.19.0.236]> --On Friday, July 22, 2005 7:23 PM +0300 George Moschovitis wrote: > I just uploaded 0.21.0 preview gems on www.nitrohq.com. You can > download them from the Homepage. I plan to release this new version > during the weekend. I would really appreciate if you could download > the gems and report any problems back to me, before the release. On first blush, some very cool stuff. :) Need to make some updates to the nitro-auth package, I foresee a 0.1.1 very soon here. Things I found so far: - Runner.run appears to be broken -- no instance method called 'setup' anymore, since the settings have moved (I think). (I suggest just nuking the method.) - Startup has changed, needs doc and/or example. proto/run.rb is still using Runner.run. - Nitro.run and Server.run appear identical. I think Nitro.run should just call Server.run, it's just a convenience anyway. (But I think examples and doc should encourage people to use Nitro.run, I like the abstractness of that.) - Webrick adapter calls server.access_log (twice) instead of Server.access_log. I'll send more as I find 'em. But the template search thing works now, yay! (Needed that for a nontrivial example for nitro-auth to work, see.) -- [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] From george.moschovitis at gmail.com Sat Jul 23 00:33:27 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 23 Jul 2005 07:33:27 +0300 Subject: [Nitro] Nitro/Og 0.21.0 preview In-Reply-To: <5C6AF6B83407CFEE31F7AE91@10.19.0.236> References: <5C6AF6B83407CFEE31F7AE91@10.19.0.236> Message-ID: > - Webrick adapter calls server.access_log (twice) instead of > Server.access_log. hmm this is on purpose, to be simpler. Do you think I must change it? Thanks a lot for the other tips :) If you find more problems let me know! -g. -- http://www.nitrohq.com From george.moschovitis at gmail.com Sat Jul 23 00:34:41 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 23 Jul 2005 07:34:41 +0300 Subject: [Nitro] Server name patch In-Reply-To: <42E17DD2.6040005@lunacymaze.org> References: <42E17DD2.6040005@lunacymaze.org> Message-ID: Is a server name setting really useful? Other opinions? -g. -- http://www.nitrohq.com From nospam at lunacymaze.org Sat Jul 23 03:18:56 2005 From: nospam at lunacymaze.org (Ghislain Mary) Date: Sat, 23 Jul 2005 09:18:56 +0200 Subject: [Nitro] Server name patch In-Reply-To: References: <42E17DD2.6040005@lunacymaze.org> Message-ID: <42E1EF60.8070308@lunacymaze.org> George Moschovitis a ?crit : > Is a server name setting really useful? Other opinions? > > -g. > > I was asking myself the same question when posting the previous mail. And so, in this case, why not suppress it? Ghislain From george.moschovitis at gmail.com Sat Jul 23 03:47:04 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 23 Jul 2005 10:47:04 +0300 Subject: [Nitro] Server name patch In-Reply-To: <42E1EF60.8070308@lunacymaze.org> References: <42E17DD2.6040005@lunacymaze.org> <42E1EF60.8070308@lunacymaze.org> Message-ID: There is no server name in 0.21.0 :) -g. > I was asking myself the same question when posting the previous mail. > And so, in this case, why not suppress it? -- http://www.nitrohq.com From deb at ysabel.org Sat Jul 23 04:19:33 2005 From: deb at ysabel.org (Deborah Hooker) Date: Sat, 23 Jul 2005 02:19:33 -0600 Subject: [Nitro] Nitro/Og 0.21.0 preview In-Reply-To: References: <5C6AF6B83407CFEE31F7AE91@10.19.0.236> Message-ID: <42E1FD95.7080607@ysabel.org> George Moschovitis wrote: >>- Webrick adapter calls server.access_log (twice) instead of >>Server.access_log. > > > hmm this is on purpose, to be simpler. Do you think I must change it? I got an undefined method error until I changed it to call the class method instead of the instance method. Either way works for me but it needs to not error out, you know? :) -- [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] From redentis at gmail.com Sat Jul 23 14:31:01 2005 From: redentis at gmail.com (Marcus Edwards) Date: Sat, 23 Jul 2005 19:31:01 +0100 Subject: [Nitro] Nitro/Og 0.21.0 preview In-Reply-To: References: Message-ID: On 7/22/05, George Moschovitis wrote: > Download the gems from www.nitrohq.com, and read the file: > > doc/RELEASES > > don't forget to report any problems :) Glue installs okay, --8<-- $ gem install glue-0.21.0 Attempting local installation of 'glue-0.21.0' Successfully installed glue, version 0.21.0 Installing RDoc documentation for glue-0.21.0... --8<-- Og has problems on installation --8<-- $ gem install og-0.21.0 Attempting local installation of 'og-0.21.0' Successfully installed og, version 0.21.0 Installing RDoc documentation for og-0.21.0... /usr/lib/ruby/1.8/rdoc/markup/simple_markup/fragments.rb:291: warning: Object#type is deprecated; use Object#class ERROR: While executing gem ... (NoMethodError) undefined method `level' for nil:NilClass --8<-- Nitro installs ok --8<-- $ gem install nitro-0.21.0 Attempting local installation of 'nitro-0.21.0' Successfully installed nitro, version 0.21.0 Installing RDoc documentation for nitro-0.21.0... lib/nitro/server/runner.rb:323:31: Skipping require of dynamic string: "conf/#{mode}.rb" --8<-- gems list --local --8<-- ... glue (0.21.0, 0.20.0) Glue utilities nitro (0.21.0, 0.20.0) Nitro Web Engine og (0.21.0, 0.20.0) Og (ObjectGraph) ... --8<-- test tc_inheritance fails (adjusted for a psql store) --8<-- $ ruby tc_inheritance.rb Loaded suite tc_inheritance Started DEBUG: Og manageable classes: [TC_OgInheritance::Photo, TC_OgInheritance::Articl e, TC_OgInheritance::Document] NOTICE: CREATE TABLE will create implicit sequence "ogtc_oginheritance_document _oid_seq" for serial column "ogtc_oginheritance_document.oid" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ogtc_oginheritan ce_document_pkey" for table "ogtc_oginheritance_document" INFO: Created table 'ogtc_oginheritance_document'. NOTICE: CREATE TABLE will create implicit sequence "ogtc_oginheritance_document _oid_seq1" for serial column "ogtc_oginheritance_document.oid" DEBUG: Table already exists NOTICE: CREATE TABLE will create implicit sequence "ogtc_oginheritance_document _oid_seq1" for serial column "ogtc_oginheritance_document.oid" DEBUG: Table already exists E Finished in 0.397 seconds. 1) Error: test_all(TC_OgInheritance): PGError: ERROR: relation "ogtc_oginheritance_photo_oid_seq" does not exist (eval):4:in `exec' (eval):4:in `og_insert' /usr/lib/ruby/gems/1.8/gems/og-0.21.0/lib/og/store.rb:121:in `save' /usr/lib/ruby/gems/1.8/gems/og-0.21.0/lib/og/entity.rb:60:in `create' tc_inheritance.rb:74:in `test_all' 1 tests, 5 assertions, 0 failures, 1 errors --8<-- test tc_relation fails --8<-- $ ruby tc_relation.rb Loaded suite tc_relation Started .F Finished in 0.048 seconds. 1) Failure: test_refers_to(TestCaseOgRelation) [tc_relation.rb:64]: <136424416> expected but was <136425796>. 2 tests, 7 assertions, 1 failures, 0 errors --8<-- test tc_polymorphic passes test tc_select passes test tc_types passes test tc_join passes test mixin/tc_hierarchical passes test mixin/tc_orderable passes test mixin/tc_optimistic_locking passes test mixin/tc_timestamped passes Environment: ruby 1.8.2 (2004-12-25) [i386-cygwin] Windows XP (Cygwin) HTH From dcorbin at machturtle.com Sat Jul 23 15:53:51 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sat, 23 Jul 2005 15:53:51 -0400 Subject: [Nitro] Og on Rails Message-ID: <200507231553.51636.dcorbin@machturtle.com> I'm trying to use Og on Rails. I've added require_gem 'og' to the environment.rb (That's ALL i've done). Now i get this stack trace. This makes no sense to me. /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/class_attribute_accessors.rb:7:in `cattr_reader': undefined method `id2name' for false:FalseClass (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/class_attribute_accessors.rb:5:in `each' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/class_attribute_accessors.rb:5:in `cattr_reader' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/class_attribute_accessors.rb:54:in `cattr_accessor' from /usr/lib/ruby/gems/1.8/gems/glue-0.19.0/lib/glue/property.rb:27 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:197:in `require' from /usr/lib/ruby/gems/1.8/gems/glue-0.19.0/lib/glue.rb:15 ... 6 levels... from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:161:in `activate' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:23:in `require' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:197:in `require' from config/environment.rb:82 Pointers? David From jlsysinc at alltel.net Sat Jul 23 17:12:17 2005 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Sat, 23 Jul 2005 17:12:17 -0400 Subject: [Nitro] Og question Message-ID: <00d201c58fcb$357329c0$0200000a@agamemnon> In the Og tutorial I got as far as the following: irb(main):064:0> cat.add_post { |p| irb(main):065:1* p.title = 'Title' irb(main):066:1> p.body = 'Body' irb(main):067:1> } ArgumentError: wrong number of arguments (0 for 1) from (irb):64:in `add_post' from (irb):64 from :0 Are blocks no longer accepted in the add_ methods? Should I be doing the following instead? cat.add_post(Post.new('Title','Body')) -- J Lambert From transfire at gmail.com Sat Jul 23 19:05:58 2005 From: transfire at gmail.com (TRANS) Date: Sat, 23 Jul 2005 19:05:58 -0400 Subject: [Nitro] Specialized Classes Message-ID: <4b6f054f0507231605311d8c1d@mail.gmail.com> Hi-- This pertains to Facets. Since Nitro's putting it to good use I thought it appropriate to diret my question to the Nitro mailing list. Currently I have a few types of specialize Hash classes, namely OrderedHash, StaticHash, and SyncHash. I have a few other classes along these lines too. I'm wondering if it might be better to use the Hash namespace instead of using these wholly distinct names. In other words, instead of using StaticHash.new one would use Hash::Static.new. The require statement used would then become require 'hash/static' too, instead of require 'statichash'. And likewise for the others. What do yall think? Thanks, T. From james_b at neurogami.com Sat Jul 23 21:41:17 2005 From: james_b at neurogami.com (James Britt) Date: Sat, 23 Jul 2005 20:41:17 -0500 Subject: [Nitro] Og on Rails In-Reply-To: <200507231553.51636.dcorbin@machturtle.com> References: <200507231553.51636.dcorbin@machturtle.com> Message-ID: <42E2F1BD.2050902@neurogami.com> David Corbin wrote: > I'm trying to use Og on Rails. Um, OK. > > I've added > > require_gem 'og' > > to the environment.rb > > (That's ALL i've done). > > Now i get this stack trace. This makes no sense to me. > Where did you put the 'require' call? I just tried this on fresh Rails app, and it starts up fine. ----- environment,rb ----------- # Require Rails libraries. require 'rubygems' unless File.directory?("#{RAILS_ROOT}/vendor/rails") require 'active_support' require 'active_record' require 'action_controller' require 'action_mailer' require 'action_web_service' require 'og' ------------------------------- I've got rubygems installed and loaded by default (on a WinXP machine with the "1-click"Ruby install ), but I don't think that's the issue. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From george.moschovitis at gmail.com Sun Jul 24 04:44:18 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 24 Jul 2005 11:44:18 +0300 Subject: [Nitro] Og question In-Reply-To: <00d201c58fcb$357329c0$0200000a@agamemnon> References: <00d201c58fcb$357329c0$0200000a@agamemnon> Message-ID: Hello :) Nitro uses active collections now: cat.posts << Post.new(...) You can still use cat.add_post if you want though. I will add an option to used blocks in 0.22.0 (too late for 0.21.0) if more people think it is useful. regards, George. On 7/24/05, Jon A. Lambert wrote: > In the Og tutorial I got as far as the following: > > irb(main):064:0> cat.add_post { |p| > irb(main):065:1* p.title = 'Title' > irb(main):066:1> p.body = 'Body' > irb(main):067:1> } > ArgumentError: wrong number of arguments (0 for 1) > from (irb):64:in `add_post' > from (irb):64 > from :0 > > Are blocks no longer accepted in the add_ methods? > Should I be doing the following instead? > > cat.add_post(Post.new('Title','Body')) > > -- > J Lambert > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Sun Jul 24 04:45:38 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 24 Jul 2005 11:45:38 +0300 Subject: [Nitro] Specialized Classes In-Reply-To: <4b6f054f0507231605311d8c1d@mail.gmail.com> References: <4b6f054f0507231605311d8c1d@mail.gmail.com> Message-ID: I find this quite elegant :) -g. On 7/24/05, TRANS wrote: > Hi-- > > This pertains to Facets. Since Nitro's putting it to good use I > thought it appropriate to diret my question to the Nitro mailing list. > > Currently I have a few types of specialize Hash classes, namely > OrderedHash, StaticHash, and SyncHash. I have a few other classes > along these lines too. I'm wondering if it might be better to use the > Hash namespace instead of using these wholly distinct names. In other > words, instead of using StaticHash.new one would use Hash::Static.new. > The require statement used would then become require 'hash/static' > too, instead of require 'statichash'. And likewise for the others. > > What do yall think? > > Thanks, > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Sun Jul 24 04:51:07 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 24 Jul 2005 11:51:07 +0300 Subject: [Nitro] Og on Rails In-Reply-To: <200507231553.51636.dcorbin@machturtle.com> References: <200507231553.51636.dcorbin@machturtle.com> Message-ID: Hello David, Nitro/Og use a different implementation of cattr_accessor than Rails. I will try to make our cattr_accessor more compatible with Rails, and ask Tom to include this in Facets. regards, George. On 7/23/05, David Corbin wrote: > I'm trying to use Og on Rails. > > I've added > > require_gem 'og' > > to the environment.rb > > (That's ALL i've done). > > Now i get this stack trace. This makes no sense to me. > > /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/class_attribute_accessors.rb:7:in > `cattr_reader': undefined method `id2name' for false:FalseClass > (NoMethodError) > > from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/class_attribute_accessors.rb:5:in > `each' > > from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/class_attribute_accessors.rb:5:in > `cattr_reader' > > from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/class_attribute_accessors.rb:54:in > `cattr_accessor' > from /usr/lib/ruby/gems/1.8/gems/glue-0.19.0/lib/glue/property.rb:27 > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require__' > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require' > > from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:197:in > `require' > from /usr/lib/ruby/gems/1.8/gems/glue-0.19.0/lib/glue.rb:15 > ... 6 levels... > from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:161:in `activate' > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:23:in > `require' > > from /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:197:in > `require' > from config/environment.rb:82 > > > Pointers? > David > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Sun Jul 24 04:54:19 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 24 Jul 2005 11:54:19 +0300 Subject: [Nitro] Nitro/Og 0.21.0 preview In-Reply-To: <42E1FD95.7080607@ysabel.org> References: <5C6AF6B83407CFEE31F7AE91@10.19.0.236> <42E1FD95.7080607@ysabel.org> Message-ID: Oops my mistake, I missinterpreted your original post, thankd for reporting. -g, On 7/23/05, Deborah Hooker wrote: > George Moschovitis wrote: > >>- Webrick adapter calls server.access_log (twice) instead of > >>Server.access_log. > > > > > > hmm this is on purpose, to be simpler. Do you think I must change it? > > I got an undefined method error until I changed it to call the class method > instead of the instance method. Either way works for me but it needs to not > error out, you know? :) > > -- > [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From jlsysinc at alltel.net Sun Jul 24 05:22:59 2005 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Sun, 24 Jul 2005 05:22:59 -0400 Subject: [Nitro] Nitro/Og 0.21.0 preview References: Message-ID: <01b101c59031$49d091d0$0200000a@agamemnon> I'm having trouble installing the gems. I downloaded them and put them in a c:\downloads\gems C:\Downloads>generate_yaml_index.rb -v -d c:\downloads Building yaml file ... adding examples-0.21.0 ... adding glue-0.21.0 ... adding nitro-0.21.0 ... adding og-0.21.0 Building yaml.Z file Looks okay. C:\Downloads>gem install examples --source file:///downloads -r Attempting remote installation of 'examples' Install required dependency nitro? [Yn] Install required dependency glue? [Yn] ERROR: While executing gem ... (RuntimeError) No metadata found! Looks like something might be wrong with glue.gem? -- J Lambert From jlsysinc at alltel.net Sun Jul 24 05:52:37 2005 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Sun, 24 Jul 2005 05:52:37 -0400 Subject: [Nitro] Og question References: <00d201c58fcb$357329c0$0200000a@agamemnon> Message-ID: <01bc01c59035$6c855130$0200000a@agamemnon> George Moschovitis wrote: > Hello :) > > Nitro uses active collections now: > > cat.posts << Post.new(...) > > You can still use cat.add_post if you want though. I will add an > option to used blocks in 0.22.0 (too late for 0.21.0) if more people > think it is useful. > It's not that I wish to use add_post over another method, I am not knowledgable enough to know otherwise. I was working through the Og tutorial (and updating it on the wiki for the next poor sap). The Og API docs are problematic in that most all the methods the user wants to know are of course created dynamically at run time and are not captured in the API docs. I am reading the code though. Is there any other documentation that I am missing? -- J Lambert From mneumann at ntecs.de Sun Jul 24 06:05:42 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Sun, 24 Jul 2005 12:05:42 +0200 Subject: [Nitro] Specialized Classes In-Reply-To: <4b6f054f0507231605311d8c1d@mail.gmail.com> References: <4b6f054f0507231605311d8c1d@mail.gmail.com> Message-ID: <42E367F6.1070806@ntecs.de> TRANS wrote: > Hi-- > > This pertains to Facets. Since Nitro's putting it to good use I > thought it appropriate to diret my question to the Nitro mailing list. > > Currently I have a few types of specialize Hash classes, namely > OrderedHash, StaticHash, and SyncHash. I have a few other classes > along these lines too. I'm wondering if it might be better to use the > Hash namespace instead of using these wholly distinct names. In other > words, instead of using StaticHash.new one would use Hash::Static.new. > The require statement used would then become require 'hash/static' > too, instead of require 'statichash'. And likewise for the others. > > What do yall think? I prefer OrderedHash, but also hash/ordered... ;-) Regards, Michael From dcorbin at machturtle.com Sun Jul 24 06:51:01 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sun, 24 Jul 2005 06:51:01 -0400 Subject: [Nitro] Og on Rails In-Reply-To: References: <200507231553.51636.dcorbin@machturtle.com> Message-ID: <200507240651.01290.dcorbin@machturtle.com> On Sunday 24 July 2005 04:51 am, George Moschovitis wrote: > Hello David, > > Nitro/Og use a different implementation of cattr_accessor than Rails. > I will try to make our cattr_accessor more compatible with Rails, and > ask Tom to include this in Facets. > Does that mean they (Rails & Og) are simply not compatible at this point? > regards, > George. > From dcorbin at machturtle.com Sun Jul 24 06:51:26 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sun, 24 Jul 2005 06:51:26 -0400 Subject: [Nitro] Og on Rails In-Reply-To: <42E2F1BD.2050902@neurogami.com> References: <200507231553.51636.dcorbin@machturtle.com> <42E2F1BD.2050902@neurogami.com> Message-ID: <200507240651.26937.dcorbin@machturtle.com> On Saturday 23 July 2005 09:41 pm, James Britt wrote: > David Corbin wrote: > > I'm trying to use Og on Rails. > > Um, OK. > You act like this is such a strange thing to do..... From jlsysinc at alltel.net Sun Jul 24 08:17:59 2005 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Sun, 24 Jul 2005 08:17:59 -0400 Subject: [Nitro] Nitro/Og 0.21.0 preview References: <01b101c59031$49d091d0$0200000a@agamemnon> Message-ID: <020301c59049$bb6e2f60$0200000a@agamemnon> Jon A. Lambert wrote: > I'm having trouble installing the gems. > Nevermind. Apparently using a file:// URL don't work so hot. I put them off a local server. C:\ >gem install examples --source http://localhost -r Attempting remote installation of 'examples' Install required dependency nitro? [Yn] Install required dependency glue? [Yn] Install required dependency og? [Yn] Install required dependency og? [Yn] Successfully installed examples-0.21.0 Successfully installed nitro-0.21.0 Successfully installed glue-0.21.0 Successfully installed og-0.21.0 Successfully installed og-0.21.0 Installing RDoc documentation for examples-0.21.0... File not found: lib ----- I just got that one error above. None of the rdoc was generated. BTW, I tried listing gems with.. gem list --source http://www.nitrohq.com -r which didn't work. Anyway now I'll try it out. -- J Lambert From james_b at neurogami.com Sun Jul 24 08:46:22 2005 From: james_b at neurogami.com (James Britt) Date: Sun, 24 Jul 2005 07:46:22 -0500 Subject: [Nitro] Og on Rails In-Reply-To: <200507240651.26937.dcorbin@machturtle.com> References: <200507231553.51636.dcorbin@machturtle.com> <42E2F1BD.2050902@neurogami.com> <200507240651.26937.dcorbin@machturtle.com> Message-ID: <42E38D9E.7020303@neurogami.com> David Corbin wrote: > On Saturday 23 July 2005 09:41 pm, James Britt wrote: > >>David Corbin wrote: >> >>>I'm trying to use Og on Rails. >> >>Um, OK. >> > > > You act like this is such a strange thing to do..... > Isn't it? I see Rails as ActiveRecord + templating + helper libs. The essence of Rails being the transparent mapping of tables to objects, where tables drive the relationship. Ideally, the Ruby world would consist of multiple libs and tools that can be wired up in any number of ways, without heavy branding of a favored assortment, and certainly using Og + Rails (or Og + some subset of Rails) could be a reasonable combination. But I often get the sense that Og and AR encourage quite different world views, and that people who prefer one tend to avoid the other. I also don't think (but would be happy to be proved wrong) that there is much overlap between the Rails and Og/Nitro communities. I'm curious to know how you're using Og with Rails, though. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From dcorbin at machturtle.com Sun Jul 24 11:48:53 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sun, 24 Jul 2005 11:48:53 -0400 Subject: [Nitro] Og on Rails In-Reply-To: <42E38D9E.7020303@neurogami.com> References: <200507231553.51636.dcorbin@machturtle.com> <200507240651.26937.dcorbin@machturtle.com> <42E38D9E.7020303@neurogami.com> Message-ID: <200507241148.53705.dcorbin@machturtle.com> On Sunday 24 July 2005 08:46 am, James Britt wrote: > David Corbin wrote: > > On Saturday 23 July 2005 09:41 pm, James Britt wrote: > >>David Corbin wrote: > >>>I'm trying to use Og on Rails. > >> > >>Um, OK. > > > > You act like this is such a strange thing to do..... > > Isn't it? > > I see Rails as ActiveRecord + templating + helper libs. The essence of > Rails being the transparent mapping of tables to objects, where tables > drive the relationship. To me, that's the essence of AR, not Rails. (Not sure what the essence of rails is of course). > Ideally, the Ruby world would consist of multiple libs and tools that > can be wired up in any number of ways, without heavy branding of a > favored assortment, and certainly using Og + Rails (or Og + some subset > of Rails) could be a reasonable combination. Yes, that would be a nice... > But I often get the sense that Og and AR encourage quite different world > views, and that people who prefer one tend to avoid the other. I also > don't think (but would be happy to be proved wrong) that there is much > overlap between the Rails and Og/Nitro communities. Probably there isn't. > > I'm curious to know how you're using Og with Rails, though. Well, I started my current app to learn Rails. I've already decided I'm not too fond of AR, and would like to try Og. (It seems to be much closer to my way of thinking...). Perhaps, eventually, the entire app will be ported to Nitro, or something else, but one step at a time (if I can). From george.moschovitis at gmail.com Sun Jul 24 12:57:46 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 24 Jul 2005 19:57:46 +0300 Subject: [Nitro] Og question In-Reply-To: <01bc01c59035$6c855130$0200000a@agamemnon> References: <00d201c58fcb$357329c0$0200000a@agamemnon> <01bc01c59035$6c855130$0200000a@agamemnon> Message-ID: > tutorial (and updating it on the wiki for the next poor sap). Thats the right thing to do :) > in the API docs. I am reading the code though. Is there any other > documentation that I am missing? I am afraid there is not much more at the moment. That's about to change though :) -g. -- http://www.nitrohq.com From george.moschovitis at gmail.com Sun Jul 24 13:06:29 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 24 Jul 2005 20:06:29 +0300 Subject: [Nitro] Nitro/Og 0.21.0 preview In-Reply-To: <020301c59049$bb6e2f60$0200000a@agamemnon> References: <01b101c59031$49d091d0$0200000a@agamemnon> <020301c59049$bb6e2f60$0200000a@agamemnon> Message-ID: Hmm, sudo gem install glue-xxx.gem sudo gem install og-xxx.gem sudo gem install nitro-xxx.gem should be enough. There were some problems with the preview gems, I think I have fixed them though. I am ready for release (tomorrow) so if you find some non reported problems, let me know! regards, George On 7/24/05, Jon A. Lambert wrote: > Jon A. Lambert wrote: > > I'm having trouble installing the gems. > > > > Nevermind. Apparently using a file:// URL don't work so hot. > I put them off a local server. > > C:\ >gem install examples --source http://localhost -r > Attempting remote installation of 'examples' > Install required dependency nitro? [Yn] > Install required dependency glue? [Yn] > Install required dependency og? [Yn] > Install required dependency og? [Yn] > Successfully installed examples-0.21.0 > Successfully installed nitro-0.21.0 > Successfully installed glue-0.21.0 > Successfully installed og-0.21.0 > Successfully installed og-0.21.0 > Installing RDoc documentation for examples-0.21.0... > File not found: lib > ----- > > I just got that one error above. None of the rdoc was generated. > > BTW, I tried listing gems with.. gem list --source http://www.nitrohq.com -r > which didn't work. > > Anyway now I'll try it out. > > -- > J Lambert > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From james_b at neurogami.com Sun Jul 24 11:07:25 2005 From: james_b at neurogami.com (James Britt) Date: Sun, 24 Jul 2005 10:07:25 -0500 Subject: [Nitro] Og on Rails In-Reply-To: <200507241148.53705.dcorbin@machturtle.com> References: <200507231553.51636.dcorbin@machturtle.com> <200507240651.26937.dcorbin@machturtle.com> <42E38D9E.7020303@neurogami.com> <200507241148.53705.dcorbin@machturtle.com> Message-ID: <42E3AEAD.6030507@neurogami.com> David Corbin wrote: > On Sunday 24 July 2005 08:46 am, James Britt wrote: >>I'm curious to know how you're using Og with Rails, though. > > > Well, I started my current app to learn Rails. I've already decided I'm not > too fond of AR, and would like to try Og. (It seems to be much closer to my > way of thinking...). Perhaps, eventually, the entire app will be ported to > Nitro, or something else, but one step at a time (if I can). If I were looking to move from one framework to another, I'd probably look to swap out all of AR and replace it with Og, and then drop the require' of AR into the app. I would like to think that Rails code referencing models created through ActiveRecord do not depend on AR themselves; that is, controller code should work fine without AR being loaded. The controller code would simply send messages to model objects; Og-based models would just need og loaded. (This would be easy to try out, which I might just do. If, however, controller code is coupled to AR then there's a design problem.) James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From dcorbin at machturtle.com Sun Jul 24 13:16:50 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sun, 24 Jul 2005 13:16:50 -0400 Subject: [Nitro] Og on Rails In-Reply-To: <42E3AEAD.6030507@neurogami.com> References: <200507231553.51636.dcorbin@machturtle.com> <200507241148.53705.dcorbin@machturtle.com> <42E3AEAD.6030507@neurogami.com> Message-ID: <200507241316.50823.dcorbin@machturtle.com> On Sunday 24 July 2005 11:07 am, James Britt wrote: > David Corbin wrote: > > On Sunday 24 July 2005 08:46 am, James Britt wrote: > >>I'm curious to know how you're using Og with Rails, though. > > > > Well, I started my current app to learn Rails. I've already decided I'm > > not too fond of AR, and would like to try Og. (It seems to be much closer > > to my way of thinking...). Perhaps, eventually, the entire app will be > > ported to Nitro, or something else, but one step at a time (if I can). > > If I were looking to move from one framework to another, I'd probably > look to swap out all of AR and replace it with Og, and then drop the > require' of AR into the app. > > I would like to think that Rails code referencing models created through > ActiveRecord do not depend on AR themselves; that is, controller code > should work fine without AR being loaded. The controller code would > simply send messages to model objects; Og-based models would just need > og loaded. > > (This would be easy to try out, which I might just do. If, however, > controller code is coupled to AR then there's a design problem.) > I was just hoping I wouldn't have to change ALL the model objects at one time. David From john.lloydjones at gmail.com Sun Jul 24 16:31:11 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Sun, 24 Jul 2005 13:31:11 -0700 Subject: [Nitro] Trouble with Og many_to_many Message-ID: <6fcd26f105072413314aa21fdb@mail.gmail.com> I'm unable to figure out the following error I'm getting : /usr/lib/ruby/gems/1.8/gems/og-0.20.0/lib/og/relation/joins_many.rb:28:in `enchant': undefined method `store' for nil:NilClass (NoMethodError) Basically, I have two classes with a many_to_many relationship (I'll use Category and Article from one of the examples to keep things familiar). That's fine. Now I add a class that extends, say Article: class NewArticle < Article property :more_text, String end Shouldn't that work? What have I missed? From dcorbin at machturtle.com Sun Jul 24 20:10:28 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sun, 24 Jul 2005 20:10:28 -0400 Subject: [Nitro] Og and Identity Message-ID: <200507242010.28511.dcorbin@machturtle.com> Is it correct that since Og is "less imposing" than AR, that it does not impose an OID on you in anyway. How are primary keys dealt with? Is there any support or even recommend strategy here? David From george.moschovitis at gmail.com Mon Jul 25 03:23:24 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 25 Jul 2005 10:23:24 +0300 Subject: [Nitro] Nitro + Og 0.21.0 Compiler, Og custom joins, Og dynamic injection, new builder Message-ID: Hello everyone, new versions of Nitro and Og were just released. Homepage + Downloads: http://www.nitrohq.com Nitro goes from strength to strength as the community gets bigger. Great new features were introduced and a lot of effort was spend on cleaning up Nitro's implementation and polishing 'little things'. Many patches were contributed by the community to make this is a release you will love! Some notable changes: * New compiler pipeline replaces the obscure shader mechanism. A compiler object is responsible for transforming a controller action and or the associated xhtml templates to a special ruby method that will respond to given urls with the action output. Using the aspect oriented features of Nitro or the specialized pipeline setup method a developer can easily customize the compilation stage to meet his needs. Here are some examples: Compiler.setup_template_transformation do |template| template = Elements.transform(template) template = Localization.transform(template) template = Markup.transform(template) template = Template.transform(template) end or Compiler.before "puts 'Compiling'", :on => :compile Compiler.after "puts 'Template processed'", :on => :transform_template Compiler.wrap Benchmark, :on => compile Compiler.before :my_method, :on => compile Special rendering effects where never easier. If you need run time effects, just intercept the Render object. * Integrated the new configuration system that was previewed in the last release. All the configuration settings are now accessible either through the owner class or from the global Configuration variable using Ruby's metaprogramming features. Moreover, Nitro now dynamically decides the configuration mode (debug, stage, live/production) from environment variables or command line arguments so depolying your application is easier than ever: just run svn update on the live server, the application will grab the correct configuration parameters automatically. Of course you can use svn's advanced features to rollback to earlier versions if you experience problems. The mode specific configuration settings are defined either on ruby files or yaml files or both. Point your browser to http:://my.app.com/settings to browse the settings for your application. * Og dynamic queries. You can inject caclulated or join attributes to your objects. Here is an example: class Item property :quantity, Fixnum property :unit_price, Float def initialize(quantity, unit_price) @quantity = quantity @unit_price = unit_price end end Item.create 2, 3.0 item = Item.find_one :select => 'quantity*unit_price as total_price' item.total_price # => 6.0 Please note that total_price is a dynamically injected attribute. Now you can combine SQL's powerful query features with the simplicity and elegance of Og. * Og customized join tables allows you to use any Ruby object as the join relation between other objects. Here comes an example: class Category property :title, String end class Article property :title, String end class ArticleToCategory property :rate, Float has_one Article has_one Category end c1 = Category.create c2 = Category.create a = Article.create a.categories.add(c1, :rate => 2.3) a.categories.add(c2, :rate => 1.2) for c in a.categories p a.category_join_data(c).rate end * Og collections size() is now optimized. * Og join code support refactoring. The new code is easier to read, more customizable and generates more efficient code by default. * Nitro automatically assings reasonable template_roots on Controllers based on mount points. Moreover, the template_root overloading feature was improved. If you cant to reuse an existing controller but customize the view rendering by using different templates for some actions, just assign a different template root for this controller, and put the custom templates inside that dir. The custom templates 'override' the templates of the parent controller (templates for non customized actions come from the parent's controller template_root). Creating a library of reusable controllers (parts) was never easier. * Major cleanup of the nitro source code, removed many files. * Greatly improved Wee integration makes Nitro the premium container for Wee components. Have a look at the updated wee example. * Improved builder mechanism for programmatic rendering. The new builder resuses the controller helper mixins thanks to extensive refactoring of the implementation. Here is an example: class MyController def index build do labels = ['George', 'Stella', 'Renos'] html { head { title 'A simple test' } body { 10.times { strong 'Hello World' i 'Hello World222' } select(:id => 'names') { options :labels => labels, :selected => 1 } } } end end * Improved helper integration. Helpers are now accessed either as mixins or through the builder mechanism. #{form entity} #{options :labels => [..], :values => [..], :selected => 1} or #{emit :form entity} #{emit :options :labels => [..] ...} * Reimplemented the markup mixin to make this more flexible. You can easily customize the markup logic that is applied by the markup macros. * Updated the documentation. * Fixed all reported or discovered bugs, many smaller improvements. Enjoy, George Moschovitis -- http://www.nitrohq.com From george.moschovitis at gmail.com Mon Jul 25 03:27:53 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 25 Jul 2005 10:27:53 +0300 Subject: [Nitro] Og and Identity In-Reply-To: <200507242010.28511.dcorbin@machturtle.com> References: <200507242010.28511.dcorbin@machturtle.com> Message-ID: On 7/25/05, David Corbin wrote: > Is it correct that since Og is "less imposing" than AR, that it does not > impose an OID on you in anyway. How are primary keys dealt with? Is there > any support or even recommend strategy here? > > David Hello David! you can define your own primary key. Here is how to do it: class MyClass property :myid, :primary_key => true ... end or class MyClass .. meta :primary_key, :myid end Please note that I plan to make some changes to the primary key/oid handling in a forthcoming version of Og. It will be quite more flexible and transparent. regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Mon Jul 25 04:19:50 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 25 Jul 2005 11:19:50 +0300 Subject: [Nitro] Trouble with Og many_to_many In-Reply-To: <6fcd26f105072413314aa21fdb@mail.gmail.com> References: <6fcd26f105072413314aa21fdb@mail.gmail.com> Message-ID: Hm, I 'll have to investigat this and get back to you! -g. On 7/24/05, John Lloyd-Jones wrote: > I'm unable to figure out the following error I'm getting : > > /usr/lib/ruby/gems/1.8/gems/og-0.20.0/lib/og/relation/joins_many.rb:28:in > `enchant': undefined method `store' for nil:NilClass (NoMethodError) > > Basically, I have two classes with a many_to_many relationship (I'll > use Category and Article from one of the examples to keep things > familiar). That's fine. Now I add a class that extends, say Article: > > class NewArticle < Article > property :more_text, String > end > > Shouldn't that work? What have I missed? > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From nusgnaf at gmail.com Mon Jul 25 04:39:06 2005 From: nusgnaf at gmail.com (Fang Sun) Date: Mon, 25 Jul 2005 16:39:06 +0800 Subject: [Nitro] Re: Nitro + Og 0.21.0 Compiler, Og custom joins, Og dynamic injection, new builder In-Reply-To: References: Message-ID: <716700c9050725013955cb8875@mail.gmail.com> Congratulations for a new release! I am not a native speaker, I hope I express my bug report and workground clearly... I am testing the integration between Wee and Nitro, and the shipped wee example from example package fails.It returns the error "uninitialized constant Wee::SequentialIdGenerator" After checking Wee-0.9.1 document I found that there is no definition of Wee::SequentialIdGenerator class now, I changed the line 17 of lib/nitro/adapter/wee.rb as the following: cb = Wee::CallbackRegistry.new(Wee::SimpleIdGenerator.new) This seems fix my problem, however, I don't understand the interval much, hope more experienced develops recheck this. From george.moschovitis at gmail.com Mon Jul 25 05:00:24 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 25 Jul 2005 12:00:24 +0300 Subject: [Nitro] Re: Nitro + Og 0.21.0 Compiler, Og custom joins, Og dynamic injection, new builder In-Reply-To: <716700c9050725013955cb8875@mail.gmail.com> References: <716700c9050725013955cb8875@mail.gmail.com> Message-ID: Oh, wait for an updated Wee release from Michael. I used a version from the SVN. regards, George. On 7/25/05, Fang Sun wrote: > Congratulations for a new release! > I am not a native speaker, I hope I express my bug report and > workground clearly... > I am testing the integration between Wee and Nitro, and the shipped > wee example from example package fails.It returns the error > "uninitialized constant Wee::SequentialIdGenerator" > After checking Wee-0.9.1 document > I found that there is no definition of Wee::SequentialIdGenerator > class now, I changed the line 17 of lib/nitro/adapter/wee.rb as the > following: > > cb = Wee::CallbackRegistry.new(Wee::SimpleIdGenerator.new) > > This seems fix my problem, however, I don't understand the interval > much, hope more experienced develops recheck this. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Mon Jul 25 05:06:20 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 25 Jul 2005 12:06:20 +0300 Subject: [Nitro] Re: Nitro + Og 0.21.0 Compiler, Og custom joins, Og dynamic injection, new builder In-Reply-To: References: <716700c9050725013955cb8875@mail.gmail.com> Message-ID: BTW, everyone that has installed the preview gems of 0.21.0 should remove them before installing the final gems! -g. -- http://www.nitrohq.com From george.moschovitis at gmail.com Mon Jul 25 05:06:20 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 25 Jul 2005 12:06:20 +0300 Subject: [Nitro] Re: Nitro + Og 0.21.0 Compiler, Og custom joins, Og dynamic injection, new builder In-Reply-To: References: <716700c9050725013955cb8875@mail.gmail.com> Message-ID: BTW, everyone that has installed the preview gems of 0.21.0 should remove them before installing the final gems! -g. -- http://www.nitrohq.com From dcorbin at machturtle.com Mon Jul 25 05:46:58 2005 From: dcorbin at machturtle.com (David Corbin) Date: Mon, 25 Jul 2005 05:46:58 -0400 Subject: [Nitro] Og and Identity In-Reply-To: References: <200507242010.28511.dcorbin@machturtle.com> Message-ID: <200507250546.58899.dcorbin@machturtle.com> On Monday 25 July 2005 03:27 am, George Moschovitis wrote: > On 7/25/05, David Corbin wrote: > > Is it correct that since Og is "less imposing" than AR, that it does not > > impose an OID on you in anyway. How are primary keys dealt with? Is > > there any support or even recommend strategy here? > > > > David > > Hello David! > > you can define your own primary key. Here is how to do it: > > class MyClass > property :myid, :primary_key => true > ... > end > > or > > class MyClass > .. > meta :primary_key, :myid > end > > Please note that I plan to make some changes to the primary key/oid > handling in a forthcoming version of Og. It will be quite more > flexible and transparent. > But right now, all that will do is control the generation of the database schema, right? It doesn't have any other side effects like changing the definition of == David > regards, > George. From mneumann at ntecs.de Mon Jul 25 11:14:31 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Mon, 25 Jul 2005 17:14:31 +0200 Subject: [Nitro] Re: Nitro + Og 0.21.0 Compiler, Og custom joins, Og dynamic injection, new builder In-Reply-To: <716700c9050725013955cb8875@mail.gmail.com> References: <716700c9050725013955cb8875@mail.gmail.com> Message-ID: <42E501D7.6000701@ntecs.de> Fang Sun wrote: > Congratulations for a new release! > I am not a native speaker, I hope I express my bug report and > workground clearly... > I am testing the integration between Wee and Nitro, and the shipped > wee example from example package fails.It returns the error > "uninitialized constant Wee::SequentialIdGenerator" > After checking Wee-0.9.1 document > I found that there is no definition of Wee::SequentialIdGenerator > class now, I changed the line 17 of lib/nitro/adapter/wee.rb as the > following: > > cb = Wee::CallbackRegistry.new(Wee::SimpleIdGenerator.new) > > This seems fix my problem, however, I don't understand the interval > much, hope more experienced develops recheck this. Try out Wee 0.10.0 ;-) BTW, I also have revised the OgScaffolder (lib/wee/databases/og/scaffolder.rb), which now works fine together with Og 0.21.0 and has some minor additional features. See: wee/examples/og-test.rb Regards, Michael From jforeman at hark.org Mon Jul 25 19:10:06 2005 From: jforeman at hark.org (Jason Foreman) Date: Mon, 25 Jul 2005 18:10:06 -0500 Subject: [Nitro] errors with fcgi? Message-ID: <4CA4731F-B19E-4510-B60F-0182EA3DCE58@hark.org> I seem to be running into trouble when running my app under FastCGI that do not appear when running under Webrick. The problems seem to be that parts of nitro expect the request to have either an IO or StringIO stream, but the FastCGI stream doesn't quack the same... This happens in a controller exposed as a web service. Check out this: ERROR: undefined method `rewind' for # /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ request.rb:137:in `ra w_body' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ service.rb:8:in `inde x' (eval):6:in `index_action' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ controller.rb:171:in `send' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ controller.rb:171:in `method_missing' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/render.rb: 314:in `sen d' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/render.rb: 314:in `ren der' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/adapter/ fastcgi.rb:39 :in `start' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/adapter/ fastcgi.rb:26 :in `each' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/adapter/ fastcgi.rb:26 :in `start' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/runner.rb: 226:in `inv oke_fcgi_proc' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/runner.rb: 192:in `run ' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/runner.rb: 332:in `run ' From george.moschovitis at gmail.com Tue Jul 26 02:23:19 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 26 Jul 2005 09:23:19 +0300 Subject: [Nitro] errors with fcgi? In-Reply-To: <4CA4731F-B19E-4510-B60F-0182EA3DCE58@hark.org> References: <4CA4731F-B19E-4510-B60F-0182EA3DCE58@hark.org> Message-ID: Is it possible that you could privately send me your code, so that I can investigate this? regards, -g. On 7/26/05, Jason Foreman wrote: > > I seem to be running into trouble when running my app under FastCGI > that do not appear when running under Webrick. The problems seem to > be that parts of nitro expect the request to have either an IO or > StringIO stream, but the FastCGI stream doesn't quack the same... > > This happens in a controller exposed as a web service. > > Check out this: > > ERROR: undefined method `rewind' for # > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ > request.rb:137:in `ra > w_body' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ > service.rb:8:in `inde > x' > (eval):6:in `index_action' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ > controller.rb:171:in > `send' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ > controller.rb:171:in > `method_missing' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/render.rb: > 314:in `sen > d' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/render.rb: > 314:in `ren > der' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/adapter/ > fastcgi.rb:39 > :in `start' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/adapter/ > fastcgi.rb:26 > :in `each' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/adapter/ > fastcgi.rb:26 > :in `start' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/runner.rb: > 226:in `inv > oke_fcgi_proc' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/runner.rb: > 192:in `run > ' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/runner.rb: > 332:in `run > ' > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From Aleksi.Niemela at cs.helsinki.fi Tue Jul 26 13:06:13 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Tue, 26 Jul 2005 20:06:13 +0300 Subject: [Nitro] Inconsistent data with refers_to fixed In-Reply-To: References: <42DEAEFB.7070102@cs.helsinki.fi> <42DEC09F.20804@cs.helsinki.fi> Message-ID: <42E66D85.2080707@cs.helsinki.fi> George Moschovitis wrote: >>2) Even if auto-reloading of incorrect references is not wanted, >>previous version of refers_to doesn't reload if forced, so there's a bug >>to be fixed. (It's easy for me to rip the above mentioned third case >>away, and the bug stays fixed.) >> >> > >please, remove the third case, i think that autoreloading of incorrect >references is not wanted by default (i 'll add an Og option for this). > > > Actually you were quicker! But yes, the bug regarding reloading is now fixed with in current version (earlier checkin fixed that already) and the code doesn't have handling for the third case (as you removed it). There are still a point I'd like to highlight. I checked in a working version of tc_relation.rb which reflects the current state of affairs. I'm posting this mail to list so you can beware and not get bitten by this feature. For me this feature of refers_to pointing to incorrect object in memory but doing just ok in database forces my code to be full of managed_object.referring_to(true).property_foo type of code which reloads referred objects all the time (just to be sure they're like they're on disk). Thanks, - Aleksi Here's the relevat part of the test case demonstrating the effect. def test_refers_to og = Og.setup(:store => :memory, :name => 'test') og.manage_classes # test refers_to accessor is correctly updated u = User.create("George") a = Article.create("Og is a good thing!") assert_equal(nil, a.active_user) a.active_user = u a.save! assert_equal(u.oid, a.active_user_oid) assert_equal(u.object_id, a.active_user.object_id) u2 = User.create("Another user") a.active_user = u2 a.save! assert_equal(u2.oid, a.active_user_oid) # Note! Og doesn't automatically reload object referred by active_user # so this won't equal. assert_not_equal(u2.object_id, a.active_user.object_id) # Even forced reload won't help here as it won't reload relations. a.reload assert_not_equal(u2.object_id, a.active_user.object_id) # But forcing enchanted accessor to reload in refers_to.rb helps! a.active_user(true) assert_equal(u2.object_id, a.active_user.object_id) # and just to be sure oids are still correct assert_equal(u2.oid, a.active_user_oid) end From fabian at oggu.de Tue Jul 26 13:28:49 2005 From: fabian at oggu.de (Fabian Buch) Date: Tue, 26 Jul 2005 19:28:49 +0200 Subject: [Nitro] cgi post problem Message-ID: <7c04de365d3ccd592799dd5aad952ab6@oggu.de> hi, I have a cgi problem too. Everything works fine, except form post. I tried some code very similar to the blog example with an entry_form sending to a new_entry action. For testing this action does only the following: def new_entry return "request: " + request['body'] end This works fine in WEBrick and works too in cgi if I use get mode, but in post mode it says the following in the logs: undefined method `binmode' for nil:NilClass The problem is probably in Nitro sources, file adapter/cgi.rb, line 214, context.in.class = NilClass, so it can't have a method binmode (or read one line below). I'm using 0.21.0 gems installed from rubyforge (not the pre version). Fabian From jforeman at hark.org Tue Jul 26 19:52:33 2005 From: jforeman at hark.org (Jason Foreman) Date: Tue, 26 Jul 2005 18:52:33 -0500 Subject: [Nitro] errors with fcgi? In-Reply-To: References: <4CA4731F-B19E-4510-B60F-0182EA3DCE58@hark.org> Message-ID: <71C367A7-82B7-4183-9F78-E2721631BDC0@hark.org> Actually, my code is mostly modelled from the blog example, with a more complete implementation of the various blog APIs. Using the blog example straight out of the examples-0.21.0.tgz will give the same error. On Jul 26, 2005, at 1:23 AM, George Moschovitis wrote: > Is it possible that you could privately send me your code, so that I > can investigate this? > > regards, > -g. > > > On 7/26/05, Jason Foreman wrote: > >> >> I seem to be running into trouble when running my app under FastCGI >> that do not appear when running under Webrick. The problems seem to >> be that parts of nitro expect the request to have either an IO or >> StringIO stream, but the FastCGI stream doesn't quack the same... >> >> This happens in a controller exposed as a web service. >> >> Check out this: >> >> ERROR: undefined method `rewind' for # >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ >> request.rb:137:in `ra >> w_body' >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ >> service.rb:8:in `inde >> x' >> (eval):6:in `index_action' >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ >> controller.rb:171:in >> `send' >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ >> controller.rb:171:in >> `method_missing' >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ >> render.rb: >> 314:in `sen >> d' >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ >> render.rb: >> 314:in `ren >> der' >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/adapter/ >> fastcgi.rb:39 >> :in `start' >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/adapter/ >> fastcgi.rb:26 >> :in `each' >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/adapter/ >> fastcgi.rb:26 >> :in `start' >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ >> runner.rb: >> 226:in `inv >> oke_fcgi_proc' >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ >> runner.rb: >> 192:in `run >> ' >> /usr/local/lib/ruby/gems/1.8/gems/nitro-0.20.0/lib/nitro/ >> runner.rb: >> 332:in `run >> ' >> >> >> >> _______________________________________________ >> Nitro-general mailing list >> Nitro-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/nitro-general >> >> > > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From transfire at gmail.com Tue Jul 26 22:20:52 2005 From: transfire at gmail.com (TRANS) Date: Tue, 26 Jul 2005 22:20:52 -0400 Subject: [Nitro] Nitro and Wee Message-ID: <4b6f054f05072619202acf67b6@mail.gmail.com> What is the relationship between Nitro and Wee? Thanks, T. From george.moschovitis at gmail.com Wed Jul 27 02:52:44 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 27 Jul 2005 09:52:44 +0300 Subject: [Nitro] cgi post problem In-Reply-To: <7c04de365d3ccd592799dd5aad952ab6@oggu.de> References: <7c04de365d3ccd592799dd5aad952ab6@oggu.de> Message-ID: Ok, will have a look at this. Perhaps James can help, he subbited the original code. -g. On 7/26/05, Fabian Buch wrote: > hi, > > I have a cgi problem too. Everything works fine, except form post. > > I tried some code very similar to the blog example with an entry_form > sending to a new_entry action. For testing this action does only the > following: > > def new_entry > return "request: " + request['body'] > end > > This works fine in WEBrick and works too in cgi if I use get mode, but > in post mode it says the following in the logs: > > undefined method `binmode' for nil:NilClass > > The problem is probably in Nitro sources, file adapter/cgi.rb, line > 214, context.in.class = NilClass, so it can't have a method binmode (or > read one line below). > > I'm using 0.21.0 gems installed from rubyforge (not the pre version). > > Fabian > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Wed Jul 27 02:59:27 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 27 Jul 2005 09:59:27 +0300 Subject: [Nitro] Nitro and Wee In-Reply-To: <4b6f054f05072619202acf67b6@mail.gmail.com> References: <4b6f054f05072619202acf67b6@mail.gmail.com> Message-ID: Nitro can act as a container for Wee components (and soon for the programmatic renderer). This way, Wee can reuse Nitro's infrastructure and low level code, and Nitro can reuses Wee's stateful components. Its a win-win combination :) Moreover, Michael contributes significant code/ideas to Og. Hopefuly he will help on the Nitro infrastructure front too. regards, George. On 7/27/05, TRANS wrote: > What is the relationship between Nitro and Wee? > > Thanks, > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Wed Jul 27 05:27:27 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 27 Jul 2005 12:27:27 +0300 Subject: [Nitro] Trouble with Og many_to_many In-Reply-To: <6fcd26f105072413314aa21fdb@mail.gmail.com> References: <6fcd26f105072413314aa21fdb@mail.gmail.com> Message-ID: Fixed this! Will be available in the next version. -g. On 7/24/05, John Lloyd-Jones wrote: > I'm unable to figure out the following error I'm getting : > > /usr/lib/ruby/gems/1.8/gems/og-0.20.0/lib/og/relation/joins_many.rb:28:in > `enchant': undefined method `store' for nil:NilClass (NoMethodError) > > Basically, I have two classes with a many_to_many relationship (I'll > use Category and Article from one of the examples to keep things > familiar). That's fine. Now I add a class that extends, say Article: > > class NewArticle < Article > property :more_text, String > end > > Shouldn't that work? What have I missed? > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From aglarond at gmail.com Wed Jul 27 05:50:42 2005 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Wed, 27 Jul 2005 11:50:42 +0200 Subject: [Nitro] Og and dynamic table names Message-ID: <55c107bf050727025052a26d82@mail.gmail.com> Hi, I'm writing an application that reads the output produced by another application. This other application is structured in such a way that database tables are created dynamically, so the schema constantly changes. Unfortunately, I don't have control over this other application, so I can't force it to use a fixed schema. I'm trying to use a factory-type way of instantiating these tables, but I'm running into a problem in that Og always looks for a table name of type "og" instead of "". Is there a way to coerce Og into looking for a different table? Or is Og really not meant for this type of thing? The following example code will demonstrate what I mean. Thanks for any help, - Dimitri P.S. The following works to a certain extent, i.e., doesn't bail. As soon as you change the store to an RDBMS-type, though, it'll bail, saying that it can't find the table. require 'og/entity' $DBG = true # from http://rubycolor.org/dp/AbstractFactory.en.html class Factory def Factory.getFactory(klass) begin factory = Object.const_get(klass).new return factory rescue NameError print "undefined class: #{klass}.\n" end end end class Table < Og::Manager::EntityInfo prop_reader :id, Fixnum end class TableFactory < Factory def createTable(name) Table.new(name) end end factory = Factory.getFactory("TableFactory") t = factory.createTable("table_name") pp t db_config={ :name => 'test_db', :store => :memory, :connection_count => 1 } Og.create_schema = false db = Og.setup(db_config) pp db dbe = db.entities = t pp db From george.moschovitis at gmail.com Wed Jul 27 06:44:05 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 27 Jul 2005 13:44:05 +0300 Subject: [Nitro] Og and dynamic table names In-Reply-To: <55c107bf050727025052a26d82@mail.gmail.com> References: <55c107bf050727025052a26d82@mail.gmail.com> Message-ID: Hello Dimitri, there is some support for this, for example you can set: Og.table_prefix = nil to get rid of the 'og' prefix before the tables. But, you will have to wait for a forthcoming release with full-blown schema reverse engineering support. Even better, instead of waiting, you could provide some patches yourself to add this functionality ;-) regards, George. -- http://www.nitrohq.com From julian at coretech.net.au Wed Jul 27 06:51:13 2005 From: julian at coretech.net.au (Julian Leviston) Date: Wed, 27 Jul 2005 20:51:13 +1000 Subject: [Nitro] Nitro Newbie / Helper In-Reply-To: References: <55c107bf050727025052a26d82@mail.gmail.com> Message-ID: <6903755F-C5C2-4C89-8D24-ABCFA23D6DDC@coretech.net.au> Hi List, George, All, I'm very interested in providing a programming and documenting hand in Nitro's development. I've had some exposure to RoR (as I'm sure we all have), but I find the fact that it's tied to the database schema so tightly rather disturbing. Why bother programming in an object oriented language if you can't write your Business Objects in an object-oriented way? Og and Nitro seem to solve this problem at first glance. What disturbs me about Nitro is the lack of documentation. I'd like to play a hand in this... I'd like to use Nitro to develop sites with, and I'm very interested in helping out if Nitro has what I'm looking for code-wise (which I'm fairly sure it does). I've digested the tutorial (no offense to the creator of it, but it is kind of all over the shop). What is the presently recommended method of learning all about NItro and how to use it? Julian From george.moschovitis at gmail.com Wed Jul 27 07:23:12 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 27 Jul 2005 14:23:12 +0300 Subject: [Nitro] Nitro Newbie / Helper In-Reply-To: <6903755F-C5C2-4C89-8D24-ABCFA23D6DDC@coretech.net.au> References: <55c107bf050727025052a26d82@mail.gmail.com> <6903755F-C5C2-4C89-8D24-ABCFA23D6DDC@coretech.net.au> Message-ID: > Hi List, George, All, Hello and welcome to the list :) > I'm very interested in providing a programming and documenting hand > in Nitro's development. That's great! > What disturbs me about Nitro is the lack of documentation. I'd like > to play a hand in this... I'd like to use Nitro to develop sites > ... > method of learning all about NItro and how to use it? The documentation is lacking at the moment, but perhaps, with your help we can improve things. For the moment have a look at: * doc/RELEASES * the example applications * the test cases Tommorow I 'll probably release another Nitro example, the Wiki that powers www.nitrohq.com. This example will demonstrate the cannonical form of Nitro applications. I would like to also demonstrate how Nitro implictly allows for 'productized' development but this will have to wait a little bit more. If you face any problems just let us know. regards, George. -- http://www.nitrohq.com From aglarond at gmail.com Wed Jul 27 07:26:35 2005 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Wed, 27 Jul 2005 13:26:35 +0200 Subject: [Nitro] Og and dynamic table names In-Reply-To: References: <55c107bf050727025052a26d82@mail.gmail.com> Message-ID: <55c107bf0507270426114a8006@mail.gmail.com> Hi George, On 7/27/05, George Moschovitis wrote: > there is some support for this, for example you can set: > > Og.table_prefix = nil > > to get rid of the 'og' prefix before the tables. I saw that in the doc/config.txt file, thanks. > But, you will have to wait for a forthcoming > release with full-blown schema reverse engineering support. Even better, instead > of waiting, you could provide some patches yourself to add this > functionality ;-) > I'd love to. I just don't know where to begin... Do you have any kind of overall concept document that explains the general purpose of each class, how it fits into the whole scheme of things, and where you're planning on heading (roadmap) with each concept? Thanks, - Dimitri From julian at coretech.net.au Wed Jul 27 07:52:30 2005 From: julian at coretech.net.au (Julian Leviston) Date: Wed, 27 Jul 2005 21:52:30 +1000 Subject: [Nitro] Nitro Newbie / Helper In-Reply-To: References: <55c107bf050727025052a26d82@mail.gmail.com> <6903755F-C5C2-4C89-8D24-ABCFA23D6DDC@coretech.net.au> Message-ID: Hi George :-) I had a look at doc/RELEASES. That wasn't very useful. So then I thought I'd try one of the example applications. Downloaded it, and untarred it... using OS X. Go the following: Bullet:~/nitrodev/examples-0.21.0/blog julian$ ruby -rubygems run.rb /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__': No such file to load -- nitro/compiler/localization (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 18:in `require' from ./src/blog.rb:15 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 18:in `require__' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 18:in `require' from run.rb:4 Wonder why that didn't work. Any ideas? So far, my view of Nitro is that it's "kind of like Rails". Is that roughly correct? Got any other places I can go to gather information? I don't mind doing low-level stuff. Julian. On 27/07/2005, at 9:23 PM, George Moschovitis wrote: >> Hi List, George, All, >> > > Hello and welcome to the list :) > > >> I'm very interested in providing a programming and documenting hand >> in Nitro's development. >> > > That's great! > > >> What disturbs me about Nitro is the lack of documentation. I'd like >> to play a hand in this... I'd like to use Nitro to develop sites >> ... >> method of learning all about NItro and how to use it? >> > > The documentation is lacking at the moment, but perhaps, with your > help we can improve things. > For the moment have a look at: > > * doc/RELEASES > * the example applications > * the test cases > > Tommorow I 'll probably release another Nitro example, the Wiki that > powers www.nitrohq.com. This example will demonstrate the cannonical > form of Nitro applications. I would like to also demonstrate how Nitro > implictly allows for 'productized' development but this will have to > wait a little bit more. > > If you face any problems just let us know. > > regards, > George. > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From george.moschovitis at gmail.com Wed Jul 27 11:06:08 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 27 Jul 2005 18:06:08 +0300 Subject: [Nitro] Spark and 0.21.1 preview Message-ID: Dear devs, I uploaded a first Preview of Spark along with 0.21.1 gems. You can find download links on http://www.nitrohq.com Spark is the wiki that powers www.nitrohq.com. I decided to release the source code to provide another small reference application for Nitro. If there is interest from other people we could improve this simple Wiki and make it something really useful. Please, try this preview and report any problems. Spark needs the 0.21.1 gems (they fix some bugs and introduced minor new features). regards, George. -- http://www.nitrohq.com From alang at cronosys.com Wed Jul 27 11:55:50 2005 From: alang at cronosys.com (Alan Garrison) Date: Wed, 27 Jul 2005 11:55:50 -0400 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: References: Message-ID: <42E7AE86.2020701@cronosys.com> George Moschovitis wrote: >Dear devs, > >I uploaded a first Preview of Spark along with 0.21.1 gems. You can >find download links >on http://www.nitrohq.com > >Spark is the wiki that powers www.nitrohq.com. I decided to release >the source code >to provide another small reference application for Nitro. If there is >interest from other >people we could improve this simple Wiki and make it something really useful. > >Please, try this preview and report any problems. Spark needs the 0.21.1 gems >(they fix some bugs and introduced minor new features). > >regards, >George. > > > > Cool, thanks for releasing the source. However I get: ruby run.rb /usr/lib/ruby/gems/1.8/gems/nitro-0.21.0/lib/nitro/controller.rb:117:in `alias_action': uninitialized constant Nitro::Publishable::ActionMetadata (NameError) from ./src/controller.rb:22 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' from run.rb:9 I have the 0.21.0 stuff installed. -- Alan Garrison Cronosys, LLC Phone: 216-221-4600 ext 308 From julian at coretech.net.au Wed Jul 27 12:18:01 2005 From: julian at coretech.net.au (Julian Leviston) Date: Thu, 28 Jul 2005 02:18:01 +1000 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: <42E7AE86.2020701@cronosys.com> References: <42E7AE86.2020701@cronosys.com> Message-ID: <43C5B0BA-1E15-4008-B31D-1693DB7A773E@coretech.net.au> Yeah but he just finished saying you need 0.21.1 not 0.21.0 J On 28/07/2005, at 1:55 AM, Alan Garrison wrote: > George Moschovitis wrote: > > >> Dear devs, >> >> I uploaded a first Preview of Spark along with 0.21.1 gems. You can >> find download links >> on http://www.nitrohq.com >> >> Spark is the wiki that powers www.nitrohq.com. I decided to release >> the source code >> to provide another small reference application for Nitro. If there is >> interest from other >> people we could improve this simple Wiki and make it something >> really useful. >> >> Please, try this preview and report any problems. Spark needs the >> 0.21.1 gems (they fix some bugs and introduced minor new features). >> >> regards, >> George. >> >> >> >> > Cool, thanks for releasing the source. However I get: > > ruby run.rb > /usr/lib/ruby/gems/1.8/gems/nitro-0.21.0/lib/nitro/controller.rb: > 117:in `alias_action': uninitialized constant > Nitro::Publishable::ActionMetadata (NameError) > from ./src/controller.rb:22 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb: > 18:in `require__' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb: > 18:in `require' > from run.rb:9 > > I have the 0.21.0 stuff installed. > > -- > Alan Garrison > Cronosys, LLC > Phone: 216-221-4600 ext 308 > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From john.lloydjones at gmail.com Wed Jul 27 12:41:57 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Wed, 27 Jul 2005 09:41:57 -0700 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: References: Message-ID: <6fcd26f105072709418754f0c@mail.gmail.com> Does the 0.21.1 preview have the fix for the many_to_many inheritance problem I reported? On 7/27/05, George Moschovitis wrote: > Dear devs, > > I uploaded a first Preview of Spark along with 0.21.1 gems. You can > find download links > on http://www.nitrohq.com > > Spark is the wiki that powers www.nitrohq.com. I decided to release > the source code > to provide another small reference application for Nitro. If there is > interest from other > people we could improve this simple Wiki and make it something really useful. > > Please, try this preview and report any problems. Spark needs the 0.21.1 gems > (they fix some bugs and introduced minor new features). > > regards, > George. > > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From alang at cronosys.com Wed Jul 27 14:24:41 2005 From: alang at cronosys.com (Alan Garrison) Date: Wed, 27 Jul 2005 14:24:41 -0400 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: <43C5B0BA-1E15-4008-B31D-1693DB7A773E@coretech.net.au> References: <42E7AE86.2020701@cronosys.com> <43C5B0BA-1E15-4008-B31D-1693DB7A773E@coretech.net.au> Message-ID: <42E7D169.9000709@cronosys.com> Julian Leviston wrote: > Yeah but he just finished saying you need 0.21.1 not 0.21.0 > > J Oh. Duh :) -- Alan Garrison Cronosys, LLC Phone: 216-221-4600 ext 308 From george.moschovitis at gmail.com Wed Jul 27 14:32:45 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 27 Jul 2005 21:32:45 +0300 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: <6fcd26f105072709418754f0c@mail.gmail.com> References: <6fcd26f105072709418754f0c@mail.gmail.com> Message-ID: > Does the 0.21.1 preview have the fix for the many_to_many inheritance > problem I reported? yes, along with more fixes, read the detailed CHANGELOGS... -g. -- http://www.nitrohq.com From julian at coretech.net.au Wed Jul 27 19:47:28 2005 From: julian at coretech.net.au (Julian Leviston) Date: Thu, 28 Jul 2005 09:47:28 +1000 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: References: Message-ID: <7956D075-4016-4315-8F8D-CFC3C4048847@coretech.net.au> Okay... I downloaded those tar files. I have no idea how to install them. I tried various options with gem install ... but I really have no idea. Julian. On 28/07/2005, at 1:06 AM, George Moschovitis wrote: > Dear devs, > > I uploaded a first Preview of Spark along with 0.21.1 gems. You can > find download links > on http://www.nitrohq.com > > Spark is the wiki that powers www.nitrohq.com. I decided to release > the source code > to provide another small reference application for Nitro. If there is > interest from other > people we could improve this simple Wiki and make it something > really useful. > > Please, try this preview and report any problems. Spark needs the > 0.21.1 gems > (they fix some bugs and introduced minor new features). > > regards, > George. > > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From julian at coretech.net.au Wed Jul 27 20:03:45 2005 From: julian at coretech.net.au (Julian Leviston) Date: Thu, 28 Jul 2005 10:03:45 +1000 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: <7956D075-4016-4315-8F8D-CFC3C4048847@coretech.net.au> References: <7956D075-4016-4315-8F8D-CFC3C4048847@coretech.net.au> Message-ID: <683189CF-FBED-413D-891F-95B4B3B00615@coretech.net.au> It's okay, I since realised that I needed to ren the tar files to just .gem and then use gem install ~ got it. Julian. On 28/07/2005, at 9:47 AM, Julian Leviston wrote: > Okay... > > I downloaded those tar files. I have no idea how to install them. > > I tried various options with gem install ... but I really have no > idea. > > Julian. > > On 28/07/2005, at 1:06 AM, George Moschovitis wrote: > > >> Dear devs, >> >> I uploaded a first Preview of Spark along with 0.21.1 gems. You can >> find download links >> on http://www.nitrohq.com >> >> Spark is the wiki that powers www.nitrohq.com. I decided to release >> the source code >> to provide another small reference application for Nitro. If there is >> interest from other >> people we could improve this simple Wiki and make it something >> really useful. >> >> Please, try this preview and report any problems. Spark needs the >> 0.21.1 gems >> (they fix some bugs and introduced minor new features). >> >> regards, >> George. >> >> >> -- >> http://www.nitrohq.com >> >> _______________________________________________ >> Nitro-general mailing list >> Nitro-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/nitro-general >> >> > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From julian at coretech.net.au Wed Jul 27 20:16:36 2005 From: julian at coretech.net.au (Julian Leviston) Date: Thu, 28 Jul 2005 10:16:36 +1000 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: <683189CF-FBED-413D-891F-95B4B3B00615@coretech.net.au> References: <7956D075-4016-4315-8F8D-CFC3C4048847@coretech.net.au> <683189CF-FBED-413D-891F-95B4B3B00615@coretech.net.au> Message-ID: <026DEAF6-60F4-4F17-8972-9F93DA803589@coretech.net.au> Okay... is that supposed to be easy to set up? Because it really isn't. I finally got the tar files working after finding out I was supposed to rename the tar files to just gem, then I extracted the sparc file, had a bit of a look trhough the ruby files, coudln't find where I was supposed to configure my database, tried running it and got this: Bullet:~/nitrodev/spark-0.3.0 julian$ ruby -rubygems run.rb /usr/lib/ruby/gems/1.8/gems/og-0.21.1/lib/og/store/mysql.rb:103:in `connect': Access denied for user 'root'@'localhost' (using password: YES) (Mysql::Error) from /usr/lib/ruby/gems/1.8/gems/og-0.21.1/lib/og/store/ mysql.rb:103:in `initialize' from /usr/lib/ruby/gems/1.8/gems/og-0.21.1/lib/og/manager.rb: 48:in `new' from /usr/lib/ruby/gems/1.8/gems/og-0.21.1/lib/og/manager.rb: 48:in `initialize' from /usr/lib/ruby/gems/1.8/gems/og-0.21.1/lib/og/manager.rb: 47:in `times' from /usr/lib/ruby/gems/1.8/gems/og-0.21.1/lib/og/manager.rb: 47:in `initialize' from /usr/lib/ruby/gems/1.8/gems/og-0.21.1/lib/og.rb:148:in `new' from /usr/lib/ruby/gems/1.8/gems/og-0.21.1/lib/og.rb:148:in `setup' from run.rb:13 Which says obviously that I haven't configured my database. I'm using OS X, Latest Ruby installed correctly and MySQL. This isn't helping me with beginning to understand Nitro at all. Can anyone point in me in some kind of direction with regards to understanding it? Even if it's reading other background material on other things that were the precursor to it? Julian From julian at coretech.net.au Wed Jul 27 20:19:23 2005 From: julian at coretech.net.au (Julian Leviston) Date: Thu, 28 Jul 2005 10:19:23 +1000 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: <683189CF-FBED-413D-891F-95B4B3B00615@coretech.net.au> References: <7956D075-4016-4315-8F8D-CFC3C4048847@coretech.net.au> <683189CF-FBED-413D-891F-95B4B3B00615@coretech.net.au> Message-ID: <34E3EA3E-BA6B-47E6-9FBE-2B39FD6ECC17@coretech.net.au> Okay I just found where the database is configured - in run.rb. Don't worry about responding. julian. From jpshack at gmail.com Wed Jul 27 23:59:32 2005 From: jpshack at gmail.com (John-Mason P. Shackelford) Date: Wed, 27 Jul 2005 22:59:32 -0500 Subject: [Nitro] Og on Rails In-Reply-To: <200507241316.50823.dcorbin@machturtle.com> References: <200507231553.51636.dcorbin@machturtle.com> <200507241148.53705.dcorbin@machturtle.com> <42E3AEAD.6030507@neurogami.com> <200507241316.50823.dcorbin@machturtle.com> Message-ID: <83f770ff050727205929e33de9@mail.gmail.com> David and I are on the same page. (Funny, David, that we seem to bump into one another in so many different contexts.) The momentum behind rails is significant and not likely to be equalled by Og/Nitro at least in terms of adoption. I already have several rails apps now in production, yet I have never been happy with AR and would like to move to Og. Having Og as an alternative model library for rails would be very valuable to my way of thinking. If it could drop into the rest of rails relatively easily I think you'd see more people migrating toward the technologies you are developing here. John-Mason Shackelford Software Developer Pearson Educational Measurement 2510 North Dodge St. Iowa City, IA 52245 ph. 319-354-9200x6214 john-mason.shackelford at pearson.com http://pearsonedmeasurement.com From george.moschovitis at gmail.com Thu Jul 28 02:28:19 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 09:28:19 +0300 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: <34E3EA3E-BA6B-47E6-9FBE-2B39FD6ECC17@coretech.net.au> References: <7956D075-4016-4315-8F8D-CFC3C4048847@coretech.net.au> <683189CF-FBED-413D-891F-95B4B3B00615@coretech.net.au> <34E3EA3E-BA6B-47E6-9FBE-2B39FD6ECC17@coretech.net.au> Message-ID: This was a preview release, so that developers experienced with Nitro could find some bugs. Please wait for the normal release (and even better for version 0.4). Anyway, it 's not that easy to setup. just use gem install to install the gems. then untar the spark tgz cd to the spark directory and run: ruby -rubygems run.rb If you want to use a differernt db than mysql, change the og setup line in run.rb regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Thu Jul 28 02:29:57 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 09:29:57 +0300 Subject: [Nitro] Og on Rails In-Reply-To: <83f770ff050727205929e33de9@mail.gmail.com> References: <200507231553.51636.dcorbin@machturtle.com> <200507241148.53705.dcorbin@machturtle.com> <42E3AEAD.6030507@neurogami.com> <200507241316.50823.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> Message-ID: > least in terms of adoption. I already have several rails apps now in > production, yet I have never been happy with AR and would like to move > to Og. Having Og as an alternative model library for rails would be > very valuable to my way of thinking. If it could drop into the rest of > rails relatively easily I think you'd see more people migrating toward > the technologies you are developing here. It is in the todo list, in the meantime, keep arround this mailing list and give Nitro a try :) regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Thu Jul 28 02:54:40 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 09:54:40 +0300 Subject: [Nitro] Og on Rails In-Reply-To: <83f770ff050727205929e33de9@mail.gmail.com> References: <200507231553.51636.dcorbin@machturtle.com> <200507241148.53705.dcorbin@machturtle.com> <42E3AEAD.6030507@neurogami.com> <200507241316.50823.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> Message-ID: > into one another in so many different contexts.) The momentum behind > rails is significant and not likely to be equalled by Og/Nitro at > least in terms of adoption. I already have several rails apps now in I don't agree with what you say here. Remember Rails one year ago? Nobody thought It would stand a chance against J2EE and/or PHP. And don't forget that the number of Ruby programmers is still minimal. For the moment, I am quite happy with the way DHH and co are helping Nitro/Og: by bringing more programmers to Ruby :) regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Thu Jul 28 05:47:14 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 12:47:14 +0300 Subject: [Nitro] [ANN] Nitro + Og 0.21.2 Message-ID: Hello everyone, New versions of Nitro (Web Application Framework) and Og (Object Relational Mapping) were released: Homepage: http://www.nitrohq.com Download: http://rubyforge.org/projects/ nitro Mailing List: http://rubyforge.org/mailman/l istinfo/nitro-general This is mainly a bug fix release. Some minor features are implemented: * Plugable dispatchers. A new dispatcher that implicitly handles nice urls is enabled by default. You can easily change to the old general dispatcher though. * Better markup setup. * Cookie Helpers. * Important bug fixes in Og. have fun, George Moschovitis -- http://www.nitrohq.com From george.moschovitis at gmail.com Thu Jul 28 05:48:06 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 12:48:06 +0300 Subject: [Nitro] [ANN] Nitro Spark 0.3.0 Message-ID: Hello everyone, I am proud to announce a Nitro spinoff project: Spark Spark is an advanced Wiki powered by Nitro and Og. The aim of this project is to provide a canonical example of using Nitro to build a Web application. However, I plan to add more features and make this a useful, easy to install wiki for everyone. Spark is the wiki behind www.nitrohq.com Homepage: http://www.nitrohq.com Download: http://rubyforge.org/projects/ nitro Please note that this is considered a preview release. A streamlined installation process and more features will follow in next releases. have fun, George. PS: Spark needs Nitro 0.21.2 -- http://www.nitrohq.com From dcorbin at machturtle.com Thu Jul 28 05:59:11 2005 From: dcorbin at machturtle.com (David Corbin) Date: Thu, 28 Jul 2005 05:59:11 -0400 Subject: [Nitro] Og on Rails In-Reply-To: References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> Message-ID: <200507280559.11667.dcorbin@machturtle.com> On Thursday 28 July 2005 02:54 am, George Moschovitis wrote: > > into one another in so many different contexts.) The momentum behind > > rails is significant and not likely to be equalled by Og/Nitro at > > least in terms of adoption. I already have several rails apps now in > > I don't agree with what you say here. Remember Rails one year ago? > Nobody thought It would stand a chance against J2EE and/or PHP. And > don't forget that the number of Ruby programmers is still minimal. For > the moment, I am quite happy with the way DHH and co are helping > Nitro/Og: by bringing more programmers to Ruby :) > There is no doubt that Rails is a boon for all Ruby projects, but there is such an amazing momentum and "buzz" behind Rails, that I'm afraid I agree with John-Mason-- matching let alone passing Rails in terms of adoption will be very difficult. Rails has raised the bar to with the "10x productivity". To get *some* peoples attention, you'll need "10 x Rails prodcutivity", which would be "100x productivity" using "current base lines". Not everyone is interested in "better solutions". Some just want "easy/simple". As an example, I find the entire JSP/ERB templating solution extremely bad, but based on my experience in the Java world, the vast majority of people are not interested in anything more powerful/flexible/good. This not meant to discourage you, simply to offer an oppinion on why it won't be an easy road. In all honesty, the best thing you can do for Nitro, is to make Og work better with Rails. There are so many problems with AR, you will get attention, and the publicity will probably help Nitro. (I know I wouldn't be here if it Og weren't so close to what I want). David From george.moschovitis at gmail.com Thu Jul 28 06:18:42 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 13:18:42 +0300 Subject: Fwd: [Nitro] Og on Rails In-Reply-To: References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> Message-ID: > be very difficult. Rails has raised the bar to with the "10x productivity". Well, I guess we all agree that this was a silly remark. > This not meant to discourage you, simply to offer an oppinion on why it won't > be an easy road. In all honesty, the best thing you can do for Nitro, is to > make Og work better with Rails. There are so many problems with AR, you > will get attention, and the publicity will probably help Nitro. > (I know I wouldn't be here if it Og weren't so close to what I want). It is not my primary goal to get Nitro more adopted than Rails. I want to use Nitro on my projects and having a small community around Nitro helps me with debugging and ideas. In this regard, I consider Nitro and especially Og a success. Moreover, as I said in the original Nitro announcement, Ruby helped me get some money over the years, and I wanted to give something back to the community. In any case, I am willing to make Og compatible with Rails. As you are familiar with Rails how about writing a small text describing what needs to get fixed in order for Og to work under Rails. regards, George. -- http://www.nitrohq.com -- http://www.nitrohq.com From julian at coretech.net.au Thu Jul 28 07:16:50 2005 From: julian at coretech.net.au (Julian Leviston) Date: Thu, 28 Jul 2005 21:16:50 +1000 Subject: [Nitro] [ANN] Nitro + Og 0.21.2 In-Reply-To: References: Message-ID: <25DC2B08-E5B0-4B22-97AD-5CF22BC6CE78@coretech.net.au> None of this makes any sense to me whatsoever yet. Julian. On 28/07/2005, at 7:47 PM, George Moschovitis wrote: > Hello everyone, > > New versions of Nitro (Web Application Framework) and Og (Object > Relational Mapping) were released: > > Homepage: http://www.nitrohq.com > Download: http://rubyforge.org/projects/ nitro > Mailing List: http://rubyforge.org/mailman/l istinfo/nitro-general > > This is mainly a bug fix release. Some minor features are > implemented: > > * Plugable dispatchers. A new dispatcher that implicitly handles > nice urls is enabled by default. You can easily change to the > old general dispatcher though. > > * Better markup setup. > > * Cookie Helpers. > > * Important bug fixes in Og. > > have fun, > George Moschovitis > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From julian at coretech.net.au Thu Jul 28 07:42:42 2005 From: julian at coretech.net.au (Julian Leviston) Date: Thu, 28 Jul 2005 21:42:42 +1000 Subject: [Nitro] Og on Rails In-Reply-To: <200507280559.11667.dcorbin@machturtle.com> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> Message-ID: <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> Woudn't it actually make more sense to push for the integration of all the things Nitro does that Rails doesn't INTO rails? I mean, they're both frameworks, right? Can't you opt for more flexibility but have defaults in place which actually make things easier for people to use? I mean, the fundamental push for RAILS is that it simplifies the time taken to get something on the "air" so to speak - it's definitely a rapid application development system... That fact is due to a couple of things: 1. The user community 2. The documentation provided (driven by the user community - because more users inevitably means more documentation in the web context) The fact that it's so agile (ie making changes is so quick) would tend to make all other constraints almost ridiculous. Anyway Julain. On 28/07/2005, at 7:59 PM, David Corbin wrote: > On Thursday 28 July 2005 02:54 am, George Moschovitis wrote: > >>> into one another in so many different contexts.) The momentum behind >>> rails is significant and not likely to be equalled by Og/Nitro at >>> least in terms of adoption. I already have several rails apps now in >>> >> >> I don't agree with what you say here. Remember Rails one year ago? >> Nobody thought It would stand a chance against J2EE and/or PHP. And >> don't forget that the number of Ruby programmers is still minimal. >> For >> the moment, I am quite happy with the way DHH and co are helping >> Nitro/Og: by bringing more programmers to Ruby :) >> >> > > There is no doubt that Rails is a boon for all Ruby projects, but > there is > such an amazing momentum and "buzz" behind Rails, that I'm afraid I > agree > with John-Mason-- matching let alone passing Rails in terms of > adoption will > be very difficult. Rails has raised the bar to with the "10x > productivity". > To get *some* peoples attention, you'll need "10 x Rails > prodcutivity", which > would be "100x productivity" using "current base lines". > > Not everyone is interested in "better solutions". Some just want > "easy/simple". As an example, I find the entire JSP/ERB templating > solution > extremely bad, but based on my experience in the Java world, the vast > majority of people are not interested in anything more > powerful/flexible/good. > > This not meant to discourage you, simply to offer an oppinion on > why it won't > be an easy road. In all honesty, the best thing you can do for > Nitro, is to > make Og work better with Rails. There are so many problems with > AR, you > will get attention, and the publicity will probably help Nitro. > > (I know I wouldn't be here if it Og weren't so close to what I want). > > David > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From transfire at gmail.com Thu Jul 28 07:54:28 2005 From: transfire at gmail.com (TRANS) Date: Thu, 28 Jul 2005 07:54:28 -0400 Subject: [Nitro] Og on Rails In-Reply-To: <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> Message-ID: <4b6f054f050728045417d09156@mail.gmail.com> Nitro is an alternative to Rails and I think that is a good thing. Rails may get all the press these days, but that just means Rails is like a mascot for a new way of doing things that's coming to the fore for a lot of people. Rails is not so much unique as it is the first to become so polished (I created a Rails/Nitro-like framework 4 years ago called Jigsaw. I didn't finish it b/c the project I was using it for fell through. If ony I had known!) So I think there's plenty of room for competitors. As this Agile Programming b/c mainstream Nitro will gain it's own strong following --thanks to George's great drive. T. From george.moschovitis at gmail.com Thu Jul 28 08:00:51 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 15:00:51 +0300 Subject: [Nitro] Og on Rails In-Reply-To: <4b6f054f050728045417d09156@mail.gmail.com> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <4b6f054f050728045417d09156@mail.gmail.com> Message-ID: > Nitro is an alternative to Rails and I think that is a good thing. Exactly, this is one of the goals of Nitro. To provide competition that will drive Ruby Web Technology forward. -g. -- http://www.nitrohq.com From julian at coretech.net.au Thu Jul 28 08:09:41 2005 From: julian at coretech.net.au (Julian Leviston) Date: Thu, 28 Jul 2005 22:09:41 +1000 Subject: [Nitro] Og on Rails In-Reply-To: <4b6f054f050728045417d09156@mail.gmail.com> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <4b6f054f050728045417d09156@mail.gmail.com> Message-ID: <5069B60A-74C2-44AE-967C-E82A566B3181@coretech.net.au> But so far it comes across as being ridiculously un-polished in comparison. I think the reason Rails is so popular is because of the guy at the top. He's great at delegating. He knows what to do with people. Largely, managing to make something of this size popular is managing people and marketing, not being brilliant at software design. It *is* a good product (rails) but there are tons of ways it could improve... for one - using an object-oriented data store... What does it matter whether it's called Rails or Nitro? So long as we can do the stuff we want to do... isn't that what's important? Julian. On 28/07/2005, at 9:54 PM, TRANS wrote: > Nitro is an alternative to Rails and I think that is a good thing. > Rails may get all the press these days, but that just means Rails is > like a mascot for a new way of doing things that's coming to the fore > for a lot of people. Rails is not so much unique as it is the first to > become so polished (I created a Rails/Nitro-like framework 4 years ago > called Jigsaw. I didn't finish it b/c the project I was using it for > fell through. If ony I had known!) So I think there's plenty of room > for competitors. As this Agile Programming b/c mainstream Nitro will > gain it's own strong following --thanks to George's great drive. > > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From george.moschovitis at gmail.com Thu Jul 28 08:32:56 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 15:32:56 +0300 Subject: [Nitro] Og on Rails In-Reply-To: <5069B60A-74C2-44AE-967C-E82A566B3181@coretech.net.au> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <4b6f054f050728045417d09156@mail.gmail.com> <5069B60A-74C2-44AE-967C-E82A566B3181@coretech.net.au> Message-ID: > But so far it comes across as being ridiculously un-polished in > comparison. Of course, Rails is nearing 1.0. Nitro is under heavy development at the moment. I remember from your original posting to this list that you wanted to contribute to the documentation and polishing of this project. So give it a try :) > I think the reason Rails is so popular is because of the guy at the > ... > improve... for one - using an object-oriented data store... While I do agree that marketing capabilities are important, I personally am not interested at the moment. As I said, the biggest problem regarding Nitro's adoption is Ruby. Quite simply, Ruby is not a popular language (yet). So I am very pleased that the Rails guys are doing all the hard work, evangelizing Ruby as language for web development :) > So long as we can do the stuff we want to do... isn't that what's important? Well, Nitro does 'just' the stuff I want to do :) regards, George. PS: BTW, I would prefer to see technical related issues on this list. New ideas, bug reports, stuff like this... -- http://www.nitrohq.com From julian at coretech.net.au Thu Jul 28 08:41:44 2005 From: julian at coretech.net.au (Julian Leviston) Date: Thu, 28 Jul 2005 22:41:44 +1000 Subject: [Nitro] Og on Rails In-Reply-To: References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <4b6f054f050728045417d09156@mail.gmail.com> <5069B60A-74C2-44AE-967C-E82A566B3181@coretech.net.au> Message-ID: <0746B472-8DD2-44EF-918E-E34AA4E6018B@coretech.net.au> I've already said I'm here to give a hand at doing this stuff. I've done what you've asked - installed Spark and had a look at the source code. What can I do next? Julian. On 28/07/2005, at 10:32 PM, George Moschovitis wrote: >> But so far it comes across as being ridiculously un-polished in >> comparison. >> > > Of course, Rails is nearing 1.0. Nitro is under heavy development at > the moment. I remember from your original posting to this list that > you wanted to contribute to the documentation and polishing of this > project. So give it a try :) From jeff.darklight at gmail.com Thu Jul 28 10:23:14 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 28 Jul 2005 07:23:14 -0700 Subject: [Nitro] [ANN] Nitro Spark 0.3.0 In-Reply-To: References: Message-ID: George, Did you use RedCloth as your markup engine? Or did you go and create YAWN ? Yet Another Wiki Notation ;) j. On 7/28/05, George Moschovitis wrote: > Hello everyone, > > I am proud to announce a Nitro spinoff project: Spark > > Spark is an advanced Wiki powered by Nitro and Og. The aim of > this project is to provide a canonical example of using Nitro > to build a Web application. However, I plan to add more features > and make this a useful, easy to install wiki for everyone. > > Spark is the wiki behind www.nitrohq.com > > Homepage: http://www.nitrohq.com > Download: http://rubyforge.org/projects/ nitro > > Please note that this is considered a preview release. A streamlined > installation process and more features will follow in next releases. > > have fun, > George. > > PS: Spark needs Nitro 0.21.2 > > -- > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- "So long, and thanks for all the fish" Jeff Wood From james_b at neurogami.com Thu Jul 28 11:24:37 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 28 Jul 2005 08:24:37 -0700 Subject: [Nitro] Og on Rails In-Reply-To: <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> Message-ID: <42E8F8B5.7070901@neurogami.com> Julian Leviston wrote: > Woudn't it actually make more sense to push for the integration of all > the things Nitro does that Rails doesn't INTO rails? > > I mean, they're both frameworks, right? Basically, when taken as a whole. Nitro/Og seems less focused on having the developer buy into a complete project layout and mindset, so it is perhaps closer to what George describes as a Web engine. > > Can't you opt for more flexibility but have defaults in place which > actually make things easier for people to use? I think that's already the case, no? > > I mean, the fundamental push for RAILS is that it simplifies the time > taken to get something on the "air" so to speak - it's definitely a > rapid application development system... I've found it rapid so long as you are building a particular sort of Web app, and follow a particular sort of application design method. And these may be what 80% of developers do 80% of the time anyway. But Rails' "convention over configuration" can get in the way if the conventions do not suit the project needs. > > That fact is due to a couple of things: > > 1. The user community > 2. The documentation provided (driven by the user community - because > more users inevitably means more documentation in the web context) > The Rails docs are, in many ways, a mess. David Hansson has posted on his Loud Thinking site that one will have a tough time getting proficient with Rails by hacking around the free-form docs; hence the need and value of the Rails book. I recently purchased the paper/PDF book combo, and have discovered a few things that are far from obvious from the online docs and tutorials I've managed to read. > The fact that it's so agile (ie making changes is so quick) would tend > to make all other constraints almost ridiculous. > Well, I'd argue that it is Ruby that makes it so agile, and that any reasonably design framework written in Ruby would be equally agile. Ideally, one would be able to easily interchange any part of MVC (or some other architecture), such that one need not decide on only Rails or Og/Nitro or whatever, but simply Ruby and whatever components work best for a particular need. But that presumes an awful lot on the part of developers, so having a prepackaged assembly of MVC parts saves people from having to think too much. I don't mean that in a negative, just that people have better things to do that figure out what libraries play well together. But I would expect that, over time, the option of Og over AR will be a tried-and-tested path; same for swapping out Eruby for some other templating segment. And people will feel comfortable with alternate arrangements. James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From jlsysinc at alltel.net Thu Jul 28 12:05:12 2005 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Thu, 28 Jul 2005 12:05:12 -0400 Subject: [Nitro] [ANN] Nitro + Og 0.21.2 References: <25DC2B08-E5B0-4B22-97AD-5CF22BC6CE78@coretech.net.au> Message-ID: <01a601c5938e$22e24360$0200000a@agamemnon> Julian Leviston wrote: > None of this makes any sense to me whatsoever yet. Me neither. Is the a public CVS or Subversion repository where one can follow development? -- J Lambert From james_b at neurogami.com Thu Jul 28 12:08:19 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 28 Jul 2005 09:08:19 -0700 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: References: <7956D075-4016-4315-8F8D-CFC3C4048847@coretech.net.au> <683189CF-FBED-413D-891F-95B4B3B00615@coretech.net.au> <34E3EA3E-BA6B-47E6-9FBE-2B39FD6ECC17@coretech.net.au> Message-ID: <42E902F3.4070405@neurogami.com> George Moschovitis wrote: > This was a preview release, so that developers experienced with Nitro > could find some bugs. Please wait for the normal release (and even > better for version 0.4). > > Anyway, it 's not that easy to setup. I just got around to installing it, and it really isn't hard to get going, but I already knew what to look for. I have a general question/feature request: I have multiple machines, though typically there are only two running on any regular basis. I ave been using a wiki I hacked up from some Ruby code someone released a while back. It uses flat files for storage, and I cooked up a synchronization scheme using CVS. Basically, whenever a page was requested, created, or saved, a call was made to CVS. If CVS wasn't available, it would quietly fail, and the next try again. So page changes were synced across all machines using the wiki (which would run locally on each box). Using MySQL, though, I lose this. (I lose some other neat things that plain text files offers, too. ) Any thoughts on how how can run synchronized wikis, particularly when there is no assurance any other machine is up and running? James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From Aleksi.Niemela at cs.helsinki.fi Thu Jul 28 13:49:52 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Thu, 28 Jul 2005 20:49:52 +0300 Subject: [Nitro] [ANN] Nitro + Og 0.21.2 In-Reply-To: <01a601c5938e$22e24360$0200000a@agamemnon> References: <25DC2B08-E5B0-4B22-97AD-5CF22BC6CE78@coretech.net.au> <01a601c5938e$22e24360$0200000a@agamemnon> Message-ID: <42E91AC0.3060405@cs.helsinki.fi> Jon A. Lambert wrote: > Julian Leviston wrote: > >> None of this makes any sense to me whatsoever yet. > > > Me neither. > > Is the a public CVS or Subversion repository where one can follow > development? > I can't say what's the case with the repository, but here's a hint how to see how things have been progressing. Install versions as they come by. It doesn't matter if you prefer gems or source packages. Remember that you can always force which version to use (through explicit $LOAD_PATH magic or if I have understood correctly also by stating version requirements for rubygems). Then let's go through this release. George said these are the changes in short: * Plugable dispatchers. A new dispatcher that implicitly handles nice urls is enabled by default. You can easily change to the old general dispatcher though. * Better markup setup. * Cookie Helpers. * Important bug fixes in Og. With these commands $ cd nitro-0.21.2 ; diff -u ../nitro-0.21.0/CHANGELOG CHANGELOG I obtained this a bit more detailed list: --- ../nitro-0.21.0/CHANGELOG 2005-07-26 19:09:19.990000000 +0300 +++ CHANGELOG 2005-07-28 20:06:43.318125000 +0300 @@ -1,5 +1,53 @@ +28-07-2005 George Moschovitis + + * lib/nitro/dispatcher/nice.rb (#dispatch): fixed. + + * doc/RELEASES: updated. + + * doc/MIGRATION: updated. + +27-07-2005 George Moschovitis + + * lib/nitro/mixin/markup.rb: cleaned up, + added setup_xxx_transformation helpers. + + * lib/nitro/server/runner.rb: added scgi support (--lhttpd-scgi) + + * lib/nitro/adapter/scgi.rb: implemented. + + * lib/nitro/controller.rb: added some cookie helpers. + + * lib/nitro.rb: use nice dispatcher by default. + + * lib/nitro/dispatcher.rb: mode setting. + + * lib/nitro/dispatcher/general.rb: introduced. + + * lib/nitro/dispatcher/nice.rb: introduced. + +27-07-2005 Deborah Hooker + + * lib/nitro/server.rb: access_log attr_accessor. + +26-07-2005 George Moschovitis + + * lib/nitro/compiler.rb: more clever implicit nice urls. + + * lib/nitro/controller.rb (#alias_action): made standalone. + + * lib/nitro/dispatcher.rb (#dispatch): new algorithm, + more clever implicit nice urls. + 25-07-2005 George Moschovitis + * lib/nitro/mixin/markup.rb (#escape/#unescape): added. + + * proto/public/error.xhtml: temp fix, use ..markuper (ugh), + + * proto/public/robots.txt added. + + * --- VERSION 0.21.0 --- + * doc/MIGRATION: updated. 24-07-2005 George Moschovitis ====================== Now, you could go through and see what are the changes in those specific files. For example mentioned cookie helpers seem to be affecting only lib/nitro/controller.rb. Diffing that file reveals changes for this release: $ diff -u ../nitro-0.21.0/lib/nitro/controller.rb lib/nitro/controller.rb --- ../nitro-0.21.0/lib/nitro/controller.rb 2005-07-26 19:09:20.302500000 +0300 +++ lib/nitro/controller.rb 2005-07-28 20:06:43.474375000 +0300 @@ -36,7 +36,7 @@ # Initialize the metadata. - def initialize(options) + def initialize(options = {}) @params = {} update(options) end @@ -114,7 +114,7 @@ base.module_eval do def self.alias_action(new, old) alias_method new, old - md = action_metadata[old] || ActionMetadata.new + md = action_metadata[old] || ActionMeta.new md[:view] = old action_metadata[new] = md end @@ -166,8 +166,22 @@ end end end - + + # Cookie helpers. + + base.module_eval do + private + + def cookies + @context.cookies + end + + def send_cookie(name, value = nil) + @context.add_cookie(name, value) + end + end end + end # The Controller part in the MVC paradigm. The controller's ============== Namely now you have methods cookies and send_cookie available for objects which do include mixin Publishable. Storing location and usage of cookies seem quite simple for my eyes. Same kind of analysis could be done for Og and Glue code. If you collectively feel the need for listing above mentioned changes in longer and more verbose text than what Changelog and release announcements provide, why don't you just divide the workload, go through the changes in source code file by file like I did show and write the explanations in clear text for the others who would like the same information. Not only would you do great service for Nitro/Og community, improve state of the things right away but most importantly you'd do huge service to yourselves by giving a great excuse to dive straight into the source code, start to familiarize yourselves to the code base! During those dives it might be even more helpful to start putting together simple docs how things relate to each other and how to avoid biggest misconceptions. Wiki's there! I heartily recommend the dive into the source code. I find George's style very readable, concise and easily understandable even to the point I use it as a source of inspiration for my own coding. Granted there will be blurry spots, but I'm sure we you'll get some help from the list at that point. - Aleksi From bernd at bdebl.de Thu Jul 28 14:16:32 2005 From: bernd at bdebl.de (Martin Bernd Schmeil) Date: Thu, 28 Jul 2005 20:16:32 +0200 Subject: [Nitro] Og on Rails In-Reply-To: <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> Message-ID: <42E92100.4030907@bdebl.de> Julian Leviston wrote: > 2. The documentation provided (driven by the user community - because > more users inevitably means more documentation in the web context) I still believe that the lack of documentation is the biggest obstacle for people using Nitro. I would like to start but the BIG PICTURE document is still missing (or I am too stupid to find it). The Og tutorial - even outdated - was sufficiant for me. To use Nitro I need some hints on what to use (and for what exactly) and what to avoid because it will be replaced in the near future. Once I'm actually able to start using Nitro I'm willing to contribute to the docs. Currently with max. 0.5 days / week spare time for hacking (there's plenty of time to read though, for example while driving with public transport) I just don't dare to dive into the code to find out how things are working. Fortunatly things regarding docs seem to improve... - Bernd From tim at keow.org Thu Jul 28 14:45:48 2005 From: tim at keow.org (Tim Larson) Date: Thu, 28 Jul 2005 19:45:48 +0100 Subject: [Nitro] Tutorial trouble Message-ID: <20050728184548.GA1193@localhost> I am on the tutorial page: http://www.nitrohq.com/view/NSBS_Page_Generation_with_Class and am having trouble starting the sample application after changing run.rb to support the "feeder" hash entry (changing from Nitro.run to a.start.) Now "ruby run.rb" just returns the command prompt without error and without starting the server. Since the tutorial is probably out of date, what is the recommended way to do this now in version 0.21.2? --Tim Larson From deb at ysabel.org Thu Jul 28 14:54:36 2005 From: deb at ysabel.org (Ysabel) Date: Thu, 28 Jul 2005 12:54:36 -0600 Subject: [Nitro] [ANN] Nitro + Og 0.21.2 In-Reply-To: <42E91AC0.3060405@cs.helsinki.fi> References: <25DC2B08-E5B0-4B22-97AD-5CF22BC6CE78@coretech.net.au> <01a601c5938e$22e24360$0200000a@agamemnon> <42E91AC0.3060405@cs.helsinki.fi> Message-ID: --On Thursday, July 28, 2005 8:49 PM +0300 Aleksi Niemela wrote: > With these commands > $ cd nitro-0.21.2 ; diff -u ../nitro-0.21.0/CHANGELOG CHANGELOG If you do the same thing for og, you'll see the detailed changes there as well. (I should clearly give George changelog entries for the patches I send him, mmm? *grin*) > cd $GEMS_HOME/og-0.21.2 > diff -u ../og-0.21.0/CHANGELOG CHANGELOG --- /cygdrive/c/Ruby1.8.2-15/lib/ruby/gems/1.8/gems/og-0.21.0/CHANGELOG 2005-07-26 12:42:27.562500000 -0600 +++ CHANGELOG 2005-07-28 08:52:09.500000000 -0600 @@ -1,5 +1,49 @@ +28-07-2005 George Moschovitis + + * lib/og/store/psql.rb: custom eval_og_allocate, + fixed inheritance problem. + + * lib/og/store/sql.rb: factored out eval_og_allocate. + + * lib/og/store/*: fixed inheritance problem. + + * lib/og/relation.rb (#enchant): fixed for polymorphic. + +27-07-2005 George Moschovitis + + * lib/og.rb: moved setup from manager.rb here, + (#escape): added helper. + + * lib/og/relation.rb (#setup): refactored, + (#enchant): manually update the owner class to handle inherited + relations. + + * slightly modified deborah's patch. + + * test/og/tc_store.rb: updated, + added test for inhertiance/relarion problem. + + * lib/og/mixin/orderable.rb: updated to latest, passes test. + + * lib/og/store/sql.rb (#update_by_sql): implemented. + + * lib/og/entity.rb (#update_by_sql): added. + (#update_properties): reimplemented [aleksi], + added some nice aliases, + (##update): use update_by_sql, + (##escape): implemented. + +27-07-2005 Deborah Hooker + + * lib/og/store/sql.rb (#ordered_join_table_keys): implemented, + (#join): fix, + (#unjoin): fix, + (#eval_og_create_schema): fix. + 24-07-2005 George Moschovitis + * --- VERSION 0.21.0 --- * lib/og/relation/joins_many.rb: fixed the same bugs. * lib/og/relation/has_many.rb: fixed find_options override -- [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] From george.moschovitis at gmail.com Thu Jul 28 15:48:16 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 22:48:16 +0300 Subject: [Nitro] Spark and 0.21.1 preview In-Reply-To: <42E902F3.4070405@neurogami.com> References: <7956D075-4016-4315-8F8D-CFC3C4048847@coretech.net.au> <683189CF-FBED-413D-891F-95B4B3B00615@coretech.net.au> <34E3EA3E-BA6B-47E6-9FBE-2B39FD6ECC17@coretech.net.au> <42E902F3.4070405@neurogami.com> Message-ID: Dunno how to do synchronization with mysql. However, I plan to work on updating the memory/filesystem stores of Og, so you could use this wiki with flat files. This allready more or less works. -g. On 7/28/05, James Britt wrote: > George Moschovitis wrote: > > This was a preview release, so that developers experienced with Nitro > > could find some bugs. Please wait for the normal release (and even > > better for version 0.4). > > > > Anyway, it 's not that easy to setup. > > I just got around to installing it, and it really isn't hard to get > going, but I already knew what to look for. > > I have a general question/feature request: > > I have multiple machines, though typically there are only two running on > any regular basis. I ave been using a wiki I hacked up from some Ruby > code someone released a while back. It uses flat files for storage, and > I cooked up a synchronization scheme using CVS. > > Basically, whenever a page was requested, created, or saved, a call was > made to CVS. If CVS wasn't available, it would quietly fail, and the > next try again. So page changes were synced across all machines using > the wiki (which would run locally on each box). > > Using MySQL, though, I lose this. (I lose some other neat things that > plain text files offers, too. ) > > > Any thoughts on how how can run synchronized wikis, particularly when > there is no assurance any other machine is up and running? > > > > James > -- > > http://www.ruby-doc.org - The Ruby Documentation Site > http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML > http://www.rubystuff.com - The Ruby Store for Ruby Stuff > http://www.jamesbritt.com - Playing with Better Toys > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Thu Jul 28 15:54:57 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 22:54:57 +0300 Subject: [Nitro] [ANN] Nitro + Og 0.21.2 In-Reply-To: <42E91AC0.3060405@cs.helsinki.fi> References: <25DC2B08-E5B0-4B22-97AD-5CF22BC6CE78@coretech.net.au> <01a601c5938e$22e24360$0200000a@agamemnon> <42E91AC0.3060405@cs.helsinki.fi> Message-ID: Aleksi, thanks for taking the time to write this useful post. regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Thu Jul 28 15:56:20 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 22:56:20 +0300 Subject: [Nitro] Tutorial trouble In-Reply-To: <20050728184548.GA1193@localhost> References: <20050728184548.GA1193@localhost> Message-ID: I would suggest that you download the Spark source code i just released today. I think the code is extremely clean and will be very helpful for you. regards, George. On 7/28/05, Tim Larson wrote: > I am on the tutorial page: > http://www.nitrohq.com/view/NSBS_Page_Generation_with_Class > ... > -- http://www.nitrohq.com From george.moschovitis at gmail.com Thu Jul 28 16:10:15 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 28 Jul 2005 23:10:15 +0300 Subject: [Nitro] Og on Rails In-Reply-To: <42E92100.4030907@bdebl.de> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <42E92100.4030907@bdebl.de> Message-ID: > document is still missing (or I am too stupid to find it). The Og > tutorial - even outdated - was sufficiant for me. To use Nitro I need Hello Martin, I plan to work on 'NITRO INTRO' a Nitro tutorial/article. I guess it will be ready at the end of next week. Hope to be as successfull as the Og tutorial. stay tuned, -g. -- http://www.nitrohq.com From erik at serverhive.net Thu Jul 28 15:01:49 2005 From: erik at serverhive.net (Erik Howard) Date: Thu, 28 Jul 2005 14:01:49 -0500 Subject: [Nitro] Og on Rails In-Reply-To: <42E92100.4030907@bdebl.de> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <42E92100.4030907@bdebl.de> Message-ID: <42E92B9D.3030608@serverhive.net> Martin Bernd Schmeil wrote: > I still believe that the lack of documentation is the biggest obstacle > for people using Nitro. I would like to start but the BIG PICTURE > document is still missing (or I am too stupid to find it). The Og > tutorial - even outdated - was sufficiant for me. To use Nitro I need > some hints on what to use (and for what exactly) and what to avoid > because it will be replaced in the near future. I definitely agree. The more documentation you have, the barriers to using Nitro start to fall. I'm also willing to pitch in and help with documentation and or tutorials. -Erik From Aleksi.Niemela at cs.helsinki.fi Thu Jul 28 17:01:58 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Fri, 29 Jul 2005 00:01:58 +0300 Subject: [Nitro] RFC: Og source code walkthrough Message-ID: <42E947C6.3060807@cs.helsinki.fi> Yep, not an IETF RFC. But a real request for comments. I'm writing a simple and hopefully quite short walkthrough of the source code and internal structure of Og. I had few hours to spend to write this start. At first I thought to finish it before giving it any publicity, but finally I considered there might be some great input coming that will force the change of style or content if that's needed. So we're http://www.cs.helsinki.fi/u/kaniemel/walkthrough.txt Feel free to bash anything. My English is certainly not in good shape and quite probably the text needs to be rewritten by a native speaker. But I'm more interested in why it might be too hard to understand or follow the discussion and in which ways you envision the _text would be better for you_. I didn't put this baby into wiki (yet) as I think I'll work with it even if someone else wants to make changes, and I don't want to do unnecessary merges. Later on, should I finish the text or even if I won't finish it, it will find it's way in a form or another into the wiki and cooperative maintenance cycle can start. Therefore I say again, don't bother to fix spelling or other little details yet, but try to guide me to make better guide for you, please. (Having said that I have to back a bit and say that I'd be very happy if you send a list of small issues as well, starting from spelling, though maybe direct mail contact is better in that case.) - Aleksi From Aleksi.Niemela at cs.helsinki.fi Thu Jul 28 17:26:50 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Fri, 29 Jul 2005 00:26:50 +0300 Subject: [Nitro] Og on Rails In-Reply-To: <42E92B9D.3030608@serverhive.net> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <42E92100.4030907@bdebl.de> <42E92B9D.3030608@serverhive.net> Message-ID: <42E94D9A.2030006@cs.helsinki.fi> Erik Howard wrote: > Martin Bernd Schmeil wrote: > >> I still believe that the lack of documentation is the biggest >> obstacle for people using Nitro. I would like to start but the BIG >> PICTURE document is still missing (or I am too stupid to find it). >> The Og tutorial - even outdated - was sufficiant for me. To use Nitro >> I need some hints on what to use (and for what exactly) and what to >> avoid because it will be replaced in the near future. > > > I definitely agree. The more documentation you have, the barriers to > using Nitro start to fall. I'm also willing to pitch in and help with > documentation and or tutorials. > I have a suggestion to all of you who think Og's a piece of cake but Nitro is harder. Could you try to free up George's time from important matter, contribute easily very valuable pieces of code while getting to know in moderate pace the internals of the code you rely on! If you could start writing simple Og test cases, for the whole library, one method at a time, you would do immensely useful favor for whole Og community and let George concentrate on Nitro docs without having nightmares how sparsely Og is tested. If you choose to take this course of action, here's my suggestion: 1) Wrap up a wiki page listing all classes and their methods. This could probably be copied over from Og's RDoc or created by clever oneliner directly from the sources. 2) Allocate single method at a time for yourself which you plan to add test for by writing your name next to it. Others know they shouldn't waste effort on that item. Place a date when work started and be pretty strict to clean up entries which timestamps are older than, say, 7 days. 3) Write a entirely new file which exercises tests for the chosen method taking a template from one of the existing test case sources. 4) Try to write useful, passing test cases for the chosen method. Update wiki info if a week is not enough. 5) Send your test cases to the list. It's better to send your test cases even if don't exercise fully the method under test to display progress. You're free to work on single test case as long you need but the work will easily look dead. I'm not suggesting direct commits to the source base as it will be good thing that many eyes look through the generated tests before they're committed into the depository. In case the traffic gets too high, we can easily set up new mailing list for that or some people can volunteer to gather the cases (I might volunteer). There's some testing infrastructure need but that won't hinder the start of the process. In specific, much of the code should be exercised through all of the database backends, not only in memory store, and currently there's no infrastructure to enable one to choose which backends are supported in one's environment. As a reminder of the size of the task I would say that Dave Thomas wrote much of Rubicon test set for Ruby and he accomplished that while consulting for clients, giving presentations in conferences and being normally Ruby active. So the mountain is not bigger than life, while not very small either. Thanks for your efforts! - Aleksi From aglarond at gmail.com Thu Jul 28 17:33:08 2005 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Thu, 28 Jul 2005 23:33:08 +0200 Subject: [Nitro] RFC: Og source code walkthrough In-Reply-To: <42E947C6.3060807@cs.helsinki.fi> References: <42E947C6.3060807@cs.helsinki.fi> Message-ID: <55c107bf0507281433793f633d@mail.gmail.com> Wow Aleksi, That's a great start! For the moment, that's the sum of my comments. :) I'm currently trying to learn Og to add some functionality that I need. Your document is just the sort of overview to help me get started. I look forward to any future incarnations, and will be willing to help out with spelling/rephrasing when it comes time for that. Once again, great job, and thank you for your efforts. - Dimitri From deb at ysabel.org Thu Jul 28 19:07:57 2005 From: deb at ysabel.org (Ysabel) Date: Thu, 28 Jul 2005 17:07:57 -0600 Subject: [Nitro] Nitro-auth 0.2.0 release Message-ID: See http://rubyforge.org/projects/nitro-auth/ for details. Rdoc at http://nitro-auth.rubyforge.org/rdoc/nitro-auth/ and in theory you can install it with a simple "gem install nitro-auth". There's an issue with og-0.21.2 join table naming that'll keep the example from working, unfortunately. But I'll be trying to patch that ASAP and I figured it was worth getting this out so people can see it and comment/critique/praise/blame/etc. -- [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] From george.moschovitis at gmail.com Fri Jul 29 03:17:25 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 29 Jul 2005 10:17:25 +0300 Subject: [Nitro] Nitro-auth 0.2.0 release In-Reply-To: References: Message-ID: Thanks for the release, Maybe you should annnounce this to c.l.r as well :) Btw, what is the problem with join tables? regards, George. On 7/29/05, Ysabel wrote: > See http://rubyforge.org/projects/nitro-auth/ for details. Rdoc at > http://nitro-auth.rubyforge.org/rdoc/nitro-auth/ and in theory you can > install it with a simple "gem install nitro-auth". > > There's an issue with og-0.21.2 join table naming that'll keep the example > from working, unfortunately. But I'll be trying to patch that ASAP and I > figured it was worth getting this out so people can see it and > comment/critique/praise/blame/etc. > > -- > [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Fri Jul 29 03:21:37 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 29 Jul 2005 10:21:37 +0300 Subject: [Nitro] RFC: Og source code walkthrough In-Reply-To: <42E947C6.3060807@cs.helsinki.fi> References: <42E947C6.3060807@cs.helsinki.fi> Message-ID: Aleksi, this is a great initiative. Many thankd for actively supporting this project! best regards, George. On 7/29/05, Aleksi Niemela wrote: > Yep, not an IETF RFC. But a real request for comments. I'm writing a > simple and hopefully quite short walkthrough of the source code and > internal structure of Og. I had few hours to spend to write this start. > At first I thought to finish it before giving it any publicity, but > finally I considered there might be some great input coming that will > force the change of style or content if that's needed. So we're > > http://www.cs.helsinki.fi/u/kaniemel/walkthrough.txt > > ... > (Having said that I have to back a bit and say that I'd be very happy if > you send a list of small issues as well, starting from spelling, though > maybe direct mail contact is better in that case.) > > - Aleksi > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.nitrohq.com From george.moschovitis at gmail.com Fri Jul 29 05:56:45 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 29 Jul 2005 12:56:45 +0300 Subject: [Nitro] Og on Rails In-Reply-To: <42E94D9A.2030006@cs.helsinki.fi> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <42E92100.4030907@bdebl.de> <42E92B9D.3030608@serverhive.net> <42E94D9A.2030006@cs.helsinki.fi> Message-ID: Hello Aleksi, what you propose is really helpful. Over the next days I 'll work to improve the testing infrastructure for nitro and introduce testing support in Og. In the meantime I would love to get some test case for the actual Og or Nitro code. regards, George. -- http://www.nitrohq.com From george.moschovitis at gmail.com Fri Jul 29 06:02:41 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 29 Jul 2005 13:02:41 +0300 Subject: [Nitro] Og on Rails In-Reply-To: References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <42E92100.4030907@bdebl.de> <42E92B9D.3030608@serverhive.net> <42E94D9A.2030006@cs.helsinki.fi> Message-ID: Especially useful would be the refactoring of the tc_store.rb test case to make it easier to automatically run for all stores. Anyone cares to help here? ;-) -g. -- http://www.nitrohq.com From mneumann at ntecs.de Fri Jul 29 06:34:59 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Fri, 29 Jul 2005 12:34:59 +0200 Subject: [Nitro] Nitro-auth 0.2.0 release In-Reply-To: References: Message-ID: <42EA0653.7050300@ntecs.de> Hi, Looks brilliant. What I'd further like to see is a way to protect the whole controller class (and all possible subclasses). Imagine an AdminController, which should only be callable when being logged in. Regards, Michael > On 7/29/05, Ysabel wrote: > >>See http://rubyforge.org/projects/nitro-auth/ for details. Rdoc at >>http://nitro-auth.rubyforge.org/rdoc/nitro-auth/ and in theory you can >>install it with a simple "gem install nitro-auth". >> >>There's an issue with og-0.21.2 join table naming that'll keep the example >>from working, unfortunately. But I'll be trying to patch that ASAP and I >>figured it was worth getting this out so people can see it and >>comment/critique/praise/blame/etc. >> >>-- >>[ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] >>_______________________________________________ >>Nitro-general mailing list >>Nitro-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/nitro-general >> > > > From alang at cronosys.com Fri Jul 29 09:17:59 2005 From: alang at cronosys.com (Alan Garrison) Date: Fri, 29 Jul 2005 09:17:59 -0400 Subject: [Nitro] Og on Rails In-Reply-To: <42E94D9A.2030006@cs.helsinki.fi> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <42E92100.4030907@bdebl.de> <42E92B9D.3030608@serverhive.net> <42E94D9A.2030006@cs.helsinki.fi> Message-ID: <42EA2C87.3070700@cronosys.com> I think even a basic "flowchart" (ala Rails' homepage) would be nice for new people. I set up a very basic (and empty) "Test Cases" wiki page on nitrohq. If I have some time this weekend I'll try and write one. I'm excited since I've been invited to demonstrate how Ruby could help our company's shop, so I've got incentive to get my lazy butt coding. :) -- Alan Garrison Cronosys, LLC Phone: 216-221-4600 ext 308 From deb at ysabel.org Fri Jul 29 09:24:12 2005 From: deb at ysabel.org (Ysabel) Date: Fri, 29 Jul 2005 07:24:12 -0600 Subject: [Nitro] Nitro-auth 0.2.0 release In-Reply-To: References: Message-ID: <7658AE33BA6AFEA6FFB7987C@[10.19.0.236]> --On Friday, July 29, 2005 10:17 AM +0300 George Moschovitis wrote: > Btw, what is the problem with join tables? The example has a class Basic::User which inherits from Auth::User. When the join table (between Auth::User and Auth::Role) is generated, it's called ogj_auth_role_auth_user (as I would expect), but join_many regenerates the table name instead of using the one stored in the metadata (I think) and thus tries to join on ogj_auth_role_basic_user, which of course doesn't exist. I haven't tried to diagnose it further than that yet. -- [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] From deb at ysabel.org Fri Jul 29 09:26:14 2005 From: deb at ysabel.org (Ysabel) Date: Fri, 29 Jul 2005 07:26:14 -0600 Subject: [Nitro] Nitro-auth 0.2.0 release In-Reply-To: <42EA0653.7050300@ntecs.de> References: <42EA0653.7050300@ntecs.de> Message-ID: --On Friday, July 29, 2005 12:34 PM +0200 Michael Neumann wrote: > What I'd further like to see is a way to protect the whole controller > class (and all possible subclasses). Imagine an AdminController, which > should only be callable when being logged in. That's a good idea. I like the idea of being able to specify a default required role for a class, too, that can be overridden for one or two methods. -- [ deb at ysabel.org ] - Ysabel - [ http://www.ysabel.org/ ] From Aleksi.Niemela at cs.helsinki.fi Fri Jul 29 12:16:25 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Fri, 29 Jul 2005 19:16:25 +0300 Subject: [Nitro] Og on Rails In-Reply-To: <42E94D9A.2030006@cs.helsinki.fi> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <42E92100.4030907@bdebl.de> <42E92B9D.3030608@serverhive.net> <42E94D9A.2030006@cs.helsinki.fi> Message-ID: <42EA5659.1090502@cs.helsinki.fi> Aleksi Niemela wrote: > If you could start writing simple Og test cases, for the whole > library, one method at a time, you would do immensely useful favor for > whole Og community and let George concentrate on Nitro docs without > having nightmares how sparsely Og is tested. > > If you choose to take this course of action, here's my suggestion: > > 1) Wrap up a wiki page listing all classes and their methods. This > could probably be copied over from Og's RDoc or created by clever > oneliner directly from the sources. > This is now done to some extent. I continued on Alan Garrison's page http://nitrohq.com/view/Test_Cases Now it would be great if the rest starts to happen. > 2) Allocate single method at a time for yourself which you plan to add > test for by writing your name next to it. Others know they shouldn't > waste effort on that item. Place a date when work started and be > pretty strict to clean up entries which timestamps are older than, > say, 7 days. > > 3) Write a entirely new file which exercises tests for the chosen > method taking a template from one of the existing test case sources. > > 4) Try to write useful, passing test cases for the chosen method. > Update wiki info if a week is not enough. > > 5) Send your test cases to the list. It's better to send your test > cases even if don't exercise fully the method under test to display > progress. You're free to work on single test case as long you need but > the work will easily look dead. Please note that the list is not quite complete due to Og's dynamical nature. We should add tests for all of the enchanted code and should we seek to have decent code coverage there're quite many different cases to go through for many simple pieces of code. But probably this is some kind of a start. The subpages were created, by the way, because saving one page with all those tables didn't succeed. Might be a feature of underlying database model Spark is using or a feature of the browser I'm using. - Aleksi From julian at coretech.net.au Fri Jul 29 20:41:25 2005 From: julian at coretech.net.au (Julian Leviston) Date: Sat, 30 Jul 2005 10:41:25 +1000 Subject: [Nitro] Og on Rails In-Reply-To: <42EA2C87.3070700@cronosys.com> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <42E92100.4030907@bdebl.de> <42E92B9D.3030608@serverhive.net> <42E94D9A.2030006@cs.helsinki.fi> <42EA2C87.3070700@cronosys.com> Message-ID: <1264D252-E190-4FCF-BC2D-FB3961FF5CCA@coretech.net.au> YES! On 29/07/2005, at 11:17 PM, Alan Garrison wrote: > I think even a basic "flowchart" (ala Rails' homepage) would be > nice for new people. > > I set up a very basic (and empty) "Test Cases" wiki page on > nitrohq. If I have some time this weekend I'll try and write one. > I'm excited since I've been invited to demonstrate how Ruby could > help our company's shop, so I've got incentive to get my lazy butt > coding. :) > > -- > Alan Garrison > Cronosys, LLC > Phone: 216-221-4600 ext 308 > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From george.moschovitis at gmail.com Sat Jul 30 01:11:41 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 30 Jul 2005 08:11:41 +0300 Subject: [Nitro] Og on Rails In-Reply-To: <42EA5659.1090502@cs.helsinki.fi> References: <200507231553.51636.dcorbin@machturtle.com> <83f770ff050727205929e33de9@mail.gmail.com> <200507280559.11667.dcorbin@machturtle.com> <64D47EC0-C37C-4B4D-BC42-A6EA0D10FD02@coretech.net.au> <42E92100.4030907@bdebl.de> <42E92B9D.3030608@serverhive.net> <42E94D9A.2030006@cs.helsinki.fi> <42EA5659.1090502@cs.helsinki.fi> Message-ID: Great job as always :) In fact you have inspired me add iextensive support for testing. -g. On 7/29/05, Aleksi Niemela wrote: > Aleksi Niemela wrote: > -- http://www.nitrohq.com From jlsysinc at alltel.net Sat Jul 30 10:20:20 2005 From: jlsysinc at alltel.net (Jon A. Lambert) Date: Sat, 30 Jul 2005 10:20:20 -0400 Subject: [Nitro] [ANN] Nitro + Og 0.21.2 References: <25DC2B08-E5B0-4B22-97AD-5CF22BC6CE78@coretech.net.au><01a601c5938e$22e24360$0200000a@agamemnon><42E91AC0.3060405@cs.helsinki.fi> Message-ID: <001101c59511$d189f870$0200000a@agamemnon> George Moschovitis wrote: >Aleksi Niemela wrote: >> Jon A. Lambert wrote: >> >>> Is the a public CVS or Subversion repository where one can follow >>> development? >>> >> I can't say what's the case with the repository... > > thanks for taking the time to write this useful post. > Is there a public CVS or Subversion repository where one can follow development? -- J Lambert From john.lloydjones at gmail.com Sun Jul 31 15:38:45 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Sun, 31 Jul 2005 12:38:45 -0700 Subject: [Nitro] Problems using Og Message-ID: <6fcd26f1050731123853760e76@mail.gmail.com> I'm still not quit getting Og to dance the way I want. Maybe I haven't grasped the basics or maybe I expect things that Og was never intended to do. My starting point follows: This simple version works, though not completely as I expected -- I was hoping to persist the object tree in one shot. When I use add_address, it persists null unless the Party has been saved in advance. (all of this was run with Og Version 0.21.1 (not preview) ----- test-og.rb ------- require 'og' $DBG = true class Party; end class Address property :street1, String property :street2, String property :city, String property :state, String property :postcode, String property :name, String belongs_to Party end class Party property :description, String property :address_oids # other boring stuff removed... has_many :addresses, Address def initialize puts "Party: initialize..." @address_oids = [] end # add the address and save the number def addAddress( a ) puts "addAddress: @address_oids = [#{@address_oids}]" add_address( a ) puts "Address has oid = #{a.oid}" @address_oids << a.oid puts "party has addresses : [#{@address_oids}]" end end # setup Og and go the magic... db = Og.setup( :destroy => true, # NB! Recreates the database for each run :name => 'og-test', :store => 'sqlite' ) # now try to use the classes # test things work with a simple Party... puts "create a (fictious) primary address" a1 = Address.new a1.street1 = '1370 Dunlap Ave' a1.street2 = 'Apt # 786' a1.city = 'Phoenix' a1.state = 'AZ' a1.name = 'primary' puts "create a (fictious) mailing address" a2 = Address.new a2.street1 = '1290 Ray Ave' a2.street2 = 'P.O Box 15' a2.city = 'Chandler' a2.state = 'AZ' a2.name = 'mailing' puts "create a party" party = Party.new party.description = "Test of the base class" puts "save the party" party.save puts "add the primary address to the party" party.addAddress( a1 ) puts "add the maiing address to the party" party.addAddress( a2 ) puts "save the party again" party.save ---- end of og-test.rb --- Now what I really want to do is use Party as as base class; I add a mixin class, Customer: module Created prop_accessor :created, Date pre "@created ||= Date.today", :on => :og_insert end module Status property :status, String pre "@status ||= 'entered'", :on => :og_insert end module Customer include Created include Status property :customer_number, String property :creditLimit, String end ... and I create a PersonalCustomer like this: class Person < Party property :firstName, String property :middleName, String property :lastName, String property :knownBy, String property :mobile, Phone end class PersonalCustomer < Person include Customer def initialize (number, first, middle, last) super() @customer_number = number @firstName = first @middleName = middle @lastName = last end end so I try to test as follows: # now try with Personal customer... puts "create personal customer" p = PersonalCustomer.new('1001', 'John', '', 'Lloyd-Jones') p.description = "Test of a derived class" puts "save the personal customer" p.save puts "add the primary address" p.addAddress( a1 ) p.save puts "add the mailing address" p.addAddress( a2 ) puts "save the personal customer again" p.save .. and that give the error message : (eval):23:in `add_address': undefined method `personal_customer_oid=' for # (NoMethodError) from og-test.rb:53:in `addAddress' from og-test.rb:124 even if I add a "personal_customer_oid=" method to Address: def personal_customer_oid=( oid ) party_oid=( oid ) end it still fails to persist the party_oid with the address. From john.lloydjones at gmail.com Sun Jul 31 17:31:27 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Sun, 31 Jul 2005 14:31:27 -0700 Subject: [Nitro] Problems using Og Message-ID: <6fcd26f105073114311f686a25@mail.gmail.com> Just an update -- I downloaded Og 0.21.2 and ran my code with the same results. John