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

SitePoint PHP Blog:
How to Build a NASA Photo Gallery with Zend Expressive
Nov 03, 2015 @ 15:52:06

The SitePoint PHP blog has a new tutorial from author Andrew Carter showing you how to create a NASA photo gallery application with the latest framework offering from Zend, Zend Expressive.

In this article, we are going to use Zend Expressive to build a photo gallery using the NASA Astronomy Picture of the Day API. The end result will be the AstroSplash website which was created for the purpose of this article. [...] Zend Expressive is an exciting new micro-framework for building PSR-7 middleware applications. [...] Middleware is a term that will be used a lot in this article. A good definition of middleware is given by the Zend Expressive documentation.

They walk you through the basics of the application and how to set up an account and application over on the NASA API. They help you create the initial project, what the output should look like and commands to remove some extra code. They include the configuration of the container, set up the route middleware, work with the templating for the app and connecting it with Doctrine for database storage. Finally they integrate the NASA API using this library and pull down the latest images from the service.

tagged: zendexpressive tutorial nasa image application api framework middleware

Link: http://www.sitepoint.com/build-nasa-photo-gallery-zend-expressive/

The PHP.cc Blog:
Disintegration Testing
Mar 20, 2014 @ 15:20:25

In this new post on thePHP.cc blog today Sebastian Bergmann relates the unfortunate disintegration of the Mars Climate Orbiter (back in 1999) back to a lesson on software testing and errors.

One of the most important tasks in software testing is to find the smallest scope in which a test case can be implemented. The smaller the scope in which a test is run, the faster it can be executed and the more precise its result. Unit Tests exercise one unit of code in isolation from all collaborators. Integration Tests verify the interaction of two or more collaborators in isolation from the rest of the system. Edge-to-Edge Tests run the software as end-to-end as possible in a single process (and without using a web browser or a web server). End-to-End Tests, or System Tests, look at the whole system and in the case of a web application send a HTTP request from a web browser to a web server running the software to inspect the HTTP response that is sent back.

He talks some about the difference between unit tests and acceptance tests and how "easy and seductive" functional tests can be over unit testing. He points out how fragile (and sometimes slow) this can be though, and how their failure only shows a problem and not where it is.

The promise of being able to develop both the business model as well as the software that implements it in an agile fashion should be reason enough for enterprises to invest in a modern, highly decoupled software architecture. And when the members of the software development team communicate well, both among themselves and with the other stakeholders, then there is not much that can really impede the success of the project.
tagged: unittest functionaltest testing software nasa orbiter

Link: http://thephp.cc/viewpoints/blog/2014/03/disintegration-testing


Trending Topics: