5 ms·
Kamele PHP Framework. Small framework. Much awesome.
- wbond 13y agoA link to easily-readable documentation would be nice.
- anons2011 13y agoThis. Not sure why the documentation isn't included in the readme. >It's a PHP framework. It works. Cool. Tells me nothing.
- superice 13y agohttps://rpi.ricklubbers.nl/dev/mvc/docs/ https://rpi.ricklubbers.nl/dev/mvc/docs/ I'm sorry, I will include this link right now in the README.md
- masom 13y agoPlease don't mix tab and spaces :( https://github.com/goldenice/Kamele-Framework/blob/master/system/basecontroller.php https://github.com/goldenice/Kamele-Framework/blob/master/sy... Using proper namespaces would be great, the `System` namespace will probably collide with other projects. `Kamele\System` would be much better. Using PDO would be much better than the `mysqli` functions. Where are the unit tests?
- BESebastian 13y agoMuch of the complaints I had, also the baffling license choice when it could just as easily be released under the MIT license or whatever others there are out there.
- masom 13y agoIndeed. I don't quite understand the reasoning behind the license.
- superice 13y agoAh I see, the MIT license does cover pretty much everything I needed. After looking for half an hour for a decent license I thought it would just be easier to write my own. MIT license will be included in the next push. What I am thinking of is pretty much the Do What the Fuck you Want to Public License, but only keeping that license itself. It's hard to find that...
- ozh 13y agoThere's a complete /doc folder that could be a gh-pages branch instead of that useless readme.md
- ihsw 13y ago* Not a composer package * Uses arcane define() statements to set configuration * No ORM -- provides a slim wrapper around mysqli * Uses singleton classes -- makes any potential unit testing very cumbersome * Rudimentary routing system -- doesn't support anything beyond /$CONTROLLER/$ACTION/$ARGS... * Rudimentary templating system that does simple string-replacement -- doesn't support looping or conditional control structures * Database::safeQuery() is anything but safe, in fact it's quite dangerous -- prepared statements should be used at a minimum rather than blind string replacement (see mysqli::prepare()) This seems like it was an interesting learning exercise for the author, but it's not much beyond that. The next step would probably be to make it PSR-1 and PSR-2 compliant (note how public/private accessors are absent in many places, and indentation swaps between spaces and tabs), and make it fit within the composer packaging system.
- masom 13y ago* No logging * No unit tests
- superice 13y agoTrue. Logging could be implemented quite easily using events, unit testing, well, I have no idea. I don't unit test that much, and I know, good practice and blahblah, but I tried and do not see the benefits for my projects. (Generally my projects are quite small)
- lukeholder 13y agoyeah as soon as i saw it was not using composer i knew it wasn't a "cool" framework.
- stephenr 13y agoI am not defending this project, I have complaints about it myself but some of your issues are ridiculous. > Not a composer package Thats like saying "its not web 2.0" frankly. If you can't manage to checkout a library/framework and make use of it without being reliant on a specific package manager, you shouldn't be writing software. > Uses arcane define() statements to set configuration I don't think you know what arcane means. Also, using constants to set application options can work very well if used properly. > Uses singleton classes I'd much rather a project that makes smart use of Singletons than the ridiculous SuperMegaObjectFactoryConstructorHelperFactoryFactory shit that is apparently the "in" thing. > make it PSR-1 and PSR-2 compliant PSR is a fucking joke. Code consistency within a project is important. Between a million different projects? Not so much. The "goal" of PSR has never been "hey heres the best way to do things". Its purely an exercise in documenting the MOST COMMON way a set of projects do things. > make it fit within the composer packaging system Also, the author must only eat fishes on fridays and must devote his sunday to the FSM. Composer is not jesus, PSR is not the bible. Stop acting like they are magical items sent from the heavens.
- vlucas 13y agoSome basic documentation or even a few paragraphs of a description would be nice, for a start...
- showerst 13y agoIf you're looking for a PHP microframework that's a bit more mature, I've had good experiences with Slim. http://www.slimframework.com/ http://www.slimframework.com/
- krapp 13y agoI don't want to jump on to you too hard since I literally have my own custom PHP framework open in the other monitor, and sooner or later I might have to pay the price for having it posted here, but I think one of the problems with this is it's small, but not small enough to be micro - and it doesn't have one of the primary advantages of a framework (especially microframeworks) which is easy extensibility. Most of the problems people have listed could be solved easily with the ability to import packages and manage autoloading through composer and psr-4. If you're going to create your own templating system, you're going to have to put forth a pretty decent argument against using Twig, for instance, which has autoescaping, inheritance, functional extensions and a sandbox. I think probably you've done what a lot of people do and tried to reinvent too much - as a result, the framework is not modular enough to meet various other users' needs. It does work, I don't doubt, but other things work better, and this is an issue facing anyone building a PHP framework. Some documentation letting us know why you built this, how to use it, what it's strengths and weaknesses are compared to other frameworks, etc. would certainly be useful, as would a more standard open source license (MIT.) If you believe in it, keep working in it though.
- korzun 13y agoHow is this on the front page?
- deleted 13y ago[deleted]
- krapp 13y agoPeople clicked the up arrow next to the header.
- nashashmi 13y agoVery interesting first draft. Looking at the simpleness makes my mind go up in fireworks of all the possibilities to add to it.
- superice 13y agoThank you so much. First positive comment I read today :P The simpleness is exactly what I had in mind when I wrote it. Just git clone it and start writing, because that's what I needed personally. And then I thought: 'Hey, I might as well share it'.
- jrmenon 13y agoHow does this compare with Kohana? http://kohanaframework.org/index http://kohanaframework.org/index Note: I tend to use frameworks largely to enforce safe db queries. IIRC, Kohana does all the needed escaping transparently. Might seem like an overkill but it is better than relying on the discipline of individual developers.
- superice 13y agoKohana seems to have the structure in about the same way, but is more complicated and has some basic modules, whereas Kamele does not. Kamele does have a nice Database class that handles the PDO-object in a MySQLi-like way of approching the object. Especially the Database::safeQuery() function will be interesting for you: https://github.com/goldenice/Kamele-Framework/blob/master/system/database.php https://github.com/goldenice/Kamele-Framework/blob/master/sy...
- jrmenon 13y agoThanks for the pointer here. Will explore it more closely.