 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Fabien Potencier's Blog: The state of YAML in PHP
by Chris Cornutt December 21, 2009 @ 09:25:17
In this new article on his blog Fabien Potencier looks at the current state of the YAML markup language and how well it's supported in the world of PHP.
YAML can be used to describe both simple and complex data structures. It's an easy to learn language that describes data. As PHP, it has a syntax for simple types like strings, booleans, floats, integers, arrays, and even more complex ones like objects. Nowadays, YAML is a heavily used format for configuration files, mainly because even non programmers are able to understand and modify YAML files easily.
He spends a little time describing the YAML markup format and shows how to parse it using the Symfony component, how to get it and install it (via svn checkout).
voice your opinion now!
yaml symfony tutorial introduction
Daniel Cousineau's Blog: Doctrine Migrations Proper
by Chris Cornutt October 21, 2009 @ 09:57:11
Daniel Cousineau has posted a quick guide to migrating database information with Doctrine:
I was talking with someone [...] here at ZendCon and discovered that they were having trouble with migrations in Doctrine. Having gone through the same issues of Doctrine seemingly not being able to figure out your changes and generate migration classes, I thought I'd post the solution here for future reference.
It's four quick steps that'll get Doctrine to automatically generate the differences (deltas) and upgrade your models to reflect these changes.
voice your opinion now!
doctrine migration tip yaml
Fabien Potencier's Blog: Symfony Service Container Using XML or YAML to describe Services
by Chris Cornutt April 09, 2009 @ 12:06:22
Fabien Potencier has posted the most recent article in his "Symfony Service Container" series, a look at using XML/YAML to describe services.
Today, with the help of service loaders and dumpers, you will learn how to use XML or YAML to describe your services. The Symfony Dependency Injection component provides helper classes that load services using "loader objects". By default, the component comes with two of them: sfServiceContainerLoaderFileXml to load XML files, and sfServiceContainerLoaderFileYaml to load YAML files.
He reviews the "dumper objects" - tools used to take a service container and push it out into normal PHP code - and how you can use them to dump the Service Container's information out to the XML and YAML formats. Once you have this, it can be loaded back at any time via the two loaders mentioned above. There's plenty of code examples included for these and other more detailed examples.
voice your opinion now!
service container symfony xml yaml describe tutorial
Fabien Potencier's Blog: Symfony Service Container The Need for Speed
by Chris Cornutt April 03, 2009 @ 12:03:24
Fabien Potencier has posted another article about dependency injection and the Symfony service container. In this part of the series he looks at the "need for speed" - reducing the need for the XML/YAML parsing of the same information on every request via a new tool, the PHP dumper.
With the introduction of the XML and YAML configuration files, you might have became a bit sceptic about the performance of the container itself. Even if services are lazy loading, reading a bunch of XML or YAML files on each request and creating objects by using introspection is probably not very efficient in PHP. [...] How can you have the best of both world? That's quite simply. The Symfony Dependency Injection component provides yet another built-in dumper: a PHP dumper.
The dumper lets you convert the service container into regular PHP code (expanding the container's functionality out into a Container class based on the XML/YAML configuration.
voice your opinion now!
symfony need speed yaml xml service container dumper expand
Mike Lively's Blog: YAML Now Supported by PHPUnit Database Extension
by Chris Cornutt February 02, 2009 @ 07:52:31
Mike Lively has posted about a new bit of support that the PHPUnit unit testing software for PHP has just gotten - YAML data set parsing.
I have now just committed YAML data sets to the Database Extension for PHPUnit. So now all those that love the simplicity and straightforwardness of YAML can use it with your data sets. I have also created a persistor for YAML datasets so you can easily convert existing data sets or database data into YAML representations.
He includes an example of a bit of YAML markup and one of the major hurdles he had to overcome - trailing line breaks (as shown in the table_2/column 8 in the example). This functionality also includes a persistor that lets you convert things back the other day - current data set to YAML markup. You can find out more about data sets in PHPUnit in this section of the project's manual.
voice your opinion now!
yaml dataset phpunit convert parse persistor
Symfony Blog: YAML in symfony 1.1
by Chris Cornutt June 19, 2008 @ 11:18:38
This new post on the Symfony blog today looks at using the framework's built-in support for the YAML format. They include a few examples of the code to make the files and how to use them.
Here is a short tutorial about my discovery of the new YAML parsing library that comes with symfony 1.1. As you may know, YAML files are a place symfony developers spend time writing configuration, it is very important they have a good tool to manipulate data and debug files.
They include code showing how to pull in a sample file, access the properties inside of it and how to take a multi-dimensional PHP array and push it back out (automagically) into a new YAML formatted file.
voice your opinion now!
yaml symfony framework format configuration tutorial
Lukas Smith's Blog: YAML and PHP
by Chris Cornutt May 26, 2008 @ 13:04:58
In this new post from Lukas Smith he talks about YAML, that handy data storage format and the two methods for its use in PHP (and why he's stuck with one of them).
If you use YAML in PHP, then you had until recently the choice between the C based PECL extension syck or the horrible spyc PHP based implementation. With syck it has the issue that it only supports the core standard and not stuff like merge-key, which is a very very useful extension to the core YAML standard.
He also points out another implementation that the Symfony framework has created - one built around regular expressions (slower, but a "more correct" version).
voice your opinion now!
yaml language extension spyc syck
Padraic Brady's Blog: Zend_Yaml; Gone the way of the Dodo...
by Chris Cornutt February 04, 2008 @ 13:43:00
In filtering through the mass of projects that he's collected around him, Padraic Brady has decided to cut one loose - the Zend Framework package he'd been developing to introduce YAML parsing and functionality to the framework.
I've been going through all those open source projects and cutting the dead weight. [...] One of the victims of this review has been Zend_Yaml. Earlier this morning I found an odd comment on the Zend_Translate_Yaml proposal by Thomas Weidner that he was erasing his proposal on the basis that there had been no progress on Zend_Yaml.
He's removed the proposal from the Zend Framework proposal pages after receiving an email noting that the package would not comply fully to the YAML 1.1 specification and couldn't be included. With the introduction of the Syck extension into PECL, it could support it but Padraic opted to just tell the ZF group about this functionality rather than working on the build himself.
voice your opinion now!
zendyaml yaml zendframework proposal syck pecl
|
Community Events
Don't see your event here? Let us know!
|