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

Freek Van der Herten:
Introducing Browsershot v3: the best way to convert html to PDFs and images
Oct 23, 2017 @ 14:13:57

In a new post to his site Freek Van der Herten has an announcement about the release of the latest stable version of the "Browsershot" package, version 3.

To convert html to a pdf or an image using wkhtmltopdf and wkhtmltoimage tends to be the popular option. Unfortunately those tools contain an outdated browser engine to do their thing, so you can’t use any newish css syntax. A while ago Google added a headless mode to Chrome. They’ve also released a javascript library called Puppeteer that gives you programmatic and fine grained control over Chrome.

Wouldn’t it be great if we could just use Chrome and Puppeteer to convert html to PDFs and images? Browsershot is package that does exactly that. In this post I’d like to introduce v3 of Browsershot, which was recently released.

He starts with some basic usage of the package, taking screenshots of example URLs and saving them locally as PDFs. Version 3 now has integration with Puppeteer to perform more complex logic on what parts of the page should be captured and how it should be saved. There's examples of this and a look behind the scenes at what the package is doing with the page grabs are called.

tagged: browsershot package screenshot puppeteer version3 release

Link: https://murze.be/2017/10/introducing-browsershot-v3-best-way-convert-html-pdfs-images/

SitePoint PHP Blog:
How to Master Your API Workflow with Postman
Aug 21, 2017 @ 16:13:20

On the SitePoint PHP blog author Younes Rafie has returned with another tutorial, this time with a focus on how Postman can help master your API workflow by making use of several of the features it already includes.

Building good APIs is hard, and anyone who had the chance to do so can relate to this. A project can easily grow to become a mess. One can keep trying to adopt an approach to make it more enjoyable, like trying a documentation-first workflow, but something always feels clumsy.

I was trying out Postman lately, a tool we’ve briefly covered before, and I discovered that they’re doing a great job by providing an integrated environment for different components of an API, like authorization, testing, documentation, versioning, etc.

He then goes through the use of the tool, including screenshots along the way for:

  • Making requests
  • Authorization
  • Environment Variables
  • Testing
  • Validating JSON schemas
  • Working with collections

The post finishes up with a look at generating documentation for the API using Postman's "View in Web" feature including integrating example calls and publishing it. There's also a look at exporting and importing data and a few links to some other helpful resources.

tagged: api workflow tutorial postman tool feature screenshot

Link: https://www.sitepoint.com/master-api-workflow-postman/

Freek Van der Herten:
Easily convert webpages to images using PHP
Jul 03, 2017 @ 16:53:35

Freek Van der Herten has an article posted to his site showing how you can use the Browsershot package to convert web pages to images with a bit of PHP.

Browsershot is a package that can easily convert any webpage into a image. Under the hood the conversion is made possible new headless options in Chrome 59. In this post I’d like to show you how you can use Browsershot v2.

He starts with a bit of history about the package and the recent switch from PhantomJS (a now abandoned project) over to Chrome's screenshot handling for creating the web page captures. He then shows how to install Chrome 59, the first version to include this feature, into a unix-based environment. Next comes the package and some example code of it in use: making a simple capture, setting the window size, manipulate the image post-capture and change it to grayscale.

tagged: convert webpage image capture screenshot browsershot package

Link: https://murze.be/2017/07/easily-covert-webpages-to-images-using-php/

TutsPlus.com:
Programming With Yii2: Using the Debugger
Jan 03, 2017 @ 17:52:29

The TutsPlus.com site continues their "Programming with Yii2" series of tutorials with the latest edition in the series, a look at using the Yii2 debugger to help track down issues in your code.

In today's tutorial, I'll show you how to install the Yii2 Debugger, and we'll explore its capabilities in detail. It's a powerful programming assistant which is often underutilized.

As you code and test your application, the debugger can show you your application path, queries and query variables, performance characteristics, server and framework settings, and much more.

The article starts off by showing you how to install the "yiisoft/yii2-debug" library (via Composer) and enable it in the "debug" section of your configuration. With it correctly installed you'll then be able to access it at the bottom of your pages. The debug console provides plenty of helpful information related to:

  • the route matched
  • a log of actions and events
  • load time
  • memory used
  • database queries performed

...among others. The tutorial walks you through these and other pieces of information the tool provides with screenshots of example output for each.

tagged: programming yii2 debugger tutorial series toolbar screenshot detail

Link: https://code.tutsplus.com/tutorials/programming-with-yii2-using-the-debugger--cms-26910

Lakion Blog:
Easy debugging on CI with Mink
Sep 18, 2015 @ 14:44:12

On the Lakion blog there's a post showing you how to debug your application's Behat tests easily as a part of your continuous integration process. In thieir case, they were trying to figure out why builds were breaking on a Travis-CI build instance.

Debugging Behat scenarios while using Mink to simulate the user is not always an easy job. Especially, if they are run on Continuous Integration server. That is why I came up with an idea to make it easier. During repairing our javascript test suite on Sylius everything went as bad as it could go. There were many errors that happened on Travis, but I was not able to reproduce them locally. [...] MinkDebugExtension was written to speed up that boring and tiring part of debugging on CI server. It consists of two parts: Behat extension and useful scripts.

The extension fires after failed steps and makes a log of the issue with content needed to recreate the issue (including possible screenshots). He also describes the scripts that come with it to help you browse through the results, uploading the resulting logs and screenshots to a place for public consumption.

tagged: mink easy debug travisci continuous integration extension log screenshot

