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

Lee Blue:
PHP vs Ruby - Application Shelf Life
December 10, 2014 @ 13:19:15

Lee Blue has started up a series of posts talking about his reasoning for moving back to PHP from Rails in his applications. In his first post of the series, he looks at application "shelf life" and the overall lifespan of the project and how that relates to things like maintainability and upgrade handling.

I plan to write a series of posts about how we develop, deploy, and support our affiliate software and digital downloads applications. And why, after 5 years of Ruby on Rails development we switched back to PHP. One of the reasons is what I refer to as the shelf life of a web application. Let's talk about what happens to a web application if you just let it sit.

He talks about the "rotting on the vine" that one of his clients' Rails 1.0 application faced when the later versions of the Ruby on Rails framework. He talks about how these kinds of upgrades cost money (and time) and how, with the right selections for the deployment stack, some of the costs could be alleviated. He gives the example of a PHP-based deployment setup and how much of the related technology has been stable and (mostly) unchanging over the years, just with new features being added. He offers a few suggestions to avoid this "app rot" and things startups/freelancers can do to help prevent it in their clients' applications.

0 comments voice your opinion now!
ruby shelflife application rot version deployment stack opinion rubyonrails

Link: http://leehblue.com/php-vs-ruby-application-shelf-life/

SitePoint PHP Blog:
3 Ways to Develop Cross Platform Desktop Apps with PHP
December 04, 2014 @ 10:29:44

In a new post to the SitePoint PHP blog today editor Bruno Skvorc shares a summary of three ways to make desktop applications with PHP that will run across multiple platforms.

PHP as a cross-platform desktop app development language? Blasphemy! Nonetheless, it's possible. A few years ago, everything those interested in bringing PHP to the desktop had had was the now long abandoned GTK PHP. Since then, new players have appeared, though let's first answer the "why".

He answers the "why" question with a list of "several far fetched scenarios" but points out that there's much better tools for the job. He then gets into the three different tools that can be used to make the desktop applications:

He briefly introduces each, explores a bit of what they can do and looks at some of the major hinderances that come with them. He ends with a few links to other, less well-developed options like PHPDesktop, Webinder and PHP GTK.

0 comments voice your opinion now!
tutorial crossplatform desktop application nightrain wxphp tidesdk

Link: http://www.sitepoint.com/3-ways-develop-cross-platform-desktop-apps-php/

Peter Petermann:
Building better project skeletons with Composer
November 06, 2014 @ 11:26:54

Peter Petermann has (re)posted an article he wrote about building better project skeletons with Composer and automate the process to make your life easier.

The more you use modern frameworks and the more modular you build your PHP applications, the more likely you'll use a skeleton (or template) for creating new projects. In fact, most of the better known frameworks provide skeletons for you to bootstrap your application with. Those skeletons are great to get started, but it's very likely you'll have your own stack of composer packages that you integrate in each project after a while. Each skeleton will be slightly different, so you'll likely fork your own. This article is meant to provide you with an understanding on how to build a skeleton that will allow you to automate things as far as possible.

He starts with some of the basics, both in the terminology that will be used in the article and a little bit about projects in Composer. He shows how the Zend Framework 2 project makes uses of a built-in "composer.phar" file to make bootstrapping easier but soon asks how it could be improved. The answer comes in the form of Composer's own "create-project" functionality (with a few additions, like cleanup scripts run after the fact). He then gets into building his own custom skeleton that includes a custom post-create-project cleanup script, templates for static files (README, CHANGELOG, etc) and a basic "composer.json" configuration for the end result.

0 comments voice your opinion now!
tutorial custom project skeleton composer application

Link: http://devedge.wordpress.com/2014/11/05/building-better-project-skeletons-with-composer-2/

Phil Sturgeon:
Composer It's ALMOST Always About the Lock File
November 05, 2014 @ 11:44:49

In his latest post Phil Sturgeon talks about a point that's been argued on both sides of the Composer users out there - whether or not to commit the "composer.lock" file. Phil talks some about it in his article and suggests that you should commit it for applications but not for components.

If you and your employees are a little vague with your composer.json specifications and you don't have a composer.lock then you can end up on different versions between you. Theoretically, if component developers are using SemVer and you're being careful then you should be fine, but keeping your lock in version control will make sure that the same version is on your dev teams computers. This will happen every time you run $ composer install. If you are on Heroku or EngineYard then this will be used for the deployment of your production components as a built in hook, which is awesome.

He mentions an article from Davey Shafik, this being his reaction to it. He suggests, though, that an absolute of "always commit for components" may be too much and could potentially cause other problems. He points out that since the "composer.lock" handling is local to the directory, you can hit up against version requirement issues between them in your application as a whole. He wonders "how strict is too strict" when defining dependencies and some things to think about (like your users) when making the choice to upgrade the libraries you use.

0 comments voice your opinion now!
composer composerlock file commit version semanticversioning semver component application

Link: https://philsturgeon.uk/blog/2014/11/composer-its-almost-always-about-the-lock-file

SitePoint PHP Blog:
Building an Ad Manager in Symfony 2
October 28, 2014 @ 13:29:31

In a recent post to the SitePoint PHP blog Hugo Giraudel shows you how to create an ad manager as a Symfony-based application. His ad manager allows you to use videos, images or HTML content to create and cache advertisements to add to any application.

The main idea was to build an ad manager. What the hell is an ad manager you say? Let's say you have some places on your site/application to display ads. We do have things like this on our site, and one of our teams is (partially) dedicated to bringing those places to life with content. Now for some boring reasons I won't list here, we couldn't use an existing tool, so we were doomed to build something from scratch. As usual, we wanted to do a lot without much coding, while keeping an overall simplicity for the end user (who is not a developer). I think we came up with a fairly decent solution for our little project.

He uses ESI rendering with Twig templates to identify the ad to return, grab its configuration and render it back to the requesting client. He includes a global configuration (URI and allowed types) an an example of a per-ad configuration file that includes the cace settings, data type and link. The code is also included to consume the request for the ad and render the result. There's also a "randomize" method that picks a random item from the array by weight. Finally, he includes the view templates that can be used to render the results - one for the main ad layout and a few for each type (video, image or HTML).

0 comments voice your opinion now!
advertisement manager symfony2 application tutorial

Link: http://www.sitepoint.com/building-ad-manager-symfony-2/

Angular Tips:
Working With a Laravel 4 + Angular Application
October 28, 2014 @ 09:11:31

On the Angular Tips site today they have a tutorial posted showing you how to combine the power of the Angular JS frontend framework with a Laravel backend. They walk you through the full process of getting an application up and running, including a bit of actually functionality (not just a "Hello World").

So you decided that Laravel is a great choice for a backend and that Angular is going to fit perfectly as the framework of choice for the frontend. Yeah! That is correct and I am starting to like you. How to start? So many question, so little time.

They start by getting everything you'll need installed, both on the Laravel and Angular sides. Then it gets into the actual development of the application, changing up the default Laravel page to include Angular and a little test to be sure it's working correctly. With this working correctly (after a little route updating too) they get to the more real-world application: a listing of TV shows generated from a dataset on the Laravel backend. They include all the code you'll need to create the frontend app and display the results.

0 comments voice your opinion now!
laravel tutorial angularjs application frontend framework

Link: http://angular-tips.com/blog/2014/10/working-with-a-laravel-4-plus-angular-application/

SitePoint PHP Blog:
Bitcoin and PHP with Coinbase's API - Demo App
October 09, 2014 @ 09:25:51

The SitePoint PHP blog has posted the second part of their series about using the CoinBase API through PHP. In this new tutorial they use the API connection made in the first part via the Coinbase SDK.

In part 1, we covered basic installation and usage of Coinbase's Bitcoin PHP API and the accompanying SDK. In this second and final part, we'll be building our sample application.

He briefly shows how to send and receive bitcoins before diving into the application. His simple application includes a basic welcome page, a payment page, thanks page and a cancel page (in case of errors). Complete code for the HTML, CSS, and PHP (API calls) is included in the post. He shows how to create the button to start the payment process and add it to the page.

0 comments voice your opinion now!
coinbase bitcoin series tutorial part2 demo application

Link: http://www.sitepoint.com/bitcoin-php-coinbases-api-demo-app/

Sameer Borate:
Creating Twitter Apps in PHP
September 29, 2014 @ 09:28:42

Sameer Borate has a post today showing how you can create a simple Twitter application in PHP making use of their REST API and the twitter-api-php library.

In this post we will look into accessing Twitter REST API in PHP. This can be useful if you need to post Tweets from your PHP application or anaylze, search Tweets. In the following examples we will use the twitter-api-php PHP wrapper for Twitter v1.1 API. Although there are a few wrappers around, this one I like for its simplicity.

He helps you get the library installed (via Composer) and create an application on the Twitter side at apps.twitter.com. Sample code is included showing how to connect to the API with your credentials, including handling the OAuth authorization piece. From there he shows two examples of action to make on the API: posting a new tweet and searching for new tweets based on a query string.

0 comments voice your opinion now!
twitter application tutorial introduction library oauth search post tweet

Link: http://www.codediesel.com/social/creating-twitter-apps-in-php/

NetTuts.com:
How to Build Rate Limiting into Your Web App Login
September 22, 2014 @ 11:12:14

In this new tutorial on NetTuts.com, Jeff Reifman shows you how to build rate limiting into your application to help with issues on your login caused by possible brute force attacks.

Since one of the wealthiest corporations in the world [Apple] didn't allocate the resources to rate limit all of their authentication points, it's likely that some of your web apps don't include rate limiting. In this tutorial, I'll walk through some of the basic concepts of rate limiting and a simple implementation for your PHP-based web application.

He starts with a brief look at how (brute force) login attacks actually work and how that relates to the most common passwords used. He splits out the two main approaches to rate limiting in applications: limit based on failures by username or limiting by IP address. He then gets into the actual code examples, choosing a Yii framework-based application for his illustration. He creates a simple "failed login" database table, shows how to log the attempts and includes a snippet to purge items older than (by default) 120 minutes ago. Finally, he includes the code to check the table and see if the username has too many failures listen and, if so, denies them access.

0 comments voice your opinion now!
rate limiting login application tutorial mysql database

Link: http://code.tutsplus.com/tutorials/how-to-build-rate-limiting-into-your-web-app-login--cms-22133

SitePoint PHP Blog:
Build a New App with Laravel and EmberJS in Vagrant
August 25, 2014 @ 11:31:58

The SitePoint PHP blog has kicked off another series of posts today with part one of a series looking at building an application based on the Laravel PHP framework and EmberJS.

Nowadays, everything is turning into a web application. Even simple websites have a mobile app relying on a REST Api. Web applications are accessible everywhere - on a laptop, desktop, tablet, mobile, and recently on wearable devices like smartwatches. Everything is becoming smaller and faster - front ends are becoming separated from back ends, and only communicate with the server through APIs. In this series, we are going to create a photo uploading app. For the front-end, we will use EmberJs and Foundation 5. [...] For the back-end, we will use Laravel. The source code will be available per-part, and in final shape in the final part of this series.

They go with the Laravel Homestead virtual machine (and Vagrant) to make for a quick setup and stable environment. They help you get it all set up to push up to Heroku and get all needed dependencies, both frontend and backend, installed. They also walk you through the setup of the database, configuring the connection and deploying the application to production.

0 comments voice your opinion now!
tutorial emberjs vagrant laravel homestead application series part1

Link: http://www.sitepoint.com/build-new-app-laravel-emberjs-vagrant/


Community Events





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


list language interview version symfony community conference laravel tool podcast security series voicesoftheelephpant composer artisanfiles opinion introduction framework release library

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