I really think shorter escaping methods are important, see if you can't include Rack::Utils or something
Aside from that, it all sounds yummy!

On 22/05/2008, at 8:32 PM, Magnus Holm wrote:

If you're going to build cookie sessions in to the core, it should either do the rails thing of using multiple cookies when one is not enough for the data, or raise a descriptive exception explaining why there's a problem and
how switching to the database sessions thingo will solve that.

Cookie Sessions: I think we should simply raise an error when the data is
larger than 4kB. Something is wrong when the cookie is larger than the
framework you're using.

I totally agree with ditching
the compressed version so long as there are
new guidelines put in place as to how much camping is too much camping. We
still need to fit it in our backpacks.

It would also be good if you continue to maintain some easy way to do the compression, so people who do care about size can get a smaller version. Someone might want to take camping with them everywhere they go in the form
of a 3D barcode, loadable via the camera's on mobile phones and many
computers, or maybe they've been running their website on a server they can only reach via TCP over Carrier Pigeon and it's important to them that they
can upload camping.rb with the fewest pigeons possible.

Perlvert that I am, I respected the 4KB obfuscation. (Maybe that's just me. ;-)

It's alright for me to keep the compressed version, but can it live under camping-compressed.rb (or something like that) and have the "real" version
under camping.rb?

Does Rack::Utils give us nice short easy escaping? Can we include in to
camping in a way that they are just nice short methods?

Rack::Utils gives us "nice short easy escaping" through Rack::Utils.escape and
Rack::Utils.unescape. Creating helper-methods will just cost bytes...

As long as you organize the code such that it's easy to switch between
session storage schemes, I think this is fine.

I've created a branch (orm_agnostic) where I've moved db.rb -> ar.rb and
session.rb -> ar/session.rb so you can plug in whatever you want.

Right now I have spread the code around three branches (rack, cookie_session and orm_agnostic). Just tell me which we need, and I'll merge/rebase them to the master for easy merging with why's repo (so you guys can continue to hack
with it).

Oh, and the documentation of session needs some cleanup, but I suck at
documentation so I'll leave it to you :-)
Magnus Holm
Camping-list mailing list

Camping-list mailing list

Reply via email to