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

ZendCasts.com:
Building a JSON End-Point With SLIM and jQuery Part 2
November 09, 2011 @ 10:04:00

On ZendCasts.com today there's a new screencast in their "Building a JSON endpoint with the Slim microframework" series - part two focusing on jQuery integration. (Part one is here)

[This screencast is] part 2 in a series on building a JSON end-point. We're using simple RESTful verbage to grab a list of names from a session store.

You'll need to have the base scripts created in part one to follow along effectively. He picks up right where the previous part ends, creating a new view that uses some simple javascript (jQuery) code to pull the "names" values from his simple JSON endpoint. Also included is an example of a form for adding a new name to the list. The full source for the example can be found over on github.

0 comments voice your opinion now!
json endpoint tutorial screencasts slim microframework


ZendCasts.com:
Building a JSON Endpoint with SLIM (Part 1)
October 26, 2011 @ 10:51:45

On ZendCasts.com today, the next part of their series looking at using the Slim microframework has been posted. This is part one of a tutorial building a JSON endpoint for a web service.

You'll need some of the base that he created in this previous screencast to follow along (the basic structure, really). His takes his basic "hello world" application and builds on it to add a "model" to pull name data from and has the "/names" action respond with a JSON-formatted message (and an "application/json" content-type). His "model" pulls the data out with findAll() and find() methods.

You can grab the source to follow along.

0 comments voice your opinion now!
json tutorial slim microframework message webservice endpoint


Lorna Mitchell's Blog:
PHP OAuth Provider Initial Requirements
May 10, 2011 @ 10:04:59

Lorna Mitchell has a quick post related to some of the OAuth work she's done on both sides, consumer and provider. This latest post relates to the OAuth pages and endpoints that are needed as a part of the authentication process.

This article uses the pecl_oauth extension and builds on Rasmus' OAuth Provider post. [...] OAuth has a little more baggage with it than just passing a username and password to an API.

She lists the five things you'll need for your service and talks a bit about the registration process and how the consumer key/consumer secret keys are generated. There's no strict definition on them, so her example uses a combination of sha1, mt_rand and substr to get the job done. She also includes a sample "consumers" table for your reference.

3 comments voice your opinion now!
oauth provider tutorial requirements consumer endpoint


Content With Style:
Unit testing web service based models in Zend Framework
April 29, 2009 @ 08:44:44

The Content with Style blog has continued their series looking at unit testing with the Zend Framework (see this previous post) with this look at testing services based models.

However, unit testing models that talk to web services presents us with a different set of problem. Usually our application runs requests against something that is not in our control. Unless the service provider gives us some kind of test mode, we're operating with dynamic live data which shouldn't be used for testing, since it's harder to test in the first place, but also could be harmful to be manipulated.

They present two method you can use to test the models: creating mock objects to handle and return correctly formatted data and intercepting the HTTP request to either send it to a Zend_HTTP adapter or a different endpoint (service location).

0 comments voice your opinion now!
unittest webservice model zendframework mock object endpoint http


Jani Hartikainen's Blog:
Improving Ajax performance in Zend Framework applications
March 23, 2009 @ 08:45:03

New on his blog Jani Hartikainen has posted a simple idea that you can take to make sure you're getting the most out of your Ajax/Zend Framework connections.

A common reason to use Ajax in a website is to make it feel faster, so you usually want Ajax requests be processed as quickly as possible. While there are many ways to speed up Zend Framework based applications, there are still some things like routing and dispatching which still add up to the total. There is, however, another way to make Ajax work even faster

Since Ajax requests don't usually require all of the complex routing and dispatching that a normal Zend Framework request might, he recommends creating a separate Ajax handler. His includes an example of a simple searching endpoint with a class handling the backend logic. A simple handler script loads up the bootstrap and makes the request for the search, returning the search results in a JSON format.

0 comments voice your opinion now!
improve ajax performance zendframework endpoint route dispatch



Community Events











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


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

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