 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
MaltBlue.com: Use RouteMatch in Zend Framework 2 For Easy Routing
by Chris Cornutt May 02, 2013 @ 11:14:22
In the latest to his site Matthew Setter takes a look at easy routing with RouteMatch in Zend Framework 2 applications. The RouteMatch component gives you better control over your routing and lets you define "match paths" for URL to Controller mappings.
Today using Zend Framework 2 RouteMatch, Router and Request objects, I show you an easy way to dynamically update the current route. It's almost painlessly simple. [...] Well, like most things in web application development, what starts out simply in the beginner often grows more complex over time. So too is my once simple route.
His "simple" route started getting a bit out of control when he added in some pagination to the page (and query for the path match). He wanted to figure out how to re-render data with the same filters but show the next page of data. He shows how to use the RouteMatch component to achieve just this. He creates a custom module with a "listViewToolbar" helper that lets you read the router, request and handle the parameters sent via the URL. The "invoke" method is called to render the toolbar in the page, complete with the new settings.
voice your opinion now!
routematch zendframework2 tutorial routing http toolbar pagination
NetTuts.com: HTTP The Protocol Every Web Developer Must Know - Part 2
by Chris Cornutt April 29, 2013 @ 15:07:21
NetTus.com has followed up their previous article covering some of the basics of the HTTP protocol with this new post, part 2 of the series. They suggest that HTTP, the messaging format of the web, is the one protocol that every web developer should know.
In my previous article, we covered some of HTTP's basics, such as the URL scheme, status codes and request/response headers. With that as our foundation, we will look at the finer aspects of HTTP, like connection handling, authentication and HTTP caching. These topics are fairly extensive, but we'll cover the most important bits.
In this article, they talk about things like the HTTPS secure version of HTTP, server-side connection handling, identification/authorization and working with caching and cache control headers.
voice your opinion now!
http developer knowledge https authentication connections caching
NetTuts.com: HTTP The Protocol Every Web Developer Must Know - Part 1
by Chris Cornutt April 09, 2013 @ 10:56:28
On NetTuts.com there's a new tutorial about what they think is the one thing every web developer should understand - the HTTP protocol and how its used in web-based communications.
HTTP stands for Hypertext Transfer Protocol. It's a stateless, application-layer protocol for communicating between distributed systems, and is the foundation of the modern web. As a web developer, we all must have a strong understanding of this protocol. Let's review this powerful protocol through the lens of a web developer. We'll tackle the topic in two parts. In this first entry, we'll cover the basics and outline the various request and response headers.
They cover some of the basics of the protocol first including its statelessness, the concept of URLs and the HTTP "verbs" (like GET, POST and DELETE). They also briefly cover the HTTP response codes (ex. 200, 304) and the flow of the request and response to and from the web server. They also look at some of the basic HTTP headers and the actual low-level text formats of the requests/responses.
There's a section at the end of the post that links you to a few tools that you can use to view the HTTP messaging happening in your requests, some of which you might already have. They also briefly cover the use of HTTP in a few libraries - ExpressJS, Ruby on Rails and jQuery's Ajax handling.
voice your opinion now!
http protocol series basics headers statuscode verb request response
System Architect: Integrate PHP application with Solr search engine
by Chris Cornutt March 12, 2013 @ 12:01:43
On the "System Architect" site there's a recent post showing you how to integrate PHP and Solr, the searching tool from the Apache project.
So why do you need a search engine, is database not enough? If you create a small website it might not matter. With medium or big size applications it's often wiser to go for a search engine. Saying that, even a small websites can benefit from Solr if you desire a high level of relevance in search results.
Their example involves an ecommerce website and a search for a term (iPhones) and how difficult it could be to match against the possible multiple variations on the models. Solr makes this kind of searching easier. He shows you how to get a Solr instance all set up and configured as well as the PHP PECL extension from here. A sample PHP script is also included showing connecting to Solr, inserting a new document and searching for a simple query of "hello".
voice your opinion now!
solr search engine tutorial integration pecl extension
Lorna Mitchell: Installing XHGui
by Chris Cornutt March 07, 2013 @ 12:15:01
Lorna Mitchell has a new post today showing you how to install XHGui to help with profiling your application for performance and processing issues.
If you're not familiar with XHGui it's a fabulously easy and friendly way to profile your application; to understand which method calls in a page take the time and how many times they are made, so you can improve the performance of your application. All these instructions are for my 32-bit Ubuntu 12.10 system, hopefully they will work for you or you'll be able to adapt them as appropriate.
She lists the dependencies you'll need to have installed before you can get XHGui working correctly including a MongoDB instance and the PECL xhprof extension. With those all set to go, you can go grab the latest XHGui from github and drop it into place.
voice your opinion now!
xhgui xhprof profile application installation pecl mongodb
Lukas Smith: On predictable PHP release cycles
by Chris Cornutt March 01, 2013 @ 09:37:52
Lukas Smith has a new post today about what he sees as an important part of PHP (or really most open source projects) - a predictable release cycle. It centers around the recent proposal to introduce the Zend Optimizer+ into the core and how it seems to be causing a delay with 5.5 (maybe up to 2 months).
What troubles me though is that its being proposed very late in the game for PHP 5.5, therefore causing a likely delay of 5.5 of at least about 2 months in the best case scenario if it were included. The other option of including it in 5.6 does not seem to be as popular at this point. This saddens me quite a bit since I believe that predictable release cycles would carry several advantages
He points out some things that come along with having predicability around the software releases like developers knowing when/if their changes will make it into the next release. It also makes it easier for end users to plan their releases of their own software, knowing when they'll be getting a feature. In this particular case, though, he doesn't quite understand the delay as the Zend Optimizer+ isn't a change to core, it's an addition:
What is even stranger for this case is that we are just talking about an extension here. Its not a language feature, there is no engine level integration. So even if its not added to core, people can easily get Optimizer+ via PECL. So in this case we are not talking about people having to wait another 10-11 months. Don't get me wrong I think getting an opcode cache into core is awesome, but the reality is that shared host users will probably still not have access to it [...] and the rest can still get it, albeit with a bit more effort.
voice your opinion now!
predictable release cycle zendoptimizer opcode pecl extension opinion
Lorna Mitchell: PHP and Gearman Unable to connect after upgrade
by Chris Cornutt February 28, 2013 @ 12:55:48
Lorna Mitchell has shared some advice about correcting an issue with PHP and Gearman after she did an upgrade via PECL.
I upgraded PHP and related pecl modules on my development machine today, and ran into a problem with Gearman. Actually I ran into more than one! Firstly the challenge of getting the newest pecl version working with a gearman version. Then an error where my existing PHP application couldn't connect to gearman after upgrade.
Running on Ubuntu, she found this tutorial helpful in getting Gearman back into a working state and installed (version 1.1.1). The "unable to connect" error turned out to be a change in how the Gearman connection needed to be made - the addition of a port to the connection string made things work again.
voice your opinion now!
gearman connection issue pecl ubuntu port
Jason Fox: Use the Accept Header to Set Your Return Data With Zend Framework 2
by Chris Cornutt February 22, 2013 @ 11:42:35
Jason Fox has a recent post to his site about using "Accept" headers in Zend Framework 2 apps to set the format of the return data from a request.
In this article I detail the process by which you can set up your controller actions in Zend Framework 2 to return either the default HTML, or JSON data depending on the "Accept Header" in the request. It incorporates changes related to a security update added since this very helpful article was written, and expands on some of the intricacies of making your web layer objects better "json providers."
His example uses a "ViewJsonStrategy" and the criteria to look for to determine which version to respond with (HTML or JSON) - the Accept header. It uses the JSON encoder/decoder instead of the built-in PHP one to he could use the included "toJson" method to customize the output of the JSON instead of just returning everything.
voice your opinion now!
accept http header zendframework2 tutorial json
|
Community Events
Don't see your event here? Let us know!
|