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

Freek Van der Herten:
Things I learned from reading Laravel: Up and running
Aug 09, 2016 @ 09:34:01

In this new post to his site Freek Van der Herten shares some of the things he learned from reading the book "Laravel: Up and Running", helping you to get a Laravel application up, running and understood easily.

Matt Stauffer is currently putting the final touches on his new book called Laravel: Up And Running. It aims to be a good guide for newcomers to the framework. But even if you’ve got some experience with Laravel, it should be worth your time to read it. Even Matt himself picked up a lot of cool stuff while writing it.

During my holiday I read an advance copy of the book containing all chapters expect the ones that touch on Laravel 5.3 specific functionality. I can say that it is very well written and it complements the official documentation well. Here are some of the things I’ve learned from reading this book.

His list of "lessons learned" includes topics like:

  • Sending a download response
  • Sharing a variable with all Blade views
  • Using closure based commands
  • Eager load the number of related records

Each one comes with a bit of code, mostly just one line (as that's all it takes) but it's interesting to see some of these handy tips and tricks to make it easier to work with the Laravel framework in your applications.

tagged: laravel upandrunning book mattstauffer prerelease lessonslearned tips

Link: https://murze.be/2016/08/things-learned-reading-laravel-running/

Matt Stauffer:
Things I didn't know Laravel could do
Jun 03, 2016 @ 10:47:51

Matt Stauffer has a post to his site sharing a few things he didn't know Laravel could do as discovered during his work on his book Laravel Up & Running.

It turns out that there's a long road between "I have a book contract" and "I know everything there is to know in order to write this book."

It doesn't matter how much of an expert you feel like. It doesn't matter how much time you've spent learning and teaching. Across the board, every tech author I've talked to has described just how much they learned—had to learn—when they wrote a book.

I learned a lot in writing Laravel: Up and Running. And I want to share it with you.

He includes a list of four of the interesting things he learned during his writing:

  • The Cookie Facade is one special cookie
  • Attaching files to emails is easier than you think
  • You can chain more Scheduler methods than the docs show
  • You can assert that a view gets passed certain data

Each item also comes with a brief code example showing it in action. If you'd like more information about the book and a free sample, be sure to sign up using the form in the post or you can just pre-order the book and get the whole thing as soon as it's released.

tagged: oreilly book laravel interesting feature top4 free sample

Link: https://mattstauffer.co/blog/things-i-didnt-know-laravel-could-do

Book Release: Integrating Web Services with OAuth and PHP
Feb 25, 2016 @ 14:08:17

php|architect has officially announced the release of their latest book: Integrating Web Services with OAuth and PHP from author and PHP community member Matt Frost.

Modern web applications are no longer standalone, monolithic codebases. Instead, they are expected to integrate with external, 3rd party applications to allow users to tap into new features, integrate with their social networks, and to easily migrate their data between systems. Many services afford these integrations by building web services that use the OAuth standard to authenticate users and allow “secure delegated access” on their behalf.

The book covers both of the major versions of OAuth currently in use (v1 and v2), how they differ and provides working PHP examples of both the client and server sides of the functionality. If you're interested you can "try before you buy" with an excerpt from the book to get a feel for the writing style and content. You can get more information and pick up a copy of your own directly from the php[architect] site.

tagged: server oauth webservice integrate release book client mattfrost

Link: https://www.phparch.com/books/integrating-web-services-with-oauth-and-php/

SitePoint PHP Blog:
How to Consume Laravel API with AngularJS
Feb 22, 2016 @ 11:23:10

The SitePoint PHP blog has posted a new tutorial from author Francesco Malatesta that continues their series looking at combining AngularJS and PHP, more specifically Laravel, to create a basic application. In this part of series he builds on the server-side code created in part one and creates the Angular frontend.

In part 1, we built our server part. Now we can build our client. We are going to use AngularJS to make a Single Page Application. We will use a very basic bootstrap template, built on the fly.

The application is simple enough and will consist of three "screens" (not "pages" since it's a single page application): a login, a signup and a main screen. He walks you through the setup of a standard frontend development environment including tools and software you'll need to get started. He makes the simple route and Blade template for the single-page app and defines some AngularJS routes for each of the screens. He then includes the code to set up both the signup and login controllers and how to detect if the user is successfully logged in. From there he gets into the functional part of the application: managing the books and the user's wishlist with the standard CRUD (create, read, update and delete) operations. Screenshots are also included at some spots so you can ensure your progress matches the tutorial.

tagged: tutorial angularjs laravel part2 screen login signup book wishlist

Link: http://www.sitepoint.com/how-to-consume-laravel-api-with-angularjs/

Laravel News:
Laravel: Up and Running Available for Preorder
Feb 10, 2016 @ 11:34:08

If you're interested in the Laravel framework and possibly using it for your upcoming projects but aren't sure where to start, you should consider checking out Matt Stauffer's upcoming O'Reilly book "Laravel: Up and Running". According to this post on the Laravel News site the book is now available for pre-order.

Matt Stauffer has been writing a new book on Laravel named Laravel: Up and Running: A Framework for Building Modern PHP Apps and it’s published by O’Reilly Media. [...] This first edition is 250 pages and will come in either paperback or ebook form, but this current preorder is only available in paperback. Based on Amazon the expected shipping date is August 25, 2016.

The book walks you through the creation of a Laravel application from start to finish. it's no meant as a reference but a "work book" to teach the foundations of the framework. It hopes to provide a single point where developers, especially those familiar with "C-family programming languages", will be able to get started quickly.

tagged: laravel upandrunning oreilly preorder book mattstauffer framework introduction

Link: https://laravel-news.com/2016/02/laravel-up-and-running-available-for-preorder/

Book Review - Modern PHP: New Features and Good Practices
Mar 24, 2015 @ 11:29:28

On Slashdot today Michael Ross as posted a book review of Josh Lockhart's recently released O'Reilly book "Modern PHP".

In recent years, JavaScript has enjoyed a dramatic renaissance as it has been transformed from a browser scripting tool primarily used for special effects and form validation on web pages, to a substantial client-side programming language. Similarly, on the server side, after years as the target of criticism, the PHP computer programming language is seeing a revival, partly due to the addition of new capabilities, such as namespaces, traits, generators, closures, and components, among other improvements. PHP enthusiasts and detractors alike can learn more about these changes from the book Modern PHP: New Features and Good Practices, authored by Josh Lockhart.

In the rest of the review Michael provides an overview of the topics covered in the book and how it's divided up. He then covers each of these three sections, commenting on the contents and making a few recommendations for those not immediately familiar with the topics. He does point out that he felt there was some critical information missing on some topics that "would allow one to begin immediately applying that technique or resource to one's own coding." Overall, though, he found the book a good resource and recommends it to those looking for a source to learn about new trends and tools in PHP.

tagged: book review modernphp joshlockhart features practices

Link: http://books.slashdot.org/story/15/03/22/1447230/modern-php-new-features-and-good-practices

Community News:
Wisdom of the ElePHPant
Feb 11, 2015 @ 10:24:46

Cal Evans, a prominent member of the PHP community, has put together a new project sharing what he's called "Wisdom of the ElePHPant", a series of short thoughts by members of the PHP community touching on everything from the art of programming to helping out open source projects to working with code reviews.

All of these little nuggets of wisdom have been gathered and put into a small book, one per page. These books cannot be purchased but there are sources where you can find them and get a copy of your own (such as conferences, user groups or from various members of the PHP community). Fortunately, there was more than enough wisdom to go around and some of the submissions are also being shared on the site including current ones from Jeremy Kendall, Erika Heidi and Cal himself.

This is a great resource for some quick chunks of wisdom from developers who have seen (and overcome) a lot of the challenges developers experience every day. I highly suggest picking up a copy for yourself...if you can track one down. For more check out the project's main site, WisdomOfTheElePHPant.com.

tagged: wisdomoftheelephpant book website thoughts community

Link: http://wisdomoftheelephpant.com

SitePoint PHP Blog:
Grumpy Programmer’s Testing Bundle: Review
Feb 09, 2015 @ 13:18:22

The SitePoint PHP blog has posted a book review of a book bundle from the "Grumpy Programmer" (aka Chris Hartjes) with content about testing - how to test, what to test and creating testable applications.

After having gotten some constructive feedback regarding my testing practices on the basic TDD in your new PHP package tutorial, I decided to read Chris Hartjes “Grumpy Testing Bundle”, a set of two books consisting of The Grumpy Programmer’s Guide To Building Testable PHP Applications and The Grumpy Programmer’s PHPUnit Cookbook. It was my hope that those books will prevent me from using the shoddy practices I displayed in that original post and which originally prompted Matthew Weier O’Phinney’s critique. In this post, I’d like to share with you what I’ve learned, and how much this helped me, if at all.

He breaks down the bundle and talks about each of the two books separately, pointing out places he thought were most useful and others where he felt it needed updates/more clarification. He includes examples of some of the code shared in the books as illustrations and what kind of overall rating he gives it (in elePHPants naturally).

tagged: book review grumpyprogrammer chrishartjes review bundle

Link: http://www.sitepoint.com/grumpy-programmers-testing-bundle-review/

Laravel News:
Learn Laravel 5 with Easy Laravel
Feb 06, 2015 @ 11:19:38

The Laravel News site has a new post today about a book (from Jason Gilmore) wanting to help you learn everything you need to know about Laravel 5 - Easy Laravel 5.

Easy Laravel is a new book by W. Jason Gilmore, focusing entirely on the brand new Laravel 5. Easy Laravel features 8 chapters and over 200 pages to help you learn Laravel 5 quickly by building a real world project. Jason has spent the last 15 years using PHP, during this time he’s written seven PHP books. Including the bestseller, “Beginning PHP and MySQL, Fourth Edition”, that has been in print more than 10 years. He has a gift of explaining things clearly in a very nice style.

The post also includes some Q&A with Jason asking about why he chose to write a book on Laravel, what was the most enjoyable part of the process and what his favorite new feature is. The remainder of the post walks you through the chapters of the book and introduces you to some of the content with a brief summary of each.

tagged: laravelnews laravel easy book learn wjasongilmore interview

Link: https://laravel-news.com/2015/02/learn-laravel-5-easy-laravel/

SitePoint PHP Blog:
Modernizing Legacy Applications in PHP: Review
Jan 15, 2015 @ 12:46:34

The SitePoint PHP blog has posted a review of Paul Jones' "Modernizing Legacy Applications" book. The book share's Paul's gathered knowledge about migrating legacy code into a more modern, maintainable and robust application.

Chances are you’ve come across some horrible legacy code once or twice in your lifetime as a PHP developer. Heck, if you’ve worked with WordPress to any degree, I’m sure you have. I myself have had the satisfying task of modernizing a monolithic ZF1 application, and it was the most mentally exhaustive (but, admittedly, the most educational) year of my career. If only I had had Paul M. Jones’ “Modernizing Legacy Applications In PHP” book back then, I would have been done in half the time, and the work I did would have been twice as good.

Bruno talks briefly about the contents of the book and its goals (from legacy to MVC really). He goes on to point out that the target audience for the book is not the beginner PHP developer but someone that's familiar with good software design concepts and application structure. He goes through the technical side of things, commenting that it's "sound - amazingly so" and how it seems to be taken from a real-life project's refactoring. He wraps things up with a list of some of the pros and cons of the book and a recommendation along with a 4.5 of 5 "elephpant" rating.

tagged: modernize legacy application book review pauljones

Link: http://www.sitepoint.com/modernizing-legacy-applications-php-review/