Productive three weeks

I have had a productive three weeks; I finally released v1.00 of the Dlayer beta on the 22nd of December and didn’t stop there, as of today I will have released five updates, details below:

For the v1.00 release I stripped Dlayer back to the minimum viable product (MVP), this meant removing everything but the Content Manager. I have one more maintenance release planned, v1.06, and then with v1.07 my primary goal is to work towards returning the Form Builder.

The Content Manager was the minimum I wanted to release for v1.00, but, it isn’t the minimum for the MVP, for that, I need the Content Manager, Form Builder, Website Manager and Media Library, here’s to v1.07 and beyond.

Dlayer, v1.00

I’m happy to announce that today, I released v1.00 of my Open Source project, Dlayer.com.

It has taken a lot of work to reach this point, I’ve restarted the project multiple times, got married, had a child but finally, I reached a point where I was happy to release the project officially on GitHub.

The v1.00 release will act as a stable base for all future development; there is a long way to go, please read the release at Dlayer.com try out the demo. If you have any feedback, positive or negative, please let me know, I will also work towards releasing the roadmap at some point next year.

Dlayer Beta v1.00, RSN

I just added a post to G3D Development explaining where I am with Dlayer, short story, I plan on having the beta out before the end of the year, ideally within the next two weeks to given me time to relax during the holidays.

Unless I find a way to create additional stories within Pivotal Tracker, as of today there are only twelve stories left to complete. Back in October, I posted a list of some of the stories still to do, I’ve ticked off a few of those along with lots of additional tasks that I deemed necessary

Dlayer progress, v0.99 next month

I’ve added a post to G3D Development detailing my progress with Dlayer, you can read it here, an extract of the post is below.

After reviewing my project planner (Pivotal Tracker) it looks like I could be ready to release v0.99 of Dlayer just before mid-September, originally it was planned for the end of August but I have been unusually social during the last two weeks…

Ubuntu: Install Apache, PHP, MySQL, SASS, Bower and PhpStorm for local development

Whenever I need to set up a Linux machine or VM for local PHP development I either recall what I need to do from memory or cobble together what I need from the web, years ago it was very simple, Apache, MySQL and PHP, that is no longer the case. These days a simple setup could be Apache, MySQL, PHP, Git, Node, Bower, Ruby and SASS. Rather than have to recall from memory again I decided to document it when I installed Ubuntu on my laptop.

After the steps below the following will be installed and configured.

  • Apache, two sites, one for a Bootstrap HTML site, the other for a site using Zend Framework 1
  • MySQL
  • PHP
  • Git
  • Bower, via Node
  • SASS, via Ruby
  • And just for good measure PhpStorm

Apache

We need to install Apache and configure two websites, one will be a simple PHP website and the other will be include rewrites for Zend Framework 1. The sites are going to be created in /var/www/html but we will create symbolic links in our Documents folder that point to the directories.

Install Apache

$ sudo apt-get install apache2

Configure Apache

Create directories for sites and set permissions, replace site1 and site2 with whatever names you want to use for your sites, in my case dlayer and site.

$ sudo mkdir –p /var/www/html/site1
$ sudo mkdir –p /var/www/html/site2
$ sudo chown –R $USER:$USER /var/www/html/site1
$ sudo chown –R $USER:$USER /var/www/html/site2
$ sudo chown -R 755 /var/www/html

Create conf files for the new sites, as above replace site1 and site2 with whatever you used previously.

$ sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/site1.conf
$ sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/site2.conf

Edit the conf files

$ sudo gedit /etc/apache2/sites-available/site1.conf

You need to set ServerName and update DocumentRoot, in my case for site1 which is a Zend Framework site I have the below.

DocumentRoot /var/www/html/dlayer/public
ServerName dlayer.dev

Because this site is a Zend Framework base website we need to add in the rewrite rules, the below needs to be added, I add it just before the closing VirtualHost tag.

<Location />
   RewriteEngine On
   RewriteCond %{REQUEST_FILENAME} -s [OR]
   RewriteCond %{REQUEST_FILENAME} -l [OR]
   RewriteCond %{REQUEST_FILENAME} -d
   RewriteRule ^.*$ - [NC,L]
   RewriteRule ^.*$ /index.php [NC,L]
</Location>

Set the ServerName and update the DocumentRoot for the second site, my second site is a simple Bootstrap based site, the settings are as below.

$ sudo gedit /etc/apache2/sites-available/site1.conf
DocumentRoot /var/www/html/site
ServerName site.dev

We can now enable the sites and disable the default site

$ sudo a2dissite 000-default.conf
$ sudo a2ensite site1.conf
$ sudo a2ensite site2.conf

Enable the rewrite module and restart Apache

$ sudo a2enmod rewrite
$ sudo service apache2 restart

We can update our host files so we can reach the sites

$ sudo gedit /etc/hosts

Add the ServerNames you defined in the conf files, in my case I added the below

127.0.0.1    dlayer.dev
127.0.0.1    site.dev

Create the symbolic links to each of the sites, you can the point your IDE or editor at you projects folder rather than /var/www/html/…., replace site1 and site2 with whatever directory names you created in the first step and Site1 and Site2 with whatever you want to directory names to be in your projects directory.

$ sudo ln –s /var/www/html/site1 ~/Documents/Projects/Site1
$ sudo ln –s /var/www/html/site2 ~/Documents/Projects/Site2

MySQL

Install MySQL and MySQL Workbench, if you don’t want to use MySQL workbench simply doesn’t include it in the install command

$ sudo apt-get install mysql-server mysql-workbench

Follow all the prompts, make sure to set a password for the root user, if you have problems copying a password from your password manager into the password field just press return at the prompts setting the password to nothing and update the password afterwards following the below steps.

$ mysql –u root –p
$ use mysql;
$ UPDATE user SET Password=PASSWORD('PASSWORD you want to use') WHERE User='root';
$ flush privileges;
$ quit;

PHP

Install PHP, we are also going to include the GD library and the MySQL PDO driver.

$ sudo apt-get install php5 libapache2-mod-php5 php5-gd php5-mysql

Git

Install Git and set your name and email address

$ sudo apt-get install git
$ git config --global user.name "Your Name"
$ git config --global user.email "Your email"

If you need to generate a SSH key for GitHub check their website or execute the below.

$ ssh-keygen –t rsa –b 4096 –C "Your Email"
$ ssh-add ~/.ssh/id_rsa

To add the key to your account do the below

$ sudo apt-get install xclip
$ xclip -sel clip < ~/.ssh/id_rsa.pub
$ copy the contents of the clipboard to the relevant section in your GitHub profile settings

Bower

Install Bower

$ sudo apt-get install npm
$ sudo npm install –g bower
If the above doesn't work enter the below and try again
$ sudo ln –s /usr/bin/nodejs /usr/bin/node

SASS

Install SASS

$ sudo apt-get install ruby
$ gem install sass

PhpStorm

On my Linux machines I use PhpStorm, I have used PHPed on my Windows machines for the last 12 years but can see myself moving to PhpStorm on both platforms if only for consistency.

Download PhpStorm and unpack

$ tar –xvf [package name]

Move it install /opt and execute the shell script

$ sudo mv [Directory to move] /opt
$ cd /opt/[PhpStorm directory/bin
$ ./phpstorm.sh

You should now have a functional development server and IDE, checkout your sites into your Project directories and start coding,