News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Image Scraping with Symfony's DomCrawler
March 31, 2014 @ 09:06:43

On the SitePoint PHP blog today there's a new post showing you how to use the Symfony DomCrawler component to scrape content, images mostly, from a remote website. The DomCrawler is one component of the Symfony framework.

A photographer friend of mine implored me to find and download images of picture frames from the internet. I eventually landed on a web page that had a number of them available for free but there was a problem: a link to download all the images together wasn't present. I didn't want to go through the stress of downloading the images individually, so I wrote this PHP class to find, download and zip all images found on the website.

He talks briefly about how the class works and then gets into the contents of the class. He walks through all the code and explains in chunks what each part does in the lifecycle of the request. The end result is a Zip archive file of all images from the remote website, packaged up for easy transport.

0 comments voice your opinion now!
domcrawler symfony framework component tutorial image scrape

Link: http://www.sitepoint.com/image-scraping-symfonys-domcrawler/

The Nerdery:
NerdCast #93 Developer Download Symfony Edition
March 24, 2014 @ 11:20:01

The Nerdery has posted the latest episode in their "NerdCast" podcast series. Usually their shows center around other types of web technology, but this time they're talking about Symfony in this "Developer Download".

Today on the Developer Download we are talking about the web framework Symfony. It's a popular tool here at The Nerdery; in fact, it's our go-to framework for custom PHP projects. Listen in as we talk with 3 Nerdery Symfony experts, covering what Symfony is, what it isn't, news, libraries and more.

Host Andrew Watson talks with a few guests (also Nerdery employees) about the framework (or is it a framework?), what it is and what it's not. They also talk about some of their own history with the framework. You can listen to this latest episode either through the in-page player or you can download the mp3 directly.

0 comments voice your opinion now!
nerdcast ep93 developerdownload symfony framework

Link: http://blog.nerdery.com/2014/03/nerdcast-and-developer-download/

Paul Jones:
Leanpub Sample Files With Symfony and Aura
February 27, 2014 @ 09:51:49

In a recent post to his site Paul Jones shares some work that's been done to help generate books in the Leanpub formatting with an Aura framework-based script.

One of the things that bothers me about some cli/console packages is how the commands you write with them end up being tightly coupled to the "framework" the package provides. [...] Most of the time I don't need a "full console application" - I just need to read some input for the command, run my actual command logic, and send some output from the command. The Leanpub Sampler from Matthias Noback is an example of the kind of thing I usually end up doing in small or one-off projects.

The script makes use of the Aura.Cli component for console interaction then a custom object for the actual work. This completely decouples the CLI handling from the code to produce the resulting document. You can find out more about the Aura framework on the project's main site.

0 comments voice your opinion now!
leanpub sample file symfony aura auracli

Link: http://paul-m-jones.com/archives/5921

SitePoint PHP Blog:
Understanding Symfony Bundle Configuration and Service Container
February 04, 2014 @ 10:46:03

The SitePoint PHP blog has a post today for those that may be new to the Symfony framework or just wanting to get into it and having trouble understanding bundle configuration. In this new post Carl Vuorinen walks you through this process, combining an example bundle with its configuration.

In this post we'll cover different ways on how to configure Bundles in Symfony2 and how the dependency injection container works with the configuration. The Bundle configuration and Symfony dependency injection container (also known as service container) can be difficult concepts to grasp when first starting development with Symfony2, especially if dependency injection is not a familiar concept beforehand. [...] I am used to working with YAML because I think it's more readable than XML, but you do get the benefit of schema validation when using XML.

He briefly introduces the concepts behind "bundles" in Symfony and two ways to create one - either via the generator on the command line or manually. He also shows two ways to get a bundle's configuration loaded. There's the "easy way", configuring it inside the main "confix.yml", or the slightly harder way of adding a configuration file inside the bundle structure itself and using the "get" method to grab the values manually. With the location(s) of the configuration defined, he gets into the contents of the file and its structure. Finally, he shows the complete example, an "ExampleBundle" with a "greet" method that accepts the configuration value from the "cvuorinen_example.greeter" setting.

0 comments voice your opinion now!
symfony bundle configuration container service tutorial introduction

Link: http://www.sitepoint.com/understanding-symfony-bundle-configuration-service-container

SitePoint PHP Blog:
Integrating Polymer/Dart and Symfony - Part 2
January 21, 2014 @ 13:05:11

On SitePoint's PHP blog Taylor Ren has posted the second part of his series looking at integrating Polymer/Dart and the Symfony framework to make a simple browser-based widget. The first part of the series can be found here.

If the server (and thus the configuration, the programming) is managed by ourselves, the process to get data from a RESTful API from that same server will be simple. We can enable CORS in the returned response header. Done! But if the remote server's RESTful API does not set that header, we will face a CORS error when we try to invoke that API call from within the Dart app.

He offers one solution - JSONP - but dismisses it because of its "hacky nature". Instead he opts to use the PHP (Symfony) side to grab the data from the remote feeds and pull it into the local domain for the widget to fetch. Code for both the client side and server side functionality are included as well as the HTML markup to create the page for the widget.

0 comments voice your opinion now!
polymer dart tutorial symfony javascript part2 widget

Link: http://www.sitepoint.com/integrating-polymerdart-symfony-part-2

Symfony Blog:
Help Symfony reach 3 billion people
January 17, 2014 @ 11:53:02

