How to Build a NASA Photo Gallery with Zend Expressive
This article was peer reviewed by Abdul Malik Ikhsan and Matthew Weier O’Phinney. Thanks to all of SitePoint’s peer reviewers for making SitePoint content the best it can be!
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 is based off of this article.
Zend Expressive is an exciting new micro-framework for building PSR-7 middleware applications. Micro-frameworks are smaller, faster and more flexible than full stack frameworks. They tend to be aimed at more experienced developers who do not require as much assistance designing their applications and prefer the flexibility of building their applications from a variety of decoupled components.
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:
“Middleware is any code sitting between a request and a response; it typically analyzes the request to aggregate incoming data, delegates it to another layer to process, and then creates and returns a response.”
StackPHP has provided a method for PHP developers to create middleware since 2013. However, there are some key differences between StackPHP middleware and the middleware that we will encounter in this article. For our intents and purposes, the only compatible elements are theoretical.
Do not worry if this still sounds confusing, these concepts are all best demonstrated by example! So, without further ado, let us dive into making our app.
Continue reading %How to Build a NASA Photo Gallery with Zend Expressive%
LEAVE A REPLY
You must be logged in to post a comment.