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

How to Validate Data
Nov 10, 2015 @ 10:18:52

In this post to thePHP.cc site Sebastian Bergmann looks at validation data, both in the sense of user input and the contents of objects you're application is currently working with.

Validating data seems to be one of the most important tasks of an application. After all, you cannot trust data from external sources. So let us have a look at how to efficiently implement data validation.

He gives an example of a user profile with requirements on the data it should contain. He focuses on the email address property as it's one of the easier options to validate (or is it). He walks through the usual progression from controller injection to setter injection of the value but wonders when the validation should happen to keep the Profile object from becoming invalid. He points out that simply having a validate method perform the checks isn't enough as it may not always be called correctly, leading to potentially invalid objects. Instead he recommends an alternative - using a validator object/tool in the setters of your object instance as the values are set. This prevents the object from getting into an unknown state and provides immediate feedback to the developer when something's wrong.

tagged: data validation object recommendation setter business rules

Link: https://thephp.cc/news/2015/11/how-to-validate-data

PHP Roundtable:
019: The Business of PHP
May 01, 2015 @ 11:52:23

The PHP Roundtable podcast has posted their latest episode hosted by Sammy Powers and featuring guests Michael Kimsal, Gary Hockin, Yitzchok Willroth and Matt Stauffer. In this new episode they talk about the "Business of PHP".

We discuss freelancing as a PHP developer, managing client expectations, niches, good customer service, project scope & scope creep, hourly rates vs value based pricing, and whether or not to run a SaaS.

You can catch this latest episode either through the in-page video player or by heading over to YouTube and catching the video there. If you enjoy the roundtable, be sure to subscribe to their feed.

tagged: phproundtable podcast video ep19 business garyhockin michaelkimsal yitzchokwillroth mattstauffer

Link: https://www.phproundtable.com/episode/the-business-side-of-php-clients-customer-service-pricing-oh-my

SitePoint PHP Blog:
Using BoltCMS to Build a Small Business Website
Apr 21, 2015 @ 12:12:23

The SitePoint PHP blog has a new tutorial posted showing you how to set up a simple small business website using the BoltCMS tool. This recent article will walk you through the full installation, configuration and setup for a simple site including database interactions.

As the web continues to mature and the demand for the efficiency of content delivery increases, more and more slim and trim CMSs are coming into the fray. Developers (front-end and back-end) are branching away from the heavy-hitters like WordPress and Drupal, and into the likes of more streamlined, tailor-made solutions. Bolt CMS is one of these CMSs, and prides itself on being a dream for designers, developers, and content editors alike.

He starts with a brief overview of what the BoltCMS has to offer and some of the technology that powers it. He then goes through each of the steps to get the application up and running:

  • Requirements, setup and installation
  • Main configuration and theme set up
  • Splitting up files into templates
  • Introducing and creating content types
  • Retrieving content from database records

Each step along the way includes the code, configuration changes or template updates you'll need to make to end up with a simple site allowing you to view a page of content and list/add related testimonials.

tagged: boltcms small business website tutorial page testimonial

Link: http://www.sitepoint.com/using-boltcms-build-small-business-website/

SitePoint Business & Marketing Blog:
Do You Need an API?
Jan 14, 2015 @ 11:05:32

In a new post to the SitePoint Business & Marketing blog Chris Ward asks an interesting question that applies to both the business side and development: do you need an API?.

API stands for ‘Application Programming Interface’ and as the name implies, creating one is a technical process. This article will talk very little about how to create an API as there are a myriad of methods to undertake that. This article aims to focus on the business side of APIs and supply advice for non-technical folk. [...] You may be a forward thinking individual inside of an organizational structure that doesn’t share your views. How can you convince others around you that having an API may be good for your business?

He talks about three of the main kinds of organizations out there that usually have APIs including government, civic and science organizations and most other online services that integrate them into their core services. He also tries to help you answer the question for your own organization by listing some of the positives it can provide as well as some of the negatives that could balance them out. He ends the post with one final recommendation if you do choose to implement an API: "Don't reinvent the wheel".

tagged: api need question positive negative business marketing

Link: http://www.sitepoint.com/do-you-need-an-api/

Laravel News:
The Artisan Files: Mitchell van Wijngaarden
Nov 07, 2014 @ 09:59:43

The Laravel News has posted their latest interview in their "Artisan Series" today spotlighting Mitchell van Wijngaarden. Mitchell is a "developer, business owner, and has a great accent."

The interview answers questions about:

  • How he got into web development
  • When he first found Laravel and why he started using it
  • His development company
  • What a typical day for him entails
  • Why he's big into BDD (behavior-driven development)

...and more. Check out the full post for the answers to these and more questions.

tagged: laravelnews interview artisanfiles mitchellvanwijngaarden developer business

Link: http://laravel-news.com/2014/11/artisan-files-mitchell-van-wijngaarden/

Top 10 PHP Code Review Tips
Sep 10, 2014 @ 11:15:31

On the VitalFlux site there's a recent post sharing a few tips (a Top 10 list) of things to think about when doing code reviews.

This article represents top 10 areas to consider while you are taking up the task to do the code review of a PHP project. The other day, I had a discussion with one of the PHP senior developers who asked me about where to start on the task related with reviewing a PHP web application and, we brainstormed and came up with the list. Interestingly, apart from few, most of them can be pretty much applied to applications written with other programming languages as well.

Their top ten list of things to look for during code reviews extend beyond just the syntax of the code and good coding practices. They also suggest things like:

  • Adherence to Business Functionality
  • Object-Oriented Principles
  • Security
  • Integration Patterns/Protocols

Code reviews, if done effectively and efficiently, can be a major benefit for producing quality code that not only adheres to standards but also follows good practices and principles (like SOLID).

tagged: code review tips top10 list syntax bestpractice business

Link: http://vitalflux.com/top-10-php-code-review-tips/

Mathias Verraes:
DRY is about Knowledge
Aug 04, 2014 @ 10:51:50

In this new post to his site Mathias Verraes approaches the concept of the DRY principle (Don't Repeat Yourself) as being more about knowledge. He includes two "real world" examples where the business rules can change around you.

“Don’t Repeat Yourself” was never about code. It’s about knowledge. It’s about cohesion. If two pieces of code represent the exact same knowledge, they will always change together. Having to change them both is risky: you might forget one of them. On the other hand, if two identical pieces of code represent different knowledge, they will change independently. De-duplicating them introduces risk, because changing the knowledge for one object, might accidentally change it for the other object.

In his examples, he shows how hard-coded rules (like "a product container can only contain 3 products") could just be around certain needs, not the entire range of requests. He covers some of the principles of Domain-Driven Design and how they apply here, pointing out that changing rules in one part of the application can have an effect on other parts depending on it.

tagged: dry dontrepeatyourself principle knowledge domaindriven design business goal

Link: http://verraes.net/2014/08/dry-is-about-knowledge/

July 2014 Issue Released - Navigating the Business
Jul 22, 2014 @ 10:52:17

The July 2014 edition of php[architect] has officially been published - "Navigating the Business". Articles in this edition include:

  • "Resume 101" by Jordan Tway
  • "Startups and PHP" by Benjamin Greenaway
  • "Hexagonal Architecture with PHP" by Carlos Buenosvinos
  • "The Confident Coder: Sanity Check: Insane Value!" by Aaron Saray

All of the usual columns are also included as well as an "Archie's Adventures" section about the travels of the php[architect] orange elePHPant. You can pick up a (digital) copy of this month's issue directly from the site or get a year's subscription to get more great content delivered each month.

tagged: phparchitect july2014 issue release navigating business magazine

Link: http://www.phparch.com/magazine/2014-2/july/

6 Extra Skills Every PHP Developer Should Have
Apr 09, 2012 @ 08:22:01

On PHPMaster.com today there's a new article with six things that they (well, Daniela Baker) thinks every independent PHP developer should know and have in their arsenal.

PHP development is hot right now, but there are also lots of people in PHP development. If you want to make it as an independent PHP developer you’ve got to know more than just PHP. Here are six other essential skills you need to succeed as a PHP developer.

Her list of six is made up of:

  • JavaScript, HTML, and CSS
  • Knowing What You Don’t Know
  • Business Communication
  • Business Finance
  • Project Management
  • Networking

Really, independent or not, these types of skills/knowledge can help any developer out there to see the bigger picture outside of just their code, out to what the business is doing.

tagged: skills opinion developer technical business knowledge


ThinkPHP Blog:
Benchmarking & optimizing real-world scenarios in a business context
Jun 18, 2010 @ 09:14:35

On the ThinkPHP blog today there's a new article looking at some of the best practices they seen when it comes to profiling and benchmarking your PHP-based applications.

Over the years, PHP has evolved from a script language to a programming language used in big applications with high-level architectures. As the most popular language for web applications, PHP is very fast, robust and stable by default. Coming from tiny scripts, PHP is used in large-scale web applications nowadays. In terms of business context, we need to focus on these three key factors: Scalability, Responsiveness and Resource misusage. All three factors have a high impact on hardware costs, customer loyalty and - indirectly - sales.

They mention a few ways that you can use to optimize your application's code including evaluating resource limitations, Firebug caching results and finding bottlenecks with something like XDebug.

tagged: profiling benchmarking optimizing business