waifung0207 / ci_bootstrap_3

A multi-tenant website template based on CodeIgniter 3 with integration of some useful tools
MIT License
385 stars 315 forks source link

Turn CI_bootstrap into a real HMVC Framework #42

Open ibanez32 opened 8 years ago

ibanez32 commented 8 years ago

Hi,

First of all thank you for your awesome work in this project.

im using your framework since the last two months and i see that you are continuously pushing new updates and improvements, and i think that this awesome project will be a must have if you make it full HMVC, and what i mean by a full HMVC is to move the default controllers and views of the demo (frontend) into a module, and i believe that it will be more easy to maintain and to update in the future, when you will push new update we can keep the change we have made in our module and simply update the core files.

also it will be great if you can integrate later an auto update that we can set on a cronjob, also to integrate more caching driver like the popular xcache, and maybe a plugin folder that we can use with short-codes or hooks like "wordpress", and a store for plugins, modules and templates, free or premium.

thank you and please excuse my little english.

buoncri commented 8 years ago

In my experience at a first thime i thought the same thig about hmvc implementation of ci_bootstrap, but later i thought the problem can be to share the admin-lte implementation. To have a decent upgrade you can start cloning the admin module with other name.

P.S. What i said seems not to be correct (but is correct for the past), infact i am looking at the code and in the last changes i am seing that now MY_controller are extending MX_controller and the plates template are removed.

ibanez32 commented 8 years ago

@waifung0207

waifung0207 commented 8 years ago

Thanks for all your suggestions!

As mentioned by @ibanez32, I will try to look into more modularization, whereas keep the routes as existing (I prefer URL "/" as Frontend and "/admin" as Admin Panel, etc.).

Regarding the update issue, in the past that was a pain even for myself (especially when the repo is not stable and lots of changes from my mind when development is ongoing), but at last I come up with a slightly better workflow, which I am adapting in my production projects (lots of my commercial projects are based on CI Bootstrap too) as well.

Current my normal setup for new projects are like this:

  1. Create a new project by cloning this repo, e.g. git clone git@github.com:waifung0207/ci_bootstrap_3.git project_name
  2. Create a new repo (e.g. on Gitlab or Bitbucket when you need private repo)
  3. Update the local git config file (file: .git/config) and change the origin link to new repo
  4. Commit and push the project to new repo, to make sure the repo is well connected
  5. Add an additional remote repo (I used core as the name here) to CI Bootstrap, e.g. git remote add core git@github.com:waifung0207/ci_bootstrap_3.git
  6. Then you should have two remote repo, origin and core linked to the local project

Under this setup, whenever I need to merge updated features from CI Bootstrap into existing project, I just need to do stuff like:

  1. Try to pull latest CI Bootstrap code from core, e.g. git pull core master
  2. Fix conflict manually - hopefully not too many files are affected
  3. Commit and push to the origin remote repo, i.e. git push origin master

I am sure this is not the best way to update the codebase, but since lots of files are affected before stable release, this seems the better way to handle upgrades at this moment.

In the long term, I hope more files can be moved to separate folders (like what CodeIgniter do - they keep the core logic inside /system folder), and includes upgrade notes for each version, so developers can upgrade more easily and gracefully.

Lastly I would omit the 3rd party caching integration by now, since CodeIgniter one is easy to use (even not very powerful) and I would like to focus on other features first.

Thanks again for your issue.

buoncri commented 8 years ago

Hi @waifung0207

I am writing just to tell when adding "core" remote repo (as you called) with link git@github.com:waifung0207/ci_bootstrap_3.git, the git fetch give error with ssh.

The problem is solved using normal https://github.com/waifung0207/ci_bootstrap_3.git link to your repo.

Cheers

mufasser commented 7 years ago

Hi,

Please suggest I'm facing an error to configure it

A PHP Error was encountered

Severity: Core Warning

Message: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20121212/mysqli.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20121212/mysqli.so: cannot open shared object file: No such file or directory

Filename: Unknown

Line Number: 0

Backtrace: