You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.
The current "MVC" pattern implemented in Addictive Community is just a mess. It's not completely object-oriented, and after implementing URL rewriting it became hard to write and maintain. So I decided to rewrite all the core-framework to make it more easy to write, maintain and extend.
Here is what WILL change:
Controllers are now entirely object-oriented and has three basic methods: _BeforeFilter() (it runs before Main, e.g. authentication), Main() (the actual Main method) and _AfterFilter() (it runs after Main). There will be no more those large do-everything controller files;
URL now follows the controller/id and controller/action/id pattern. So, accessing forum.com/thread/1 - without an specific action -, actually it runs Thread::Main(1). Accessing forum.com/thread/reply, it runs Thread::Reply(), and so on;
No more blank templates or exit;. Inside a method, just write $this->layout = false to avoid page rendering. Useful for actions that returns JSON, manipulate MySQL data or any other back-end task;
Will be possible and easier to create plugins and extensions for Addictive Community.
It'll take a while to be completed, but worth the job.
The text was updated successfully, but these errors were encountered:
The current "MVC" pattern implemented in Addictive Community is just a mess. It's not completely object-oriented, and after implementing URL rewriting it became hard to write and maintain. So I decided to rewrite all the core-framework to make it more easy to write, maintain and extend.
Here is what WILL change:
_BeforeFilter()
(it runs before Main, e.g. authentication),Main()
(the actual Main method) and_AfterFilter()
(it runs after Main). There will be no more those large do-everything controller files;controller/id
andcontroller/action/id
pattern. So, accessingforum.com/thread/1
- without an specific action -, actually it runsThread::Main(1)
. Accessingforum.com/thread/reply
, it runsThread::Reply()
, and so on;exit;
. Inside a method, just write$this->layout = false
to avoid page rendering. Useful for actions that returns JSON, manipulate MySQL data or any other back-end task;It'll take a while to be completed, but worth the job.
The text was updated successfully, but these errors were encountered: