Skip to content

31 comments

EDIT: Clarity

It is a little disheartening reading dismissive statements, "this is different therefore bad". It isn't great, but not because it isn't pure MVC.

There are several important issues with the framework.

Major Environmental (static) dependence from static & configuration creep. Statics have been used liberally, breaking encapsulation all over the place.

A lack of dependency injection has resulted in many areas of the framework being tied to each other in a non-intuitive, non-modular way.

I should only need the class API to know how to use it: not the config api, not the config parameter requirements, not pre-defined config values, not which classes need to be in the include path.

'Abitary Files' seem to be used quite frequently. Routing/configuration/logic is found in "return array()" files (!) rather than being part of an architecture which has place-holders for the composition of logic.

$route->add('GET', '/', function() { return new View(); });

would be better, with $route instanced and used in an appropriate location within the architecture.

The lack of MVC/some dispatch system has obscured how the rest of the library can be composed into an application and this has lead to statics and configuration creep.

My initial impression was that the author expected users of his library to take it and use it to build some problem/domain-specific architecture, however after seeing the example application i was disappointed.

I found the lack of MVC initially refreshing. I think a functional library with object oriented state management is an extremely interesting 'research' area for php frameworks, and it is certainly worth while releasing some non-mvc frameworks which take this route.

This is nevertheless a reasonable attempt for a person who hasnt written many frameworks before. Writing frameworks is an excellent way to improve design and conceptual programming skills; library programming is much more reliant on technique than application programming.

13 points

Way to actually provide some useful input. Upboat to you sir.

2 points

It's bad.

  • procedural code ( yes , static classes are procedural )
  • DB's by default open for injections
  • unusable routing
  • weak access control
  • no unittests ( and code it self - untestable )
3 points

DB's by default open for injections

How exactly? It seems his compiler uses ? etc.

1 points

He is using PDO, but by default PDO is emulating the prepared statements. Thus removing all the benefits promised by native prepared statements.

1 points

I actually had the same issue, the routing was bad. The guy actually changed it but it looks like the docs haven't been updated yet... routes behave more like you'd expect now.

EDIT: actually he did update the docs, I guess both ways work. If you look under the heading "Organizing Routes" you can now use something other than a monolithic file.

3 points
unknown author2 hidden

Deleted before we saved it.

1 points

If this was on someone's resume as a recent project, it would be an instant non-hire.

Unless the author is a very young junior programmer with zero work experience and no formal training, and we could afford to spend years teaching them the basics.

There are already way to many PHP-hacks out there doing cargo-cult OOP, and most of them are unteachable.

-4 points

If you wouldn't hire someone because you think they lack perfect OOP manners, I think I know a lot of people who wouldn't work for you if they had to.

From a hiring perspective (assuming this was a 'recent' project for the author) I'd take from this that they're willing to try new things and are good at completing projects in the general sense. I'll happily take a bit of time to fill in any knowledge gaps if I knew I was getting someone who was used to seeing a project through and could at least attempt to think outside of their own box.

8 points

so, if i want to use this, I can't have commas in my URLs? It's not a common requirement, but it is something that is valid to use. :/

1 points

I stopped reading after seeing how routes were handled. Seems to be an unconventional way of handing off requests to a controller/view.

0 points

I really can't take any project that ignores all existing programming (PHP or otherwise) standards and best practices without any kind of justification seriously.

There may be thought behind it, but it smells like general cluelessness. It's just procedural code dumped into classes with zero comprehension of object oriented programming. And of course zero test coverage.

Even as an exercise in writing your own framework it is pretty pointless.

-5 points

I know rolling your own framework is a good way to learn to programme but PHP doesn't need more frameworks. Really. Just stop.

-7 points
unknown author3 hidden

Why not? Competition breeds innovation. It's not hurting anyone.

7 points

It breeds innovation when people are trying to do things differently. The thing is, most of these frameworks are very similar and rarely do anything innovative.

3 points

Building new framework is like reinventing a wheel.

Only .. you see .. all the php 'wheels' have been mostly rectangular.

2 points

Agreed... instead of rolling your own, there are plenty of great frameworks already out there that could use more contributors.

1 points
unknown author

Deleted before we saved it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.