...
Download the latest version of Akelos framework from [Akelos's website's download section|http://www.akelos.org/download|Akelos Framework Download].
Creating an Application
Preliminaries / Database Configuration
...
- Using a command line interface (i.e. Terminal), type the following:
...
- ./src/akelos/akelos ~/projects/
...
- PROJECT_NAME
...
...
- Create a symlink
...
- ln -s ~/Projects/blog/public /Applications/MAMP/htdocs
...
- Next, point to localhost, in order to setup the database connection details
...
- The database configuration script checks to see your current PHP settings and finds all the databases that you have support for (i.e. MySQL, PostgreSQL, SQLite etc.)
...
- By default (i.e. "out-of-the-box") the Akelos framework enforces the usage of three different databases: DEV / TEST / PROD
...
- Therefore, create the three different environments (i.e. just the three databases without the tables)
...
- You will need four key pieces of information, moving forward
- You will need four key pieces of information, moving forward
...
- Database Host
- Database Host
...
- If you have all three environment on your local machine, than this will be "localhost" for all three database configuration
...
- Database Name
...
- Username
...
- Password
...
- In case you are not familiar with three environment way of development:
...
- DEV is for
...
- Development
...
- , in which your error levels will be all "raised"; this is the place where you will do all the nitty-gritty work before the application reaches the Testing phase.
...
- TEST is for
...
- Testing
...
- , in which you will let the stakeholders perform the tests on the system
...
- PROD is for
...
- Production
...
- , in which you push the application once it has been tested and signed-off by the customer(s); this environment also has a better ways of handling errors (i.e. logging them, as oppose to having them exposed to the users)
...
- There is a native (out-of-the-box) support for internationalization. When you finish providing the database configuration details, you will be prompted to provide a 2 letter ISO 639 language codes (separated by commas) to make your app multi-lingual.
...
- That's it! now you are ready to start "Coding" your application.
Development
...
- Open/Load up the project in your favorite IDE
...
- Next, the first thing you will do is create a controller.
...
- In the command line, type: ./script/generate controller
...
- NAME
...
...
- You can check to make sure that the controller was created by pointing your browser to
...
- http://localhost/*NAME
...
- \* (http://localhost/*NAME
...
- *) (name of the newly created controller)
...
- Most likely (i.e. in
...
- normal
...
- cases), you will get a Fatal error saying "Action
...
- index
...
- does not exist for controller
...
- NAME
...
- Controller in ... on line ...
...
- So, create a function index() within the
...
- NAME
...
- controller class, rendering the hello world text:
Code Block theme Default language php
- controller class, rendering the hello world text:
...
linenumbers true function index() {
...
$this->renderText("Hello World"); }
...
- TODO