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

TutsPlus.com:
Understand the Basics of Laravel Middleware
Jul 26, 2017 @ 17:53:38

On the TutsPlus.com site there's a tutorial recently posted sharing the basics of middleware in Laravel applications - reusable pieces of code that operate on the request and response during the execution of your code.

In this article, we'll dive deep into the Laravel framework to understand the concept of middleware. The first half of the article begins with an introduction to middleware and what it's actually used for.

As we move on, we'll cover how to create custom middleware in a Laravel application. After creation of your custom middleware, we'll explore the options available to register it with Laravel so that it could be actually invoked during the request processing flow.

The tutorial starts by explaining what middleware is and how it functions in the flow of the Laravel application (as well as possible uses). It then starts in on the creation of custom middleware designed to redirect mobile users to the "mobile site" for the service. With the test for that in place the post then shows how to apply the middleware to the application on a route.

tagged: laravel middleware introduction custom mobile example

Link: https://code.tutsplus.com/tutorials/understand-the-basics-of-laravel-middleware--cms-29147

SitePoint PHP Blog:
How to Scan Fingerprints with Async PHP and React Native
Jun 07, 2017 @ 16:52:09

The SitePoint PHP blog has posted a tutorial from Christopher Pitt with another interesting use of PHP: using it and React to scan fingerprints to aid in multi-factor authentication.

We live in interesting times. A short while ago, a company called OfferZen announced a new, programmable credit card. It’s been a long time since I was this excited to get my hands on a piece of tech. My mind has been brimming with ideas ever since.

So, I decided to write about one of them!

I’m going to describe the process of building custom multi-factor authentication for all transactions. I don’t want to do the usual (and boring on its own) SMS or push notification one-time-password stuff. I want to build a fingerprint scanner right into my phone. [...] In this tutorial, we’re going to look at how to set up a simple iOS app using React Native. We will also set up an asynchronous HTTP server, with a web socket connection to the app.

He starts by taking some time to introduce React Native for those not familiar with it and what it brings to the table. He then walks through the installation of React Native and how to install the TouchID package using yarn. He also includes some simple JS code you can use to ensure it's all working. Next up he uses PHP to create an asynchronous server with the amphp/aerys package (this code). He creates the server with a "scan" endpoint handlers for opening the connection, performing the handshake and reacting to incoming data. Then he brings them together, connecting React and PHP, and sets up a script to wait for fingerprints. Code is included to perform the validation of the fingerprint and the end result should look something like this.

tagged: react reactnative fingerprint scanner mobile asynchronous tutorial

Link: https://www.sitepoint.com/scan-fingerprints-async-php-react-native/

Symfony Finland:
How to implement AMP (Accelerated Mobile Pages) on the eZ Platform CMS
Aug 29, 2016 @ 16:44:58

On the Symfony Finland site they've posted an introductory article showing you how to implement accelerated mobile pages (AMP) in an application based on the ez Platform CMS.

Accelerated Mobile Pages is an initiative from Google to speed up mobile browsing. AMP is an open standard based on HTML. It enforces performance by limiting functionality and includes remote caching.

Given Google's continuing dominance search both publishers and CMS vendors need to take AMP into account. In this article you'll learn the basics of how to implement AMP with eZ Platform CMS and Symfony.

The post starts out with a bit of background about AMP and how it relates back to the main content of the site. With that knowledge in place the author moves into the code, showing how to use annotations to create the route, building and returning the template including the meta and link tags required to link this AMP version back to the main content page.

tagged: tutorial amp mobile pages accelerated symfony twig meta link

Link: https://www.symfony.fi/entry/how-to-implement-amp-accelerated-mobile-pages-ez-platform-cms

Noupe.com:
How Will REST API Affect WordPress Developers?
Feb 03, 2016 @ 16:48:31

On the Noupe.com site they've posted an article talking about the WordPress REST API that's been included by default in the project and how it will affect developers on the platform.

With the advent of WordPress 4.4 last year in December, we saw the inclusion of the first half of REST API in the WordPress Core, and the rest of it is expected to be with us in the upcoming major release of WordPress. [...] The community is abuzz with all talks about how important REST API will soon be for WordPress development, and how it is going to change the way developers code and interact with WP.

So, how is REST API going to affect the WordPress users and developers, and what exactly will we be able to accomplish using it?

In the article they talk about the impact that the API will have on the "rise of Javascript" in the WordPress application and the role PHP could play in it all. They also talk about cross-platform integrations the REST API makes possible, the Calypso interface that was recently announced and how it opens up a new world of mobile application possibilities.

tagged: wordpress api rest impact developers javascript crossplatform calypso mobile

Link: http://www.noupe.com/development/cms/how-will-rest-api-affect-wordpress-developers.html

SitePoint PHP Blog:
Mobile App Development with Zend Studio
Jun 29, 2015 @ 15:14:41

