My First php Project

Download Report

Transcript My First php Project

A VFP programmer’s experience learning php


Php stands for php hypertext preprocessor.
Enjoy the recursive acronym? Originally, it
was personal home page, but it has grown to
much more than that.
It is a language used for developing web
pages




Interviewing Wounded Warriors over six years
to discover Quality of Life.
Participants log on to web site and answer
questions every six months.
Data are collected and transferred to SQL
Server back end.
My mission is to learn the existing
application, take over maintenance, and
eventually start enhancing system.







NetBeans – an IDE that gives hints and
intellisense while developing
PostgreSQL and mySQL (web side Databases)
Javascript
JQuery
Virtualbox
WampServer (Windows Apache MySQL Php)
Ipswitch WS_FTP




You eat an elephant one bite at a time.
I’ll choose a piece which coincides best with
my experience.
Designed and built a SQL Server database to
store relevant data.
Began to modify the process that exports
data from PostgreSQL to SQL Server.

Five separate buttons to generate text files
◦ First button exports answers and takes 25 minutes
◦ Buttons must be done in order for parameters to be
kept from previous button.
◦ Requires entering dates and users each time


Open text files in Excel to review
Run SSIS to import into SQL Server




One button
No parameter entry required
Puts all data directly into Excel spreadsheet
Run SSIS to import into SQL Server_


Can you get there from here?
Show the current code in NetBeans
◦ Building a where clause
◦ Row processing
◦ Filtering by evaluating each row

Show the revised code in NetBeans
◦ Build a view which implements the where clause
◦ Set processing
◦ Filtering prior to evaluating


Not as daunting as I thought it would be
VFP skills that are applicable to php
◦ Database design (first and foremost)
◦ Test-driven programming technique
◦ Optimizing queries
 Not null vs (‘yes’ or ‘no’
 Length($studyno) = 5
 Order of tables (most limited % result sets first)
◦ Looping
 Case
 While
 Foreach

Syntactical differences
◦ Brackets
◦ Semi-colons
◦ incrementing

Debugging is more difficult (but may improve
with acquiring knowledge)
◦
◦
◦
◦
Xdebug
Xxdebug
Var_dump
echo


Create tables to mimic SQL database in
PostgreSQL
Revise code to populate SQL tables
◦ In parallel ?
◦ Using triggers in PostgreSQL?

Acquire knowledge of debugging tools