5 ms·
This isn't really anything new. Yii and Symfony have been doing code generation for years. Someone simply decided to create a library that's not framework speci
by Gigablah 12y ago
This isn't really anything new. Yii and Symfony have been doing code generation for years. Someone simply decided to create a library that's not framework specific.
- debacle 12y agoThe problem is that everyone is creating every library, over and over. It is a real problem in PHP that there is no single, polished solution and every framework is being reinvented (and breaking BC) constantly.
- Gigablah 12y agoThat's why I hope StackPHP gets some traction and more people create framework agnostic libraries (e.g. phpleague).
- debacle 12y agohttp://xkcd.com/927/ http://xkcd.com/927/
- Gigablah 12y agoThat's cute. What's your solution? Stick with CodeIgniter?
- lkrubner 12y agoOr go work on original problems that have not already been solved dozens of times. Projects like this are a waste of talent. There are clearly some smart programmers writing libraries for PHP. The question is, why do they keep writing the same stuff, over and over? All of humanity would benefit if some of these smart people focused on doing something domain specific (medicine, law, education) or dove deeper and helped re-invent the stack at a deeper level. Maybe re-invent PHP as a language that has primitives for concurrency. Or leave PHP and work on other problems that plague the tech industry (the obsoleteness of HTTP/HTML as a way of delivering documents, when people increasingly want software over TCP, not documents).
- Gigablah 12y agoI suspect you are ascribing way too much credit to a code generation library. People work on what interests them when it comes to open source. Besides, most of what you're describing is already being worked on (and naturally, being disparaged as unnecessary or a poor solution by plenty of commentators on HN). By the way, your entire comment can be applied to just about every single project that's posted to HN. To the point of irrelevance.
- mtbcoder 12y agoI'm not familiar with StackPHP but how agnostic is it? The first middleware listed (HttpCache) relies heavily on Symfony.
- alexbilbie 12y agoIt relies on a single Symfony component which has become the standard for almost every HTTP package. You don't need to download the entire Symfony framework
- mtbcoder 12y agoRight, but that's a large, core Symfony component, not a small library. It essentially dictates how you handle fundamental tasks (such as routing) and immediately starts you off doing things the "Symfony way".
- Gigablah 12y agoEh, it doesn't dictate how you handle routing. I think you're misunderstanding the dependency here: what StackPHP depends on is the HttpKernel interface. Basically the function signature for a HTTP request handler. It does tie you into the Symfony Request object, but otherwise there are no other dependencies.
- alexbilbie 12y agoThis is something we're trying to solve with the League - http://thephpleague.com http://thephpleague.com. Standardised, framework agnostic, go-to packages that are the de-facto solutions for specific problems
- asocial 12y agoThat's not a problem, that's a feature. Competition between frameworks and libraries ensures that there are multiple solutions to meet multiple needs, and also that consensus, where it exists, exists due to the popularity of a package, not the dictate of someone setting an arbitrary "standard" for the community. You can guarantee that Laravel is going to be updated because people use it and contribute to it, not because it's the only option. And there's no guarantee that a single solution is going to keep backwards-compatibility. That is always entirely at the whim of the developer. Removing room to innovate only guarantees stagnation, it doesn't guarantee the standard.
- debacle 12y agohttps://packagist.org/search/?q=http%20router https://packagist.org/search/?q=http%20router 92 pages of the same basic router implementation. That is a problem. A huge problem.
- Gigablah 12y agonikic/FastRoute. You're welcome. (Also, note that the problem is more with Packagist's search results, since most of them aren't even routing libraries)
- asocial 12y agoNo it isn't, it's the way open source is supposed to work. There being 92 pages of routers doesn't stop anyone from picking the most popular and well-maintained one. Almost anyone who actually cares is going to pick one of the large frameworks (which probably use Symfony) or use nikic's FastRoute. If you're worried about small packages being maintained into the future, that's what forking is for. If you want to write your own, you can. Also, to be fair to your argument, Composer will load packages from outside Packagist, and VCS systems other than git, so the actual universe of available routers is probably much, much bigger. I'd suggest this as another example of how not conforming to a standard (Packagist as the de facto PHP repository) is a benefit. You don't even have to care about Packagist and Composer still works just fine.
- aikah 12y ago