Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [babel-dev] Help on PHP to load a plugin system

I see two ways of doing it, though, and that's where my PHP skills fall short:
either we move all the eclipse specific code in a particular folder, and we load its functions at runtime, or we keep the current code, and we give the ability of people to override.

In case 1, we'd have:
ext/
  eclipse/
    functions_for_authentication.php
  intalio/
    functions_for_authentication.php

In case 2, the function for authentication is by default the one from eclipse, and we load a file that may contain an override_function call: http://www.phptutorial.info/?override-function
I feel case 2 is going to be quirky and buggy.
Case 1 demands more refactoring, but less work for people to come, copy and customize the files for their own needs.

What do you prefer ?

Thanks,

Antoine


On Tue, Dec 16, 2008 at 3:31 PM, Denis Roy <denis.roy@xxxxxxxxxxx> wrote:
+1

The plugin mechanism is usually how it's done.  Now is likely the best time to do it while the codebase is still small.

Denis



Antoine Toulme wrote:
So, as discussed on last week call, I have a vested interest on making Babel consumable by other organizations than Eclipse.

Ideally, I'd like to be able to check out the Babel code and complement it with more files that would be placed in a specific folder.
Those files would contain function definitions that would override some specific function definitions in the Babel code.

Is this a realistic use case ? Denis, Gabe, did you have to face before a situation where you had to plug code like this ?

What would you think of such an architecture ?

Thanks,


_______________________________________________ babel-dev mailing list babel-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/babel-dev

_______________________________________________
babel-dev mailing list
babel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/babel-dev




--
http://www.lunar-ocean.com/blog


Back to the top