1
Mamba
Reusing of Code/Feature between modules
  • 2012/4/4 7:55

  • Mamba

  • Moderator

  • Posts: 11412

  • Since: 2004/4/23


In the last few months, as I was working on converting modules to the new Admin GUI, I was surprised how many different ways people used to solve similar problem, instead of just reusing somebody's else code.

So in several modules now I've implemented a method to change "status" of something by clicking on the icon in the table (e.g. to make it visible or not). I found the method in one of Trabis' modules. There is also a way to do it in the Core and I'll have to look into this to see if it is better.

The key is to find a cool method, document it, and then reuse it within our XOOPS community. And if we find something better, communicate it, so we all can improve it in our modules.

I documented it in this little paper. This is just a "quick & dirty" way to show what could be done, and hopefully start a way for our community to share cool ideas for reusable code.

Please provide a feedback about this method, as well as the paper itself.

What other cool "patterns" or "best practices" do you see in XOOPS Modules? Or somewhere else, that we should implement in XOOPS?

I still hope that we'll finally have a Documentation Team that could take those kind of things and set them up on our Documentation Wiki. There is a lot of work to be done to clean up our Wiki and make it more user-friendly. Any volunteers?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

2
redheadedrod
Re: Reusing of Code/Feature between modules

Yes this is the same thing I saw a long time ago. This is a huge reason why we need to document the best way to do things and to build a module framework that can take more of the commonly used features and put them in one place.

I will document what I can as I go along. Once I know more and have more time available I can get back to helping with this but I am not quite there yet.

As I have told you in email I will be trying to add things or update them in the install guide and operational guide as needed.

I am also going to develop a "Move to blue" tutorial as I convert xroster to use xoops api.. Very little xoops code is used in that code base as is. I will not be adding my full intended work to this module at this time but it should be a good project to help other developers bring old modules up to date.

Attending College working towards Bachelors in Software Engineering and Network Security.

3
Mamba
Re: Reusing of Code/Feature between modules
  • 2012/4/4 9:13

  • Mamba

  • Moderator

  • Posts: 11412

  • Since: 2004/4/23


Quote:
This is a huge reason why we need to document the best way to do things and to build a module framework that can take more of the commonly used features and put them in one place.

I was hoping that XMF (XOOPS Module Framework) developed by Trabis will be merged with RM Common Utilities from BitC3R0, and together they will help us to achieve that. Currently Trabis and Eduardo are absent, but let's hope that they will come back soon and start working together on this.

In the meantime, let's work on updating existing modules to Blue Move, because once they have the same code base, it will be easier to move them to XMF or whatever we'll have in the future.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

4
redheadedrod
Re: Reusing of Code/Feature between modules

Very true....

Once I get my feet wet a little further and feel more comfortable with things if they have not returned I may look into this as well since it will fit right in with some other stuff I am doing as well.

Hmm, if I could only clone myself...
Attending College working towards Bachelors in Software Engineering and Network Security.

5
Shine
Re: Reusing of Code/Feature between modules
  • 2012/6/18 22:44

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


Have you already found any/some time to look into this? @ redheadedrod

6
redheadedrod
Re: Reusing of Code/Feature between modules

This is on my list but I have some Core related projects I am working on hoping they make it into 2.6 first. If Trabis comes back soon I am hoping he and Bitcero can work together to make a new XMF or related Module framework.

For me to work on this at the moment this is about 4 or 5 on my list.

However when I work on xRoster I will be doing so with the intent on making it one of the first projects to make use of THIS system. When I work on xRoster it will be experimenting with a variety of things that will hopefully make it into a totally new Profile module.

Rodney
Attending College working towards Bachelors in Software Engineering and Network Security.

Login

Who's Online

141 user(s) are online (55 user(s) are browsing Support Forums)


Members: 0


Guests: 141


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits