A framework or an app?
Usage
-
The README contained everything I needed to easily use the program:
is this meant to be a login framework that other sites can use, or a webapp that displays a user's current location?
-
The program compiles/runs without errors:
-
The program worked as advertised:
Style
-
The code is cleaning divided into modules and multiple files:
the
includes/functions.php
file appears to include functions related to different logical modules. Separating functions based on authentication, session management, utility, etc. would make it easier to reuse modules in the future. -
Variable and function names are meaningful:
-
Comments are used where appropriate:
would benefit from consitent docstrings for runctions
Philosophy
-
The program most closely follows the
MVC
interface pattern:an app (or framework) like this is usually best organized around a model-view-controller pattern.
-
This choice of pattern is a good one for this application:
I think the project would be generally improved if the focus was on providing a framework, rather than an all-in-one app. The example implementation could still be included
-
This program follows the Rule of Silence and Least Surprise:
When I navigate to the protected page without having logged in the login link takes me back to the index page, not the login page.
-
This program follows the Rules of Modularity and Composition:
with a bit of refactoring I think this could work very nicely as a framework that other webapps could use
-
This program follows the Rules of Representation and Simplicity:
while PHP allows mixing of HTML and PHP code in the same files, exploiting this for any more than the simplest of sites will be a maintenance nightmare. Use of a PHP template engine would allow a much cleaner separation of content and logic.