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

Brandon Savage:
Consuming RabbitMQ messages with PHP
May 31, 2013 @ 09:15:47

Brandon Savage continues his look at using RabbitMQ and PHP together to queue up requests today in this latest post. In this new part of the series, he focuses on the last piece of the puzzle - consuming the requests in the queue. (Parts one and two)

Once you've created a RabbitMQ producer, it's fairly easy to create a consumer. In fact, the only difference is in exactly what commands you're using. The connection, envelope, channel and queue declarations are the same. While in RabbitMQ you publish to the exchange, you actually do consume a specific queue. As a result, the commands for consuming are part of the AMQPQueue class.

He shows you how to set up the code to sit in the background and wait for a queue request and how to fetch them in a non-blocking way. He finishes off the post with a look at handling success and error conditions (based on the status of message consumption, not the result of the processing).

0 comments voice your opinion now!
rabbitmq tutorial consume amqp library success failure nonblocking background

Link: http://www.brandonsavage.net/consuming-rabbitmq-messages-with-php

Ralph Schindler's Blog:
PHP Component and Library API Design Overview
January 19, 2011 @ 09:19:29

Ralph Schindler has written up a new post for his blog today looking at APIs and some things to consider when building them. These aren't the web service APIs you're thinking of - this is the interfaces your code uses to talk to it's own parts.

It's important to have a common understanding of the actual problem area. When we talk about names, we are really talking about the API. An API is a particular set of rules and specifications that a developer can follow to access and make use of the services and resources provided by another particular software program, component or library. Put another way, it is an interface between various software pieces and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers.

He talks about the two different APIs you're usually building at the same time - a consumption API that is the method others use to consume it and the extension API, how the feature allows others to improve upon it. He shares his own API philosophy and a three tips he's learned along the way to make his APIs more robust:

  • Adopt A Common Namespace & Class Naming Scheme
  • Avoid Doing Too Much In the Constructor
  • Avoid final And private
0 comments voice your opinion now!
component library api design opinion consume extend


Brian Swan's Blog:
Consuming SQL Azure Data with the OData SDK for PHP
August 04, 2010 @ 11:22:56

Brian Swan has a new post to his MSDN blog today about using the OData SDK to consume Azure data (ODP is the Open Data Protocol that's been defined). The OData interfaces is a REST-based service used to grab data from multiple types of data sources.

The SQL Azure OData Service incubation (currently in SQL Azure Labs) provides an OData interface to SQL Azure databases that is hosted by Microsoft. Another way to think about this is that SQL Azure OData Service provides a REST interface to your SQL Azure data.

He shows you how to create the SQL Azure Server, make a SQL Azure database and creating the SQL Azure OData service. Then, with that all set up, you can use this other tutorial to connect your script to this new service.

0 comments voice your opinion now!
tutorial consume sql azure data odata sdk


NETTUTS.com:
Working with RESTful Services in CodeIgniter
February 04, 2010 @ 13:03:58

Phil Sturgeon has posted a new tutorial over on the NETTUTS.com site about working with REST services in CodeIgniter. He shows both sides of things - using REST services and making them.

CodeIgniter is becoming well known for its power as a PHP based web application framework, but it's not often that we see examples of it being used for anything else. Today we'll learn how we can use CodeIgniter to create a RESTful API for your existing web applications, and demonstrate how to interact with your own API or other RESTful web-services, such as Facebook and Twitter.

He has the sample code hosted over on his github account where you can pull down the source and follow along from the beginning. His application is created to be flexible enough for multiple output formats (xml, json, html) and respond correctly to the HTTP request types like GET, POST, PUT, DELETE. On the other side he shows how to consume the services via different methods like file_get_contents and cURL.

0 comments voice your opinion now!
rest webservice codeigniter tutorial consume create


Manfred Weber's Blog:
Consuming PHP SOAP Webservices with Flash - Part I
January 03, 2007 @ 09:40:00

Manfred Weber has posted the first part of a quick series looking at pulling information from a PHP-generated SOAP web service inside of a Flash document.

A PHP Pear package to easily create Webservices and WSDL. After several tests with PHP and C# I thought it is time to find a better way in Flash to create backend-driven applications.

He starts with the creation of a simple web service that just returns a string ("Hello!") including what the information page would look like in a browser. Next up is building the Flash side of things - using the serivces.WebService object already in Flash to pull in the info for the service and make the call to the "hello" method.

0 comments voice your opinion now!
flash soap webservice consume serviceswebservice pear package flash soap webservice consume serviceswebservice pear package



Community Events











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


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

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