[Nitro] Gen Part and related thoughts

Fabian Buch fabian at fabian-buch.de
Wed Oct 4 13:31:54 EDT 2006


hi George,

Below are the thoughts about Rachets, Gen and Parts with Trans a few  
days ago.

The basic site for Nitro Parts is already in an advanced state and  
the domain for it already ordered. I just want it to be more thought  
through and could be used in combination with Trans Ratchets (see  
below).

Furthermore I'd like to at least let 0.40.0 glycerin stabelize a  
little more and maybe even release the site when Nitro 0.40.0 is  
released (or earlier, depending on developments in Nitro/Ratchets/ 
Parts area).

Components (or whatever they will be called in the end) would fit  
exactly into all this, just like Parts, that don't get included into  
the standard Nitro distribution.

read on below!

Fabian

Forwared E-Mail:
> Von: Fabian Buch <fabian at fabian-buch.de>
> Datum: 25. September 2006 11:27:00 MESZ
> An: TRANS <transfire at gmail.com>
> Betreff: Re: [Nitro] Gen
>
> hi Trans,
>
> I just had a little more thought about Gen on weekend, especially  
> about gen part (or even gen app) and how I could extend it's  
> functionality.
> At the moment Gen is not doing so much scuffolding. The currently  
> working generators are basically copying files. So it's not so much  
> having functionality of seed, but more of a different project of  
> yours (or might have, after what I thought out on the weekend).
>
> I'm writing to you, instead of the Nitro ML, b/c I'm planning a  
> site which I don't want to reveal to the general public yet.  
> Basically it'll be a site for Nitro Parts, maybe a little similar  
> to rubyforge, but only for Nitro parts, like collecting Nitro "plug- 
> ins" and providing them to other Nitro developers.
> I thought about several ways how to package/provide Parts through  
> this site: gem, rolls, sow, ratchets.. Then I thought, hmm.. don't  
> like gem, Parts aren't full apps or libraries like the usual stuff  
> on rubyforge.. Trans is still taking a while with ratchets.. So why  
> not built-in a small downloader into "gen part" which downloads  
> Parts from my website, unpacks them and then does what it's doing  
> right now.
>
> But then I thought, that's simple, but it does stuff "gem" and  
> probably "ratchets" can do a lot better. Just that they can't do  
> the little copying of Gen.
> Then again, reap will be part of ratchets, right? So, with some  
> "generator"-scripts for ratchets, it could take-over Gen's job,  
> even replacing Gen. Of course it would have to be easy for a user/ 
> web-developer to handle this, so it'd have to be as easy as saying  
> "gen part blogpart" to install the blogpart in current webapp  
> folder, from wherever (local path, or if not found remote url;  
> Nitro Parts from my site).
>
> I know ratchets has to be general purpose, but maybe you could do  
> it extendable, so that in Nitro served scripts could utilize  
> ratchets to take over the Gen job. Preferably easy and straight- 
> forward.
>
> Just some thoughts,
> thanks for reading,
> Fabian
>
> PS: do you know an approximate timeline for Ratchets already?
>
Anfang der weitergeleiteten E-Mail:

> Von: Fabian Buch <fabian at fabian-buch.de>
> Datum: 27. September 2006 00:11:30 MESZ
> An: TRANS <transfire at gmail.com>
> Betreff: Re: [Nitro] Gen
>
> Thanks for your reply Trans, and don't worry about typos ;)
>
> Am 26.09.2006 um 19:00 schrieb TRANS:
>> On 9/25/06, Fabian Buch <fabian at fabian-buch.de> wrote:
>>> built-in a small downloader into "gen part" which downloads Parts
>>> from my website, unpacks them and then does what it's doing right  
>>> now.
>>
>> Interesting idea. Facets has a Downloader class that woudl make the
>> dowloading a qucik addition.
>
> Cool. The implementation is not the problem though. It's more the  
> question of whether I SHOULD implement that, since it duplicates  
> other apps functionality (gem, rachets).
>
>> Hmmm... I like that idea. It should be pretty easy implement and
>> actually could be fairly general in implementation. And I agree that
>> Ratchets would be the prefect platform for this.
>>
>> When you use 'gen part foo', that's to distinguish from say 'gen app
>> foo'. Correct? Is the distinction actually needed? What I mean is,
>> will it even be possible to name two projects foo on your hosting
>> site, one a part and one an app? Or would the type be distinguishable
>> by the name itself? I.e Project bar is an app and foo is a part. So
>> all that's needed on the command line is 'gen foo'.
>
> Well, I'm thinking about Parts only, since they can (if wanted by  
> the author) be run as apps too, just use some general conventions  
> (opposed to normal nitro apps that can be in whatever layout). "gen  
> part foo" does actually a little more than "gen app bar". Both copy  
> stuff, the latter only the "proto"-dir to a path and "gen part" the  
> part to current dir plus it's public things into the apps public  
> dir, which are two copy/move operations. Additionally "gen part"  
> 'searches/finds' a part, whereas gen app knows where "proto" is.
>
> The difference is also that gen app produces something for you to  
> start developing an app and gen part provides you with fully  
> functioning, maybe feature-rich application parts, that can, but  
> don't have to be customized (among the parts I'll release with the  
> site are: an authentication-part, a blog-part and  a photogallery- 
> part (the latter two even needing the first)).
>
>>  project new {type}
>
> What can {type} be?
>
>>> I know ratchets has to be general purpose, but maybe you could do it
>>> extendable, so that in Nitro served scripts could utilize  
>>> ratchets to
>>> take over the Gen job. Preferably easy and straight-forward.
>>
>> Yep, it would be a pretty simple matter of taking th above and adding
>> a feature to this that could check a remote site for the app/part if
>> it isn't stored locally. That would be very cool! The hard part is
>> actually settleing on a nomenclature of the CLI.
>
> Could it be stuff like:
>
> project new nitroapp {name}
> project new nitropart {name}
> project new webapp {name}
>
> ratchets install {whatever} --remote {url}
>
> where {whatever} is an app, nitroapp or part which have a  
> ProjectInfo that tells how it's gonna be installed? (if ProjectInfo  
> says "part" it does what "gen part" does and if it says "app" it's  
> installed in site-ruby)
>
> I'm not sure. Some more random idea shots:
>
> project new nitroapp {name}
> project gen nitropart {name}
> project gen nitroscuffold {model.rb}
>
> Or letting everything alive as is and "gen part" uses ratchets for  
> downloading/versioning. On the other hand, Gen isn't a big bunch of  
> code, it doesn't have to survive necessarily in my eyes. Replacing  
> it as something integrated in other software isn't so bad an idea  
> (doesn't have to be ratchets for all stuff, since there's a "nitro"  
> command too that might be able to take some more care too (for an  
> upcomming scuffolding e.g.)).
>
>>> PS: do you know an approximate timeline for Ratchets already?
>>
>> Very soon --days. I'm really just stuck on one last issue --a naming
>
> Great :). Go for ProjectInfo.
>
> Fabian

btw. I think my site would broaden the Nitro community and its  
visibility a lot. People would see Nitro is actually being used apart  
from www.nitroproject.org and www.oxyliquit.de

-- 
Nitro Q&A: http://oxyliquit.de/
Blog: http://blog.fabian-buch.de





More information about the Nitro-general mailing list