6 January 2014

Giveaway of the new book - Learning FuelPHP for Effective PHP Development

Overview: http://www.packtpub.com/learning-fuelphp-for-effective-php-development/book

  • Install FuelPHP
  • Set up a project and use Git source control
  • Use the FuelPHP oil tool to auto-generate Models, Views, and Controllers
  • Perform migrations to bring different environments in line with one another
  • Deploy existing packages to perform common functionality
  • Enable user authentication with the Auth package
  • Create your own packages to share functionality

My Review

Overall its a book for beginner, and would recommend it if your starting a FuelPHP project.
The Good
- The package walk through is fantastic without going to in-depth of creating a package
- Setup walk through with git and sub modules
- Usage of FuelPHP's major components

The So-So
- Usage of oil generate, they should have used "php oil generate scaffold" instead

The Bad
- Setup for config file “fuel/app/config.php” , should go into more detail as it must be set
before running - DB config, and using separate db’s for multiple step servers (dev -> qa -> prod )
- Setup of a template to get started requires extending of classes
- Extending classes so you can modify the core files without worries of future upgrades
- Missing the ORM in detail, one of the most beneficial things in FuelPHP
- Nothing about how to relating models together

17 December 2013
I'm almost there guys! I have 1 more semester of hard work ahead of me. But my projects have taken a toll this semester! I'm hoping to get back on track with Boiler Projects. Also my main site needs some updating with current projects that I've worked on through work / free lancing.
Also I will be having a contest on my website and if you win you will get a free book about FuelPHP!
I will have additional details later!
Luke
5 September 2013

Its been a crazy couple of months around here , and I have been really busy!

Quick recap

  • ShortPOLO AKA (Mee.la)
  • Designed from the ground up , new framework , around 80% rewrite!
    Now its not always great to rewrite something but in this case it was necessary as it was not on a framework and it should have been to be easily managed.
    This has a really cool admin side along with a sign up for regular users. Users can signup via Facebook / Google / Twitter , see their URLs stats and with the image plugin they can share images easily!

    Sufian Hassan and myself have been working together to make this happen he did most of the CSS and I the PHP. You should checkout some of his other projects!

  • BoilerProjects
  • Over the past few months I've been trying to get Boiler Projects on the right track. I took the time to give it a redesign with the new Twitter Bootstrap and some cool cloud effects. I've gotten mostly positive reviews from the redesign! But the site overall has been a tremendous project so I will be teaming up with some others soon to hopefully finish it before I leave Purdue in May!

    So far I've added a good friend and co-worker Ben Mollet

  • ownCloud Drag and Drop Directories
  • This by far has been the most fun project for me, learning a entire new framework on a high profile project. I started with ownCloud about a month ago , and realized they were missing drag and drop features for folders (like dropbox). This was a quick and easy task and hope it reaches a pull request!

    You can follow it here: http://shortpolo.com/Ck , really wanted to use ShortPOLO here :-)

I've also started on the Purdue Ice Hockey site, but that is looking like a release of December.


It was a great summer and looking forward to finishing up some of these projects!Luke
1 July 2013

I’ve been asked a lot how to do a basic setup with a template with a header and footer. With FuelPHP its super easy, so lets get started!

The Setup

Go download FuelPHP : http://fuelphp.com/docs/installation/download.html (currently on v 1.6.1)

Run in your command line.

         php composer.phar update


If running Nginx Read , use this for you setup!

location / {
    root /var/www/html/fuelphp/public;
    index index.html index.htm index.php;
    #FUELPHP MOD REWRITE
    try_files $uri /index.php?$uri&$args;
}

Now to move on it is recommended to go through your config file to customize how you want FuelPHP to behave.

The Template

First create the following controller :

app/classes/controller/template.php

abstract class Controller_Template extends \Fuel\Core\Controller_Template {
    
    public function before()
    {
        // Lets render the template
        parent::before();
        $data = new stdClass;
        
        $data->controller = str_replace('controller_', '',strtolower($this->request->route->controller));
        
        // Lets set the default title , you can change it when calling the view
        $this->template->title = ucwords($data->controller.' | Luke Polo');
        
        // Lets get the header and footer and set a variable to use within the template
        $this->template->footer = View::forge('core/footer');
        $this->template->header = View::forge('core/header');
    }
}

You can do a lot with this template controller for example , you can check for logins before the page even renders and change the default view.

To use templates you must add this line to your bootstrap.php in your autoloader 'Controller_Template' => APPPATH.'classes/controller/template.php',

Create the views

“app/views/template.php”

    // It's easy as just using these variables in the template view!
    echo $title;
    echo $header;
    echo $footer;

“app/views/core/header.php”
“app/views/core/footer.php”

    If you want to send data to the header / footer , inside the template controller you can do the following:
        $data = new stdClass;
        $data->some_variable = 'hi!';
        $this->template->header = View::forge('core/header',$data);

    Then in the header view just do 
        echo $some_variable;

All Setup , but how do I use this?

Open app/classes/controller and change extends Controller to extends Controller_Template

public function action_index()
{
    $this->template->title = ‘My new title!’; 
    $this->template->content = View::forge('welcome/index');
}

I hope this tutorial was helpful!

21 March 2013

How's it going !

I just added two new sites to my current projects page,

I am finally getting free enough to start really working on Boiler Projects more, its a great site looks promising and a few of my testers really like the flow, but there are lots of issues and lots of missing features. Things are changing a lot but it keeps me busy looking to find better ways to do what I did. I actually started to use it for my projects! Its nice especially if you want to add a description and see all your tasks right there in front of you.

I am opening the sign up pretty soon (for testers) after I re-haul the design and flow!


Well thats all I have for now , checkout the new sites! Luke

25 February 2013

Well , GoDaddy has failed me, lost all my DB's and "no backup"? So I picked up my stuff (had a repository for all my sites just not a db backup). So anyways I lost all of my blogs, so I'll post them back up eventually (not like many people even look at this stuff) .

But I would like to say having your own Virtual Private Server is awesome. Digital Ocean is an awesome cheap solution.


It was my first time configuring a server (still on going) but its a blast.

Some tips that I suggest are :

  • Install Dropbox for your backups
  • Auto MySQL Backup - backups all databases, daily , weekly, monthly and Yearly!
  • Install jemalloc or TCmalloc , helps reduce loads on the server (Useful with 8+ Cores)
  • Install Fail2Ban for better security
  • Use NGINX instead of Apache - from my experiences so far, its incredibly fast and becoming very popular!
  • Varnish (with NGINX proxy to http allows https to be cached as well!)
  • Combine Memcached with Varnish === awesomeness

I'm sure there is a lots of additional software to install but those are a few I recommend, and aren't all that hard to work with.

I hope you all at least investigate DigitalOcean a cheap solution for Virtual Private ServerLuke