Sidecar ) Archipelago Framework
PHP & The Archipelago Framework
Model-view-controller is a design pattern used in software engineering. MVC provides an outline for separating the core components of a web application; the data (model) and the presentation (view) are coupled by the action layer (controller). This structure allows the data handling and business logic to be manipulated independently of the presentation, and allows the user interface to be tweaked without effecting the core web application. In other words, the engineers can work independently from the designers without getting frustrated with each other.
The MVC design pattern is like a stack of pancakes. Each layer touches only the one below and above it. The controller is like the syrup that turns them into one soggy pile of deliciousness.
MVC adapts well to the web because the view layer is easily incorporated as HTML templates and CSS stylesheets (HTML being a markup language and CSS being a style language). And the data layers are divided between the tables in a database and the models that represent them. The only thing left is the controller, whose job it is to bring all the layers together into a rich user experience.
The flow of an MVC request works like this:
- The user makes a request (i.e. clicks a link)
- The controller analyzes the request and routes it to the proper mini-controller (action). The controller also creates a few objects to help it process and authenticate the request.
- The mini-controller(action) creates the models it needs to complete the request. For example, if viewing an address label, the action would create a model to access that record in the database.
- The mini-controller(action) then takes the data returned by the model and passes it along the view - usually comprised of an HTML/CSS layer, but can also be XML, RSS, or CSV - where it is rendered for the user to see.
- The controller waits idly for the next request.
Pelago uses MVC because it is a standard design pattern that is easily understood by any experienced web developer. The easier it is to understand the internals of our web applications, the easier it is to develop for our clients. It's a win-win situation for us and our clients.
By reusing the same framework for each project, Pelago is able to reduce the development time spent implementing redundant tasks, and focus that time instead on solving our client's real-world problems. We constantly evolve the framework with each client and can retroactively apply upgrades to existing clients.
Although the MVC implementation is transparent to the end user, the developers and designers notice the difference in working with MVC right away. Once you get it, it's just makes sense.
We use standard coding methods because we don't believe in proprietary through obscurity. We want our clients to know that their web application is an entity that can and will grow beyond Pelago. We want our clients to feel confident their web application can be understood and maintained by any developer versed in web development, even if it's not us. Our utmost concern is for our client's businesses, and we feel the MVC framework is the best option for their success.
Evolution. The MVC framework is easy to expand upon. We are constantly adding new features, and refining existing ones. Being able to plug them in to a common framework makes development fast, easy, and fun.
Flexibility. Adding features outside of the original client spec is easy because it always falls within the architecture and capability of the framework. We don't have to rewrite or restructure any code because the bolts are already there.
Pelago has taken the primary tenets of MVC and adapted them in the object-oriented Archipelago Framework using PHP.
Why use PHP? Because PHP is open-source, competitive and often faster than other well-known web technologies, and it was created specifically for web development. And because PHP is widely supported, it is easy to find System Administrators and Developers to work on the Archipelago Framework. PHP is also reliable, secure, scalable, extensible and can easily be load balanced. PHP has been proven to be enterprise reliable by Yahoo and others.
Having identified the programming issues common to 99% of our clients, we have built a stripped-down framework devoid of the bloat common to one-size-fits-all frameworks. The Archipelago Framework utilizes only the core functionalities necessary to effectively run most web applications. This makes our framework lightning fast and incredibly versatile. Addressing the unique needs of that other 1% is easily layered in on a per-project basis.
While maintaining the integrity of MVC, we have layered in several library classes, such as template rendering, user authentication, request handling, emailing, session handling, friendly URLs, database abstraction, and error handling.
Pelago has developed a large library of plug-and-play web site modules that can quickly be assembled into a robust web application. These include common features like Address books, Photo galleries, Document repositories, Shopping Carts, and some not-so-common features too numerous and diverse to list.
Pelago has successfully teamed up with developers from other companies, using the Archipelago Framework, to co-develop robust web applications. In all of these cases, it took the developers little time to become proficient with the underpinnings of the Archipelago Framework. In a sense, using this framework has facilitated the growth of our virtual development team.
Other facts about the Archipelago Framework:
- The Archipelago Framework uses the PEAR database abstraction layer and will work with any database supported by it. Pelago has developed sites on the Archipelago Framework using MySQL and PostgreSQL.
- The Archipelago Framework has been implemented using Apache Web Server and Lighttpd. It also works well with various PHP accelerators, including eaccelerator and the Zend Optimizer.
Peers (Web Developers)
Our embracing of tried and tested programming practices means we know our stuff. When we approach a programming problem, we don't just go modal and throw a bunch of code at it until the problem is solved. We take a step back first and consider how the problem can be solved in the context of object-oriented code and well-structured frameworks. We've seen enough projects to know what works and what doesn't. We also know what problems we will need to solve before most clients present them. In other words, we are prepared for just about any development scenario that may come our way.
Potential Clients, Executives
Proof. Our commitment to standard programming practices shows we are committed to the longevity of our work. We have an intimate knowledge of our field and require ourselves to stay up-to-date with the latest research and happenings. We are passionate about this work and want to bring that to our clients. Differentiation. This makes us different. We care how our clients get from point A to point B. And once they have arrived, we want to know they continue to get the best care available. Our framework is current in regards to security and optimization.
While there are plenty of solid PHP frameworks available, we decided to roll our own for several reasons.
- Most free frameworks do too much.
Because they are written to handle just about every scenario a web site can handle, thus making them more attractive to the web development community as a whole, these frameworks simply did too much. We found we didn't need some of the features. We found our web sites to use the same set of features repeatedly, so we wanted a framework that would excel in just those features.
- Each framework has its own style
Developers tend to program in a dialect unique to them. Pelago certainly does. We wanted a framework that was written in the same style as the rest of our code library.
- Learning curve
Every framework has its learning curve. They may all have the MVC design pattern as a common denominator, but they vary in their interpretation of it. Whichever framework you absorb into your company, you will have a learning curve, sometimes minor, sometimes not. If we were to spend the energy learning a new framework, it might as well be our own.
Pelago is still working on the licensing and documentation for opensourcing our Archipelago Framework. It's in the works. Once we have it ready for an official release, we'll be letting the world know. Meanwhile. Interested in learning more about developing web sites using the MVC design pattern? Here are some links to get you started.