News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
The PHP 7 Revolution Return Types and Removed Artifacts
January 19, 2015 @ 13:12:14

On the SitePoint PHP blog today Bruno Skvorc has written about the PHP 7 revolution and some of the changes coming with this next major version of the language (including return types and the removal of some functionality).

With the planned date for PHP 7's release rapidly approaching, the internals group is hard at work trying to fix our beloved language as much as possible by both removing artifacts and adding some long desired features. There are many RFCs we could study and discuss, but in this post, I'd like to focus on three that grabbed my attention.

He touches on a few topics in the post including:

  • the debate that came up about PHP 5.7 versus PHP 7
  • The addition of return types from functions/methods
  • The removal of PHP4 style constructors
  • Changes to the extension API

Obviously, since PHP7 is no where near release status, all or some of these things could be subject to change. For example, the removal of PHP4 constructors is still being hotly contested on the php.internals mailing list at the time of this post.

0 comments voice your opinion now!
php7 revolution returntype remove php4 constructor extension api

Link: http://www.sitepoint.com/php-7-revolution-return-types-removed-artifacts/

NetTuts.com:
Building With the Twitter API Repeating Tweets From a Group
January 19, 2015 @ 11:18:45

NetTuts.com has continued their series about constructing a Twitter application as a Yii framework-based application. In this latest tutorial they expand on the previous post's "tweet storm" functionality and instead posts random updates based on pre-defined content. If you need to catch up, you can find the other parts of the series here.

The nature of the Twitter stream makes repetition useful, within reason; overdoing it is spammy and annoying.[...] This automates the task of repeating and creating variation over time to increase the likelihood that your Twitter followers will engage with your content. Keep in mind that the Twitter API has limits on repetitive content. You'll be more successful if you offer a wide variety of variations and run the service on an account that you also use manually to share other content.

They start with a short list of features the application needs to support including the main goal of posting the randomized, recurring tweets. They start by creating the Group model and table to allow for the grouping of tweets. Then they use Yii's scaffolding to create a form for creating new groups. Next up is the controller code to handle the group submission and an update to link a tweet to a group. Finally they include the code to push the tweets out to Twitter and mark the tweets as sent. The post ends with an example of a timeline with the resulting posts.

0 comments voice your opinion now!
tutorial series twitter api repeat tweets group random

Link: http://code.tutsplus.com/tutorials/building-with-the-twitter-api-repeating-tweets-from-a-group--cms-22490

SitePoint Business & Marketing Blog:
Do You Need an API?
January 14, 2015 @ 11:05:32

In a new post to the SitePoint Business & Marketing blog Chris Ward asks an interesting question that applies to both the business side and development: do you need an API?.

API stands for 'Application Programming Interface' and as the name implies, creating one is a technical process. This article will talk very little about how to create an API as there are a myriad of methods to undertake that. This article aims to focus on the business side of APIs and supply advice for non-technical folk. [...] You may be a forward thinking individual inside of an organizational structure that doesn't share your views. How can you convince others around you that having an API may be good for your business?

He talks about three of the main kinds of organizations out there that usually have APIs including government, civic and science organizations and most other online services that integrate them into their core services. He also tries to help you answer the question for your own organization by listing some of the positives it can provide as well as some of the negatives that could balance them out. He ends the post with one final recommendation if you do choose to implement an API: "Don't reinvent the wheel".

0 comments voice your opinion now!
api need question positive negative business marketing

Link: http://www.sitepoint.com/do-you-need-an-api/

SitePoint PHP Blog:
Adding Products to Your eBay Store with the Trading API
January 13, 2015 @ 12:50:14

The SitePoint blog has posted the next part of their "using the eBay trading API" series today (part three) showing you how to add products to your store via their API.

In this third and final part of our eBay Trading API series, we'll be building the product adding functionality into our application. Now that we're done with the store settings, we can begin with writing the code for the controller that would handle the creation of products.

He walks you through the code to create the "new" action on your Slim controller, build the view to gather the product information and handle the upload of product images with the Dropzone Javascript library. Also included is the code to get the current category list (to populate a dropdown list) and the code needed to create the product, both in your database and sending it back to the eBay API for insertion. This finishes the series about using this API, but you can get more information on the API itself though its documentation. The full code for the tutorial series is available on GitHub.

0 comments voice your opinion now!
ebay trading api tutorial series part3 add product upload

Link: http://www.sitepoint.com/adding-products-ebay-store-trading-api/

SitePoint PHP Blog:
Configuring Your Store's Settings with the eBay Trading API
January 12, 2015 @ 11:18:22

The SitePoint PHP blog has posted the next article in their "eBay Trading API" tutorial series today. In this new tutorial they show you how to configure your store's settings.

In part 1, we explained the different parts of eBay's developer dashboard and configured our test application. We also created our database. Now we're ready to create a project. In this part, we'll focus on store settings. In part 3, we'll add new products to our store.

They include the "composer.json" contents you'll need to install all of the libraries they'll use for the tutorial. With those installed they start in on the code, creating a basic Slim application that uses Twig views and some custom configuration options. Then he starts in on the classes, creating an "Ebay" class to handle the application settings and creating a "post" method to handle the API request. He adds in a few other helper methods and builds a database object/query to get the application details from the database. Next up are the templates for the main page and the controller to handle the default, session and token requests. He adds in some additional route configurations, makes a "view action" for the store settings and to request the user preferences from the API.

0 comments voice your opinion now!
configure store setting ebay trading api series part2

Link: http://www.sitepoint.com/configuring-stores-settings-ebay-trading-api/

SitePoint PHP Blog:
Introducing eBay's Trading API - Setting Up
January 06, 2015 @ 12:58:43

The SitePoint PHP blog they've posted the first part of a new series about using the eBay API as a part of a product management application. In part one they start by getting things set up on the eBay trading API and creating the database you'll need for the rest of the series.

In this tutorial series, I'll walk you through Ebay's Trading API. The Trading API allows you to build applications that can be used for selling in Ebay. Here are some examples of things you can do with the API: retrieve store information, update store preferences, add products to a specific eBay store, end product listings, update product price and retrieve product information. In this tutorial, we'll be creating an app that allows users to create a product on eBay through the use of the API.

They start by helping you register an application on the eBay developer site and configure the settings to match your needs. They link to some of the tools you can use during your development and some of the headers/content you'll need to set to make your requests. The tutorial wraps up with the SQL needed to create the database backend for your store's settings, products, listings and some sample data to insert.

0 comments voice your opinion now!
ebay trading api tutorial series part1 product management

Link: http://www.sitepoint.com/introducing-ebays-trading-api-setting/

AWS Development Blog:
Preview the AWS Resource APIs for PHP
January 06, 2015 @ 10:32:37

On the AWS development blog Jeremy Lindblom has a recent post with a preview of the AWS resource APIs for PHP and the AWS SDK for PHP.

This year is just about over, but we are too excited to wait until the new year to share with you a feature we are developing for the AWS SDK for PHP. We are calling it the AWS Resource APIs for PHP. This feature is maintained as a separate package, but it acts as an extension to Version 3 of the AWS SDK for PHP.

He talks about the new resource objects that contain information to identify what it represented (like a S3 bucket or SQS queue) and includes an example object structure. He shows how to perform actions on the objects and working with collections. He also includes a helpful hint about using the "respondsTo" method on the object to get the methods the object can use.

0 comments voice your opinion now!
aws resource api sdk update feature object actions collections

Link: http://blogs.aws.amazon.com/php/post/Tx3K1TS5GUKJR85/Preview-the-AWS-Resource-APIs-for-PHP

Sameer Borate:
Integrating Googles new reCAPTCHA in PHP
December 17, 2014 @ 09:23:10

Recently Google announced their reCAPTCHA without a CAPTCHA technology to help make preventing automated systems (usually spammers) from causing issues in your applications. In this new post from Sameer Borate, he shows you how to implement this new kind of CAPTCHA in your PHP-based application.

For the past several years Google's reCAPTCHA has helped verify that a user is not a bot by forcing you to decipher warped text. reCAPTCHA's method of protecting websites from spam has always been a kind of burden on the end user who has to solve the captcha to prove that he is human and not a bot. [...] Google recently released a new captcha API called "No CAPTCHA" reCAPTCHA, which utilizes an Advanced Risk Analysis engine that is capable of discerning between users and bots. So instead of solving a jumbled box of text all a user has to do is check a box.

He walks you through the full process of the integration:

  • Signing up for an account/API keys
  • Rendering the HTML for the actual widget (using Google Javascript)
  • Validating the user's response via an API call
  • The PHP you'll need to perform the validation

He also briefly mentions some of the customization available and provides the code as a download so you can see it all working together.

0 comments voice your opinion now!
google captcha nocaptcha recaptcha api tutorial configure setup

Link: http://www.codediesel.com/security/integrating-googles-new-nocaptcha-recaptcha-in-php/

SitePoint PHP Blog:
Writing API Documentation with Slate
December 15, 2014 @ 13:46:59

The SitePoint PHP blog has a new tutorial for the API developers out there showing you how you can use Slate for creating documentation. They point out a few other tools or formats you could use, but focus in on Slate, a Markdown-based tool that converts the result to HTML.

So you've built yourself an API. Perhaps it's RESTful, RESTlike or something else entirely. [...] There's one more thing, however. Thing is, an API is only as good as its documentation. That applies if it's for internal use only - perhaps it's for a JavaScript-based one-page app, or a mobile application - but even more so if it's for public consumption.

He includes an example of what the output looks like first so you know what the end result will be (and if it meets your needs). They then walk you through the installation of Slate and a few Ruby tools you'll need to generate the HTML output. He includes a simple example of the configuration and a simple document with four sections. He also shows how to use includes, alerts, tables and a sidebar. Finally he gives the "rake" command to build the documentation and how to you can push the result up to your own GitHub Pages.

0 comments voice your opinion now!
slate api documentation tutorial install configure example

Link: http://www.sitepoint.com/writing-api-documentation-slate/

Michelangelo van Dam:
Running Apigility on Azure
November 21, 2014 @ 11:55:15

Michelango van Dam has a new post on his site today walking you through the process of running Apigility on Windows Azure. Apigility is a project from Zend that makes creating and maintaining APIs much simpler (based on the Zend Framework).

Since a couple of years I've been a fan of Microsoft Azure, the cloud platform by Microsoft. It offers a platform as a service (PaaS) in the form of Azure Websites which makes it a great solution to prototype and to play with new stuff. Last year Matthew Weier O'Phinney announced Apigility at ZendCon, a manager for API design. It was immediately clear that it would revolutionise the way we would design and manage REST API's.

Michelangelo walks you through the entire process, starting locally. He shows you how to clone and set up the latest version of Apigility and create a basic endpoint named "demo". He adds in a bit of code to handle the API request (returning user data) and includes an example of what the REST request looks like. With that up and running, he moves on to the Azure side of things. He shows you how to create a "web.config" file to configure the Azure server and run Composer as the install is being processed. He helps you get an Azure account set up and shows how to set up the website instance where you'll deploy the application, pointing it to a GitHub repository as a deploy source.

0 comments voice your opinion now!
apigility windows azure deploy tutorial introduction rest api

Link: http://www.dragonbe.com/2014/11/running-apigility-on-azure.html


Community Events





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


podcast threedevsandamaybe interview community laravel framework unittest language introduction composer series conference version voicesoftheelephpant configure opinion symfony list release api

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