ProgrammingWeb Development

An Earth-shaking release like PHP 7.0 is tough to follow-up, and at first glance, the upcoming PHP 7.1 release appears, shall we say, not as exciting as the last. But don’t let that damper your enthusiasm, for the PHP 7 line is indicative of a language reaching a state of maturity and stability, and what we have with 7.1 is a cautious incremental release that moves things forward at a pace befitting this.

Indeed, #internals is full of exciting RFCs mapping future courses that we’d love to tinker with today, but are not decidedly not ready for prime-time. As much as we like new toys, we spend enough time staring down large PHP codebases that we’re excited by many of the incremental improvements found in 7.1.

Let’s run through those areas of improvement that have caught our eye.

Return Types

The addition of Return Types in 7.0 has gone a long way toward solidifying our APIs, moving vital interface parameters out of documentation and into the code, where the parser can enforce what was previously a suggestion. 7.1 brings two subtle but useful refinements of this system.

Void Return Types allow you to specify a function that is expected to return literally nothing, whereas before you would omit the return type and specify void in the documentation block accompanying the function.

Nullable Types allow for returns that are either a specified type or a null, much as you might specify

ObjectType $variable = null

upon input, allowing either that type or nothing at all. This is one that we’re looking forward to in particular, allowing for more flexibility in the construction of cohesive interfaces.

Array Unpacking

Having worked extensively with ES6 and having become very used to its destructuring syntax, this is an area of welcome improvement.

First is a more concise notation, optionally replacing the use of the list keyword, bringing things more in line with the square-bracket array syntax we’ve enjoyed since 5.4.

Second, the allowance of keys within the list construct allow properties to be extracted by name, much as we’ve come to expect on the JavaScript side.

Iterable Pseudo-Type

PHP has long had the Traversable interface, allowing iterable objects to be treated relatively interchangeably and foreachd without regard to specifics, much as you’d treat an array. Except array itself is not an object, and could not be interchanged with a Traversable. You could specify an iterable object or an array, but not both at once.

7.1 resolves this with Iterable, nicely encompassing array primitives and iterable objects under a single umbrella. It’s a small change that brings considerable flexibility to your API.

Closures from Callables

Over the past couple years, our framework has come to be increasingly driven by callbacks, while avoiding some of the common pitfalls through sensible class-based organization (patterns our ES6 and PHP7 codebases have increasingly come to share.)

However, JavaScript objects are wide open and lack a concept of private or protected members. Previously, class-bound callables we wished to pass around had to be marked public in our PHP codebase, even when it would be appropriate to limit and allow the parent class to dispense access.

This could be accomplished with hacky workarounds that we’d rather not use in production, but now we have a language construct to do so in a safe way.

… and more!

Head over to php.net for an exhaustive list, and tell us what you’re looking forward to in the comments.

Finally, remember that the PHP development process is a remarkably open and democratic one, and that you too can get involved and help shape the language’s future.

23 views
MarketingSEOWeb Development

  

Does your website accurately represent your brand? Are you easy to Google? Kick up your on-line presence with a new reliable website, fully SEO’d, with hosting and 24/7 support!

For a limited time, Panda Rose will develop a new custom website at an introductory rate of $1000 CAD plus Tax, including one-year hosting on the Panda Cloud. *

We’re ready to get started right away on your website which will include:

  • A full redesign to modern standards
  • Up to 5 different customizable pages of your choice, including a splash page, service listing, a portfolio with a customizable media display, social media & contact options and more!
  • A modern responsive design so that your page looks great on all devices, including phones, tablets, and desktops.
  • Accessibility, search engine optimisation (SEO), and speed testing.
  • 24/7 email support and business hours phone support
  • 24 hour response time for questions or issues
  • Integration with popular social media platforms including Twitter, Facebook, LinkedIn, Yelp, and Google Plus.
  • Google Analytics to allow you to track how your customers are using your website and improve conversion rates.
  • Integration with your current inventory, accounting, or tendering services available for an additional fee.

Hurry! This offer is only valid until September 30th, 2016! Contact us today to find out how we can upgrade your website game!

Contact Us Today

