Modifying Functionality without Modifying Existing Modules

avatar Prattski Apr 22. 2011. 5:09 am
I am just starting to get into ActiveCollab development, and am finding an extreme lack of developer documentation. Is it possible to modify existing AC functionality without having to touch any of the existing modules? Most of the examples I have seen have you just modifying what is already there. I would much rather create a module that overrides functionality, but I can't yet figure out how to accomplish that.

For instance: I would like to modify how emails are sent out (changing the from name so that it is from whoever sent the discussion/comment/etc.). This post shows you how to do it by modifying the system module. But, can this be accomplished by creating a new module?

If editing modules is the only way, how does modifying the core set of modules effect upgrades?

Any guidance/examples/etc. would be greatly appreciated!
avatar Ilija Studen Staff Apr 22. 2011. 1:04 pm
Hello,

Modules are designed mainly to extend activeCollab's functionality. They are great for adding things, and sometimes you can use them to override existing behavior (hijack the route and implement your own handler, insert JavaScript code that modifies the page when it's loaded etc).

Internal systems on the other hand can't be reconfigured via modules. There are exceptions (like Authentication and Caching), but mailing is not one of them, sorry. To change how mailing works, you'll need to tweak the core files (not recommended).

Prattski:
If editing modules is the only way, how does modifying the core set of modules effect upgrades?


Modifications to core files don't "survive" upgrade, since upgrade requires that you upload new versions of files. Modifications than need to be reapplied and tested whether they wrok with the new version or not.

Reason why we don't recommend core file modifications is because they make you hesitant to upgrade to the latest releases, so you can miss out on some new features, but mainly on bug and security fixes.
avatar Prattski Apr 22. 2011. 2:34 pm
Ilija,

Thanks for the response. It's a bummer that the core set of functionality cannot be modified without editing the existing modules. The main piece of software I work with most these days is Magento, which is fully modular, and pretty much anything can be overridden by another module, which is awesome and extremely flexible.

Do you anticipate more flexibility in this area with ActiveCollab 3?

I guess we'll just have to make edits to the AC modules and write down all the changes we make in detail so that they can be re-applied with any upgrades...
avatar Ilija Studen Staff Apr 22. 2011. 3:04 pm
Prattski:
It's a bummer that the core set of functionality cannot be modified without editing the existing modules. The main piece of software I work with most these days is Magento, which is fully modular, and pretty much anything can be overridden by another module, which is awesome and extremely flexible.


We do not plan to go that far. There's the line where official support for customizations end. You are free to cross it, of course, but you should be aware that there are certain strings attached to that decision (trickier upgrade process, risk of getting carried away with customizations etc). Even though we do not recommend that approach, if you do decide to go that way, use version control :)

Prattski:
Do you anticipate more flexibility in this area with ActiveCollab 3?


Not really. Outgoing mailing system will not be something that you can tweak and tune with third party modules in activeCollab 3. Good news is that we did a lot of work on this front so no customization will be required for vast majority of activeCollab users.

As already mentioned, we do not plan to go as far as Magento and WordPress have gone. activeCollab is an end user product, not a platform (big difference), so it needs a rock solid set of base features that we can extend and support. Mailing itself is tricky enough and produces quite a bit of support already. Adding another variable to the mix (support for customization and extension of the mailing system) could result in an absolute nightmare that would outweigh any benefits of such support.
avatar Prattski Apr 22. 2011. 3:35 pm
Ilija,

Thanks again for the reply. We have AC in version control already, and like I mentioned, we'll just be documenting any changes that are made.

You are right about the solution vs. platform. Magento is very much a platform, or actually much like a framework.

I wish you wouldn't have moved this topic to General, Licensing, and Pre-Sale Questions though... I was scouring the web and the Extending / Tweaking activeCollab forums last night hoping to find a post like this. I wouldn't have checked this form as it pertains to development...
avatar Ilija Studen Staff Apr 22. 2011. 3:51 pm
Hello,

This feels more of a general discussion, since it's discussing how we make decisions what to allow for customization, not specifics on how to extend or tweak the system.

PS: We'll probably write an article on this and add it to our developers guide and FAQ section so it's easier to find.
avatar Prattski Apr 22. 2011. 3:59 pm
I would highly suggest that! Honestly, there is so little information for developers that it is frustrating. Knowing the possibilities (and limitations) would be extremely helpful. Plus, setting those expectations can, I assume, reduce the amount of frustration developers may encounter trying to figure this stuff out.
avatar Ilija Studen Staff Apr 22. 2011. 4:13 pm
Will do. Thank you for the feedback :)

We're here to help if you need anything else.
avatar Guy C. Dev Apr 29. 2011. 3:56 am
Prattski - I just wanted to note that I setup a wiki at http://www.acdeveloper.com that provides some documentation and examples on module development, etc. Feel free to read / join the Wiki and add content / updates as well.

Guy Cortesi
eSolve Solutions, Inc.
http://www.esolvesolutions.com
www.esolvesolutions.com

Try activeCollab free for 30 days, No credit card required!

Instant access to activeCollab, no installation needed.

.tryactivecollab.com

If you are already a user of activeCollab, you can log in here.