Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase OOP, reduce hard coupling, improve internal APIs, etc. #23

Open
14 of 31 tasks
garrettw opened this issue Jun 11, 2017 · 4 comments
Open
14 of 31 tasks

Increase OOP, reduce hard coupling, improve internal APIs, etc. #23

garrettw opened this issue Jun 11, 2017 · 4 comments
Assignees

Comments

@garrettw
Copy link
Contributor

garrettw commented Jun 11, 2017

This issue is mainly to track development on these topics. I'll be tagging this issue in my commit messages.

Classes to be converted from static to OO:

  • Pimf\Application
  • Pimf\Config
  • Pimf\Param
  • Pimf\Util\Header\ResponseStatus
  • Pimf\Util\Header
  • Pimf\Logger

Classes that need hard class references to be replaced with dependency injection:

  • Pimf\Application
  • Pimf\Environment

Internal APIs that need improvement:

  • Pimf\Cache::factory() and Pimf\Session::factory() -- would like to get rid of the switch statements by unifying the signatures of each storage type constructor as much as possible

Methods with too many params:

  • Pimf\Error::native()
  • Pimf\Controller\Base::__construct()
  • Pimf\Cookie::put()
  • Pimf\Cookie::forever()
  • Pimf\Request::__construct()
  • Pimf\Util\Uploaded::__construct()

Reduce complexity:

  • Pimf\Application::run()
  • Pimf\Logger
  • Pimf\Util\Validator
    • has duplicate code in lengthBetween() and valueBetween()
  • Pimf\Controller\Core::initCliAction()

Remove usage of exit/die:

  • Pimf\Application lines 102 and 261
  • Pimf\Error line 38
  • Pimf\Response line 144
  • Pimf\Util\Header lines 69, 83, 97, 103, 134, 233

Consider better names for functions:

  • Pimf\Session\Storages\Storage::id() -> newId()
  • Pimf\Uri::is() -> matches()
  • Pimf\Url::to() -> make()
  • Pimf\Url::toAsset() -> makeForAsset()
  • Pimf\Util\Character::is() -> matches()
  • Pimf\Logger::init() -> checkInit()
  • Pimf\Util\Validator::ip()

Improve adherence to ADR pattern in:

  • Pimf\View
  • Pimf\Controller\Base
garrettw added a commit to garrettw/pimf-framework that referenced this issue Jun 14, 2017
garrettw added a commit to garrettw/pimf-framework that referenced this issue Jun 20, 2017
… small tweak in Util/Char/Clean and Util/Header/*
garrettw added a commit to garrettw/pimf-framework that referenced this issue Jun 20, 2017
garrettw added a commit to garrettw/pimf-framework that referenced this issue Jun 20, 2017
garrettw added a commit to garrettw/pimf-framework that referenced this issue Jun 20, 2017
@gjerokrsteski
Copy link
Owner

@garrettw is the checklist above up to date?

@garrettw
Copy link
Contributor Author

Yes, I've been making those changes in my master branch, and adding new checklist items as I come across other things that need doing.

@gjerokrsteski
Copy link
Owner

I am looking forward to it and am very excited :-)

@garrettw
Copy link
Contributor Author

Me too. I originally wanted to build my own framework, and I still do, but I think it will be easier to start with this existing project which is already similar to what I would want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants