Thursday, March 27, 2008

(PHP/mySQL) Project Calendar - Introduction

As some of you might have read in one of my previous posts, I have a project in mind as a (heavy) PHP refresher. This is the first Blog Entry about this project.

I dusted off one of my college books. This is a major programming project and I wanted needed a refresher on analysis and algorithm (Pseudo-Coding). Here are the 6 steps of any major programming project:
  1. Definition of the goals/Analysis of the problem
  2. Design of the algorithm
  3. Validation of the algorithm
  4. Coding
  5. Debug
  6. (optional) Documentation

Source: Introduction à la programmation - Algorithmes et ANSI/ISO C++
Michel Michaud



Let's get step 1 completed.

Goals: A PHP calendar generator linked to a database for date-related information (scheduler).

Two "views" will be developped. "Single-month view" and "year view". Single-month view is redundant to the Year-view but essential for prototyping the final view (Year-view)

Single-month view will accept a month and year from the user (dropdown, textbox, or both - undefined at this point). The page (PHP) will then dynamically generate a one-month calendar with the input. All the calculations (first day of month, days per month, etc.) will be handled by code to allow greater flexibility and easier portability (from PHP to another language).

Once the prototype is complete, design and development on Year-view can begin. Year-view will accept a year from the user (like the prototype, the entry type is undefined at this point). With this input, the page will dynamically generate a 3 by 4 grid of 12 monthly calendars.

(optional) If 3 by 4 is big on screen, a 2 by 6 grid may be chosen instead. Per-user selection based on the user's screen resolution may be added.

Once the calendar is working, a database will be designed and implemented to the system. The database will store date-specific information. By clicking on a date on the calendar, the user will be taken to a screen (page) where the user can view, add, edit, or delete entries (appointements).

There you have it, I have defined what I want this project to be.