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

TutsPlus.com:
Building Your Startup: Issue Tracking and Feature Planning
Dec 02, 2016 @ 12:56:23

TutsPlus.com has continued their "Building Your Startup with PHP" series today with this latest tutorial covering the creation of an issue tracking and feature planning process with the help of the Anana service.

Even for a one-person startup, it helps to have more than a spreadsheet (or paper) to track issues, ideas, and bugs. A few years ago, I'd used Lighthouse for my grant-funded NewsCloud Community Starter Project. Last year, I'd been introduced to Asana during a consulting gig.

[...] Eventually, I found my way and discovered the tool works well whether you're working with a variety of people or just solo. In today's episode, I'll walk you through how I began using Asana for Meeting Planner. I use Asana not only to track issues but to organize them and plan for the future. I also use it to track and process bugs.

He walks you through getting started with the service (they have a free tier) and how to set up your first project. He includes examples of task creation, tagging tasks and tracking bugs right inside the service. He then uses it to create a "release plan" for the next version of the Meeting Planner application. He wraps up the post talking about what's next on his side for the Planner application and its funding goals.

tagged: build startup series meetingplanner issue tracking feature planning tutorial

Link: https://code.tutsplus.com/tutorials/building-your-startup-issue-tracking-and-feature-planning--cms-26722

TutsPlus.com:
Object-Oriented Autoloading in WordPress, Part 3
Dec 01, 2016 @ 11:15:35

TutsPlus.com has continued their series covering object-oriented development practices in WordPress (plugins) with this third tutorial. In previous parts they set up the environment and introduced some of the basic concepts of OOP programming and getting the first classes and files defined.

In the last tutorial, we reviewed the original state of our autoloader and then went through a process of object-oriented analysis and design. The purpose of doing this is so that we can tie together everything that we've covered in this series and the introductory series.

Secondly, the purpose of doing this in its own tutorial is so we can spend the rest of this time walking through our class, seeing how each part fits together, implementing it in our plugin, and then seeing how applying object-oriented programming and the single responsibility principle can lead to a more focused, maintainable solution.

They start with a brief review of what they've covered so far and begin to build on the changes suggested in the previous part of the series. They've already broken it down into the different functional classes (according to the single-responsibility principle) and take the next step of including them and calling some example code to prove all is working as expected.

tagged: oop wordpress tutorial series objectoriented programming plugin part3

Link: https://code.tutsplus.com/tutorials/object-oriented-autoloading-in-wordpress-part-3--cms-27515

TutsPlus.com:
Object-Oriented Autoloading in WordPress, Part 2
Nov 30, 2016 @ 09:33:08

The TutsPlus.com site has posted the next tutorial in their "Object-Oriented Autoloading in WordPress" series - part two - expanding on the basics presented in the previous part of the series.

In the previous tutorial, we covered a handful of concepts, all of which are going to be necessary to fully understand what we're doing in this tutorial. Specifically, we covered the following topics: object-oriented interfaces, the single responsibility principle, how these look in PHP [and] where we're headed with our plugin.

[...] Ultimately, we won't be writing much code in this tutorial, but we'll be writing some. It is, however, a practical tutorial in that we're performing object-oriented analysis and design. This is a necessary phase for many large-scale projects (and something that should happen for small-scale projects).

First they briefly cover the environment you'll need to follow along (already set up if you followed along with part one). They then get back into the code, evaluating the current state of the custom autoloader and investigating how it can be broken down into a class and a set of methods instead of procedural code. They work through the different functional parts of the autoloader and how to break it down into classes with only one job (the "single responsibility principle"). They end up with the autoloader that uses NamespaceValidator, FileInvestigator and FileRegistry instances to get the job done.

tagged: oop objectoriented wordpress part2 series refactor singleresponsibility principle

Link: https://code.tutsplus.com/tutorials/object-oriented-autoloading-in-wordpress-part-2--cms-27431

TutsPlus.com:
Building Your Startup: The Dashboard Foundation
Nov 24, 2016 @ 16:28:49

NetTuts.com has continued their "Building Your Startup" series with this latest post focusing on the dashboard for the users of the meeting planner - a "quick look" into the current stats for their account.

For my initial statistics reporting, I focused on simple real-time data and detailed historical data. For example, real-time data would tell you the number of users and meetings built on the system to date and their status.

The historical data would tell you the number of users and meetings completed over time as well as other interesting data—especially growth curves that I and prospective investors may care about.

He then walks through the creation of the dashboard view, gathering together various pieces of real-time and historical data and displaying them in a simple table view. All code and SQL required is included as well as a few screenshots showing the results.

tagged: startup series meeting planner dashboard introduction

Link: https://code.tutsplus.com/tutorials/building-your-startup-the-dashboard-foundation--cms-26682

TutsPlus.com:
Object-Oriented Autoloading in WordPress, Part 1
Nov 18, 2016 @ 13:57:08

The TutsPlus.com site has posted the next part of their series looking at autoloading in WordPress plugins. In this latest post the most from just the namespacing and setup into the actual code - creating some simple object-oriented classes that can be easily autoloaded.

I recently wrapped up a series in which I covered namespaces and autoloading in WordPress. If you're not familiar with either of the above terms, then I recommend checking out the series. [...] While working on the series, specifically that of the autoloader, I couldn't help but recognize a number of code smells that were being introduced as I was sharing the code with you.

This isn't to say the autoloader is bad or that it doesn't work. If you've downloaded the plugin, run it, or followed along and written your own autoloader, then you know that it does in fact work. But in a series that focuses on namespaces—something that's part and parcel of object-oriented programming—I couldn't help but feel uncomfortable leaving the autoloader in its final state at the end of the series.

They move away from just autoloading and namespacing quickly and move into OOP concepts like interfaces, implementing them, the "single-responsibility principle" and a few other helpful principles. They define the goals for the work ahead and move into the code, updating the current state of the plugin to use these new ideas.

tagged: oop objectoriented wordpress part1 series interface singleresponsibility principle

Link: https://code.tutsplus.com/tutorials/object-oriented-autoloading-in-wordpress-part-1--cms-27381

TutsPlus.com:
Programming With Yii2: Automated Testing With Codeception
Nov 17, 2016 @ 10:37:40

TutsPlus.com has continued their series looking at programming with the Yii2 framework with this new article covering testing the application with Codeception.

In this Programming With Yii2 series, I'm guiding readers in use of the Yii2 Framework for PHP. In this tutorial, I'll explore automated testing using Codeception, which is integrated with` the Yii2 development framework.

Admittedly, my experience writing tests with my code is scarce. I've often been part of solo or small projects with limited resources. During my time at Microsoft, we had distinct test teams that did this. But frankly, this is likely typical of you too, right? Programmers like to code, they don't write tests—at least old school programmers didn't.

He briefly talks about some of his own experiences with Codeception and how it "makes writing tests fun and easy". The tutorial then moves over to the technical side, showing how to install the Codeception tool and set up the Yii2 application to integrate with its testing functionality. The remainder of the tutorial is split up into the different kinds of testing (unit, functional and acceptance) and some code examples of each.

tagged: yii2 framework series testing codeception programming tutorial

Link: https://code.tutsplus.com/tutorials/programming-with-yii2-automated-testing-with-codeception--cms-26790

TutsPlus.com:
Using Namespaces and Autoloading in WordPress Plugins, Part 3
Nov 15, 2016 @ 10:23:30

On the TutsPlus.com site they've continued their WordPress series showing you how to integrate class autoloading into your plugin development.

In this tutorial, we're going to take a break from writing code and look at what PHP namespaces and autoloaders are, how they work, and why they are beneficial. Then we'll prepare to wrap up this series by implementing them in code.

In the previous part of the series they built up the environment and some of the basic structure of the plugin (you'll need this to follow along with this new tutorial) and continue on, starting with the basics of namespacing and autoloading. They then move over and start applying this functionality to the plugin classes and what happens in the autoloader when they're referenced.

tagged: wordpress autoload namespace tutorial part3 series

Link: https://code.tutsplus.com/tutorials/using-namespaces-and-autoloading-in-wordpress-plugins-3--cms-27332

TutsPlus.com:
Building Your Startup: Preparing for Reminders
Nov 14, 2016 @ 11:57:06

The TutsPlus.com site has published the latest tutorial in their "Building Your Startup" series that walks you through the creation of an application (a meeting planner) using the Yii2 framework. In this latest post they start on the reminders integration used to notify attendees of upcoming meetings.

his tutorial is part of the Building Your Startup With PHP series on Envato 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, I'll release the Meeting Planner code as open-source examples you can learn from. I'll also address startup-related business issues as they arise.

In this two-part series, I'll describe how we built the infrastructure for reminders and their delivery. This episode will focus on the infrastructure and user experience behind configuring reminders.

They start off by talking about the goals for the reminders and how they'll integrate with the current Meeting Planner system. With that settled the article shows you how to:

  • set up the "reminders" table in the database
  • set up reminders for new and existing users
  • linking them to meetings
  • adding code to handle the creation of new reminders

This is all setting the application up for the next part in the series where they'll use this structure (and some additional functionality) to allow users to create the reminders via the UI.

tagged: startup series meeting planner reminders setup database tutorial

Link: https://code.tutsplus.com/tutorials/building-your-startup-preparing-for-reminders--cms-26527

TutsPlus.com:
Programming With Yii2: Using Ajax
Nov 10, 2016 @ 11:18:23

The TutsPlus.com site continues their series covering development with the Yii2 framework in this new article. This time they're focusing in on only the Ajax functionality using it an an example for their startup application interacting with Google Maps to place meeting locations.

In this Programming With Yii2 series, I'm guiding readers in use of the Yii2 Framework for PHP. In this tutorial, we'll explore the implementation of interactive pages using Ajax. Specifically, I'm going to highlight the use of Ajax in two areas of the Meeting Planner application, which I'm writing the Building Your Startup series about in parallel.

The article then starts in on showing you how to load a Google Map into the page using some of the built-in Ajax handling and integrating it into the "Create a Place" form. They show how to collect the information from the map once a location is selected and use this to update a "meeting" record on the backend. All coded needed to reproduce the system is included.

tagged: ajax yii2 framework programming tutorial series google map

Link: https://code.tutsplus.com/tutorials/programming-with-yii2-using-ajax--cms-26663

TutsPlus.com:
Programming With Yii2: Security
Nov 09, 2016 @ 12:41:30

The TutsPlus.com site has posted the next article in their "How to Program with Yii2" series of tutorials, this time talking about security covering security tools and functionality already included in the framework.

In this Programming With Yii2 series, I'm guiding readers in use of the Yii2 Framework for PHP. If you're planning to share your application with the public, you'll need it to be secure, and it's best to plan this from the beginning. Fortunately, starting with a framework such as Yii makes this a lot easier than it otherwise would be.

[...] In this tutorial, I'll walk you through the basic security concepts within the Yii application framework. And, if you're interested, future episodes will work to <a href="http://code.tutsplus.com/tutorials/building-your-startup-security-basics--cms-26702>secure the application, Meeting Planner, featured in our startup series, as it approaches alpha release.

The tutorial starts with a look at some of the basics of Yii2's security functionality including authorization tools, password handling and cryptography. Code is included in each section showing the use of the component/functionality. The final point, "Best Practices", links to pages in the Yii2 documentation where you can get more information about preventing vulnerabilities like SQL injection, cross-site scripting and file exposure issues.

tagged: programming yii2 tutorial series framework security controls

Link: https://code.tutsplus.com/tutorials/programming-with-yii2-security--cms-26701