I'm just wondering if anyone has devised a scheme for standardizing plug-ins for standard and third-party modules. I'm asking because I have found a number of occasions when a standard module or a third-party module does 99% of what I need and with just a few dozen lines of code, I can add the functionality that it's missing. But by adding the code straight to the module, I'm changing the module itself, which makes it hard to upgrade and somewhat cumbersome to share.
I'm currently working on a project that revolves around one fairly large and robust module that I wrote in anticipation of the Cafe Press affiliate program that should be launching within the next few months. To it, I would like to add a whole bunch of functionality down the road, but I'd like to keep it modular, in that the module itself performs its core functions and then plug-ins are used to extend its functionality as desired by the user. I can certainly create my own scheme for the deployment of these plug-ins, but I figured I'd ask if anyone out there has anything they've already cooked up or anything that's on the road to becoming Standard Operating Procedure.
If something exists, great. If not, is anyone else interested in some sort of a routine that would allow for easy integration of plug-ins inside of modules? If some of you are interested, what are your thoughts on how it should be structured? All I know for sure is that I don't want to write 2 dozen "helper" modules with their own admin interfaces, each with 2 or 3 settings. I want to do something that will add the administrative functions of the plug-ins to the admin interface of the core module. That's my only really big requirement. I'm open to suggestions on everything else.
- Ed
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Plug-ins for modules.
-
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
-
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
Personally I prefer the helper module approach as it makes a whole lot of things easier. The code is more managable, the code is easier to debug, the code is testable in isoloation. Breaking the module down has advantages for code re-usability. So if the utilitiy side of the module could be useful for other projects then I would recommend making that a module.
This is a generalisation of course and no one solution will fit all which is why you'll only ever get peoples opinions rather than any concrete recommendations. Give two coders the same problem and you'll get two different solutions.....
As I say personally I don't like really large modules as I can almost always see somethingthat could be useful in another module and thus would be best as a useful, stand-alone utility module.
-Mark
--
Visit My homepage and Zikula themes. -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 97
Thanks Mark. That's the direction I was going with it, but the problem I'm coming up with is that in this particular application, I'm looking at potentially dozens of these helper modules and any one user might find 7 or 8 of them helpful. If each has its own admin UI, that's a whole lot of clicking around to set things up. And most of these modules won't have a great deal of value without the core module. So, here's what I'm thinking now. If someone could tell me if I'm way off base, I'd appreciate it. I get lost easilly and I could dig into this for a month tearing out what little hair I have left.
I'm thinking of writing each of these plug-ins as a helper module sans admin interface. Having just recently started exploring the wonder of hooks, I'm thinking it should be possible to use them to integrate the administrative options for the helper modules into the admin area of the main module, at least for those modules that don't have a whole lot of stand-alone value (such as alternative shopping carts for a Cafe Press custom store module). Those few modules that do have stand-alone value (e-card module, reciprocal links, etc.), I'll give their own admin UI because they might be useful independent of the core module of the project.
Am I headed in a sensible direction or am I going to end up just beating my head against a wall here?
Thanks in advance,
Ed
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
