-
How to create a Data Container Component in React
One pattern I’ve used quite a lot while working with React at the BBC and Discovery Channel is the Data Container pattern. It became popular in the last couple of years thanks to libraries like Redux and Komposer. The idea is simple. When you build UI components in React you feed data into them via…
-
Implementing Dynamic Finders and Parsing Method Expressions
Most ORMs support the concept of dynamic finders. A dynamic finder looks like a normal method invocation, but the method itself doesn’t exist, instead, it’s generated dynamically and processed via another method at runtime. A good example of this is Ruby. When you invoke a method that doesn’t exist, it raises a NoMethodError exception, unless…
-
Database Replication Adapter for Zend Framework Applications
Last updated: 21 Feb, 2010 Database replication is an option that allows the content of one database to be replicated to another database or databases, providing a mechanism to scale out the database. Scaling out the database allows more activities to be processed and more users to access the database by running multiple copies of…
-
Zend Framework DAL: DAOs and DataMappers
A Data Access Layer (DAL) is the layer of your application that provides simplified access to data stored in persistent storage of some kind. For example, the DAL might return a reference to an object complete with its attributes instead of a row of fields from a database table. A Data Access Objects (DAO) is…
-
Domain-Driven Design: Sample Application
Last updated: 15 Feb, 2010 Part 1: Domain-Driven Design and MVC Architectures Part 2: Domain-Driven Design: Data Access Strategies Part 3: Domain-Driven Design: The Repository Some of the Domain-driven design concepts explained above are applied in this sample application. Directory Structure app/ config/ controllers/ UserController.php domain/ entities/ User.php UserProfile.php repositories/ UserRepository.php views/ lib/ public/ The…
-
Domain-Driven Design: The Repository
Part 2: Domain-Driven Design: Data Access Strategies The Ubiquitous Language The ubiquitous language is the foundation of Domain-driven design. The concept is simple, developers and domain experts share a common language that both understand. This language is set in business terminology, not technical terminology. This ubiquitous language allows the technical team become part of the…
-
Domain-Driven Design: Data Access Strategies
Part 1: Domain-Driven Design and MVC Architectures The Domain Model Here are some of the features a Domain-driven design framework should support: A domain model that is independent and decoupled from the application. A reusable library that can be used in many different domain-specific applications. Dependency Injection in order to inject Repositories and Services into…
-
Domain-Driven Design and MVC Architectures
According to Eric Evans, Domain-driven design (DDD) is not a technology or a methodology. It’s a different way of thinking about how to organize your applications and structure your code. This way of thinking complements very well the popular MVC architecture. The domain model provides a structural view of the system. Most of the time,…
-
Zend Framework: The Cost of Flexibility is Complexity
The Zend Framework is a very flexible system, in fact, it can be used to build practically anything. But, the problem with using a flexible system is that flexibility costs. And the cost of flexibility is complexity. Martin Fowler wrote: Every time you put extra stuff into your code to make it more flexible, you…
-
Apache Log Analyzer 2 Feed
I found this project thanks to Raphael’s post Turning a Zend_Log log file into an RSS feed. Developed by Simone Carletti, ApacheLogAnalyzer2Feed is a really powerful open source PHP 5 class to parse and analyse Apache Web Server log files. Results are converted into a feed to let users subscribe them with a feed reader.…
-
Zend Framework Automatic Dependency Tracking
When you develop or deploy an application, dependency tracking is one of the problems you must solve. Keeping track of dependencies for every application you develop is not an easy task. To solve this problem I’ve created Zend_Debug_Include, a Zend Framework component that supports automatic dependency tracking. We all agree that dependencies cannot be maintained…
-
The Multimaster Replication Problem
Replication has its problems, specially if you have a multimaster replication system. To make matters worse, none of the PHP frameworks support multimaster replication systems nor handle master failover. Symfony uses Propel and only supports master-slave replication systems. When the master fails, it’s true that you have the slaves ready to replace it, but the…
-
Designing a CMS Architecture
François Zaninotto wrote: When faced with the alternative between an off-the-shelf CMS or a custom development, many companies pick solutions like ezPublish or Drupal. In addition to being free, these CMS seem to fulfill all possible requirements. But while choosing an open-source solution is a great idea, going for a full-featured CMS may prove more…
-
Where is the include coming from?
The includes of the system map out the dependencies of the system, which files depend on which, which subsystem depends on which. When working with a system, it’s always useful to map out the dependencies before hand. Here are some examples: WordPress 2.2.1 http://wordpress.org MediaWiki 1.12 http://www.mediawiki.org/ phpBB 3.0 http://www.phpbb.com/ phpMyAdmin 2.9.1.1 http://www.phpmyadmin.net/ Symfony 1.1…
-
Django 1.0 will be released in early September
-
A Modular Approach to Web Development
MVC is about loose-coupling, and Modular Programming takes that concept to the extreme. A modular application can dynamically load and unload modules at runtime, completely separate applications in their own right, which interact with the main application and other modules to perform some set of tasks. In this article you will presented with a different…
-
Learn to Build Robust, Scalable and Maintainable Applications using MVC
MVC is about loose-coupling, and Modular Programming takes that concept to the extreme. A modular application can dynamically load and unload modules at runtime, completely separate applications in their own right, which interact with the main application and other modules to perform some set of tasks This document (PDF) discusses the classes and interfaces of…
-
Analysis of coupling within the Zend Framework
Neil Grab wrote: One of the Zend Framework’s strongest drawing cards, as I see it, is its loosely-coupled structure. The name Zend Framework may be a misnomer, in fact, as ZF is more a set of reusable libraries than an actual application framework. I won’t go into detail about the advantages of loose coupling, but…
-
A Painless Remote Projects Synchronization Utility
So, there you are, asking yourself – “How the hell am I going to deploy my next application across multiple servers?”. First, you write some shell scripts. One that checks out the project from the repository and the other one that runs all the tests. Then, you master the synchronization technique and realise that combined…
-
Magento 1.0 Released! Open Source eCommerce Evolved
Varien, one of the most important eCommerce development and consulting firms in the world, has taken eCommerce to a completely different level with the latest release of Magento 1.0. An amazing, flexible, modular and scalable open-source eCommerce solution, powered by one of the most popular systems on the web today, the Zend Framework. Congratulations to…
