11
bitcero
Re: i'm working an a standard module skeleton
  • 2014/11/18 18:51

  • bitcero

  • Quite a regular

  • Posts: 318

  • Since: 2005/11/26


Hi everybody.

For several recent projects, I've been using the MVC approach included in rmcommon. The biggest project where I've applied this was an ERP created entirely in XOOPS, that consists of several modules. All those modules were created from scratch, using rmcommon and MVC. The main idea is that, with this approach, the required time to create a module is smaller that traditional way. Also, by using AJAX, is possible to bring a better experience to users.

I've recently wrote an article with a brief explanation about MVC in Common Utilities but it is in Spanish.

I think that this will be a very important discussion if the result bring to XOOPS modules a new life.

12
goffy
Re: i'm working an a standard module skeleton
  • 2014/11/18 19:59

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


Hi everybody

I only understand partially, what you are discussing (and the code of vide module), because I learned php, css and so on only by myself.
I made in the past several modules like e.g. xNewsletter.
My latest project ishttp://mtbrace.eu, a website for handling mountainbike competitions with 23 tables inside (the module you can download fromhttp://wedega.com/modules/TDMDownloads/singlefile.php?cid=1&lid=1, but pay attention, it's only a first version).

All my project I have started with TDMCreate, because this module gave me the basic structure for the module and I had "only" to add the new functionalities.
In the beginning I didn't really understand the system with classes,..., but it was no problem, the basic system was available.
Maybe my modules are not perfect coded, maybe they are not cloneable, but they are working.

In my opinion the code and structure should stay clear and readable for everybody, like it is with TDMCreate, because not everybody made an university degree in programming, in order to keep xoops attractive for all persons, not only for experts.



13
Mamba
Re: i'm working an a standard module skeleton
  • 2014/11/18 21:14

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
My latest project ishttp://mtbrace.eu, a website for handling mountainbike competitions with 23 tables inside (the module you can download fromhttp://wedega.com/modules/TDMDownloads/singlefile.php?cid=1&lid=1, but pay attention, it's only a first version).

Very nice work on the Website!!! Congratulations!

Unfortunately, the download doesn't work...

Quote:
In my opinion the code and structure should stay clear and readable for everybody, like it is with TDMCreate, because not everybody made an university degree in programming, in order to keep xoops attractive for all persons, not only for experts.

The goal of XOOPS was always to keep things simple, and I hope, we can keep it that way!

@ Eduardo:
Quote:
I've recently wrote an article with a brief explanation about MVC in Common Utilities but it is in Spanish.

I have posted it in the Tutorials section. The English translation is done by Google, and I'll fix it later (I have to go to a meeting right now)
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

14
goffy
Re: i'm working an a standard module skeleton
  • 2014/11/18 22:48

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


strange, fresh installed tdmdownload modules, something gone wrong, I uploaded the zip via ftp, now it works, hopefully

15
Mamba
Re: i'm working an a standard module skeleton
  • 2014/11/19 0:31

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Goffy, yes, the download is working now. Thank you!

Do you want to add it to SVN, so other people can contribute, similar to xNewsletter?
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

16
goffy
Re: i'm working an a standard module skeleton
  • 2014/11/19 5:59

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


hi Mamba

of course, but at the moment it is only an example what is possible to make by a "none expert" when using TDMCreate
I want to handle first one or two real competitions with this site/module, than I can upload to SVN

and if Lucio see this module, he will thinking: oh my god, the outputs on client site are again not template base, a lot of hard coded tables, forms,...


17
redheadedrod
Re: i'm working an a standard module skeleton

I have some comments. I have not had time to look at this as I am finishing up my semester. But yes I think there are five considerations at this time that should be considered on building this.

1. XMF, XMF SHOULD be the basis of any module that can make use of it. This will help make a module 2.6 ready and make any necessary conversions MUCH easier.

2. MVC should be the rule for modules of the future. It does make things much easier to debug and sort of forces use of OOP.

3. We need to make a standardized folder format. In the near future we will be looking at automating installations and it is important to try making the zip folders the same so an installation program knows where to put them.
I suggest the following folders which follow the main xoops installation.
html - should contain all files in the proper folders for installation. An
installation program will just take the folder and copy it into the main
directory.
extras - should contain anything extra that isn't normally included in the main
install but may benefit some users.
docs- any help files that may be included. These should be separate and not
installed automatically and should contain any extended help. A future
installer may use this directory to allow someone to install help menus
for a module but for security or to save space may decide not to install.
upgrade - should contain any files or other items needed to upgrade a module
from older versions or perhaps have conversion scripts to allow a new
module to replace an older module.
An install program will likely only use the html and docs folders. The other folders are to help users get their module up and running. May be able to just use the extras folder and not need an upgrade folder.

4. With xoops 2.6 we have a service manager that will allow a module to provide services to other modules. This will become more common place as the manager evolves but in essence a program like xoopspoll that can be used by other programs should have functions setup that are generic and can be accessed on their own by other modules. When building an MVC setup this becomes much easier to do because you can pretty much make the whole "Model" portion into a service manager provider and the "Controller" would make use of it. For xoops 2.5.x you could still make use of such a format but just be aware of the importance to generalize it.

5. Another consideration with an MVC build is that the Model can be built to have objects that are generic and can make service manager service providers easier but can also help clone modules much easier. You should only have to clone the Controller and View portions of the module in this manner. You can leave the original module in place and just copy the view and controller to make a second copy that is totally different than the original. If built with this in mind it can make life much easier in the future.

My semester ends shortly and depending on how next semester lines up and how much I get done during winter break I may be able to help with this. I don't have any pressing projects for xoops other than some service manager stuff I need to finish up for 2.6. I also will only have 2 classes next semester instead of my current 4 which should help dramatically.

Anyhow great start!

Rodney

Login

Who's Online

249 user(s) are online (176 user(s) are browsing Support Forums)


Members: 0


Guests: 249


more...

Donat-O-Meter

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

Latest GitHub Commits