The Alt Manifesto
Written by Marcello Bastéa-Forte
Version 0.2 - February 2nd, 2009
Introduction
The Alternative Web Framework is a design experiment to simplify the process of developing web applications.
While the goals for the framework are loftier than what can be reasonably developed by one person, they give a benchmark for success.
50,000 feet: The Main Goal
The high level goal is a simple framework that can be easily learned while remaining flexible and scalable.
10,000 feet: The Five Design Goals
There are a few specific goals that help meet the main goal[1]:
- Reduce the number of prerequisites
- The fewer languages the developer has to know, the better. Ideally? One language.
- Documentation before implementation
- Writing documentation with tutorials and example code before the code works helps understand requirements from the user's perspective.
- Simple API
- No one component of the framework should take more than three printed pages to describe 90% of the functionality. (example)
- The user should be able to understand in the first page why the approach makes sense and find it reasonable.
- The fewer APIs to learn, the better[2].
- Support creativity and interactive programming
- Creativity arises from the ability to prototype multiple ideas quickly.
- By providing mechanisms for faster feedback, programmers can fail early and often, and develop experimentally.
- Formalize scalability from day 1.
- Code should not care (much) about scalability. It should be possible to design an API such that hardware scalability is abstracted.
- The user should be thinking the same way when designing a small app as when designing a big app.
And though not strictly a design rule, let's add...
- Open[3]
- Small web frameworks work best when open and free.
- Free leads to use, and open leads to contribution.
[1] Guidelines not rules!
[2] But don't hide functionality. We are not Apple.
[3] And I mean properly open, not GPL. (Don't kill me.)
5,000 feet: The Techniques
(This section is a work in progress.)
The Language: JavaScript
- To do interesting web applications, you'll be using JavaScript anyway. Why use a different language on the server-side?
The Data Model: JavaScript Objects
- Forget everything you know about SQL, tables, relational databases, indexes,
- JavaScript works with JavaScript Objects (which are essentially ordered hash maps).
- Let's use that as the data store.
- You don't honestly care how things are indexed or stored on disk anymore, do you? You just want it to work and work fast.
- Provide mechanism for atomic code blocks for caching, synchronization, and rollback support.
- Many current database frameworks are designed such that data structures created in code (such as Java, Python, etc.) can be mapped to databases. Why not take that abstraction a step further and enforce it?
- Versioned database?
Other Topics
Integrated Version Control
- Version Control in general is invaluable to programmers, so integrating removes barrier to entry on version control.
- Integrating version control
lets us:
- Link deployment to specific versions/branches across one system or a cluster of systems.
- Deploy multiple versions/branches on the same system.
Current Thoughts
Alt actually exists today. It started as a PHP project (SQueaL) in attempt to simplify working with databases. It exploded into a full-fledged JavaScript engine. After a grad school break from Alt, the original design felt flawed (see below) and this manifesto came of those criticisms. I look forward to continuing evolving and massaging the framework until it meets the requirements.
Other Projects
Since the Alt project was started, similar projects (Google App Engine, Aptana Jaxer, AppJet, etc.) have been announced and released, but they all fall short in one or more of the design goals described above.
The closest project I have seen is the (currently unreleased) new version of Appjet. If it is ever released as open source, it could be a good candidate starting point for Alt.
My Criticism of the Current Alt Framework
- Why use XML? That's learning another language. E4X is really cool, but also a pain to work with, and doesn't work on (most) client-side browsers.
- Arguably, considering XHTML/HTML, is inevitable, so for layout it makes some sense. For a database schema? Not so much.
- Why have a database schema?
Contact
That's it for now.
Send me your thoughts!
marcello@cellosoft.com