[Nitro] ratchets, parts and plugins

transfire at gmail.com transfire at gmail.com
Fri Nov 17 18:39:17 EST 2006


hi--

was looking at rails plugin script this evening and thinking about what
they are doing. my understanding is this: each rails app has a
vendor/plugins directory, where plugins are installed via the plugin
script or the rapt utility. (assuming i got this right) while i see the
point considering the deployment limitations of web apps, doesn't it
seem rather amazing that essentially copy-and-paste reusability is
getting so much play?

i developed my own "plugin" system (before i knew how rails' worked)
and it functions as an indirect require. so you do:

  require_plugin 'someapp/pluginname'

and this refernce file is read from a shared store which simply
contains a list of lib files to actually require. the system is
extremely simple, effective, versitle and reusable, and w/o
copy-and-paste --plugins are just installed like any other app.

of course I understand that there is a need for reusable copied parts
and ratchets has a feature for that, which naturally fell out of reap's
seed tool, eg. scaffolding a project. if you think about it,
scaffolding a project is essentially copy-and-paste reusability. so i
was able to integrate the two concepts. one can do:

  project scaffold --part part_name_or_url

to add a pre-packaged part to a project. for a completely new project
it's

  project scaffold --part new

though one can just use 'project scaffold' b/c new is the default part
in none is given.

but now that i look at what rails is doing it appears i perhaps
reversed the concepts. is a plugina part and a part a plugin ... had
you all been talking about parts as analogous to rails' plugins, or
different in regards to their reuse? myself, i sort of prefer the term
'scaffolding parts' (or just 'parts') for copy-and-paste reusability,
and plugins for the other.

one thing i did learn from rails plugin system is i need a way to
unistall parts too. since ratchets is more flexible, in that in can
install files anywhere within a project layout, its not as simple as
removing a plugin folder, so i'll have work that out via some for of
manifest --and it may have to wait for a later release.

any thoughts on all this?

T.



More information about the Nitro-general mailing list