2 ms·
Show HN: Wireframe – A Simple PHP Framework with Routing and Templating
- tbirrell 10y agoI recently wrote Wireframe to practice with PHP and get a better understanding of how frameworks function. It's not intended to solve any problems that other frameworks don't already solve, though it does serve a practical purpose for me personally. As this is my first attempt (well, version 2 of my first attempt), I welcome any feedback, critique, or pointers to where I can improve.
- jack9 10y agoI chuckled when I expected simplicity and get smacked with a ton of process and dependencies that could be (and would be) thrown away. If someone wants to use these, they will include them. Bootstrap Sass Bower NPM and Gulp
- EJTH 10y agoHere is some of my comments: Don't hardcode error levels like you do in your bootstrap file (wireframe.php) ini_set('display_errors', 1); I am not a fan of setting title from some HTML comments, I can't really understand why you would do this when writing a PHP framework, as you wouldn't be able to make dynamic titles. While nothing wrong with this code as such: if (file_exists($file)) { return true; } else { return false; } It is unnecessary to explicitly return true or false, return file_exists($file); Would have done the same... Lastly I really think that you should consider using PSR-4 style autoloading for your internal classes, I see no point in not doing it.
- tbirrell 10y agoThanks for the feedback! I am unfamiliar with PSR-4, I'll have to give it a look.