Is it right to use setter injection? Or is it evil, to be avoided at all costs, for the explicitness of constructor injection? In today’s post, we explore that and how to implement constructor injection in ZF2 controller classes.
Routing is one of the key requirements in modern applications, especially in Zend Framework 2; but they shouldn’t be overly-complicated. Today, we’re going to look at how to build a routing table, simply and easily using child and segment routes.
For the longest time, I’ve been using closures in my Zend Framework 2 Modules Module
class. I know they’re not always the best approach, but they’re not necessarily wrong either.
But after reviewing Gary Hockin’s recent talk at PHP Conference UK, I was reminded that outside of APC and OPCache, closures aren’t cacheable.
Want to learn how to have initialized objects with minimal code and nearly no hands-on configuration in Zend Framework 2? Come learn about setter injection.
Do you need to use different elements of a Zend Form, in multiple locations? Are you keen to reuse the same form class and avoid code duplication but don’t know how? Come learn about validation groups.
In today’s tutorial we look at a simple way of rendering CSV output in Zend Framework 2, using only a View Template and Controller Action. We see just how easy it is to generate content and send it to the browser, instead of rendering a standard .pthml template.
In today’s post, we look at more HTML5 Form fields in Zend Framework 2: Month, Range, Color, Week and Number, as well as element properties and attributes. Come look around more of the great new elements available.
In part 3 of this series on \Zend\Db\Sql\Select in Zend Framework 2 We cover the constructor, columns function, aliases and expressions, finishing up with limit and order functions. Come wind up the series in style.
In this tutorial we’re working through the basics of \Zend\Db\Sql\Where, showing how to build SQL Where clauses for database queries. We’ll show how to create different predicates from simple to nested queries using of and, or, like, between and in conditions.
In today’s tutorial, we go through the key options in ZFTool, the tooling support available in Zend Framework 2. We install it, create a basic ZF2 application and more.
In today’s tutorial come and learn the new HTML5-specific form elements available in Zend Framework 2. You’ll learn how they work, how to use them, what they look like.
Synopsis
Zend Framework 2 comes packed with an assortment of new features and functionality and greatly streamlines how common scenarios, such as interacting with datasources and application configuration and caching are implemented.
Whether it’s the new HTML5 form elements and view helpers, the new implementation of Zend\Http, the Service Manager, the Event Manager or that Modules are now first-class citizens - you can’t help but see that it’s bursting at the seams.
Today using Zend Framework 2 RouteMatch, Router and Request objects, I show you an easy way to dynamically update the current route. It’s almost painlessly simple.
In Zend Framework 2, so much has been changed, updated and improved - with Forms receiving a lot of attention. In this post, I show you a simple, flexible and powerful approach to compose and use them everywhere in your applications.
The Zend ServiceManager simplifies the web application development process by making configuration a breeze. In this, the 4th post introducing Zend Framework 2, you will learn what the ServiceManager is how to use it and how it simplifies applicaiton development time.
If I have seen further it is by standing on the shoulders of giants.
It’s a really exciting time at the moment with Zend Framework 2 gaining so much traction, after being stable for some time now.
Though I and countless others really enjoyed the 1.x series, it did leave some things to be desired - to be fair.
But the more I explore of the 2.x series, the more I honestly can say that I’m very impressed with it. It may not be as fast as the previous series, but with respect to development, there’s so much going for it it’s worth shouting about.
So it really is rewarding and exciting to begin covering all that it has to offer us. In part one of this series, I looked at a central concept of the revised framework - Dependency Injection.
In today’s post, we look at one of the simplest and most effective components of the Zend Framework that allows us to create extendable and extensible Zend Framework applications - Zend Application Resource Plugins (combined with the Strategy Pattern). If you want to ensure your apps can grow without heartache, read on.
If you’ve been using Zend Forms for any length of time, you’ll know just how flexible and configurable they are. There’s not much that you can’t do with them, But it’s not always easy and there are catches. Today we look at ensuring that module-based Zend Forms using the ViewScript decorator can always be initialised no matter what.
Ever wanted to know how to take an existing Zend Framework application where you have posts, records, news or anything else stored in a data source and updated regularly, and make it available as a feed for your users that they can subscribe to?
During the recent development of the new PHP cloud development casts site, which has been developed with the Zend Framework, so much development time has been saved by using one of the simplest and arguably best features of the framework: Controller Plugins. So today I want to introduce you to them and walk you through a working plugin so you can see just how effective and efficient they can make your development workflow.
Welcome to the fourth and final part in the Zend Form Mastery with Zend Config series. Previously we looked at the basic form options, element and form wide prefixes, filters and element options. In this installment, we’re going to look at configuring Zend Validators via our XML config.
– Part 3 Standard Form & Element Options
This is a Multi Part Series. Check out the other parts:
Part 1 - Custom Filter Paths Part 2 - Core Form Configuration Part 4 - Configuring Zend Validators Options We’ve looked at custom form filters and we’ve looked at the core form configuration. But what about the other form properties? What about:
setting an element as readonly an element as required ignoring an element and love them or hate them, what about decorators Element Options Outside of the options that we’ve looked at previously, there are a number of other options that we can consider implementing when configuring a Zend Form.
Today we move on in learning how to configure the basics of Zend Forms, such as action, method, enctype, accept, accept-charset et al with Zend Config XML. It couldn’t be simpler.
When you’re working with Zend Form you keep your configuration as much out of code as you can - right? Well, if you’ve been working withZend Form for more than a little while, you know that Zend Config really makes that pretty simple - well, some of the time. In this series we look, comprehensively at how to do it all with Zend_Config.
Here we are at part four of the Beginning Cloud Development with cloudControl series and in this part, we’re adding Memcached support. In part one of the series, we laid the foundation for the application and got up to speed with what cloudControl is, why it works and how to get started using it.
Then in part two, we started to flesh out the application that we started building in part one and added MySQL support to it. We showed how to work with cloudControl to manage the key requirements, such as enabling MySQL support, connecting to the MySQL database and keeping the database up to date from a maintenance perspective (creating the database schema and loading data in to the database).
Then in the third part of the series, we replaced MySQL with mongoDB support. Now, in this, the third part of the series, we’re going to finish up with adding Memcached support. As the core of the work’s already been done in the application, this tutorial will be shorter and simpler than the previous three. So, get out the code that you worked through from part 2, or download a copy of it from the github repository and let’s get started.
Here we are at part three of the beginning cloud development with cloudControl series and in this part, we’re adding mongoDB support. In part one of the series, we laid the foundation for the application and got up to speed with what cloudControl is, why it works and how to get started using it.
Then in part two, we started to flesh out the application that we started building in part one and added MySQL support to it. We showed how to work with cloudControl to manage the key requirements, such as enabling MySQL support, connecting to the MySQL database and keeping the database up to date from a maintenance perspective (creating the database schema and loading data in to the database).
In this, the third part of the series, we’re replacing MySQL that we introduced in part two with mongoDB support.
In part one of the series we got a birds eye view of a great cloud development solution for PHP - cloudControl. We looked at the concept of what it is, what you can do with it and ran through a basic deployment with a rather basic application. If you missed the first part, I strongly encourage you to read it before continuing on with part two. When you’re done, come on back and work through it here.
In this, part two of the series, things start to get more serious. In this part, we’re going to start to flesh out the application started in part one, adding in MySQL support - showing just how simple cloudControl makes this for us.
##.
Don’t forget to grab the other parts as well:
So you’ve heard all about the cloud. In the current day and age, you’d have to be living under a rock to have not encountered it by now. Whether it’s the ads from Amazon, Rackspace or Microsoft, the extensions to your favourite framework, such as SimpleCloud in Zend Framework or iCloud from Apple – The Cloud is Everywhere!
But these aren’t the only options available to us as developers. In this series I want to introduce you to and help you get started with another cloud service - cloudControl.