On the SitePoint PHP blog they've posted a new tutorial from Daniel Berman about using Zend Studio to create mobile applications in the same interface you're using (if you're a Zend Studio user) to create your PHP applications.

The world has turned mobile. This is not new, and it should therefore be no surprise to anyone that the results of the 2015 DevPulse survey by Zend show that a vast majority of PHP developers are working on, or intend to work on, mobile apps.

Mobile app development poses many challenges for developers, one of which is tying in the front end of the mobile application with the back-end web service APIs. This tutorial describes how to simultaneously create, test and modify both the front and back end of a modern mobile app using Zend Studio’s mobile development features.

He breaks the rest of the post up into several steps to help you get a simple mobile project up and running, complete with a basic Apigility API backend:

  • Creating a Cloud Connected Mobile Project
  • Previewing your App
  • Developing the Back-End APIs
  • Developing the Front-End
  • Testing as an Android Native App
  • Exporting a Native Application Package

The end result is a simple "cloud connected" application that can be installed directly on an Android device as a ".apk" package.

tagged: tutorial mobile application zendstudio android api apigility

Link: http://www.sitepoint.com/mobile-app-development-zend-studio/

SitePoint PHP Blog:
Push your Drupal Site’s Events to your Phone with Pushover
Feb 12, 2015 @ 18:54:12

The SitePoint PHP blog has a new tutorial posted (by Daniel Sipos) about pushing notifications from your Drupal-based application via the Pushover service.

In this article I am going to show you how you can integrate Pushover with your Drupal site. I will illustrate a couple of examples of how you can use Pushover to notify yourself as soon as something happens on your site. The code I write in this article is also available in this repository so you can just clone that if you want to follow along.

He starts with an introduction to Pushover and what kinds of features it offers for the handling of push messages (with the app being not free, but "very affordable"). He help you get everything you need set up including a Pushover account and the Pushover class to use in a custom Drupal module. He includes the code you'll need to configure the module to use the library and a method to create the Pushover class instance. He then shows how to send messages for things like the addition of a new comment and user login via hooks, sending a message when an administrator logs in.

tagged: drupal tutorial pushover push message service mobile application

Link: http://www.sitepoint.com/push-drupal-sites-events-phone-pushover/

NetTuts.com:
How to Create a PyroCMS Theme
May 21, 2013 @ 16:19:25

On NetTuts.com today there's a new tutorial posted showing you how to create a theme for PyroCMS, an open source, PHP-based content management system with a large user base and community.

Like most content management systems, PyroCMS uses front-end themes. Though PyroCMS themes are built a bit differently than what you might be used to from other systems, they’re still quite easy to create. They’re so easy, in fact, that very little PHP experience is required to assemble them!

He walks through things like the folder structure of the templates directory and how to get started on a custom "Foo" theme of your own. He covers how to lay out the HTML markup for the theme and how you can use partials for the sections of the site. He briefly touches on using multiple layout files and how to use different layouts shown only to mobile devices.

tagged: pyrocms theme tutorial introduction mobile markup patrials

Link: http://net.tutsplus.com/tutorials/php/how-to-create-a-pyrocms-theme

Henry Hayes' Blog:
Zend Framework UserAgent Browscap Implementation
Jun 20, 2012 @ 15:55:32

Henry Hayes has a recent post to his blog looking at a the change for the user agent support for the browser detection functionality in the Zend Framework.

Recently it has come to light that Zend Framework are dropping support for the WurflApi Features Adapter in the Zend_Http_UserAgent component. This is due to licensing issues. As of version 1.12 Zend_Http_UserAgent_Mobile constant DEFAULT_FEATURES_ADAPTER_CLASSNAME now specifies that Zend_Http_UserAgent_Features_Adapter_Browscap is now the default mobile adapter.

He shows you how to get the browscap support set up and configured for your PHP installation and what needs to be done to a pre-1.12 ZF release application (using this library) and in a post-1.12 application (almost nothing).

tagged: zendframework browscap browser detection mobile update

Link:

Kevin Schroeder's Blog:
10 reasons to use PHP
May 31, 2012 @ 13:47:14

Kevin Schroeder, in his move towards doing some mobile development, has a new post to his blog about why he's still going to stick with PHP for the backend of this new development work.

I do like working with client/server-like architectures and so I intend to be building apps that have a fair amount of server-side processing to back it up. More details on that to come in the next few months. [...] I have decided that, for the time being, to use PhoneGap for my frontend development. [...] So the question was what to use for the backend development and, to nobody’s surprise I presume, PHP is my chosen way to go.

Some of his reasons for the choice include:

  • PHP is stupid easy to scale
  • It is tied to the web
  • (Available) Frameworks
  • Tons of blogs
  • It integrates with everything

Check out the post for more of his reasons.

tagged: reason use opinion mobile development phonegap

Link:

PHPMaster.com:
Let’s Talk: Efficient Communication for PHP and Android, Part 1
May 28, 2012 @ 21:20:09

On PHPMaster.com today, they've started a new series about integrating two popular technologies - PHP and the Android OS - in this new tutorial from Matthew Turland. He'll show both sides of the code needed to get your Android app talking to a PHP backend.

This two-part article will guide you through the process of building an efficient PHP-based REST web service to be consumed by an Android-based application. Some of the concepts presented here are also applicable to other mobile platforms, such as iOS. I assume you already know the basics of PHP and Android development and that you have a suitable development environments set up for both. I’ll focus mainly on showing you how to handle data serialization and compression in both environments.

In this first part, he starts from the client side, creating the code (Java) that's needed to create the connection to the backend. He stets it up as a background task so its execution won't block the main app from working. He shows how to execute it, running an "on create" method and checking to ensure the network is available for the request.

tagged: tutorial android communication backend mobile java

Link:


Trending Topics: