5 ms·
Twitto: A web framework in a tweet
- nate 18y agolove this line: » TWITTO IS NOT SECURE, DON'T USE IT FOR YOUR NEXT WEBSITE «
- tptacek 18y agoI'd have been more impressed if he also write a 2-line ORM based on SQL statements fed from browsers.
- deleted 18y ago[deleted]
- tlrobinson 18y agoI was going to give you a lecture on why that's a ridiculously bad idea. Then I noticed your username. Then I went back and looked at the code. I see now.
- tptacek 18y agoMine is a subtle humor.
- mrfish 18y agoSo what exactly would I use this for. Aside from shitting myself with geeky-ness
- treo 18y agoI think the point is that PHP is a web framework by itself and there is no need for a fancy framework around it.
- jonursenbach 18y agoYou shouldn't be using it for anything.
- loincloth 18y agocute
- paul_houle 18y agothis is why i like hacker news: anything about PHP gets downvoted into oblivion on reddit.
- nir 18y agoOne of the symptoms of Reddit's takeover by the same kind of idiots that comment on YouTube was the knee jerk downmod of any non-derisive mention of PHP. I hope the fact the parent comment is downmodded so quickly doesn't mean those people have arrived at HN too, now. IMHO, attitude towards PHP is a great way to tell if someone really codes or just quotes the current hype. People that actually build stuff appreciate PHP's ease of deployment and scaling, even if its weaknesses make many coders (self included) choose other tools most of the time.
- sho 18y ago"IMHO, attitude towards PHP is a great way to tell if someone really codes or just quotes the current hype. People that actually build stuff appreciate PHP's ease of deployment and scaling" I don't agree with this. Yes, everyone knows PHP is easy to deploy, and it's faster than the ruby/pythons etc. But it's an ugly mess with a long history of security problems and a design that flows against the principles of well designed architecture. I know plenty of people who "really code" and abhor PHP. I know what you mean about "trendy" language snobbishness being a hallmark of someone who doesn't actually know what they're talking about, but in PHP's case I think there is a case for informed people having strong, negative opinions. Doesn't excuse the Reddit behaviour, of course, I don't miss that one bit. Just sayin'...
- ahoyhere 18y agoOr maybe it's just because they spent lots and lots of hours doing things that made PHP (and thus them) cry. When you spend every day for months writing methods like __get and __set and so on, and try to work around the other busted aspects of the object model, it can get to you.
- kragen 18y agoMaybe the parent comment was downmodded so quickly because it adds nothing to the conversation (except self-congratulation).
- pierrefar 18y agoI thought Perl was supposed to be the king of really low char count code! (Sorry for the alliteration.)
- simonista 18y agoOne should never apologize for alliteration. It is a joy to stumble upon.
- dchest 18y agoHow about (secure?) OO version (with no error handling)? $c=new ReflectionClass('co');$m=$c->getMethod($_GET['m']);if($m && $m->isPublic()){$i = $c->newInstance();$m->invoke($i);} Example usage: <?php // "Framework" $c=new ReflectionClass('co');$m=$c->getMethod($_GET['m']);if($m && $m->isPublic()){$i = $c->newInstance();$m->invoke($i);} // Controller class co { public function index() { echo "index!"; } public function test() { echo "yes, it's test."; } } ?> Call: example.com/?m=index example.com/?m=test
- dmoney 18y agoHow about (secure?) OO version Nice. You should call it TwitOO.
- antirez 18y agotoo bloated, but nice hack
- Andys 18y agoIt doesn't scale, either