Opening the factory doors: An MVC web app design from scratch. Ok, so as I’ve already mentioned, I’m writing a series of tutorials where I build an MVC web app entirely from scratch in the Yii Framework. This post outlines what the project is, outlines the web app design and some approaches I will be taking.
Web App Design – Overview
Raddir is a web app for building web directories. The idea is to focus on making it a great platform for niche directories, including cases where it is setup as part of existing authority sites. It will be pluggable: I am keen to make it very flexible when it comes to how directory listings get ranked when shown on page, for example.
Q. Hold on! Aren’t directories kind of passe, and generally just part of the ecosystem/cesspool of web spam?
A. That is a good point, but it doesn’t have to be that way. You’re probably thinking of those spammy directories that SEO guys used to spend hours getting listings on (and now spend hours disavowing). Those directories are doing it all wrong.
Here’s why I think we can do something cool with directories: Directories allow for a large number of diverse links to be presented in a well-organized structure. A good directory in a niche field could be a valuable resource for anyone interested in that field; a clear benefit to users. And a directory engine is a very flexible thing. Sites in a directory could be listed in many different ways: what if a (fictitious) health-related directory allowed filtering and sorting of sites based on how many degrees separate they are from www.nih.gov? That ability to rank sites based on trust could be a useful feature for a health-related directory! The base directory software of the raddir project will provide the infrastructure for the directory; specialized features like ranking systems will be implemented using modules. The module system will allow for a very broad range of sorting and filtering rubrics.
Web App Design – Scope
Our web app design will focus on the infrastructure of the base product and the module system. We’re going to omit URL submission. In my opinion it is important to distinguish this project from poor quality web directories, you know: the ones who charge $20 / year for placement. Again, this app is designed to be used in building useful niche directories.
Here are the features and requirements for the initial version of raddir:
- A directory web app that doesn’t accept submissions: You have to be added by the admin. Later we will build in site discovery (see future features below).
- Install script featuring Administrator login creation
- Administrator login and logout
- Add, edit, and delete sites
- Site tagging and categorisation
- Site ranking – some basic sorting and filtering
- Pretty URLs
- Module system
- User front end, with multiple ways of viewing the directory
- Template-driven output allowing total customization by site admins. Themes will be installable, ala WordPress.
- User tracking via a logging mechanism
- Performance is an area of interest so we’ll spend some time making sure the app is fast
- We want the app to be installable on a range of configurations of PHP hosting. There are a few considerations:
- Use the Database for logging to keep it simple
- Store all install-specific configuration in the Database. Ala WordPress
- Because our install might have to share a Database with another web app, we should allow custom database table prefixes. Again, ala WordPress
- We’ve considered briefly the possibility of allowing install without URL rewrites, but ultimately decided that the added complexity is not worth it. This might change later, but for now we will require Mod_Rewrite
Future features, out of scope of the initial version but pencilled in for completion ‘soon.’
- Crawling capabilities for measuring site quality
- Allow claiming of listed sites
- Pluggable authentication
- A Discovery system where sites can be nominated by an existing listed site. Nomination works by being linked from an existing site; admins will be presented with lists of potential new listings that they can review, preview, approved, decline, or ignore.
Notice that our web app design leaves out some features that seem important. It’s always difficult to decide what to cut from the initial features, but we have to be a bit brutal here and focus on the first milestone: a working “minimum viable” app. The initial features are all there because they are either absolutely essential, or adding them later would require large-scale changes to the app (for example the theme system).
Web App Design – Technology
We’re using Yii for this project. Most of my experience is with Zend Framework and Cake, so I really felt like it was time to try some other frameworks. I expect to encounter some hurdles and a learning curve with Yii but I’m up for it.
Ok, I realise I’ve hardly touched on detailed design or actual implementation yet; bear with me, there’ll be more implementation details in the next session! I will also update this post as the project progresses.
I’m focussing on practicalities here: I want these posts to help you get up and running with minimal time wasting. With this in mind I will keep to best practises as much as possible, but we’ll cut a few corners here and there. When I do that I’ll try to let you know and provide pointers with more detail.