Posted on: 2015/5/19 2:30
Re: The future of XOOPS?
The biggest things about future modules is that they MAY work with little updating with 2.6 but there are a BUNCH of things that are changing with 2.6 that will make rewriting many of the modules the best choice but before that happens we need to lock down some items within 2.6 more so we only need to rewrite modules once.
I would suggest any modules that do get rewritten to follow a strict MVC model so it makes things much easier to modify down the road. By making a module fully MVC you are forced to group things together in the same area instead of threading them through the code and it will make life MUCH easier down the road.
In Brief, MVC seperates a program into three sections...
M = Model - The code that does the actual work.. This should be the code that uses a lot of Xoops API. This will save variables, load them, and do all of the calculations etc...
V = View - This is the interface to the program. This would be written mostly in Smarty but setup with some basic PHP. There should be NO HTML code anywhere other than in here.
C = Controller - This is the decision making portion and basically interfaces between the View and Model. The View communicates with the Controller and based on what it needs the Controller communicates with the Model to actually do the work.
This forces you to NOT sprinkle HTML code throughout and by the grouping required should make things much easier to upgrade down the road. When you clone a module you may be able to just clone a portion of it instead of the whole thing too.