Hi Folks, It seems that although Rails promotes a huge amount of organisation and modularisation within an individual rails project, and provides access to a large amount of re-usable functionality in the rails libraries themselves, promoting the sharing of modular code components between different rails is not an area where rails excels any more than, say, PHP does. Although there are some ways of sharing code, such as generators, helpers, partials, libraries, etc, they don''t seem to me to really leverage the convention over configuration philosophy of rails, which I think should enable us to have easily sharable modules which can just be dropped into any rails app that follows the rails conventions. Here''s my real world example. I decided I wanted to use the tinyMCE html editor in my forms. It''s a javascript LGPL widget, so I plonked it into "public/javascripts/tiny_mce". I started off by putting the html and javascript that I needed to load it for my form field straight into my _form template. Then, I factored it out into a function in application_helper.rb It''s only ten lines of code or something, but it did take at least a few minutes to set up, and wouldn''t it be great if other people could just drop it into their app. Also, I had a look at the sourcecode for the MaraveyWeb CMS, and noticed that they had also integrated tinyMCE but done it in a different way (possibly better). Wouldn''t life be easier if these common tasks could be consistant across projects, and we didn''t have to keep re-inventing the wheel? So a question. I''m willing, as part of my application development, to put extra time in required to bundle up any bits of my application which I think are general enough to be re-usable by others, because I feel that if many of us follow this philosophy, then we''ll get a whole lot more done for each hour in front of the computer. So what is the best way for me to do this? Do I use generators? I''m a bit iffy about this. What if I want to release a newer, better version of my module? What I really want is to be able to bundle things up in a package managed distribution system that handles dependencies between packages (that would be "gem"). So how would we go about making helpers, components and things into gems? Should we? I''d welcome discussion on this topic. I think it''s really important, and even if I''m missing some great ways that I could be sharing code, I''m sure that there''s always room for improvement. regards, Craig -- Craig Ambrose Web Elements http://www.portallus.com/people/craigambrose/
On Friday 10 June 2005 10:44 pm, Craig Ambrose wrote: I''d really like to see this too. I understand the goal that Rails be very lightweight and not burdend with lots of cruft that anyone might need. That''s a great goal, and one of the best ways to make this happen is to have a an easy to install component model. Ideally something that can be installed as a gem would be great, and then named in in particular ruby-file in your project and poof its there. One obvious example that would be a complete "security module" that would provide login screen, maintain user/password, and provide for password recovery. David
> One obvious example that would be a complete "security module" that would > provide login screen, maintain user/password, and provide for password > recovery....and access control for apps, one login might have different levels of access for the applications on the site. By having a central user management piece that apps could use there is only one password for all the apps. Zope does stuff like this well, maybe there are some ideas to borrow from them. Wayne
In article <200506111244.58398.craiga-aW5oDkNkUadaA94nB1n4cRCuuivNXqWP@public.gmane.org>, craiga- aW5oDkNkUadaA94nB1n4cRCuuivNXqWP-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org says...> It seems that although Rails promotes a huge amount of organisation and > modularisation within an individual rails project, and provides access to a > large amount of re-usable functionality in the rails libraries themselves, > promoting the sharing of modular code components between different rails is > not an area where rails excels any more than, say, PHP does.I''ve been mulling this over myself; it seems that *because* it''s so darn easy to put together a new app in rails, someone with an itch to scratch is more likely to code it himself than to join up with an existing app and help improve it. Likewise, there are very few team-based rails projects. I don''t know which is the cause, and which is the effect. Many Perl apps rely heavily on CPAN modules. gem is a huge improvement on cpan, yet there are relatively few abstractions of projects into gem modules. Is it just that Rails is more suited for "scratch an itch" development, and appeals to love-em-and-leave-em developers? Is it something missing in the design patterns? Or is it just a lack of critical mass to date? Alternatively, is it just that most Rails code tends to be so high-level that it''s already too domain-specific to componentize? What portions of, say, basecamp would we like to see as components? Food for thought. -- Jay Levitt | Wellesley, MA | I feel calm. I feel ready. I can only Faster: jay at jay dot fm | conclude that''s because I don''t have a http://www.jay.fm | full grasp of the situation. - Mark Adler
On 6/12/05, Jay Levitt <jay-news-WxwZQdyI2t0@public.gmane.org> wrote:> Alternatively, is it just that most Rails code tends to be so high-level > that it''s already too domain-specific to componentize? What portions > of, say, basecamp would we like to see as components?I think you''ve hit something there. Reuse of domain specific classes is generally not a good idea, you either end up with classes so generic that noone can use them, or classes with so much functionality that noone wants to. Take CreditCard. If you work at a bank, like I do, you know that there''s an awful lot of ''stuff'' that a credit card can do. You can attach warnings to it, issue additional cards, add PINs to it, determine which fees to charge. A CreditCard class in an issuer''s system is going to do all that kind of stuff. What about if you work for one of the schemes (MasterCard, VISA etc.)? Your classes will be focussed around routing transactions, taking your cut and handling funds auth requests. Both of these classes are *useless* to someone building an ecommerce site. All that they want to do is store the numbers & charge some money to it. This is a feature, not a bug. Two apps, doing different things have different requirements ;)> Food for thought.Indeed, OO is not about re-use, it''s about programming to the business domain rather than the ad-hoc functional requirements of the day. -- Cheers Koz
I''ve had thoughts about the same thing. I''ve started organizing my code, pulling all the "library" code into various helpers and mixins that live in /lib. I have a view helper that adds label tags to my form fields in a certain way that I like them, and a model helper that helps with the construction of complex SQL queries. Someday I''d like to move these to gems as I start using them in multiple projects.> Alternatively, is it just that most Rails code tends to be so high-level > that it''s already too domain-specific to componentize? What portions > of, say, basecamp would we like to see as components?Besides the obvious (the whole rails framework), I think one example is the acts_as_list. I have no clue if David wrote that for Basecamp/Tadalist, but judging by the revision log [1], it was mostly written by David. I also remember the early Ajax work [2, 3] and the new ActionMailer receiver feature [4] being implemented when Backpack was called Honey. There''s a lot of common functionality already extracted from their products. If nothing else, they are great examples of how other people should extract pieces from their code. It could be as simple as submitting a few patches to get the functionality you need, or writing gems. I''ve yet to see anyone offering major components, however. They were designed to share models/controllers/views among multiple projects, but I haven''t seen too many people using them. 1. http://dev.rubyonrails.com/log/trunk/activerecord/lib/active_record/acts/list.rb?rev=1237 2. http://dev.rubyonrails.com/file/trunk/actionpack/lib/action_view/helpers/javascript_helper.rb?rev=888 3. http://dev.rubyonrails.com/changeset/956 4. http://dev.rubyonrails.com/changeset/940 -- rick http://techno-weenie.net
On Jun 11, 2005, at 7:51 PM, Rick Olson wrote:> I''ve had thoughts about the same thing. I''ve started organizing my > code, pulling all the "library" code into various helpers and mixins > that live in /lib. I have a view helper that adds label tags to my > form fields in a certain way that I like them, and a model helper that > helps with the construction of complex SQL queries. Someday I''d like > to move these to gems as I start using them in multiple projects. > >> Alternatively, is it just that most Rails code tends to be so >> high-level >> that it''s already too domain-specific to componentize? What portions >> of, say, basecamp would we like to see as components? > > Besides the obvious (the whole rails framework), I think one example > is the acts_as_list. I have no clue if David wrote that for > Basecamp/Tadalist, but judging by the revision log [1], it was mostly > written by David. I also remember the early Ajax work [2, 3] and the > new ActionMailer receiver feature [4] being implemented when Backpack > was called Honey. There''s a lot of common functionality already > extracted from their products.Nothing to contribute other than a minor correction, but if I recall correctly (and the AR changelog is right) Tobias wrote acts as list. The commit logs all say david because until very recently David was the only person with full commit access. Acts as list was before Tada, the start of the Ajax helpers came with Tada. Rails itself was an extraction from Basecamp, and it tends to be that added features arise out of other applications. This is why the whole ball of wax has been able to pull together so quickly into a magnificently pleasant set of tools.> If nothing else, they are great examples of how other people should > extract pieces from their code. It could be as simple as submitting a > few patches to get the functionality you need, or writing gems. I''ve > yet to see anyone offering major components, however. They were > designed to share models/controllers/views among multiple projects, > but I haven''t seen too many people using them.Definitely. I wrote a handful of apps in my last job but the only thing I ever really abstracted was the user and authentication scheme, which I packaged as a generator. That was really the only thing in common, which clicks with koz''s earlier post about domain modeling (which I very much agree with). But it was handy to not have to rewrite it constantly (it did some Kerberos and LDAP jive with the university''s cracked out set up ... blech.) -Scott _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
> >> Alternatively, is it just that most Rails code tends to be so high- >> level >> that it''s already too domain-specific to componentize? What portions >> of, say, basecamp would we like to see as components? >> > > Besides the obvious (the whole rails framework), I think one example > is the acts_as_list. I have no clue if David wrote that for > Basecamp/Tadalist, but judging by the revision log [1], it was mostly > written by David. I also remember the early Ajax work [2, 3] and the > new ActionMailer receiver feature [4] being implemented when Backpack > was called Honey. There''s a lot of common functionality already > extracted from their products.Since the beginning of Rails until just recently, David has been the sole gatekeeper of new features. He has done a good job of sculpting a unified and (nearly) complete framework from many contributed parts. However, as we''ve seen from several posts on modularization and code re-use, ensuring that Rails continues to be a lightweight framework is sometimes at odds with the desire of developers to re- use common functionality in their specific domains. Like many of you, I''m starting to see many common application pieces that I develop "in house" that make sense according to the Rails way of doing things. For example: a javascript calendar (thanks to Jarkko for the Dynarch link [1]), 3-state buttons for a tab bar (I made a generator for this [2]), a collection_paginator (paginates an array of results when using offset and limit in the SQL won''t do), and a text search method for ActiveRecord [3]. I''m not sure where to draw the line on what should be included in the Rails base, but I sure would like to make these pieces easy to re-use--and that means both the creation of these pieces as well as the actual re-using of those pieces. (Writing the tab bar generator was a half-day project. I''m not sure that the sum of all of the times I re-use that pattern in the future will really save me 4 hours of work.) I wonder, given that we now have the components, api, lib, and vendor directories to work with, how can we a) make it easier to create re- usable modules, and b) make the interaction of modules that need to interact flexible? Duane Johnson (canadaduane) [1] http://www.dynarch.com/projects/calendar/ [2] http://wiki.rubyonrails.com/rails/show/AvailableGenerators [3] http://wiki.rubyonrails.com/rails/show/TextSearch
On Monday 13 June 2005 03:27, Duane Johnson wrote:> I wonder, given that we now have the components, api, lib, and vendor > directories to work with, how can we a) make it easier to create > re- usable modules, and b) make the interaction of modules that need > to interact flexible?a) more documentation on how to do it. It''s actually quite possible as I''ve recently found out with BoilerPlate. What appears to be missing, AFAICT, is a way to put partials in an arbitrary location -- e.g., somewhere in vendor/myextension/views. b) kind_of?, respond_to? -- check if functionality is provided by some other module. If it''s required and not available, raise a helpfully worded exception. Otherwise degrade gracefully. In the latter case it may be useful to log a message as it can be rather non-obvious how this kind of adaptive, self-configuring code behaves. Michael -- Michael Schuerig Life is just as deadly mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org As it looks http://www.schuerig.de/michael/ --Richard Thompson, Sibella
I''m glad to see I''m not the only one thinking about this stuff. :) I''d like to see a bit of action come out of this thread (which currently contains a lot of questions and nodding, but few answers). For an initial step, how about the formation of another mailing list, to be used only for mails along the lines of: - I have some functionality which I think is generally usefull, and you can download it here: - I found an interesting ruby/rails code snippet or component on the web here: - I have some functionality which I think is generally usefull and I have some questions about how best to bundle it for re-use - I''d like to talk about strategies for re-use across projects. it would definatelly not include: - Is there a component for X? - I want someone to make me a component for X? At worst, I would end up being a big shared blog full of usefull snippits of rails code (which may interest many people). At best, we might see common themes and help identify bits of functionality to be submitted to the rails core, or changes to the rails core to promote sharing. Or it might help lead to better documentation about how to share. If at least three people reply here or email me and let me know that they would like to participate in this, then I''m happy to organise the list. Craig -- Craig Ambrose Web Elements http://www.portallus.com/people/craigambrose/
On Tuesday 14 June 2005 02:21, Craig Ambrose wrote:> I''d like to see a bit of action come out of this thread (which > currently contains a lot of questions and nodding, but few answers). > For an initial step, how about the formation of another mailing list, > to be used only for mails along the lines of: > > - I have some functionality which I think is generally usefull, and > you can download it here: > - I found an interesting ruby/rails code snippet or component on the > web here: - I have some functionality which I think is generally > usefull and I have some questions about how best to bundle it for > re-use > - I''d like to talk about strategies for re-use across projects.[snip]> If at least three people reply here or email me and let me know that > they would like to participate in this, then I''m happy to organise > the list.Count me in. Michael -- Michael Schuerig All good people read good books mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org Now your conscience is clear http://www.schuerig.de/michael/ --Tanita Tikaram, Twist In My Sobriety
Count me in for sure. - B On Jun 13, 2005, at 9:21 PM, Craig Ambrose wrote:> > I''m glad to see I''m not the only one thinking about this stuff. :) > > I''d like to see a bit of action come out of this thread (which > currently > contains a lot of questions and nodding, but few answers). For an > initial > step, how about the formation of another mailing list, to be used only > for > mails along the lines of: > > - I have some functionality which I think is generally usefull, and > you can > download it here: > - I found an interesting ruby/rails code snippet or component on the > web here: > - I have some functionality which I think is generally usefull and I > have some > questions about how best to bundle it for re-use > - I''d like to talk about strategies for re-use across projects. > > it would definatelly not include: > > - Is there a component for X? > - I want someone to make me a component for X? > > At worst, I would end up being a big shared blog full of usefull > snippits of > rails code (which may interest many people). At best, we might see > common > themes and help identify bits of functionality to be submitted to the > rails > core, or changes to the rails core to promote sharing. Or it might > help lead > to better documentation about how to share. > > If at least three people reply here or email me and let me know that > they > would like to participate in this, then I''m happy to organise the list. > > Craig > > -- > Craig Ambrose > Web Elements > http://www.portallus.com/people/craigambrose/ > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Craig Ambrose wrote:> I''m glad to see I''m not the only one thinking about this stuff. :) > > I''d like to see a bit of action come out of this thread (which currently > contains a lot of questions and nodding, but few answers). For an initial > step, how about the formation of another mailing list, to be used only for > mails along the lines of: > > - I have some functionality which I think is generally usefull, and you can > download it here: > - I found an interesting ruby/rails code snippet or component on the web here: > - I have some functionality which I think is generally usefull and I have some > questions about how best to bundle it for re-use > - I''d like to talk about strategies for re-use across projects.Craig, it''s great that you are thinking about this and are trying to define an effective process for handling it, but I don''t support your idea of taking it off the main list. Please stay in view! regards Justin
That''s a very valid point Justin. I''m just concerned that amidst such a high volume list, people wont bother to post little things that they have coded, or small ideas. The conversation here feels like waves rapidly crashing on a beach. Each one is interesting, but within a couple of days at the most, old threads are long since forgotten. :) I think that it''s important to nurture sub-groups with a particular philosophy. That way, a consistant theme can develop and you can build towards something, rather than feeling like each thread just tackles an unconnected issue. How would you feel if the main list received a weekly update containing information on the ''code re-use'' list? Would that help this area stay in view while also giving it a bit of space to grow? Craig On Tue, 14 Jun 2005 11:14 am, Justin Forder wrote:> Craig, it''s great that you are thinking about this and are trying to > define an effective process for handling it, but I don''t support your > idea of taking it off the main list. Please stay in view! > > regards > > Justin-- Craig Ambrose Web Elements http://www.portallus.com/people/craigambrose/
In article <42AE2F5B.60505-zSfPWr5aQuznITO/+xaoB7VCufUGDwFn@public.gmane.org>, justin-zSfPWr5aQuznITO/ +xaoB7VCufUGDwFn-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org says...> Craig, it''s great that you are thinking about this and are trying to > define an effective process for handling it, but I don''t support your > idea of taking it off the main list. Please stay in view!Ditto.. -- Jay Levitt | Wellesley, MA | I feel calm. I feel ready. I can only Faster: jay at jay dot fm | conclude that''s because I don''t have a http://www.jay.fm | full grasp of the situation. - Mark Adler
On 6/13/05, Craig Ambrose <craiga-aW5oDkNkUadaA94nB1n4cRCuuivNXqWP@public.gmane.org> wrote:> > That''s a very valid point Justin. I''m just concerned that amidst such a high > volume list, people wont bother to post little things that they have coded, > or small ideas. The conversation here feels like waves rapidly crashing on a > beach. Each one is interesting, but within a couple of days at the most, old > threads are long since forgotten. :) > > I think that it''s important to nurture sub-groups with a particular > philosophy. That way, a consistant theme can develop and you can build > towards something, rather than feeling like each thread just tackles an > unconnected issue. > > How would you feel if the main list received a weekly update containing > information on the ''code re-use'' list? Would that help this area stay in view > while also giving it a bit of space to grow?Why not start the discussion here, but post the code and/or strategies to a wiki?> Craig > > On Tue, 14 Jun 2005 11:14 am, Justin Forder wrote: > > Craig, it''s great that you are thinking about this and are trying to > > define an effective process for handling it, but I don''t support your > > idea of taking it off the main list. Please stay in view! > > > > regards > > > > Justin > > -- > Craig Ambrose > Web Elements > http://www.portallus.com/people/craigambrose/ > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Bill Guindon (aka aGorilla)
Craig Ambrose wrote:> That''s a very valid point Justin. I''m just concerned that amidst such a high > volume list, people wont bother to post little things that they have coded, > or small ideas. The conversation here feels like waves rapidly crashing on a > beach. Each one is interesting, but within a couple of days at the most, old > threads are long since forgotten. :) > > I think that it''s important to nurture sub-groups with a particular > philosophy. That way, a consistant theme can develop and you can build > towards something, rather than feeling like each thread just tackles an > unconnected issue. > > How would you feel if the main list received a weekly update containing > information on the ''code re-use'' list? Would that help this area stay in view > while also giving it a bit of space to grow? > > CraigCraig - I agree that the volume on the list is a problem (I fell about 1500 messages behind, recently, and only caught up a couple of days ago) but it shouldn''t inhibit people from posting small things. The reverse is true - people shouldn''t feel inhibited from posting small things when the bulk of traffic is about other small things. It''s true that these small postings may be buried in the noise, but they would be even less visible if they were posted on a totally separate list. Why not propose a convention for flagging them, in the subject line, like [ANN]? Or you could just maintain a single main thread, and spin off into other threads when appropriate. regards Justin (PS - I must go to sleep soon - it''s nearly 3am here in the UK!)> > On Tue, 14 Jun 2005 11:14 am, Justin Forder wrote: > >>Craig, it''s great that you are thinking about this and are trying to >>define an effective process for handling it, but I don''t support your >>idea of taking it off the main list. Please stay in view!
On Jun 13, 2005, at 6:14 PM, Justin Forder wrote:> Craig Ambrose wrote: > > >> I''m glad to see I''m not the only one thinking about this stuff. :) >> I''d like to see a bit of action come out of this thread (which >> currently contains a lot of questions and nodding, but few >> answers). For an initial step, how about the formation of another >> mailing list, to be used only for mails along the lines of: >> - I have some functionality which I think is generally usefull, >> and you can download it here: >> - I found an interesting ruby/rails code snippet or component on >> the web here: >> - I have some functionality which I think is generally usefull and >> I have some questions about how best to bundle it for re-use >> - I''d like to talk about strategies for re-use across projects. >> > > Craig, it''s great that you are thinking about this and are trying > to define an effective process for handling it, but I don''t support > your idea of taking it off the main list. Please stay in view! > > regards > > Justin > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Yes I applaud the ideas but I would like to see it stay on the rails list. I already have my hands full reading ruby-talk and the rails list everyday. Plus I would think that the rails mailing list would be the perfect place to talk about these things. -Ezra Zygmuntowicz WebMaster Yakima Herald-Republic Newspaper ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org 509-577-7732
Hi folks, In the thread "Code Re-use across rails projects" we were discussing a place to post code snippets, links to re-useable components and questions about re-use. It''s been proposed by several people now that rather than take this to another list, we use this list, but with a subject prefix. So, I''m suggesting the prefix [REUSE]. Look out for (or use) this prefix for posts about: - Snippets of code, or links to larger bodies of code, which other rails developers might find usefull. - Notification of re-useable components (be they generators, components, helpers, or whatever) which other railers can download and use. - Discussion on how to best bundle for re-use code which you have written (or plan to write). Please feel free to post even small code ideas, or thoughts on the subject. If anyone finds volume to be too high, then we can always re-think the idea of using the main list, or people can simply filter based on this prefix. Obviously the goal is to end up with re-useable components listed on the wiki, and methods of re-use documented, and I am willing to help out with this (to some degree) if necessary. thanks for your time, Craig -- Craig Ambrose Web Elements http://www.portallus.com/people/craigambrose/
On Jun 13, 2005, at 9:11 PM, Craig Ambrose wrote:> > Hi folks, > > In the thread "Code Re-use across rails projects" we were > discussing a place > to post code snippets, links to re-useable components and questions > about > re-use. > > It''s been proposed by several people now that rather than take this > to another > list, we use this list, but with a subject prefix. So, I''m > suggesting the > prefix [REUSE]. Look out for (or use) this prefix for posts about: > > - Snippets of code, or links to larger bodies of code, which other > rails > developers might find usefull. > - Notification of re-useable components (be they generators, > components, > helpers, or whatever) which other railers can download and use. > - Discussion on how to best bundle for re-use code which you have > written (or > plan to write). >Craig, this is fantastic! Thank-you for the suggestion, and for keeping this on the list. I have a filter which will now take "[REUSE]" messages out and put them in their own little folder. I''ll be one of the listeners (and hopefully, a contributor) on that "sub- list". Duane Johnson (canadaduane) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Bill Guindon <agorilla-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:> Why not start the discussion here, but post the code and/or strategies > to a wiki?My first thought when I saw the note about the [REUSE] tag and pasting code samples was, "I hope somebody will rip all that stuff and put it into a repository somewhere". I''ve been somewhat vocal about the fact this list is not widely indexed or archived. The emacswiki.org has a nice system for integrating code samples and their wiki. Seems like this type of work should be done on the wiki. -- doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org
On 6/14/05, Doug Alcorn <doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org> wrote:> Bill Guindon <agorilla-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > > Why not start the discussion here, but post the code and/or strategies > > to a wiki? > > My first thought when I saw the note about the [REUSE] tag and pasting > code samples was, "I hope somebody will rip all that stuff and put it > into a repository somewhere". I''ve been somewhat vocal about the fact > this list is not widely indexed or archived. The emacswiki.org has a > nice system for integrating code samples and their wiki. Seems like > this type of work should be done on the wiki.http://textsnippets.com/ it : - is designed to hold code - organised by tags ala del.icio.us - allows comments - provides rss feeds - runs on ROR :) Jean
On 6/11/05, Jay Levitt <jay-news-WxwZQdyI2t0@public.gmane.org> wrote:> In article <200506111244.58398.craiga-aW5oDkNkUadaA94nB1n4cRCuuivNXqWP@public.gmane.org>, craiga- > aW5oDkNkUadaA94nB1n4cRCuuivNXqWP-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org says... > > It seems that although Rails promotes a huge amount of organisation and > > modularisation within an individual rails project, and provides access to a > > large amount of re-usable functionality in the rails libraries themselves, > > promoting the sharing of modular code components between different rails is > > not an area where rails excels any more than, say, PHP does. > > I''ve been mulling this over myself; it seems that *because* it''s so darn > easy to put together a new app in rails, someone with an itch to scratch > is more likely to code it himself than to join up with an existing app > and help improve it. Likewise, there are very few team-based rails > projects. I don''t know which is the cause, and which is the effect. > > Many Perl apps rely heavily on CPAN modules. gem is a huge improvement > on cpan, yet there are relatively few abstractions of projects into gem > modules. > > Is it just that Rails is more suited for "scratch an itch" development, > and appeals to love-em-and-leave-em developers? Is it something missing > in the design patterns? Or is it just a lack of critical mass to date? > > Alternatively, is it just that most Rails code tends to be so high-level > that it''s already too domain-specific to componentize? What portions > of, say, basecamp would we like to see as components? > > Food for thought. >I think this is hitting on the edge of a great idea...right now (as near as i can tell) it would be fairly impossible to install a component as a gem since components have to reside (or appear to reside) in each application''s component folder. What about creating a tool, that allows you to install components as gems, and then copy (or link of the platform provides it) the component into each application that you wish to use it in. This would allow a single repository, easy installation, and still use the existing functionality.> -- > Jay Levitt | > Wellesley, MA | I feel calm. I feel ready. I can only > Faster: jay at jay dot fm | conclude that''s because I don''t have a > http://www.jay.fm | full grasp of the situation. - Mark Adler > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- ===Tanner Burson==tanner.burson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://tannerburson.com <---Might even work one day...
> I think this is hitting on the edge of a great idea...right now (as > near as i can tell) it would be fairly impossible to install a > component as a gem since components have to reside (or appear to > reside) in each application''s component folder. What about creating a > tool, that allows you to install components as gems, and then copy (or > link of the platform provides it) the component into each application > that you wish to use it in. This would allow a single repository, > easy installation, and still use the existing functionality.That''s basically how it works now. You do ''gem install whatever'', then ''./script/generate whatever'' to install in your rails directory. See http://wiki.rubyonrails.org/rails/show/AvailableGenerators for examples. (To be fair, I asked almost the exact question about a week ago, and was given almost this exact response.)
On 6/14/05, Jean Helou <jean.helou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 6/14/05, Doug Alcorn <doug-jGAhs73c5XxeoWH0uzbU5w@public.gmane.org> wrote: > > Bill Guindon <agorilla-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > > > > > Why not start the discussion here, but post the code and/or strategies > > > to a wiki? > > > > My first thought when I saw the note about the [REUSE] tag and pasting > > code samples was, "I hope somebody will rip all that stuff and put it > > into a repository somewhere". I''ve been somewhat vocal about the fact > > this list is not widely indexed or archived. The emacswiki.org has a > > nice system for integrating code samples and their wiki. Seems like > > this type of work should be done on the wiki. > > http://textsnippets.com/ > > it : > - is designed to hold code > - organised by tags ala del.icio.us > - allows comments > - provides rss feeds > - runs on ROR :) > > JeanSnippets were suggested in another thread as well. There are shortcomings to snippets as well: - Not easily editable (except by the original author?) - Optimized for short code - Not Hierarchical. Tags are great, but not always the best way to find things. I''m not opposed to using a snippets site, but I tend to prefer a Wiki based solution. The ideal solution would probably be a hybrid of the two (Snippets format, but easily editable by logged in users).
>> http://textsnippets.com/ >> >> it : >> - is designed to hold code >> - organised by tags ala del.icio.us >> - allows comments >> - provides rss feeds >> - runs on ROR :) >> >> Jean >>I just found out about this site also: http://www.bigbold.com/snippets/ Several people on the site have posted to that snippet site, so it looks like they''ve got a bigger collection. Duane Johnson (canadaduane)