 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
P'unk Avenue Blog: Faster, PHP! Kill! Kill!
by Chris Cornutt March 17, 2010 @ 16:36:30
On the P'unk Avenue blog there's a recent post from Tom Boutell looking at optimizing PHP applications and how you can cope with the possibility of "Serious Traffic" that might come your way.
PHP is easy...as programming languages go, that is. You can build sites in a real hurry. [...] Still, sooner or later success catches up with you and you want your site to cope with Serious Traffic...or cope with moderate traffic on a cheap virtual machine...or at the very least, not be dog-slow with just a handful of users on the system.
He mentions things that can slow down the application (like timeouts on web server connections or not optimizing the site with a "thin" server for non-PHP requests). He mentions the alternative PHP cache (APC) as one possible way to help, some tips on making your Apache server more efficient and pushing those lighter requests off to a smaller, built-for-speed server using FastCGI.
voice your opinion now!
optimization fastcgi apc apache request
Zend Developer Zone: Zend Framework MVC Request Lifecycle
by Chris Cornutt March 16, 2010 @ 10:57:42
On the Zend Developer Zone there's a recent post from Kevin Schroder (a Tech Evangelist at Zend) about the MVC request lifecycle for the Zend Framework every time an application runs.
When I have done training for Zend Framework, one of the things that mystifies students to some extent is the whole plugin architecture and where things can go. There has been several articles written about it, but they tend to use code to describe it. [...] I had found that when I drew out the request lifecycle that it helped the students understand it better.
His diagram (seen here) lays out the full execution relationship for the request structure including where plugins, action helpers and controllers fit in the mix. He also describes it in more detail, mentioning some of the variations that could happen along the way.
voice your opinion now!
mvc request lifecycle zendframework
Lorna Mitchell's Blog: Three Ways to Make a POST Request from PHP
by Chris Cornutt January 19, 2010 @ 08:45:33
Lorna Mitchell has a new post to her blog looking at three different ways you can make a POST request to a server - cURL, Pecl_Http non-OOP and Pecl_Http with the OOP interface.
I've been doing a lot of work with services and working with them in various ways from PHP. There are a few different ways to do this, PHP has a curl extension which is useful, and if you can add PECL extensions then pecl_http is a better bet but there are a couple of different ways of using it. This post shows all these side-by-side.
Code snippets are included for each showing a request to the Flickr API. Be sure to check out the post's comments for more great ideas (like streams, the PEAR HTTP_Client package, Zend_Http_Client and other request types without cURL).
voice your opinion now!
post request curl pecl tutorial
Phil Sturgeon's Blog: CodeIgniter "2.0" Rumours, facts and requests
by Chris Cornutt November 02, 2009 @ 21:12:45
In this new post to his blog today Phil Sturgeon takes on some of the rumors that have been floating around about a version 2.0 of the CodeIgniter framework.
Ever since it was announced that ExpressionEngine 2.0 would be running on CodeIgniter, the forums have been jammed full of "CodeIgniter 2.0" questions. I have answer this so many times I wanted to clear things up. [...] I figured, instead of just ranting about it, I could use this oppertunity to discuss what is, what is not and what should be going into CodeIgniter over the next few versions.
He breaks up things into four categories - confirmed features, missing features, minor syntax changes and a "crazy but helpful" section.
voice your opinion now!
codeigniter rumor fact request framework
Brandon Savage's Blog: Peer Review You Have Not Because You Ask Not (Requests & Responses)
by Chris Cornutt September 21, 2009 @ 10:07:46
Brandon Savage's latest post in his "Peer Review" series has been added to his blog today. This time he focuses on the requests and responses - modifying the sample code to make it more testable on how things are quested and the responses they give back.
There is one last area that I want to address, and this has everything to do with object-oriented principles and code reusability. For those who are familiar with OO programming, they realize that the use of classes does not make something object oriented by nature. In this final part of the series, we'll move one step closer to being object-oriented, by introducing the concepts of request and response objects.
He changes up the Twitter object to take in a HTTPRequest object (instead of creating one by itself) and to use exceptions and a "Twitter response object" to encapsulate any responses from the service making it much easier to work with and understand than just a true/false return.
voice your opinion now!
peer review request response tutorial
Lorna Mitchell's Blog: Adding PUT variables to Request Object in Zend Framework
by Chris Cornutt August 17, 2009 @ 09:48:05
Lorna Mitchell has added a new post to her blog about adding in PUT variables to your Zend Framework Zend_Request object (useful for web services).
Its very simple: I have extended Zend_Controller_Action with my own, and all controllers inherit from here. This has a routeAction() which grabs the incoming variables from a PUT request and sets them as parameters within the usual $this->getRequest() scope, then forwards on the request.
Her example adds a call to the isPut method to check for the PUT request type and, if found, takes in the request values and pushes them back into the action's parameter values. Then the controller can make a call back to the request object to pull in the parameters when needed.
voice your opinion now!
put zendframework request object
Brandon Savage's Blog: Of Lies, Damned Lies, and Benchmarks
by Chris Cornutt August 12, 2009 @ 12:28:44
Brandon Savage has posted a response to a recent set of benchmarks as run comparing ASP.NET and PHP's processing speeds.
But benchmarks, for all their decision-making aid, fail under the best of circumstances for one simple reason: they're not real life. Never more is this true than in Joe Stagner's blog post on whether Windows or Linux, and PHP or ASP was faster. [...] Benchmarks come loaded with all sorts of problems. It doesn't matter if it's Microsoft doing them or Apple doing them; they don't mimic real-world conditions, and any number of factors affect how the benchmarks are rendered.
Keeping these things in mind, Brandon looks at some of the issues he found with how the benchamrks were run, the largest of which was comparing the ASP.NET results (with byte code caching) to a PHP install without APC enabled.
voice your opinion now!
benchmarks aspnet bytecode cache request speed
Ian Selby's Blog: Making RESTful Requests in PHP
by Chris Cornutt May 15, 2009 @ 07:57:19
In a new post to his blog Ian Selby looks at working with REST requests in PHP. He includes some of the basics of REST too, for those not completely familiar with the term.
APIs have become a very commonplace part of many popular web sites and services...especially REST APIs. I've already discussed how you can roll your own REST API for your PHP apps, but I've also received countless requests to go over how to actually make RESTful requests. That's exactly what we'll take a look at in this article
His tool of choice is the curl extension, making it simple to create a class wrapper with methods like executePost, executeGet, setAuth and, of course, execute. He outlines the class and gives the code blocks that fit inside each of the major functions. In the end you'll have a class that can make GET, POST, PUT and DELETE requests and be able to correctly parse the response.
voice your opinion now!
delete post put get tutorial request rest
|
Community Events
Don't see your event here? Let us know!
|