Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Base Framework rewriting #9

Closed
brunnopleffken opened this issue Mar 22, 2015 · 0 comments
Closed

Base Framework rewriting #9

brunnopleffken opened this issue Mar 22, 2015 · 0 comments

Comments

@brunnopleffken
Copy link
Owner

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.

@brunnopleffken brunnopleffken added this to the Beta 1 milestone Mar 22, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant