Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Using Akelos framework

Get the Framework

Download the latest version of Akelos framework from Akelos's website's download section.

Creating an Application

Preliminaries / Database Configuration

  1. Using a command line interface (i.e. Terminal), type the following:
    1. ./src/akelos/akelos ~/projects/PROJECT_NAME
  2. Create a symlink
    1. ln -s ~/Projects/blog/public /Applications/MAMP/htdocs
  3. Next, point to localhost, in order to setup the database connection details
    1. 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.)
  4. By default (i.e. "out-of-the-box") the Akelos framework enforces the usage of three different databases: DEV / TEST / PROD
    1. Therefore, create the three different environments (i.e. just the three databases without the tables)
    2. You will need four key pieces of information, moving forward
      1. Database Host
        1. If you have all three environment on your local machine, than this will be "localhost" for all three database configuration
      2. Database Name
      3. Username
      4. Password
  5. In case you are not familiar with three environment way of development:
    1. 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.
    2. TEST is for Testing, in which you will let the stakeholders perform the tests on the system
    3. 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)
  6. 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.
  7. That's it! now you are ready to start "Coding" your application.

Development

  1. Open/Load up the project in your favorite IDE
  2. Next, the first thing you will do is create a controller.
    1. In the command line, type: ./script/generate controller NAME
    2. 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)
    3. Most likely (i.e. in normal cases), you will get a Fatal error saying "Action index does not exist for controller NAMEController in ... on line ...
    4. So, create a function index() within the NAMEcontroller class, rendering the hello world text:
      function index()
      {
      
           $this->renderText("Hello World");
      
      }
    5.  TODO
  • No labels