Build your first application with DLM ALPHA
Yesterday I wrote you about ALPHA. It was just an overview, the concepts that lead the ALPHA framework to born.
Today I would let you know how to build your first application with ALPHA.
There are 2 possible ways to do it:
- Automated script
The first is fastest and ensure you to have a working project immediatelly. The second requires a proof understanding of the project structure and is slowest, requiring you to create and edit some files and some directory one at once.
So, the best way to start is using the Automated script solution.
Step 1. we should assure we have a working installation of Apache and PHP.
Well in a default distro installation of Linux you have already the latest stable version of Apache and PHP installed. In a minimal configuration we could not. So use the yum, apt, rpm or what you want to install Apache first and then PHP module.
On Mac i know Xampp however other solutions should works without problem.
Step 2. Download and install ALPHA
This step is extremelly simple.
- Make the download of the framework from github ALPHA Project Page.
- Extract it in /alpha/core/ or where you prefer (in the next step we will assume that the installation directory of the core will be /alpha/core/).
Step 3. Make the first APLHA project
Open a shell/consolle window, then go into the document root of your web server on linux (could change in according with distro and our custom settings) we assume it will be in /var/www/ .
On Windows would be in:
- c:\xampp\htdocs\ if you will use Xampp (where c:\xampp is your Xampp installation directory) or
- c:\wamp\www\ if you will use WampServer (where c:\wamp is your WampServer installation directory)
Execute the shell command:
php -f /alpha/core/build/make.php myFirstApp
and read what the automated script is asking to you.
Done! Take a look
Now, in the document root of the web server you have a new directory named myFirstApp, inside it you will find 3 files (.htaccess, application.xml and index.php) and a new directory named app.
Open your web browser and type http://localhost/myFirstApp
That’s all! Simple, true?