Good documentation for writing Redmine plugins
Asked Answered
T

3

18

I am currently developing some plugins for Redmine, and I must say, I'm a bit disappointed with the lack of documentation available on this subject.

Normally, If I am looking for explanations on classes/methods, I need to spend a consistent amount of time browsing trough the core classes, and striving to understand the code written there (It seems that some people forgot to document their code, unfortunately).

I've checked their forums http://www.redmine.org/projects/redmine/boards, and it seems to take forever in order for a question to be answered.

That's why I would like some advice regarding some good API documentation/books/forums on this subject.

Torritorricelli answered 18/7, 2011 at 17:47 Comment(2)
The IRC channel #redmine at freenode.net may be more useful for quicker turn-around in answers.Florie
If my answer helps out please accept as answer for your question.Florie
H
9

the better documentation is the codesource. One the Redmine's mainteners have almost all Redmine's plugin on github.

you can choose any plugin and see what is looks like. mostly it's about metaprogramming and alias_method_in_chain usage

Howling answered 18/7, 2011 at 18:0 Comment(4)
This may not seem like the answer, but save yourself a lot of headache and believe us that it is. The plugins are actually not that hard to write. Go off of what's already written and you should be able to find out how to do most things.Updraft
yes, I also can't find a good 'text' documentation howto write plugin for Redmine. can you please let me know if you can find it?Howling
I'm considering writing a couple of tutorials to help other people get started faster than I did, once I acquire more experience. I will probably post the link here, if I succeed. Thanks for the answersTorritorricelli
@RailsRider Please see my answer for a new book on Redmine Plugin DevelopmentFlorie
F
14

I know this maybe too-late for the original question poster but might help someone else in a similar situation. Below links are for a total newbie (like me) to RubyOnRails but someone who's programmed before. You can pick and choose the relevant ones as per your skill level.

Understanding Redmine (functionality):
If you're not familiar with Redmine or administering other Issue Tracking Software Mastering Redmine book is an ok place to start. It's not very densely packed so it'll help only as a structured organization of information. If you want more dense information go through the documentation instead.

Understanding Redmine Plugins:
"Redmine Plugin Extension and Development" by Alex Bevilacqua has just been released (March 2014). It's available both in print and ebook formats from packtpub.

I'm going through the book myself as I need to customize/rewrite a plugin for Redmine. I'm new to Rails/Ruby/Redmine myself. Though I'm from Unix/C++ background still getting to know the ropes of Ruby, Rails, Redmine via following books.

Understanding Rails:
I found the book Agile Web Development with Rails to be a good enough intro to Rails for programmers from other languages.
Note: Target audience seems to be Rails developers but it should be possible to get through that learning curve by browsing github redmine plugin repositories.

Understanding Ruby:
Programming Ruby (the PickAxe Book)

Understanding Ruby Metaprogramming idioms (used in Rails):
On the surface Ruby looks like most scripting languages it is the use of MetaProgramming and Dynamic nature of Ruby Object Model that allows making complex internal gymnastics invisible to newbies.

A single line of Rails code contains enough such tricks to fill a small book.
Fortunately such a book has already been written - Ruby MetaProgramming book in Pragmatic Programmers series. It's superb to come to grips with this Mixin based Dynamic MetaProgramming. Rails and Redmine use plenty of these tricks as hooks etc to get the work done.

Excellent Video on Ruby Object Model by Dave Thomas
Video on Ruby Object Model and Meta Programming

Florie answered 21/3, 2014 at 13:40 Comment(0)
H
9

the better documentation is the codesource. One the Redmine's mainteners have almost all Redmine's plugin on github.

you can choose any plugin and see what is looks like. mostly it's about metaprogramming and alias_method_in_chain usage

Howling answered 18/7, 2011 at 18:0 Comment(4)
This may not seem like the answer, but save yourself a lot of headache and believe us that it is. The plugins are actually not that hard to write. Go off of what's already written and you should be able to find out how to do most things.Updraft
yes, I also can't find a good 'text' documentation howto write plugin for Redmine. can you please let me know if you can find it?Howling
I'm considering writing a couple of tutorials to help other people get started faster than I did, once I acquire more experience. I will probably post the link here, if I succeed. Thanks for the answersTorritorricelli
@RailsRider Please see my answer for a new book on Redmine Plugin DevelopmentFlorie
M
6

As stated on the redmine wiki page about plugin hooks:

There is a list of valid hooks. But the best way to find them is to just have a look into the code to find the place you would like to extend and search for a call to a hook nearby.

It seems browsing through the core classes as well as looking at other plugins is the way to go.

I assume you already found all the documentation on the wiki related to plugins:

As to the reactivity on the forum, you may try asking a question on the forum of chiliproject, the recent fork of redmine. Not sure though how much of it has already changed.

Manon answered 18/7, 2011 at 19:40 Comment(1)
Redmine and ChiliProject 1.x are pretty close, we tried to keep compatability as much as possible. ChiliProject 2.x has some major changes especially around Journals (issue notes). Older code should still work but it will need to be tested and ported. About 50% of my plugins worked with no changes, 40% worked with a Gemfile for bundler, and the rest need some updates.Saveall

© 2022 - 2024 — McMap. All rights reserved.