- Installing Ambition
- Creating your first application
- Controllers and Views
- Ambition Templates
- Accessing and Storing Data
- Extending your Application with Plugins
- Integrating with Almanna
- Web Forms and Helpers
- Testing Your Application
- Frequently Asked Questions (FAQ)
- Handy Recipes and How Tos
- Support Forum on Google Groups
Creating a Simple Blog
Sometimes, the easiest way to learn a new framework or technology is to build something simple but usable right off the bad. In this tutorial, to demonstrate creating a new Ambition application from scratch, we're going to build a (simple) blog application. This tutorial will demonstrate how to generate a new application, database access, template creation, and using plugins.
Before we get started
This tutorial assumes that a working installation of Ambition already exists. If not, please see the Installation Guide, or visit any of the support options available on this site.
You will also need a working text editor, preferably one with Vala syntax highlighting. You may use vim or emacs on the command line, or if you prefer a GUI, gedit, Geany, and Sublime Text all have support for Vala.
For the database support, we will be using PostgreSQL for our example. It's possible to use MySQL or SQLite for running these examples, with minor changes, but the tutorial won't get into that. PostgreSQL is open source, free, and fairly easy to install in most operating systems.
What do we want this blog to do?
- Show a list of blog posts, from most recent on
- Page through posts by sets of five
- Show a list of blog posts by tag, with the existing pagination
- Display a single post
- Log into an administration page
- Post new entries
- Edit an existing entry
- Edit user information
There are other things that blogs might be able to do, and they may be a good exercise for additional experimentation. Most blogs support comments, so one could use Disqus to add instant comments, or create a commenting system within the application. RSS is an excellent tool, so a way to view those entries via Atom would be a great experiment.