From why at whytheluckystiff.net Wed Feb 1 18:23:03 2006
From: why at whytheluckystiff.net (why the lucky stiff)
Date: Wed, 01 Feb 2006 16:23:03 -0700
Subject: CAMPING
Message-ID: <43E142D7.3010804@whytheluckystiff.net>
Just pokin the listserv.
_why
From why at whytheluckystiff.net Fri Feb 10 00:31:02 2006
From: why at whytheluckystiff.net (why the lucky stiff)
Date: Thu, 09 Feb 2006 22:31:02 -0700
Subject: ! camping paid gigs
Message-ID: <43EC2516.3040005@whytheluckystiff.net>
Oh, boy, this is great. Anyone here want to get paid for doing some
camping work? Because O'Reilly is interested in doing a 20-30 page PDF
on Camping. Please do it, guys. I won't blab about how much it pays,
but if it took you a couple days, you'd get back a hacka lot of moaney.
Anyway, post your camping paid gigs, people. If we could have one guy
in the world getting paid to do full-time Camping work, I promise I will
laugh every morning in the shower from now on. Because ridiculous yeah.
_why
From why at whytheluckystiff.net Fri Feb 10 01:39:54 2006
From: why at whytheluckystiff.net (why the lucky stiff)
Date: Thu, 09 Feb 2006 23:39:54 -0700
Subject: + about camping 1.4
In-Reply-To: <43EC2516.3040005@whytheluckystiff.net>
References: <43EC2516.3040005@whytheluckystiff.net>
Message-ID: <43EC353A.9090508@whytheluckystiff.net>
here's the rundown for camping 1.4:
* lib/camping/webrick.rb: checked in.
* lib/camping/mongrel.rb: checked in.
* lib/camping/session.rb: done, soon to be checked in.
And the main change to lib/camping.rb is that Controllers::Base.service
is now split into Controllers::Base.initialize and
Controllers::Base.service. So you can override these methods to get
before_filter/after_filter stuff happening.
See, that's how sessioning works:
class Hoodwinkd::Controllers::Base
def initialize(*a)
super(*a)
if @cookies.hoodwinkd_sid
@session = Hoodwinkd::Models::Session.find_by_hashid
@cookies.hoodwinkd_sid, :include => :user
end
unless @session
@session = Hoodwinkd::Models::Session.generate(@cookies)
end
@user = @session.user rescue nil
@user ||= Hoodwinkd::Models::User.new
end
def service(*a)
s = super(*a)
@session.save if @session
s
end
end
Any requests?
_why
From why at whytheluckystiff.net Mon Feb 13 16:12:05 2006
From: why at whytheluckystiff.net (why the lucky stiff)
Date: Mon, 13 Feb 2006 14:12:05 -0700
Subject: + Helpers#URL
Message-ID: <43F0F625.4000808@whytheluckystiff.net>
Okay, a new method: Helpers#URL. Here's the rundown.
== Helpers#URL ==
Builds a complete URL to a controller route or a path, returning a URI
object. Basically, an absolute URL which can replace the ugly `self /
R(...)` in your controllers.
Assuming the Hoodwink.d app is mounted at
http://localhost:3301/hoodwinkd/, in a controller or view you'll see the
following results:
URL()
#=> #
self.URL
#=> #
URL(Static, 'js/prototype.js')
#=> #
URL("/boingboing.net/setup")
#=> #
URL("http://google.com")
#=> #
Since a URI object is returned, you can also get host-local absolute
paths by calling URL(...).path.
_why
From why at whytheluckystiff.net Tue Feb 21 02:43:14 2006
From: why at whytheluckystiff.net (why the lucky stiff)
Date: Tue, 21 Feb 2006 00:43:14 -0700
Subject: + camping/session
Message-ID: <43FAC492.7060206@whytheluckystiff.net>
Camping now comes with a sessioning class, checked in tonight.
To get sessions working for your application:
1. require 'camping/session'
2. include Camping::Session in your application's toplevel module.
3. In your application's create method, add a call to
Camping::Models::Schema.create_schema
4. Throughout your application, use the @state method like a hash to
store your application's data.
You can see a practical example in the examples/blog/blog.rb app:
require 'camping/session'
Camping.goes :Blog
module Blog
include Camping::Session
end
...
module Blog::Controllers
class Add
def get
unless @state.user_id.blank?
@user = User.find @state.user_id
@post = Post.new
end
render :add
end
end
...
def Blog.create
Camping::Models::Session.create_schema
unless Blog::Models::Post.table_exists?
ActiveRecord::Schema.define(&Blog::Models.schema)
end
end
This is also covered at the wiki:
http://code.whytheluckystiff.net/camping/wiki/CampingSessions.
_why
From maurizio at gmail.com Sat Feb 25 03:00:27 2006
From: maurizio at gmail.com (Maurizio Balestrieri)
Date: Sat, 25 Feb 2006 09:00:27 +0100
Subject: + camping/session
In-Reply-To: <43FAC492.7060206@whytheluckystiff.net>
References: <43FAC492.7060206@whytheluckystiff.net>
Message-ID: <1c7fecb90602250000j34ef1148p5f890468157416e@mail.gmail.com>
Hello.
I got the following warnings while installing camping with gem under
windows (xp).
Is this OK?
C:\Documents and Settings\Maurizio\My Documents\ruby>gem install camping --inclu
de-dependencies
Attempting local installation of 'camping'
Local gem file not found: camping*.gem
Attempting remote installation of 'camping'
Successfully installed camping-1.3
Successfully installed markaby-0.3
Successfully installed builder-2.0.0
Successfully installed metaid-1.0
Installing RDoc documentation for camping-1.3...
lib/camping-unabridged.rb:578:32: Couldn't find Base. Assuming it's a module
Installing RDoc documentation for markaby-0.3...
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/html.rb:25: warning: already
initialized constant FONTS
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/html.rb:235: warning: already
initialized constant STYLE
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/html.rb:335: warning: already
initialized constant FILE_PAGE
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/html.rb:384: warning: already
initialized constant CLASS_PAGE
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/html.rb:604: warning: already
initialized constant METHOD_LIST
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/html.rb:621: warning: already
initialized constant BODY
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/html.rb:649: warning: already
initialized constant FR_INDEX_BODY
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/html.rb:675: warning: already
initialized constant FILE_INDEX
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/html.rb:677: warning: already
initialized constant CLASS_INDEX
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/html.rb:678: warning: already
initialized constant METHOD_INDEX
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/html.rb:704: warning: already
initialized constant INDEX
c:/ruby/lib/ruby/1.8/rdoc/generators/template/html/one_page_html.rb:76: warning:
already initialized constant CONTENTS_XML
Installing RDoc documentation for builder-2.0.0...
Thanks.
--M
On 2/21/06, why the lucky stiff wrote:
> Camping now comes with a sessioning class, checked in tonight.
>
> To get sessions working for your application:
>
> 1. require 'camping/session'
> 2. include Camping::Session in your application's toplevel module.
> 3. In your application's create method, add a call to
> Camping::Models::Schema.create_schema
> 4. Throughout your application, use the @state method like a hash to
> store your application's data.
>
> You can see a practical example in the examples/blog/blog.rb app:
>
> require 'camping/session'
>
> Camping.goes :Blog
>
> module Blog
> include Camping::Session
> end
>
> ...
>
> module Blog::Controllers
> class Add
> def get
> unless @state.user_id.blank?
> @user = User.find @state.user_id
> @post = Post.new
> end
> render :add
> end
> end
>
> ...
>
> def Blog.create
> Camping::Models::Session.create_schema
> unless Blog::Models::Post.table_exists?
> ActiveRecord::Schema.define(&Blog::Models.schema)
> end
> end
>
> This is also covered at the wiki:
> http://code.whytheluckystiff.net/camping/wiki/CampingSessions.
>
> _why
> _______________________________________________
> Camping-list mailing list
> Camping-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
From why at whytheluckystiff.net Sat Feb 25 10:53:50 2006
From: why at whytheluckystiff.net (why the lucky stiff)
Date: Sat, 25 Feb 2006 08:53:50 -0700
Subject: + camping/session
In-Reply-To: <1c7fecb90602250000j34ef1148p5f890468157416e@mail.gmail.com>
References: <43FAC492.7060206@whytheluckystiff.net>
<1c7fecb90602250000j34ef1148p5f890468157416e@mail.gmail.com>
Message-ID: <44007D8E.6060601@whytheluckystiff.net>
Maurizio Balestrieri wrote:
> Hello.
>
> I got the following warnings while installing camping with gem under
> windows (xp).
> Is this OK?
>
Sure, it's fine. RDoc is being noisy. I'll see what I can do about
quieting things down.
_why
From maurizio at gmail.com Sat Feb 25 11:35:02 2006
From: maurizio at gmail.com (Maurizio Balestrieri)
Date: Sat, 25 Feb 2006 17:35:02 +0100
Subject: + camping/session
In-Reply-To: <44007D8E.6060601@whytheluckystiff.net>
References: <43FAC492.7060206@whytheluckystiff.net>
<1c7fecb90602250000j34ef1148p5f890468157416e@mail.gmail.com>
<44007D8E.6060601@whytheluckystiff.net>
Message-ID: <1c7fecb90602250835rca09059t1b31489a9bbb7dc5@mail.gmail.com>
Thank you!
I'd take advantage of having you "on line" and ask you a question,
which maybe could be useful for other on this list too: would you
suggest/consider creating a publicly accessible and potentially (and
hopefully) trafficked application with camping rather than with rails?
I mean, how far can I go with camping? Could I successfully develop
an application of the size of some well known rails applications like,
for example, basecamp or instiki, in camping? What are the
differences, in few words, between camping and rails?
Sorry for being maybe too naive :)
--M
PS Consider I'm now beginning to learn ruby (and rails) and that I've
some years experiences in programming (basic, c, awk, perl) albeit I
could not be considered a professional programmer but rather an
amateur programmer (because I do other things to earn a living).
On 2/25/06, why the lucky stiff wrote:
> Sure, it's fine. RDoc is being noisy. I'll see what I can do about
> quieting things down.
From why at whytheluckystiff.net Sat Feb 25 12:13:34 2006
From: why at whytheluckystiff.net (why the lucky stiff)
Date: Sat, 25 Feb 2006 10:13:34 -0700
Subject: + camping/session
In-Reply-To: <1c7fecb90602250835rca09059t1b31489a9bbb7dc5@mail.gmail.com>
References: <43FAC492.7060206@whytheluckystiff.net> <1c7fecb90602250000j34ef1148p5f890468157416e@mail.gmail.com> <44007D8E.6060601@whytheluckystiff.net>
<1c7fecb90602250835rca09059t1b31489a9bbb7dc5@mail.gmail.com>
Message-ID: <4400903E.6000503@whytheluckystiff.net>
Maurizio Balestrieri wrote:
> I'd take advantage of having you "on line" and ask you a question,
> which maybe could be useful for other on this list too: would you
> suggest/consider creating a publicly accessible and potentially (and
> hopefully) trafficked application with camping rather than with rails?
> I mean, how far can I go with camping?
At some point, I'd really like to have a site with some Camping apps for
people to try out, sure.
But you could write a blog in Camping and it would scale just fine with
FastCGI. It would probably perform better than Rails in many situation,
however Camping doesn't have any caching built-in, so you can't tune
performance as much.
> Could I successfully develop an application of the size of some well known rails applications like, for example, basecamp or instiki, in camping? What are the
> differences, in few words, between camping and rails?
>
Basecamp's probably too big for Camping. Instiki would probably work
well in Camping, though. It's smaller and it's designed for distribution.
See, this is the distinction: Rails is great for large web apps and
commercial stuff which is hosted for general use by users all over the
world. You don't install Basecamp on your machine, you hit the Signals'
machines and use their app.
Instiki, however, is designed for you to install and use on your
machine. Camping is great for this kind of software. You download
instiki.rb and run: camping instiki.rb. The bin/camping tool requires
SQLite and takes care of setting up the database.
_why
From Matt.Bowen at farweststeel.com Sat Feb 25 13:26:43 2006
From: Matt.Bowen at farweststeel.com (Matt Bowen)
Date: Sat, 25 Feb 2006 10:26:43 -0800
Subject: + camping/session
Message-ID: <09DF733B1027BB499CF8A5DF87FCB13E09D7FD@exfws.fws.farweststeel.com>
_why:
Couldn't you also migrate your Camping app to Rails, if needed. Camping is perfect from some of the utilities I'm writing now. Having all the logic nicely encapsulated in one file makes for very rapid development. If gets too big, will push out to respective model, controller, and view files (as you suggested). Since Camping uses ActiveRecord seems pretty easy to port to Rails if needed, or not... Camping rocks. I'm still trying to wrap my brain around some of your clever expressions.
- Matt
________________________________
From: camping-list-bounces at rubyforge.org on behalf of why the lucky stiff
Sent: Sat 2/25/2006 9:13 AM
To: camping-list at rubyforge.org
Subject: Re: + camping/session
Maurizio Balestrieri wrote:
> I'd take advantage of having you "on line" and ask you a question,
> which maybe could be useful for other on this list too: would you
> suggest/consider creating a publicly accessible and potentially (and
> hopefully) trafficked application with camping rather than with rails?
> I mean, how far can I go with camping?
At some point, I'd really like to have a site with some Camping apps for
people to try out, sure.
But you could write a blog in Camping and it would scale just fine with
FastCGI. It would probably perform better than Rails in many situation,
however Camping doesn't have any caching built-in, so you can't tune
performance as much.
> Could I successfully develop an application of the size of some well known rails applications like, for example, basecamp or instiki, in camping? What are the
> differences, in few words, between camping and rails?
>
Basecamp's probably too big for Camping. Instiki would probably work
well in Camping, though. It's smaller and it's designed for distribution.
See, this is the distinction: Rails is great for large web apps and
commercial stuff which is hosted for general use by users all over the
world. You don't install Basecamp on your machine, you hit the Signals'
machines and use their app.
Instiki, however, is designed for you to install and use on your
machine. Camping is great for this kind of software. You download
instiki.rb and run: camping instiki.rb. The bin/camping tool requires
SQLite and takes care of setting up the database.
_why
_______________________________________________
Camping-list mailing list
Camping-list at rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 5170 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/camping-list/attachments/20060225/f70f11ad/attachment-0001.bin
From why at whytheluckystiff.net Sat Feb 25 14:44:52 2006
From: why at whytheluckystiff.net (why the lucky stiff)
Date: Sat, 25 Feb 2006 12:44:52 -0700
Subject: camping2rails (was Re: + camping/session)
In-Reply-To: <09DF733B1027BB499CF8A5DF87FCB13E09D7FD@exfws.fws.farweststeel.com>
References: <09DF733B1027BB499CF8A5DF87FCB13E09D7FD@exfws.fws.farweststeel.com>
Message-ID: <4400B3B4.7090202@whytheluckystiff.net>
Matt Bowen wrote:
> Having all the logic nicely encapsulated in one file makes for very rapid development. If gets too big, will push out to respective model, controller, and view files (as you suggested).
Yeah, sure, for most things you'll end up moving to Rails. It's so easy
that someone could probably write a camping2rails script that would do
it for you. It's kind of a sticky subject because Rails is pretty easy
to prototype with anyway.
So the Rails/Camping connection isn't really a better/worse situation,
it's just a "what foot is it easier for you to start off on" sort of
situation.
However, Hoodwink'd is an example of a larger Camping sort of thing and,
man, I'm surprised, it's worked out pretty well actually.
_why