*Regular price: $1500 for site design and development + $35 per month for hosting with unlimited bandwidth. Provincial Taxes Apply.

26 views
MarketingSEOWeb Development

restaurant website images

Did you know you’re 70% more likely to attract a long term customer to your restaurant by having a great website and online presence? It’s true! Kick up your on-line presence with a great new reliable website, fully SEO’d and ready to go!

For a limited time, Panda Rose will develop a new custom website at an introductory rate of $500, including one-year hosting on the Panda Cloud. *

Your introductory offer will include:

  • A full redesign of your website
  • Up to 8 different pages of your choice, including tools for reservations, menus — both online and downloadable, location services, and reviews that tap directly to social media, to find the best non-solicited reviews on-line and display them prominently.
  • A modern responsive design so that your page looks great on all devices, including phones, tablets, and desktops.
  • Accessibility, search engine optimisation (SEO), and speed testing. So all your users will have a seamless experience and you’ll be easy to find.
  • Custom menu pages which can be easily updated by your staff as prices and offerings change.
  • Full Integration with all popular social media platforms including Twitter, Facebook, LinkedIn, Yelp, and Google Plus.
  • Google Analytics to allow you to track how your customers are using your website and improve conversion rates.
  • For an additional fee, we can integrate your website with your current reservation system, like Open Table.

But hurry! This offer is only valid until September 30th, 2016! Contact us today to find out how we can upgrade your website game!

Contact Us Today

*Regular price: $700 for site design and development + $15 per month for hosting with unlimited bandwidth 

25 views
ProductivityProgrammingWeb Development

In many ways, the transition to PHP 7, from the 5.x line we had used for many years before, was a clean break, an opportunity to clean house and sweep aside development practices and software dependencies that had outlived their usefulness.

 

Operating on a codebase which had grown out of the days and practices of CodeIgniter and their ilk, which had proved useful for years but was unquestionably showing its age, we jumped at the opportunity to build the framework we would like to use in 2016, rather than the one we had inherited from 2009.

Here was an excuse to revamp our development practices, throw out bits that made sense in 2008 but were a source of a headache today, and incorporate improvements that have taken hold in the ecosystem in the meantime.

Most notable improvements are the standardization efforts that have occurred under the umbrella of PHP-FIG, and the package management ecosystem(courtesy of Composer) that these standards have enabled and allowed to thrive.

A packaging system is something that, given a lack of, you will inevitably try to invent yourself — poorly, incompatibly, and inevitably counter-productively. Such was the state of the PHP framework ecosystem before standardization, and the reorientation of our own framework from an inward-facing framework to an outward-looking one. A framework which naturally integrates with third-party packages and is itself incorporated into third-party packages in a similar fashion.

In this series, we will explore the changes that have occurred in our own development practice, the ways in which these are reflective of the ecosystem as a whole, and why these make for such an exciting time to be writing PHP on the backend.

Stay tuned.

39 views
MarketingSEOUncategorizedWeb Development

Did you know you’re 70% more likely to attract a long term customer to your restaurant by having a great website and online presence? It’s true! Kick up your on-line presence with a great new reliable website, fully SEO’d and ready to go!

For a limited time, Panda Rose will develop a new custom website at an introductory rate of $500, including one-year hosting on the Panda Cloud. *

Your introductory offer will include:

  • A full redesign of your website
  • Up to 8 different pages of your choice, including tools for reservations, menus — both online and downloadable, location services, and reviews that tap directly to social media, to find the best non-solicited reviews on-line and display them prominently.
  • A modern responsive design so that your page looks great on all devices, including phones, tablets, and desktops.
  • Accessibility, search engine optimisation (SEO), and speed testing. So all your users will have a seamless experience and you’ll be easy to find.
  • Custom menu pages which can be easily updated by your staff as prices and offerings change.
  • Full Integration with all popular social media platforms including Twitter, Facebook, LinkedIn, Yelp, and Google Plus.
  • Google Analytics to allow you to track how your customers are using your website and improve conversion rates.
  • For an additional fee, we can integrate your website with your current reservation system, like Open Table.

But hurry! This offer is only valid until September 30th, 2016! Contact us today to find out how we can upgrade your website game!

Contact Us Today

 

23 views