Project

General

Profile

Write a plugin in php

Added by Guillaume Marescaux over 11 years ago

Hi,

I have to write a redmine plugin for my job but my boss want it in php. Is it possible or it's necessarily in ruby ?

Thanks,
Guillaume


Replies (6)

RE: Write a plugin in php - Added by Derric Atzrott over 11 years ago

As far as I know they must be developed in Ruby.

I'm sure you could come up with some sort of bridging mechanism, but honestly, it probably isn't worth the work to do so.

Thank you,
Derric Atzrott
Computer Specialist
Alizee Pathology

RE: Write a plugin in php - Added by William Roush over 11 years ago

I'm sure you could come up with some sort of bridging mechanism, but honestly, it probably isn't worth the work to do so.

I agree with this. Your boss needs to reevaluate why he wants it in PHP when the rest of the architecture is in Ruby.

What are you looking to do? If you're doing something that is read-only (reporting or some such), and it doesn't depend on Redmine's auth mechanisms (though they're easy to do in PHP too), you could get by with direct database access.

I highly recommend against this simply because now you need someone that understands Ruby AND PHP (being as anything you do in PHP you'll need to understand how and why Redmine does it) and is more susceptible to lead to fragmentation issues later as Redmine evolves.

RE: Write a plugin in php - Added by Guillaume Marescaux over 11 years ago

Your boss needs to reevaluate why he wants it in PHP when the rest of the architecture is in Ruby.

My boss wants the plugin in php because in my firm nobody understands Ruby.

What are you looking to do? If you're doing something that is read-only (reporting or some such), and it doesn't depend on Redmine's auth mechanisms (though they're easy to do in PHP too), you could get by with direct database access.

I have to do reporting but i need the permission mechanisms because everybody could use the plugin but only see reporting for his own project.

RE: Write a plugin in php - Added by William Roush over 11 years ago

Guillaume Marescaux wrote:

My boss wants the plugin in php because in my firm nobody understands Ruby.

How does your boss expect you to understand the internal mechanics of Redmine without referring to the Ruby code? The internal docs to Redmine's operations are pretty weak if even existent. Implementing things like side-by-side auth (required being as there is no way Ruby is "handing off" to PHP without you writing that part) requires you to refer to the code.

It would be easier to just learn the tiny bit of Ruby (Redmine/Rails will basically hold your hand though the plugin configuration process) needed to execute SQL, create reports and call it a day, and the likelihood of it breaking during an upgrade is minimal.

I have to do reporting but i need the permission mechanisms because everybody could use the plugin but only see reporting for his own project.

You could squeak by with PHP on that one, but will have to re-implement authentication and reverse engineer it's permissions systems and re-implement those too. It'll be a lot of additional effort and maintenance.

RE: Write a plugin in php - Added by Etienne Massip over 11 years ago

Guillaume Marescaux wrote:

I have to do reporting but i need the permission mechanisms because everybody could use the plugin but only see reporting for his own project.

Best is to make use of Redmine REST possibilities in your PHP code or even, if you really need it, directly query the DB, because writing a plugin requires minimal Ruby skills.

RE: Write a plugin in php - Added by Guillaume Marescaux over 11 years ago

Ruby is not a problem for me but like i am a probationer, when i would leave nobody could do the maintenance.

Well i will tell this to my boss thank you for your help.

    (1-6/6)