Hi Jonas,
Thanks for this reply, and the other cluing me into the .included
callback. I'll take a look at that later today and see if I can get it
to work.
> Great ! I wanted to implement that for long time and never had it (the
> time). I've packages a set of Camping extensions in a package called
> "Equipment". Apparently I don't have many followers but maybe you're
> interested to contribute ?
>
> I think that my lib is a bit too complex and gets intimidating
> compared to the LOC of Camping. Let me know if you want to be
> introduced a little bit :)
Regarding equipment, you're right: it is a little intimidating. I
opened it up and thought "hey, what are all these "depends" calls? why
can't I just use 'include Foo'?". I am willing to believe these are
necessary, but I am worried that it raises the bar for new programmers
(e.g. me) who aren't willing to take the time to make their little
code snippets (like the two posted in this thread) into full equipment
compatible modules.
I'd like a solution where I can define something like:
module MyModule
module Models
...
end
module Controllers
...
end
module Views
...
end
module Helpers
...
end
end
and have anyone else come along and just drop it into their apps with
one line of code (or perhaps two, if something needs to be run in the
create method). eg
MagicModuleIncluder.make_magic :MyModule, :SomeOtherModule, ...
def MyApp.create
MyModule.create
SomeOtherModule.create
... MyApp creation code ...
end
My inspiration for this is the Camping::Sessions code. It's not very
complicated itself, and it drops right into any other camping app.
I've been thinking about starting a little website where people can
upload "songs." Little camping components that don't require a lot of
work to create or include in other apps. (The reason behind the word
song is that when one goes camping, you're likely to have a
sing-a-long. Apps can join in or not if they want. Cheesy? Yes.) A
place where developers can share their code without having to meet a
lot of dependency requirements or create a gem, or otherwise put
themselves out. Think pastie + tepee. WIth RSS. Lots of RSS.
I'll make a formal announcement when I have something more than vapor,
but if anyone is interested in helping, I think there are two things
that need to happen:
1. CampSongs (the module/class) that has the necessary vodoo to make
the code I posted above possible.
2. CampSon.gs (the website) the camping app that makes the sharing of
songs easy and effective. It should probably eat a healthy amount of
dog food and use as many songs as possible.
Email me off-list if you're interested, and I'll keep you posted.
And with that, I shall go make code of this vapor,
-Mark
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list