News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
feed this:

Lorna Mitchell's Blog:
Building A RESTful PHP Server Routing the Request
January 23, 2012 @ 11:14:11

Lorna Mitchell is back with a second installment in her "Building a RESTful PHP Server" series with this new post about handling and routing the incoming requests. (You can find the first part about working with the request here)

This is the second part of a series, showing how you might write a RESTful API using PHP. This part covers the routing, autoloading, and controller code for the service, and follows on from the first installment which showed how to parse the incoming request to get all the information you need.

She shows how to grab the controller name from the incoming request (based on her previous code), create the object for it and execute the requested action name. Also included is a sample autoloader and a basic controller - a UsersController with "getAction" and "postAction" methods for responding to GET and POST requests.

0 comments voice your opinion now!
restful server tutorial request routing controller get post action



Kevin Schroeder's Blog:
Call for webinars (Zend)
January 18, 2012 @ 11:50:07

Kevin Schroeder is looking for suggestions. He wants to know what the PHP community wants to hear about in upcoming webinars from Zend.

Just wrapped up a call working on our webinar schedule for the year. We've got a bunch of ideas but we'd like to also get your input as well. Yes, I know y'all want ZF2 webinars. We have that down. I would also like to do an HTML5 and mobile webinar but I need an SME (Subject Matter Expert) for that. [...] I would also love to have webinars on how to use various API's, even if there is not native PHP support. So, what kinds of webinars do you want?

Leave your suggestions in his comments along with one already suggesting a "Why PHP?" checklist of sorts to help encourage companies/employers to go with the language.

0 comments voice your opinion now!
opinion webinar share zend zf2 html5 api


7php.com:
PHP Interview With Enrico Zimuel Senior Software Engineer At Zend Technologies
January 16, 2012 @ 11:30:04

On 7php.com there's a new interview posted with Enrico Zimual of Zend - "Everything is an Array in PHP".

In this edition, I talked with Enrico Zimuel a computer geek since he was 9yrs old. He has written a couple of books namely "Secrets, Spies and Cipher Codes" published by Apogeo in 1999 and the recent "How to use the digital sign" published by Tecniche Nuove in 2010. Enrico has a pretty impressive 'geek' path. He also speaks at many international conferences [...]. You can find his presentations on slideshare.

Questions in the interview include:

  • How do you find PHP now as compared to when you first started?
  • Based on your experience, what are the good and bad parts of PHP?
  • To someone who wants to become a better PHP developer, what is your advice?
  • What are some good PHP blog or resources you highly recommend?

Read the full interview here.

0 comments voice your opinion now!
interview enricozimuel zend software engineer community


Fabien Potencier's Blog:
Create your own framework... on top of the Symfony2 Components (part 6)
January 13, 2012 @ 11:08:12

In the sixth part of his series on creating a custom framework on top of the Symfony2 components, Fabien Potencier looks at how to improve the previous examples by swapping out the more procedural controllers with actual classes.

The move is pretty straightforward and makes a lot of sense as soon as you create more pages but you might have noticed a non-desirable side-effect... The LeapYearController class is always instantiated, even if the requested URL does not match the leap_year route. This is bad for one main reason: performance wise, all controllers for all routes must now be instantiated for every request. It would be better if controllers were lazy-loaded so that only the controller associated with the matched route is instantiated.

To help solve the issue, he uses the HttpKernel component and its "controller resolver" to figure out how to call the controller and pass it the correct parameters, but only when needed. A resolver object is created and that is used to instantiate the controller object. Sample "action" calls are included to fill out the basic controller (his "leap year" example) and the full resulting code is included both for the framework and the new object oriented controller.

0 comments voice your opinion now!
framework symfony2 tutorial series component controller


PHPMaster.com:
Zend Job Queue
January 13, 2012 @ 08:37:31

In this most recent post to PHPMaster.com Alex Stetsenko takes a look at the Zend Job Queue functionality, a part of the Zend Server installation. He talks about some basic usage to make HTTP requests and a more extended example showing report generation.

Web applications usually follow a synchronous communication model. However, non-interactive and long-running tasks (such as report generation) are better suited for asynchronous execution. One way to off-load tasks to run at a later time, or even on a different server, is use the Job Queue module available as a part of Zend Server 5 (though not as part of the Community Edition). Job Queue allows job scheduling based on time, priority, and even dependencies

In his two examples, he shows the code involved to create a new Queue object and define a HttpJob in it. The first just calls a "sample.php" script that's exposed as a part of your external-facing site and shows how you can get the current status of the job. The more advanced example shows a call to a "report.php" script with a set of options defining things like "type", "length" and "priority". He also points out some other options that can do similar things like Gearman, NodeJs and RabbitMQ.

