Hey DAZ -- I've been enjoying writing plugins and have some of the same questions. Here's my experience:
> * Are there any good instructions anywhere on how to write a plugin? Best way I learned was by reading how modules are included into other modules and classes. That's the key point. After that, I read other people's plugins that I was using in my own project. Lots of different ways to write plugins but there are similarities. Almost all the Rails books I have have a section about writing plugins but I haven't read them. Ryan Bates has a Railscast about writing plugins, but again I learned from reading existing plugins (the popular ones, like Rick O's). > * Like I mentioned before, if I have a vanilla version of the plugin > and a site that uses this plugin and I improve part of the plugin on > the site, can I merge these changes into the plain vanilla version of > the plugin and then pass these changes around to any other sites that > use the plugin? This is where git or svn is crucial. I'm guessing that the best way to develop a plugin is to keep the master on github (what a great service!) and then develop on your local machine, deploying to your site, testing and then pushing your changes back to the master plugin. When you want to make improvements, you can branch the master and clone that branch to your development project where you want to make your improvements. When you're satisfied with your improvements, you can merge the branch back into the master plugin on github or keep it as a separate branch (maybe your improvements are too specific to include in the master). > * Once you have made a plugin, can you improve it and easily update > sites that are using the plugin? Once you merge the completed, improved branch back into the master, you can then pull from the master into the other sites. Someone please correct me and fill in where I'm just waving my arms in the air. ;) An aside: I highly recommend writing tests or specs first and then coding to make the tests/specs pass. I haven't been able to write tests for my app but I've been writing tests for my plugins and wow, am I'm really happy. But for some reason, I've been dragging my feet when it comes to writing tests for my app. :( Kevin DAZ wrote: > Looks like when I've finished it then, I'll have to learn how to write > a plugin.... > > A few questions about that, if anybody knows: > * Are there any good instructions anywhere on how to write a plugin? > * Like I mentioned before, if I have a vanilla version of the plugin > and a site that uses this plugin and I improve part of the plugin on > the site, can I merge these changes into the plain vanilla version of > the plugin and then pass these changes around to any other sites that > use the plugin? > * Once you have made a plugin, can you improve it and easily update > sites that are using the plugin? > > thanks for all the help on this, > > DAZ > > On Jun 3, 11:24 pm, Morten Bagai <[EMAIL PROTECTED]> wrote: >> Hi, >> >> From what you described it sounds like a plugin is the appropriate >> strategy. >> >> /Morten >> >> On Jun 2, 2008, at 5:53 AM, DAZ wrote: >> >> >> >>> Thanks Scott, I was thinking of getting the stuff from Peepcode, but >>> just wanted to check first if what I was describing was even possible >>> with git. Or is it worth learning anywya? >>> thanks again, >>> DAZ >>> On Jun 2, 1:21 pm, Scott Gardner <[EMAIL PROTECTED]> wrote: >>>> Hi DAZ, checkout peepcode.com's Git screencasts and PDFs. You will >>>> gain a solid understanding of Git from them. Good luck >>>> On Jun 1, 11:39 am, DAZ <[EMAIL PROTECTED]> wrote: >>>>> Hi, >>>>> I have almost built a sort of mini content management system that >>>>> has >>>>> a basic user login and allows you to create pages. I'd like to use >>>>> this as the basis for starting some projects. >>>>> What I was wondering was if I set up 2 sites - site A and site B - >>>>> using the barebones miniCMS files and then built upon this for each >>>>> site, adding new models, styles and views. >>>>> Say that I then really improved the User model in site A. Is there a >>>>> way of somehow getting these changes into site B AND the core files. >>>>> It sounds like Git can do this by mergin, but I just don't know >>>>> enough >>>>> about Git at all. >>>>> If this is possible, could anybody point me to any good tutorials on >>>>> using Git - specifically how to do what I described? >>>>> ...or should I just make the original files a plugin or generator? >>>>> Thanks, >>>>> DAZ > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/heroku?hl=en -~----------~----~----~----~------~----~------~--~---