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

NetTuts.com:
Programming With Yii2 Timestamp Behavior
May 22, 2015 @ 09:47:33

NetTuts.com has posted the next part of their "Programming with Yii2" tutorial series today. This new tutorial in the series focuses on the use of the timestamp behavior to assign the current date to an object (like for create or update dates).

In this tutorial, we'll explore Timestamp Behaviors, which reduce the amount of code you need to write with each new model for the common operation of creating timestamps for inserts and updates. We'll also dive into the Yii2 source code, examining how a behavior is implemented.

He starts with a brief look at what behaviors are (a reminder for those that may have already read about the sluggable and blameable behaviors). He then gets into the Timestamp behavior specifically and how to apply it to the sample project's "Status" instances. He shows the updates needed for the behavior configuration and rules. He also looks inside the component at the code that makes it up and the "touch" method it provides.

0 comments voice your opinion now!
tutorial timestamp behavior yii2 framework series touch

Link: http://code.tutsplus.com/tutorials/programming-with-yii2-timestamp-behavior--cms-23329

NetTuts.com:
Programming With Yii2 Blameable Behaviors
May 20, 2015 @ 10:33:10

NetTuts.com has continued their series about programming with the Yii2 framework with this new tutorial talking about blamable behaviors. These behaviors can de defined similarly to a common concept in other languages/tools, mixins

In this tutorial, I'll guide you through another of Yii2's interesting behaviors: helping automate the common web development task of assigning created by and updated by user_ids across the models in your web app using DRY coding and Yii2 BlameableBehavior. We'll also create a log that records who updated the Status table for every change made.

In his example he shows the code needed to insert and update these two dates related to users of your system. He shows what kind of updates are needed to support it in your migrations and adding in the support for the BlameableBehavior in the models. He then modifies this example to not only log the latest person to modify a record but a history of IDs in a "status log" table.

0 comments voice your opinion now!
tutorial blameable behaviors programming series yii2 framework

Link: http://code.tutsplus.com/tutorials/programming-with-yii2-blameable-behaviors--cms-23287

Product & Support:
Interview with Taylor Otwell
May 15, 2015 @ 09:09:33

The Product & Support site has posted an interview with Taylor Otwell, the creator of the Laravel framework. In it they talk about what Laravel is, how it treats users as "customers" and the community around it.

Taylor is the creator of Laravel, founder of Laravel Forge and founder of Envoyer . I spoke with him about open source software and making the transition to entrepreneurship.

Taylor also answers questions about the ecosystem around the framework (marketing, documentation, etc) and how its helped the popularity of the framework. He also shares a few things he might have changed if he could start over with Laravel, including features he feels are "overdone". They also talk about Taylor's move from a full-time job into being self-employed and how that works with two large open source projects to maintain. Check out the full interview for the answers to these and other questions.

0 comments voice your opinion now!
taylorotwell interview laravel framework community envoyer forge

Link: http://productandsupport.com/taylor-otwell/

NetTuts.com:
Programming With Yii2 Sluggable Behavior
May 13, 2015 @ 12:53:33

NetTuts.com has continued their series looking at programming with the Yii2 framework in this latest part of the series covering the "sluggable" behavior the framework includes.

In this Programming With Yii2 series, I'm guiding readers in use of the newly upgraded Yii2 Framework for PHP. In this tutorial, I'm going to show you how to modify Yii's default view URL routes for model objects to be more user friendly and search engine friendly. Yii provides built-in support for this via its sluggable behaviors. For these examples, we'll continue to imagine we're building a framework for posting simple status updates, e.g. our own mini-Twitter.

They start the tutorial off by defining what a "slug" is for those that may not have used them before. From there they show you how to add in the behavior to the current version of their sample application, adding a new "slug" column to their status table. They then update the status model to reflect the changes and test it out with the insert of a new update. They also show how to implement the slug handling in your routing and add the functionality to the controller to handle the different request. They finish off the post with a mention of managing permanence and uniqueness to prevent overlaps.

0 comments voice your opinion now!
series yii2 framework sluggable slug functionality tutorial

Link: http://code.tutsplus.com/tutorials/programming-with-yii2-sluggable-behavior--cms-23222

DigitalOcean Community Blog:
How To Deploy a Basic PHP Application using Ansible on Ubuntu 14.04
May 13, 2015 @ 10:15:16

If you've ever been interested in learning Ansible and how to use it in deploying your PHP applications, you should check out this new tutorial from Stephen Rees-Carter on the DigitalOcean blog. He walks you through the full process for getting the server and application set up and configured just the way you need it (on a Ubuntu server).

This tutorial covers the process of provisioning a basic PHP application using Ansible. The goal at the end of this tutorial is to have your new web server serving a basic PHP application without a single SSH connection or manual command run on the target Droplet. We will be using the Laravel framework as an example PHP application, but these instructions can be easily modified to support other frameworks and applications if you already have your own.

He starts with a list of the things you'll already need installed and things to know including a basic understanding of Ansible and two servers (they use their own Droplets in the examples). From there, they walk you through a seven step process to get the automated deployment up and running:

  • Installing Ansible
  • Installing Required Packages
  • Modifying System Configuration Files
  • Cloning the Git Repository
  • Creating an Application with Composer
  • Updating Environment Variables
  • Configuring Nginx

Some of the steps here are Laravel-specific as mentioned but if you're familiar with the setup of your own application, it's pretty easy to adapt. Each step includes the configuration changes and commands you'll need to complete it.

0 comments voice your opinion now!
deploy ansible digitalocean setup tutorial configure laravel framework

Link: https://www.digitalocean.com/community/tutorials/how-to-deploy-a-basic-php-application-using-ansible-on-ubuntu-14-04

NetTuts.com:
Localize Your Web Application for Any Country With the Google Translate API
May 04, 2015 @ 10:56:34

In this new tutorial to the NetTuts.com site author Jeff Reifman shows you how to use the Google Translate API to translate the content in your application/website to the language of your choosing. In his examples, he shows how to integrate it with a Yii framework application.

In this tutorial, I'll walk you through my extensions to the Yii I18n extract script which do exactly this. And I'll demonstrate translating my startup application, Meeting Planner, into a handful of languages. Keep in mind, Google Translate isn't perfect and it doesn't address issues related to time and date formats and currencies. But for a quick and affordable (free) way to build default translations for your web application into 50+ languages, this is an ideal solution.

He starts with a brief introduction to the Google Translate API, the languages it supports and how to install the library he's chosen to make the connection. He then gets into the internationalization (i18n) functionality that Yii has (an introduction to that is here) and how to define the "messages" files with the different content strings. These files are defined to there's no need to call out to the API for every piece of content that loads. He shows how to extend the message extraction handling to add in the API request and parsing the result. This information is then added to the current message information files, making it simpler to add in new strings. He then integrates this into the Meeting Planner application and shows how to run the script to call the Google API and switch the language with image results in several different languages of the finished output.

0 comments voice your opinion now!
tutorial internationalization i18n googletranslate api yii framework messages

Link: http://code.tutsplus.com/tutorials/localize-your-web-application-for-any-country-with-the-google-translate-api--cms-23126

NetTuts.com:
Creating a Dating Application with Sinch RESTful API
April 27, 2015 @ 10:19:26

NetTuts.com has kicked off a new tutorial series today about building a dating application with a combination of Laravel, MongoDB and the Sinch service allowing for messaging between users. The Sinch service has several features including voice/messaging/SMS communication methods and device verification.

In this tutorial, we're going to create a dating application for iOS similar to Tinder. For voice and messaging, we will leverage the Sinch platform, making use of its powerful SDK. In the first part, we will focus on the development of a RESTful API to store and retrieve user information. In the second part, the iOS client will hook into this API to find nearby users based on the user's current location. We will use Laravel 5.0 for the RESTful service and will be covering basic concepts, such as routes and controllers. We are also going to define custom models to support MongoDB integration in an ActiveRecord-like manner.

This first part of the series is mostly about just getting things set up so they walk you through:

  • Basic setup of the Laravel application
  • Creation of the Base model (for MongoDB connection)
  • Creating helper methods
  • Building out CRUD functionality for the database layer
  • Making a User model
  • Creating the BaseController class
  • Making a SessionController class (and working with sessions)
  • Building a UserController

They end this part of the series by hooking all of this functionality together with some simple RESTful routing for GET, POST, PUT and DELETE request handling for the various endpoints.

0 comments voice your opinion now!
tutorial series laravel sinch messaging rest api framework part1

Link: http://code.tutsplus.com/tutorials/creating-a-dating-application-with-sinch-restful-api--cms-23709

Christoph Rumpel:
Hello world, I am Laravel (5)
April 24, 2015 @ 12:46:22

With Laravel 5 out in the wild, you may be wondering what this new version has to offer either as someone already using the framework or brand new. In this recent post from Christoph Rumpel you can find out some of the highlights of this new release along with some code samples to illustrate.

So there is this thing called Laravel. You may have heard of it already, but you're not sure what it is actually about? Or you do, but want to know more about it and its great new features in version 5? Great, this post is especially for you! Laravel is at the same time one of the youngest and most popular PHP frameworks out there. So how does this work together? Let us take a closer look at why it is that popular and how it could be of use for you too. We will go through the main functionalities and talk about brand new features in version 5.

He touches on several different topics including: routing, use of the Eloquent ORM, the "artisan" command line tool, controllers, migrations and form request handling. Each section has some example code and a brief description of the feature. Obviously the Laravel documentation is a much more complete resource for each of these topics, but at least this gives you a feel for the framework and what it can do.

0 comments voice your opinion now!
introduction laravel5 framework version features overview

Link: http://christoph-rumpel.com/2015/04/hello-world-i-am-laravel/

TechEmpower.com:
Web Framework Benchmarks - Round 10
April 22, 2015 @ 11:06:58

The TechEmpower.com site has posted round 10 of their PHP framework benchmarks that includes several test types and hardware configurations.

Round 10 of the Framework Benchmarks project is now available! It has been a little less than a year since the previous round and in that time, approximately 133 contributors have made 2,835 git commits. View Round 10 resultsThese contributions have improved the project's toolset and added many new framework test implementations.

Frameworks tested include Phalcon, Slim, Yii2, Fuel, Symfony2, Laravel and CodeIgniter. They've run tests on:

  • JSON serialization
  • Single queries (requests)
  • Multiple queries (requests)
  • Fortunes
  • Data updates
  • Plaintext output

If you click on each item in the tab list above the results, you'll also get a description of what each test entails. They also provide the results in multiple formats, not just in graphical form that include both latency and framework overhead. You can also read more commentary about the results in this related blog post.

0 comments voice your opinion now!
framework benchmark round10 performance blog

Link: https://www.techempower.com/benchmarks/#section=data-r10

NetTuts.com:
Building Your Startup With PHP Scheduling a Meeting
April 21, 2015 @ 11:37:52

NetTuts.com continues its "Building Your Startup with PHP" series today in this latest post enhancing the application and allowing the user to add a meeting.

This tutorial is part of the Building Your Startup With PHP series on Tuts+. In this series, I'm guiding you through launching a startup from concept to reality using my Meeting Planner app as a real life example. Every step along the way, we'll release the Meeting Planner code as open source examples you can learn from. We'll also address startup-related business issues as they arise. All of the code for Meeting Planner is written in the Yii2 Framework for PHP.

In this new post (one of four that will deal with adding a meeting) they start by creating the initial meeting listing page that includes a description, last update date and icons linking to actions to perform on that meeting. Next up they create the "Create Meeting" form and the functionality behind the scenes to make it work. This includes some alerting functionality as well. Next is the functionality to invite people to the meetings, using autocomplete handling to make it easier to locate individuals. Following this they include code to add locations (integrating Google Maps), assigning a meeting time and adding additional notes.

0 comments voice your opinion now!
startup tutorial series schedule meeting yii2 framework

Link: http://code.tutsplus.com/tutorials/building-your-startup-with-php-scheduling-a-meeting--cms-23252


Community Events

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


part2 library example series symfony2 laravel configure framework opinion performance interview php7 composer introduction community application conference api release podcast

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