0 comments voice your opinion now!
zend job queue zendeserver tutorial task status


Zend:
Zend Takes The Pulse Of Developers In The APP Economy
January 12, 2012 @ 12:56:15

In this new press release Zend has announced the posting of the results from their "Zend Developer Pluse" survey - a survey taken of developers world-wide about their habits, preferences and desires.

Zend Technologies addresses [the question of how a new demand for a new generation of apps] in Zend Developer Pulse, a new survey series that takes the pulse of a vibrant community of developers from around the world. The company's first developer survey conducted in late November 2011 offers insights on emerging technology and career trends captured from 3,335 respondents. The findings are summarized in a report now available at [http://www.zend.com/topics/zend-developer-pulse-survey-report-0112-EN.pdf].

The press release mentions some of the details from the survey including that 66% of developers will be working with mobile app development projcts, that next-generation UI deveopment scored high in skillsets, there was a strong interest in cloud development and that there's been a strong rise in the need for PHP development skills in the last year.

You can read the entire report here.

0 comments voice your opinion now!
zend survey pulse results developer


Fabien Potencier's Blog:
Create your own framework... on top of the Symfony2 Components (part 5)
January 12, 2012 @ 10:48:17

Fabien Potencier has posted the fifth part of his series looking at building a custom framework on top of the Symfony2 components. In this new tutorial he adds in one of the major features of any framework - the controller level.

For simple pages like the ones we have created so far, that's not a problem, but if you want to add more logic, you would be forced to put the logic into the template itself, which is probably not a good idea, especially if you still have the separation of concerns principle in mind. Let's separate the template code from the logic by adding a new layer: the controller: The controller mission is to generate a Response based on the information conveyed by the client Request.

He updates the template rendering to use an external method instead of doing it itself and updates the routing to include a "_controller" attribute pointing to the method. The full code for the updated version of the framework is included - a simple request/response with handling for a "leap_year" route.

0 comments voice your opinion now!
framework symfony2 custom controller tutorial series


Kevin Schroeder's Blog:
Connecting to the Zend Developer Cloud with PDT
January 04, 2012 @ 10:10:35

Kevin Schroeder has come back around and has posted a new tutorial to his blog showing how to connect PDT to the Zend Developer Cloud (the "PHP Development Tools" extension for the Eclipse IDE).

A couple of weeks ago I wrote a series of blog posts on how to connect to the Zend Developer cloud with various IDEs. Except one that I missed... PDT. The deployment plugin is already installed in PDT 3 and so you already will have the ability to push to the DevCloud instance.

The process is pretty simple thanks to that plugin - just create the project (or use an existing one), set up a new target for deployment then launch and deploy the PHP application directly. You can find out more about the "PHP Development Tools" on its Eclipse project site.

0 comments voice your opinion now!
pdt development tools zend cloud deployment


php|architect:
A Chat on Zend's phpcloud at ZendCon 2011
December 21, 2011 @ 09:53:45

On the php|architect site today Keith Casey has posted a recording of an interview with Boaz Ziniman of Zend about one of their latest offerings, phpcloud - a platform-as-a-service to provide easy, scalable PHP application hosting.

At the tail end of ZendCon 2011 in October, I managed to corner Boaz Ziniman to chat on the launch of their new product phpcloud. We covered features, limitations, design & implementation considerations, and how it's different than most of the other options out there.

If you'd like to listen, you can grab the mp3 here. It's about 15 minutes long. You can find out more about Zend's cloud offering on phpcloud.com.

0 comments voice your opinion now!
zend phpcloud paas hosting interview boazziniman


Kevin Schroeder's Blog:
Setting up a connection to the Zend Developer Cloud on Linux
December 02, 2011 @ 10:04:10

Kevin Schroeder has a method in one of his latest posts for hooking your linux-based system into Zend's phpcloud platform, complete with an automatic upload (so you're not constantly sftp-ing).

Connecting with the Zend DevCloud in Linux is actually quite easy if you know how to use SFTP. [...] But, as I said in a previous post, I hate having to do command line stuff for each and every file or commit. I like things to work seamlessly. So what I did was write a PHP script that connects to the DevCloud (or any SSH-based endpoint for that matter) and then monitors all of the files and directories for changes, such as a creation, modification or deletion event.

His script (available on github) uses the PECL inotify package to work, but once its set up, you can have the PHP process running the script in the background, pointed at your web root, and have it upload automatically.

0 comments voice your opinion now!
inotify phpcloud zend cloud sftp automatic push



Community Events





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


unittest language application package custom conference phpunit framework development release introduction symfony2 podcast interview series opinion community api test manifesto

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