Skip to content

Instantly share code, notes, and snippets.

@adicahyaludin
Last active November 19, 2016 11:54
Show Gist options
  • Save adicahyaludin/dfbd089bfa6faff4af51c2727d6eff96 to your computer and use it in GitHub Desktop.
Save adicahyaludin/dfbd089bfa6faff4af51c2727d6eff96 to your computer and use it in GitHub Desktop.
latihan project backend dari nol sampai jadi aplikasi
Planner App
apa?
-Planner app berguna untuk mencatat daftar kerja perhari dalam satu bulan
siapa pengguna?
-tamu
-pemilik
alur?
-tamu
-cuma bisa akses halaman login
-pemilik
-login/logout
-menampilkan daftar kerja perhari dalam satu bulan
-penanganan ketika tidak ada daftar kerja dalam suatu hari
-tambah, edit, delete kerjaan
-konfirmasi sebelum aksi delete
-pesan sukses ketika aksi berhasil dilakukan
-filter daftar kerjaan perbulan dalam satu tahun
wireframe
-login
https://drive.google.com/file/d/0B3g3CqNaUlfJMWd0eGtuRXNCNkE/view
-app
https://docs.google.com/drawings/d/1hpJw-37hJG38zrMiPNtrRyvYsRkCbj8Qs6nDsxTNyY8/pub?w=1200&h=2400
Susun Database
-users
id
name
email
password
-plan_header
id
user_id
date
-plan_detail
id
plan_header_id
plan
ceklis
Algoritma Planner App
-Read Plans
function searchArray($key, $st, $array) {
foreach ($array as $k => $v) {
if ($v[$key] === $st) {
return $k;
}
}
return null;
}
month = date('m') / form.month
year = date('Y') / form.year
days = cal_days_in_month(CAL_GREGORIAN,month,year)
plans = select plan_header where user_id = user_id & month = month & year = year JOIN plan_detail not empty
plans looping
plans.dates = date('d', strtotime(plan[date]))
days looping
if in_array("day", plans.dates)
define datetampil = year-month-day
planid = searchArray('date', "datetampil", plans)
tampil day plans.[planid]
else
define datetampil = year-month-day
tampil day tidak ada daftar kerja
-Create Update Delete Plans, Use Normal Way/AJAX
create
-date
detail
-tambah_id
-plan
update
-detail_id
-plan
delete
-detail_id
Monitoring Progress
-https://docs.google.com/spreadsheets/d/1AOSW0-Bq_bTpJ37891i-DmQ8IEWa_ZmoCedJUyPlLgo/edit?usp=sharing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment