5 ms·
PHP Fat Free Framework aka F3
- jrockway 17y agoEven with intense concentration, I wasn't able to read the text on the page. It's the lowest-contrast thing there; the YELLOW logo and "1.0" thing (and the social bookmark links) try very hard to pull your eyes away from the text... and they succeed. I am going to have nightmares about this site tonight, I swear. Also, PHP really needs something like Plack/PSGI/Rack so that you don't have to manually reconfigure the web server for every library you want to use.
- jeduan 17y agoAgreed. It works ok with Readability http://lab.arc90.com/experiments/readability/ http://lab.arc90.com/experiments/readability/
- olliesaunders 17y agoDid they fix this? I see white on dark grey.
- tlrobinson 17y agoAlso, PHP really needs something like Plack/PSGI/Rack so that you don't have to manually reconfigure the web server for every library you want to use. The Apache configuration mentioned in this article is pretty generic. PHP has a standard HTTP interface, unlike the other languages before WSGI/Rack/JSGI/PSGI came around. Of course, PHP's interface isn't function-based, so you don't have the advantages of stackable middleware. A spec closer to the *SGI's would indeed be nice.
- dhotson 17y agoActually, it's funny you should mention that. I wrote a little web server in PHP that's basically a port of Ruby's Rack: http://github.com/dhotson/kelpie http://github.com/dhotson/kelpie It actually works pretty well, no apache required! It's pretty fast too.. all the init stuff you normally have to do every single request can be done once on server startup. I also wrote a little sinatra style framework to go on top of it: http://github.com/dhotson/kelpie/blob/master/demoapp.php http://github.com/dhotson/kelpie/blob/master/demoapp.php Anyway, it's turning out to be a pretty fun little project. :-)
- tlrobinson 17y agoCool, I might write up a little library to provide the same interface to standard PHP CGI/Apache.
- dhotson 17y agoThis is what I've got so far: http://gist.github.com/339915 http://gist.github.com/339915 It basically sets all the usual superglobals like $_SERVER, $_GET etc. Doesn't handle sessions just yet; I'm still working on that..
- joshd 17y agoThat's quite cool. That's some of the cleanest PHP I've seen. When I've tried to write long-running applications in PHP I always get memory leaks. How do you handle this in Kelpie?
- dhotson 17y agoThanks Josh! :-D Yeah, it's probably going to have memory leak issues. It's pretty much inevitable unfortunately. I've thought about having the server monitor the memory usage and periodically respawn processes. I believe apache uses a similar technique. I'm open to ideas on this issue though. :-)
- pan69 17y agoReading through the 'Getting started', it's quite an interesting approach actually. I might give it a go some time.
- olliesaunders 17y agoWhat's interesting about it?
- armandososa 17y agoI've done something similar, inspired by sinatra: http://github.com/soska/microbus http://github.com/soska/microbus but I'm a poor self-promoter. This is an interesting idea, but I like better my syntax though. But again, I'm not even a real programmer.
- csytan 17y agoI'm a poor self-promoter. <snip> But again, I'm not even a real programmer. Modesty isn't very useful when promoting. Tell us why your framework is better!
- armandososa 17y agoI don't actually think it is better, just different and works for me. Some other attempts try to make PHP act like ruby or python with ugly results. What I've tried to do here is embrace PHP 'classic' style. if (get('hello')){ // do stuff }
- soe 17y agothe license gpl v3 for base framework is pretty limiting ... it could be a show stopper... something like MIT or BSD would encourage people to try out...
- regularfry 17y agoReally? I honestly didn't think it was a problem for web apps. What's the issue here?
- soe 17y agogpl v3 requires code (even hosted) to be shared upon request by users with gpl v2, it was a requirement. hence gpl v2 licensed applications such as wordpress and drupal don't need to be shared with site users code built upon the framework is derivation and thus, has to be licensed accordingly
- regularfry 17y agoI can't see the requirement to share code with users on request anywhere in the GPLv3. It explicitly excludes interaction over a network in section 0: "To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying." Are you sure you're not thinking of the Affero GPL?
- bcosca 17y agoit's not an issue, it's in the site: "Any of the license terms and conditions can be waived if you get permission from the copyright holder."
- rev087 17y agoThis is exactly what I intended for my "personal framework" when I began writing it's first version about three years ago: unintrusive (all main functions as static methods of a single class to keep the global namespace clean; no enforced directory structure) and lightweight (few files, few bytes). Too bad mine grew to become a monster, pretty much like all other popular PHP frameworks out there. I guess simplicity really is one of the hardest features to implement.
- thmz 17y agoAnother framework based on MVC. But MVC is just not possible in PHP. Maybe with Ajax it is, but mostly it is a hype people don't understand. Let Apache (or any webserver) be the controller and you have the most lightweight framework there is.
- bruceboughton 17y agoIn what way is it not possible? You can send all requests through a single handler with .htaccess can't you?
- thmz 17y agoYou can, but it will not update the view directly as MVC does. You always need to refresh the page for that. In Java or Flex (or with Ajax) the view is updated by the model. That is MVC. In PHP this is just not possible. So imho it is a hype word people don't understand. Most (PHP) frameworks that use 'MVC' are just more bloated than Apache + PHP (a single handler with .htaccess could be nice!).
- blasdel 17y agoMVC ≠ What your pet framework does MVC is a descriptive point of view, not a prescriptive implementation plan. It's one of the only software idioms that's actually an Alexanderian Pattern, unlike the vast majority of the GoF that's just reflective of language warts/features. There are tons of completely different ways you could describe the web as MVC: Model View Controller URL Response Request DB Response Request Response Hypermedia Sub-Requests LocalStorage DOM Javascript data:// JavaScript DOM Events ...
- regularfry 17y agoI think that the confusion comes from the fact that the original MVC was a prescriptive design pattern, but use of the term has expanded way, way beyond its original intent. For instance, events between M and V are pretty much required if you're doing it the "old way," but people tend to ignore that and just explicitly route messages through the C. The expression carries a lot less meaning now than it used to.
- alinajaf 17y agoIt looks like Sinatra for PHP.