Link: http://lakion.com/blog/mink-debug-extension

SitePoint PHP Blog:
Top 10 Z-Ray Features to Check Out
Mar 26, 2015 @ 14:50:23

The SitePoint PHP blog has a new post today from Daniel Berman (of Zend) with the top 10 features of Z-Ray to be sure to check out. Disclaimer: Z-Ray is a tool provided by Zend, a part of their Zend Server product.

Necessity is the mother of invention goes the famous saying. For PHP developers, there is no greater need than visibility. But developers today have a tough choice to make as they develop and debug their apps. Either use crude methods such as printing, debugging information, or storing it in a log file, or – use multiple debugging/profiling tools that are awkward and require a lot of work from the developer’s side. [...] This article introduces the top 10 features of Z-Ray – an innovative new technology from Zend that makes PHP development a whole lot quicker and easier by giving developers unprecedented insight into their code – and the visibility they need to develop top-notch apps.

Among the items on their Top 10 list are things like:

  • Viewing information about page requests
  • Execution time and memory consumption
  • Showing errors and warnings
  • Viewing functions called during execution
  • Debugging features for mobile apps and APIs

Check out the full post for a list of more features and screenshots/detail on each one.

tagged: zend zray zendserver top10 list features screenshot

Link: http://www.sitepoint.com/top-10-z-ray-features-check/

Matthew Setter:
Can VIM Ever Replace PHPStorm?
Mar 02, 2015 @ 16:54:13

In an interesting new post to his site Matthew Setter wonders if an IDE like PHPStorm can be replaced by VIM, a standard in the editor community for decades.

Is it reasonable, even practical, to expect that a 30 year old application can match a modern one? Is it conceivable to be able to code as well using VIM, said 30 year old application, as I can in PhpStorm, with all the IntelliSense-lead functionality PhpStorm offers?

He starts with some of his recent experience with the editor and some of the things he's (happily) found it can do he didn't know before. He includes a screenshot of a multi-pane view, explains what each is and what he can do with them. He points out that this example is Markdown documents but it can just as easily be used for code too. Finally he talks about the subject any PHPStorm user wants to know about, the IntelliSense functionality. Unfortunately, while there are some tools he mentions that can do similar things, they don't provide the context PHPStorm can deliver.

He ends the post with an interesting question: is IntelliSense the right approach? He wonders if having more context is a better answer rather than just the auto-complete handling IntelliSense offers.

tagged: vim editor replacement phpstorm opinion autcomplete context screenshot

Link: http://www.matthewsetter.com/can-vim-ever-replace-phpstorm/

Rob Allen:
Z-Ray for Zend Server 7
Jul 02, 2014 @ 17:56:59

In his latest post Rob Allen gives a "first look" at a new feature in the Zend Server (v7) product from Zend - Z-Ray. The z-Ray feature gives you a complete "under the covers" look at what your code is doing including resource use, database connections and processing time.

I’ve been running the beta for all my development work for a while now and the main reason is the new Z-Ray feature. Z-Ray is a bar that is injected into the bottom of your page showing lots of useful information.

His post shares some of the results he found with his development version of Joind.in and screenshots of the results. He shows the levels of detail available at each level, all directly in the browser. It even includes functionality to track all variables being created or used in the current execution.

tagged: zray zendserver7 introduction joindin example screenshot

Link: http://akrabat.com/software/z-ray-for-zend-server-7/

SitePoint PHP Blog:
PhpStorm - Top Productivity Hacks and Shortcuts
Feb 12, 2014 @ 17:53:59

The SitePoint PHP blog has a recent post from Bruno Skvorc sharing some PHPStorm productivity "hacks" and shortcuts you can use during your development in this popular IDE.

We all have our favorite IDEs/editors when coding. Mine is PhpStorm, and it took a while to master all its shortcuts and establish a rapid workflow. In this article, I’ll share some keyboard shortcuts and tips with you which you should make part of your regular routine if you, too, do your work in this IDE. This article was partially inspired by this Reddit thread, and will be mentioning and demonstrating some of the shortcuts found there as well.

He breaks it up into three main categories with several points each, some with (animated) screenshots:

  • Keyboard shortcuts and hacks
  • Using Plugins
  • Dark themes for readability
tagged: phpstorm productivity hack shortcut ide screenshot

Link: http://www.sitepoint.com/phpstorm-top-productivity-hacks-shortcuts/

MaltBlue.com:
Zend Framework 2 - The New HTML5 Form Fields
May 29, 2013 @ 14:33:59

Matthew Setter has posted another in his series looking at the Zend Framework v2 and some of its features. In this new post he focuses on the HTML5 form field support that comes bundled with recent versions.

In this tutorial, I’ll be taking you through a few of the new HTML5-specific form elements available in the new Zend Framework 2. We’ll see: how they work, how to use them, so you can also see what they’re like. This will be coupled with a good set of screenshots – so you know what they look like. By the end of this tutorial, you should be well on your way to being able to have fully HTML5 interfaces in your applications.

He starts off by talking about HTML5 elements in general, pointing out a few reasons why to use them, complete with statistics to back them up (of mobile usage where HTML5 can be handy). He focuses specifically on four different elements - the telephone input field, email field, URL field and the date/time selector. He gives examples of each and screenshots of what they look like on a mobile device (iPhone in this case). Complete code is included to create the elements as well.

tagged: tutorial html5 elements zendframework2 introduction screenshot

Link: http://www.maltblue.com/tutorial/zf2-html5-form-field-introduction


Trending Topics: