Posts Tagged ‘easy’

Quick guide to DooSession

This will be a quick guide how to use DooSession, first of all you need to call a DooSession class, I love to have one super class that extends DooController class. In super class constructor I make session and create everything I need for a website.

Calling session class needs one parameter and thats namespace name, often you wish to put name for your session.

$this->_application = Doo::session("mywebsite");

Now that you created session namespace you can start using it, storing in session and getting stuff from it. For example you want to define username of user that is registered:

$this->_application->user = "John";

Now you are accessing it from controller with:

$this->_application->user

Another nice thing is to have access to session from your view scripts, I am doing it like this, inside constructor of my super class I add:

$data['application'] = Doo::session("mywebsite");
$this->renderc('templatefile', $data);

Now from your view scripts you can access your user variable like:

$this->data['application']->user

Thats about it, all functions that you have in doo session class are in API.

http://doophp.com/documentation/api_svn

More »

Create a simple To Do List in DooPHP – Part 2

Introduction

This tutorial will guide you through all the steps required to get started using DooPHP through the creation of a simple To Do List Application. The tutorial is split into a number of sections and you will need to read the guide from the begining in order to understand whats going on.

  • Part 1 – Getting Started
  • Part 2 – The Signup Form
  • Part 3 – User Authentication – Coming Soon
  • Part 4 – The To Do List – Coming Soon
  • Part 5 – Adding AJAX Functionality – Coming Soon

Creating the Signup Form

The first thing we need to do is to create a new controller which will handel registration tasks. For this we will create a new Controller with the name RegistrationController and this will handel all aspects of registration. Right now this will consist of a single action – Signup. Therefore we must create a new file public_html\protected\controller\RegistrationController.php and the contents of this file will be:

More »

Create a simple To Do List in DooPHP – Part 1

Introduction

This tutorial will guide you through all the steps required to get started using DooPHP through the creation of a simple To Do List Application. The tutorial is split into a number of sections and you will need to read the guide from the begining in order to understand whats going on.

  • Part 1 – Getting Started
  • Part 2 – The Signup Form
  • Part 3 – User Authentication – Coming Soon
  • Part 4 – The To Do List – Coming Soon
  • Part 5 – Adding AJAX Functionality – Coming Soon

Our Objective for this Tutorial

In this tutorial we will be creating a simple To Doo List Manager Web Application and through the course of the tutorial we will be covering the following topics:

  • Obtaining and Deploying the Base DooPHP Application
  • Setting up the MySQL Database
  • Creating the Models
  • Creating the To Do Manager Application
    • Signup Form
    • User Authentication
    • User Home Page
    • Task Actions
    • Enhancing you application with AJAX

You can view a demo of the finished project here. Some screen shots of the final application are also included below:

TODO: IMAGES TO GO IN HERE WHEN I FINISH!

TODO: UPDATE THE DEMO LINK ABOVE

More »