7 ms·
The Yet Another Framework (Yaf), PHP extension for developing web applications
- farico 15y agoWhen did they launch this?
- jasonlotito 15y agoSeems it was published in June: http://pecl.php.net/package/yaf http://pecl.php.net/package/yaf Keep in mind it's a PECL extension, so it's not bundled with PHP.
- alastairpat 15y agoIt kind of reminds me of ASP.NET C# MVC, just glancing at the example page: http://au.php.net/manual/en/yaf.examples.php http://au.php.net/manual/en/yaf.examples.php Not being particularly proficient in PHP, is the 'Class myClass extends baseClass' syntax normal? I've never seen it before.
- troels 15y agoSyntax yes, code standard, no. Most standards would prescribe: class MyClass extends BaseClass
- deefour 15y agoYes, it's normal. http://www.php.net/manual/en/language.oop5.inheritance.php#language.oop5.inheritance.examples.ex1 http://www.php.net/manual/en/language.oop5.inheritance.php#l...
- bradwestness 15y agoI actually wrote a PHP framework with the intention of mimicing the ASP.NET MVC file structure layout and "convention over configuration" ideology, though it's not compiled so it's probably slower than YAF. http://www.killstone.net/software/killstone-php-framework http://www.killstone.net/software/killstone-php-framework
- hieronymusN 15y agoIs the source for this anywhere like GitHub where it can be looked over? EDIT: Appears to be on Google Code: http://code.google.com/p/yafphp/source/browse/ http://code.google.com/p/yafphp/source/browse/
- jasonlotito 15y agohttp://pecl.php.net/package/yaf http://pecl.php.net/package/yaf
- deleted 15y ago[deleted]
- hieronymusN 15y agoSince this is a PECL extension, and therefore compiled in C, I would love to see some performance information.
- phpnode 15y agohttp://yaf.laruence.com/manual/yaf.bench.html http://yaf.laruence.com/manual/yaf.bench.html it looks like it's about 10% slower than pure PHP, orders of magnitude faster than most frameworks
- mweibel 15y agoSo, apart from being written as an extension (and maybe a little bit faster that way), what's the point of Yaf?
- hippich 15y agoWhat the point of your existence? :) To make world (in this particular case) of PHP different and give users ability to choose. Being an extension is pretty good point of existence IMHO
- mknx 15y ago> Yaf require PHP version greater than 5.2.1, and could not run with early version of PHP. No thanks. Closure? Namespace?
- ra 15y agoclosures and anonymous functions, to my mind, were a jailbreak for PHP.
- oinksoft 15y agoI'm not sure what you're getting at. Is there reason to believe that this will not work with PHP >= 5.3?
- Mikushi 15y agoIt will be is not structured using Namespaces, which can be annoying if you are using them on a day to day basis and want to integrate something like Yaf that doesn't use them.
- underwater 15y agoYou could always write your own namespaced shim classes if it matters that much to you.
- ivan_krechetov 15y agoWhy?
- ceejayoz 15y agoWhy not?
- ivan_krechetov 15y ago:) I mean why, except for "Why not?"
- mgkimsal 15y ago[me]# pecl remote-info yaf Package details: ================ Latest 2.1.3 Installed - no - Package yaf License PHP Category System Summary PHP Framework in PHP extension Description Yaf is a PHP framework similar to zend framework, which is written in c and built as PHP extension. Windows binaries can be found at <a href="http://code.google.com/p/yafphp/downloads/list">http://code.google.com/p/yafphp/downloads/list</a> [me]# pecl install yaf pecl/yaf requires PHP (version >= 5.1.0, version <= 5.3.6), installed version is 5.3.8 No valid packages found So... 2.1.3 doesn't know how to work with 5.3.8. I'm not upgrading to 5.4.0 to test this right now. Any hacks to get around this?
- Werba 15y agoSo use with blitz template engine as is extension http://alexeyrybak.com/blitz/blitz_en.html http://alexeyrybak.com/blitz/blitz_en.html You had blazing speed and performance
- solomonjames 15y agoAnyone else see that this looks almost identical to Zend Framework?
- flyosity 15y agoYup. We use Zend at work and I did a double-take at the example code. "Wait, my code looks exactly like this..."
- ketchupy 15y ago"Yaf is a PHP framework similar to zend framework, which is written in c and built as PHP extension" (http://code.google.com/p/yafphp/ http://code.google.com/p/yafphp/)
- jaxn 15y agoIt is interesting that there are no models. This seems to be a glorified front controller integrated with a templating engine. It is really cool that they did this as a PECL extension. I had a PHP framework many years ago that we considered converting to a PECL extension (http://sourceforge.net/projects/cep/ http://sourceforge.net/projects/cep/).
- jonstjohn 15y agoGenerally, models can be left up to the developer to create based on business logic. Take for example, Zend Framework. It provides an active record like pattern in its Zend_Db_Table but expects the individual application to create the models that use (not inherit) Zend_Db_Table.
- jaxn 15y agoSeems like a missed opportunity to me. Lots can be done with "magic methods" for models. Not sure how hard that is in a PECL extension.
- geeksam 15y agoI'm loving the documentation: http://us3.php.net/manual/en/yaf-loader.clearlocalnamespace.php http://us3.php.net/manual/en/yaf-loader.clearlocalnamespace....
- drivingmenuts 15y agoThere's more like that elsewhere in the PHP docs (at least, last time I went looking). PHP used to be minutely documented, with copious examples, which was why it was so easy to learn. Now, not so much, it seems.
- FuzzyDunlop 15y agoThe OOP parts in the PHP manual haven't been given anywhere near enough care and attention than the old bits. Unless it's core functionality, good luck finding decent doc for the extensions listed. Class:nameOfFunction - *the Name of Function purpose* Some of the SPL classes are equally amusing, especially when you get as far as `RecursiveIteratorIterator` and, to recursively scan a directory (OOP stylee): $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('/path/to/directory'), RecursiveIteratorIterator::SKIP_DOTS); Now I make use of that and, syntax aside, it's pretty handy for the stuff you get back from it, but for the best part some of these PHP extensions are a waste of time. There's bugger all documentation and, quite often, they're missing basic methods that you can already do procedurally. Why would anyone want to spend time figuring out this framework extension, or the OOP PHP stuff like SPL and Imagick, with no documentation, when there are plenty well established ones out there that have mountains of it?
- schiptsov 15y agoWhy I need so many combinations of long CamelCase words and obscure symbols to make a bunch of web pages? ^_^
- pornel 15y agoAnother framework full of thinly veiled global variables: http://uk.php.net/manual/en/class.yaf-registry.php http://uk.php.net/manual/en/class.yaf-registry.php
- drivingmenuts 15y agoI'll stick to CI, thanks. This smells like another Zend product, and Zend framework was just a pain, in my experience.
- tszming 15y agoOne of the good things is it is not using the PHP namespace, e.g. use Zend\Controller\Action\HelperBroker;
- igorw 15y agoYou've never tried to integrate two PHP projects, eh? As in: Whoops, you guys also have a class named "user"?