The Symfony project wants your help to allow this popular PHP framework to reach more people all around the world (3 billion, according to them) by helping out with translations in the Validator and Security component.

Internationalization has been one of the pillars of the Symfony success since the very beginning. Besides providing tools to translate both the strings and the contents of your applications, Symfony itself is translated into a lot of different languages. [...] Some of these translations are incomplete or haven't been updated for a long time. For that reason, we are organizing a community initiative to improve the internationalization of Symfony.

The strings they're talking about are in the Validator and Security components and are currently in 20 different languages. They've broken up the ones they're needing help on into a few categories:

  • Completed translations
  • Incomplete translations
  • Unavailable translations
  • Additional translations

Obviously, they'd love ones from any of the last four in that list and they include a few steps on how to grab the latest version of Symfony and get translating.

0 comments voice your opinion now!
symfony project framework translate message validator security

Link: http://symfony.com/blog/help-symfony-reach-3-billion-people

SitePoint PHP Blog:
Integrating Polymer/Dart and Symfony - Part 1
January 15, 2014 @ 10:43:31

On the SitePoint PHP blog today Taylor Ren shows you how to integrate the popular PHP framework Symfony with Polymer/Dart to make a dynamic web application. In this first part of the series, he focuses on just getting things set up and working and creating the first template to populate with data.

In this 2-part series, we are going to look at how to integrate these two powerful tools together, i.e. to run Dart (after compiling to JavaScript) in a Symfony website to add some dynamics. We will also discuss the work-around to avoid JSONP to access data from a remote server where the user has no direct control and the RESTful API called has no CORS enabled. Finally, we will highlight the limitation of the integration and seek the attention of the Dart team to solve the issue and make Dart a better platform.

He starts off with the server-side of things, using Symfony to create a simple template for the site used by the default controller. He then moves to the client-side, showing how to bootstrap Dart and include the resulting Javascript into the page. He includes the markup to add to the page to make things work and the results of his simple "Quote of the Day" application.

0 comments voice your opinion now!
polymer dart tutorial symfony javascript part1

Link: http://www.sitepoint.com/integrating-polymerdart-symfony-part-1

Fabien Potencier:
SensioLabs raises 5 million euros to boost the Symfony ecosystem
December 16, 2013 @ 09:39:43

On his site today Fabien Potencier shares some wonderful news for the Symfony community - Sensio has raised 5 million Euros to help boost the Symfony project and its ecosystem.

Fund raising in the PHP world does not happen that often, and that makes me sad. Of course, PHP has big players like Automattic, Acquia, or Zend, but the PHP world has so many great solutions, great products, and a large community of very talented developers. They deserve more exposure and I hope that our fund raising is one small step into that direction.

As far as their plans on what to do with the funds, they're talking about a few options - improvement of the whole ecosystem around the framework, hiring developers dedicated to the work SensioLabs does for the framework and things like SensioLabs Insight.

0 comments voice your opinion now!
sensiolabs fund symfony framework ecosystem community

Link: http://fabien.potencier.org/article/71/sensiolabs-raises-5-million-euros-to-boost-the-symfony-ecosystem

SitePoint PHP Blog:
Command line PHP using Symfony Console
December 12, 2013 @ 10:34:15

The SitePoint blog has a new post from Daniel Gafitescu covering the use of the Symfony Console component to create command line PHP scripts quickly and easily.

As a PHP developer, you will often find yourself working with PHP in the command line. The first time I had to use it was because I would get the "Maximum execution time of 30 seconds exceeded" error on a shared server where you could not change the max_execution_time PHP setting. Nowadays building command line scripts is much easier than it used to be. If you search on Packagist you will find a lot of packages to work with the command line but the one that stands out and is the most commonly used is Symfony/Console.

He starts with what you'll need to add to your Composer configuration to pull in a development version (2.4.x-dev) of the component. With that installed, he sets up a base directory ("/app") and a basic skeleton for your application. For his first command, he creates a script that will calculate the fibonacci numbers between two given numbers. He shows how to work with the input and Output objects inside the script and the code for the finished command - including some screenshots of the output.

0 comments voice your opinion now!
command line cli symfony console tutorial

Link: http://www.sitepoint.com/command-line-php-using-symfony-console/

Reddit.com:
Evolving code
November 01, 2013 @ 13:28:06

On Reddit.com today timoh has posted a "brief look back" at PHP's evolution to be "enterprise ready" and looks towards the future with some speculations as to what the coming years will bring to the language and its community.

I'm trying to evoke some disqussion about how we have come to the current point of life we have now going on in the PHP field, as an architectural decisions, design and best practices we use to build PHP based software today. [...] Of course PHP language itself has put some walls to design the software the way one would have liked, but still there are alot that could have been done better even "back in the days". At least "better" in a sense what it means today.

He points out that in recent years there's been a push in the community as a whole for things like SOLID/DRY principles, decoupled code and testing. He speculates about the future of things like the Symfony and Zend Frameworks (and the radical changes they both made from their version one to version two). Have your own thoughts about the evolution of PHP and where it might be headed? Share them here!

0 comments voice your opinion now!
evolution code community principles symfony zendframework

Link: http://www.reddit.com/r/PHP/comments/1pofu1/evolving_code/


Community Events











Don't see your event here?
Let us know!


component series overview application framework dependency opinion hhvm hack release security introduction language podcast unittest install composer symfony2 package facebook

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework