News Feed
Sections




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

PHP Roundtable:
021 From Idea To Production Part 1
May 29, 2015 @ 12:17:24

The PHP Roundtable podcast, hosted by Sammy Powers, has a new show posted (#21) staring off a series about moving from just an idea to a production application. His guests for this episode are Steven Maguire, Jocelyn Lopez and Glen Hinkle.

We discuss an idea for a web app and identify ways to turn it into a real-life product on the web.

We start with describing the domain and the problems the app should solve. Then we identify the personas that will interact with the app. We discuss the features features the app should have to fix the problems and we sort all the features by priority. Finally we talk about timeline, deliverables and next steps. The app we discuss will be launched to production by the next airing of this multi-part series of taking an idea to code.

You can watch this latest episode either through the in-page video player or directly over on YouTube

0 comments voice your opinion now!
phproundtable podcast video idea production application part1 ep21

Link: https://www.phproundtable.com/episode/part-1-turning-an-idea-into-code-for-production

NetTuts.com:
The Ternary Operator in PHP
May 29, 2015 @ 11:41:44

If you're relatively new to the PHP language, there's an interesting "shorthand" method for evaluation that you may not know about. In this new tutorial from NetTuts.com they show you this handy method - the ternary operator.

The ternary operator allows us to simplify some PHP conditional statements. We'll see how it can be used, with test-driven development and refactoring, to simplify code.

While the tutorial is largely a screencast, they do provide a quick summary of what the operator is mainly used for and an example for quick reference.

0 comments voice your opinion now!
ternary operator tutorial screencast introduction evaluation

Link: http://code.tutsplus.com/tutorials/the-ternary-operator-in-php--cms-24010

HHVM Blog:
Covariance, Contravariance, and super Type Constraints
May 29, 2015 @ 10:13:24

The HHVM blog has a new post that talks about covariance, contravariance, and super type constraints - enhancements to the previous generics handling in the Hack language.

Hack has recently enhanced its generics with two features: variance annotations and super type constraints. In this post, I'll explain how they work and why they were added.

They start with variance and how the idea of covariance (consistent type variance in class parameters) fits in. They include a code example showing how this typing works and some of the issues with following this covariance flow. Following this they talk about contravariance, the opposite of covariance, where the typing can be used as a parameter type but not a return type. They go on to talk about the idea of "super type constraints" and how they augment the current type constraint handling to provide improved type resolution. They end the post with a bit about how "super" relates to "as" constraints and a historical note about some hard-coded class names that are always resolved as either co- or contravariant by the typechecker.

0 comments voice your opinion now!
covariance contravariance super typeconstraints example history

Link: http://hhvm.com/blog/9215/covariance-contravariance-and-super-type-constraints

Laravel News:
Everything we know about Laravel 5.1 - Updated
May 29, 2015 @ 08:59:30

With the next Laravel release (5.1) coming soon, the Laravel News site has gathered together all of the information that's been shared about what's to come. In this new post they list some of the updates and code where needed to illustrate.

Laravel 5.1 is scheduled for release in May and lots of new features will be included in this release. Here is a list of eight of the big changes and new features.

Their list of eight includes things like:

  • LTS, Long Time Support
  • Resolve a service from blade
  • Middleware Parameters
  • Broadcasting Events

You can find out more about these and others on the list in the full post.

0 comments voice your opinion now!
laravel5 version upcoming new feature updated top8 list

Link: https://laravel-news.com/2015/04/laravel-5-1/


Jonathan Wage:
Using the Symfony Expression Language for a Reward Rules Engine
May 28, 2015 @ 10:07:27

Jonathan Wage has a new tutorial on his site showing you how to use the Symfony Expression Language to create simple logic statements. He illustrates with a project they (OpenSky) applied it on - a "reward" rules engine.

We recently adopted the Symfony Expression Language in the rules engine at OpenSky. It has brought a new level of flexibility to our system and creating new logic has never been easier. [...] The expression language allows you to perform expressions that get evaluated with raw PHP code and return a single value. It can be any type of value and is not limited to boolean values.

He starts with a simple example, showing how it can return a boolean based on the results of an evaluation of an array of data. He then takes this up to the next level and use it with a Doctrine object, evaluating the results of methods to apply "rewards" to a user's account. He shows how to define the Doctrine objects with the necessary methods, how to write the rule and a lookup class to find rules that apply to the current situation.

0 comments voice your opinion now!
symfony expression language rules engine tutorial doctrine object

Link: http://jwage.com/post/76799775984/using-the-symfony-expression-language-for-a-reward

SitePoint PHP Blog:
Pagination with jQuery, AJAX and PHP
May 28, 2015 @ 09:46:57

The SitePoint PHP blog has a new tutorial posted showing you how to set up pagination with jQuery and PHP using a simple Silex-based application.

n this article, we're going to explain how easy it is to paginate your data set using PHP and AJAX via jQuery. We're also going to use the Silex framework for simplicity.

The data he's going to paginate through is a list of "people" data with ID, name and age values. He starts by helping you get Silex installed and a new project created. With that in place, he shows how to inject the database connection (PDO) into the application and set up the simple route to output the "people" data back to the waiting Javascript. The route includes a page number value that's used in the LIMIT statement to segment the results into pages. He also includes another route that returns a total count of people records so the pagination knows when to end. With the backend in place, he then moves to the frontend, showing the complete code to get the page records and populate them into the page (via a list).

0 comments voice your opinion now!
pagination tutorial ajax jquery silex people data

Link: http://www.sitepoint.com/pagination-jquery-ajax-php/

7PHP.com:
Installing Magento version 2 on an AWS (Amazon) Free Tier EC2 Instance On LEMP
May 28, 2015 @ 08:58:05

The 7PHP.com site has a tutorial they've recently posted showing you how to get Magnto 2 installed on an AWS instance running LEMP (Linux, Nginx, MySQL and PHP).

This article tries to demonstrate how to setup an AWS (EC2) instance, installing a LEMP stack, preparing the server environment to meet Magento's requirements and then to finally install Magento v2 using command line approach. [...] I'm presenting in this article something which might otherwise seem to be a daunting approach - but I also see it as an approach which you can later automate by using Docker/Dockerfile for example or even using a Vagrant appliance.

He takes you through the entire process, including the setup of the account and instance on the AWS side, with screenshots along the way:

  • Creating a Free Tier AWS Account
  • Preparing & Configuring your AWS EC2 Instance
  • Creating A Security Group For Our AWS EC2 Instance
  • Creating a PEM file - Key Pairs
  • Creating our AWS EC2 Instance
  • Creating an Elastic IP & Assigning to our EC2 Instance
  • Preparing & Configuring our AWS EC2 Instance
  • Installing Our LEMP Stack
  • The Magento 2 Project Installation Walkthrough
  • Configuring nginx conf file to serve our magento site
  • Creating a database & running The Magento Setup From Commandline

You'll find all the commands, screenshots and output examples you'll need to follow along with the tutorial easily. There's also links to other resources if you're interested in finding out more about the setup.

0 comments voice your opinion now!
commandline magento2 aws ec2 instance install tutorial stepbystep

Link: http://7php.com/installing-magento-v2-aws-ec2-commandline/


NetTuts.com:
Programming With Yii2 Validations
May 27, 2015 @ 11:41:37

NetTuts.com has continued their series around developing applications with the Yii2 framework with this new post covering validations.

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 introduce you to Yii2's validators. Validators simplify the code needed to validate input, i.e. verify conformance or non-conformance of data input, typically from users via web forms. For these examples, we'll continue to leverage the Hello application codebase we've used in past tutorials. Use the GitHub links on this page to get the code.

They start with a brief look at what the validators are and some common uses (and how they can save you time in the long run). There's a list of the current validators included in the framework and how/where they fall in the overall process flow. Then the tutorial gets into the application of a validator, showing how to define the rules, display errors associated with them and application to a "Sample" model and form. This includes the use of the FilterValidator, DefaultValueValidator and SafeValidator.

0 comments voice your opinion now!
yii2 series tutorial programming validators

Link: http://code.tutsplus.com/tutorials/programming-with-yii2-validations--cms-23418


Community Events

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


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

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