Skip to content
Imants Horsts edited this page Apr 13, 2017 · 6 revisions

Here are the list of topic for those who want to learn programming with Agile Toolkit.

Goal 1: Greeting program

A good start in any programming language and framework is to teach your program to greet you with respect.

  • ask name of the user
  • say "Hello, ".$name;

This requires you to collect the information from the user then re-use this information to output. An extension to this task would be to ask about user's age after, and modify the response format based on the name.

With Agile UI you need to make input through a form and make output appear nicely.

Goal 2: Contact Form

Many sites feature a contact form. Your goal will be to create such a form, collect information and store it in the database. Next create a separate page that will display all the entries by the user through a table.

Decorate form by using nice field layouts, add more types (e.g. checkboxes).

Goal 3: Money Lending App

Now we will start doing something useful. Create an app that allow you to enter list of friends, then you should be able to select a friend and enter details about a loan: date, amount and when he should repay you.

Create a basic dashboard that will show you how much you are owed. As an extra - create a special URL that your friends can click to see how much money the owe you. It's important that you can create multiple loans for a friend.

(I've broken down this into multiple minor steps):

  • start new app in a new folder
  • composer require atk4/ui to install Agile UI 1.1.0 (or later)
  • create init.php, set up database connection in this file, $app and $layout, populate menu.
  • create friends.php, create Friend model, add CRUD for editing your friends
  • create lend.php with a form to lend money, first make it list friends, then when friend is selected, ask to enter amount you are lending. Link with Loan model
  • create formulas for Friend to calculate total loans
  • create repay.php where friend can enter his email, then see how much money he must repay

Additionally, try the following:

  • use git repository locally
  • register on github.com, store your repository there
  • deploy your app to heroku, use ClearDB add-on to store data
  • add hints, messages and improve layouts on your page - use boxes, labels etc where possible

composer.json file to use

{
    "require": {
        "atk4/ui": "^1.1"
    },
    "autoload":{
        "psr-0":{
            "": ["lib/"]
        }
    }
}

After you create this file, call composer update. Also please create /lib sub-folder where you should place all your class definition files like data Models.

Goal 4: On-Line auction

It's time to sell your old gadgets. Have a phone that you no longer use? Lets create an auction for it. You have to write an app where you can enter details of your item (name, description, starting price, expiration date), then share link with your friends who can bid on it.

Your friends need to create account and log-in before they can bid, so that you know who they are. Personalize your app with your unique ideas. Implement the "minimum bid" policy, e.g. If current bid is "5" and someone enters bid "10" it increases to 6 only. If there is another user who bids 8, then your system automatically increases bid amount to "9".

Show how much time is left to bid.

Goal 5: Advertisement Board

Create a site with number of categories (household, garden, car, etc) and actions (buy, sell, rent, exchange). Allow users to fill out a form with the ad details, which will then be displayed in the appropriate category. Extend your app to include "admin's verification" - we don't want bad ads to be advertised. Also introduce ability to display ads only for some time period (e.g. 30 days).

Integrate payment gateway, so that you can pay 0.01 cent to extend your ad's lifetime to 60 days, give it a "HOT" badge and place it on top of the list in the category.

Compare your project with a professional classifieds site, see which features you are lacking and add some of them.

Goal 6: Twitter

Time to post tweets on your timeline. Implement your own twitter. Allow other users to follow you, then for a user show relevant tweets only. Implement other features like direct messages, re-tweeting and likes.