开发者

Good documentation for writing Redmine plugins

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 orde开发者_如何学Cr for a question to be answered.

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


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


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


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:

  • The plugin tutorial
  • The plugin internals page
  • The above mentioned page explaining hooks
  • And finally, the list of the currently available hooks (rake redmine:plugins:hook_list in order to get the latest list of the installed redmine version)

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