GithubHelp home page GithubHelp logo

raymon-roos / byof-todo Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 446 KB

My (abandoned) implementation for the build-your-own-framework exercise from Bit Academy.

Home Page: https://www.bit-academy.nl/

License: GNU General Public License v3.0

PHP 45.01% JavaScript 2.00% SCSS 22.88% HTML 30.11%
school-assignment frameworks oop php

byof-todo's Introduction

Build-your-own-framework: Todo

This project has been abandoned

A showcase of a particularly involved school exercise/assignment I have been working on. This is a still a work in progress, and can hardly be called fully featured. It serves mostly to display my newly acquired experience with Object-Oriented programming in PHP.

Assignment:

Create a to-do tracking website, using the front/backend framework strategies you have learned so far.

Requirements:

  • Adding todos (done)
  • Marking todos as 'done' (in progress)
  • Editing todos (in progress)
  • Ordering todos
  • Todos have to be stored in a database (done)
  • User specific todos (i.e. a login system) (in progress)

The goal of the assignment is to familiarise oneself somewhat with the inner workings of a web development framework, so that the underlying systems won't seem as alien. This also builds an appreciation for how much of the heavy lifting isn't done by the developer.

This project is hosted locally only, under an apache virtual host. The project contains an .htaccess file, with the following URL rewriting rules:

RewriteEngine on  
RewriteCond %{REQUEST_FILENAME} !-f    
RewriteRule ^(.*)$ src/index.php?url=$1 [NC,L,QSA]    
RewriteRule ^([a-z]*)$ src/index.php [NC,L,QSA]  

Which serves the purpose of redirecting every request back to src/index.php and pass the url entered by the user as a $_GET variable. The index.php file spawns a router, which will analyse the url and spawn the requisite controllers and call the proper methods for every page.

Every page has an associated controller, with supportive services. Each controller has methods, corresponding with the http request made. I.E. a GET request to home/index will load the HomeController.php and call its GETIndex() method, whereas a POST request to todo/createTodo will call controllers\TodoController->POSTCreateTodo, which will handle the form input.

Database management is handled through the redbeanphp ORM, template rendering is done with Twig. Styling is done through sass.

Screenshot of the site

Website screenshot

Dependencies for this project:

composer install
gabordemooij/redbean
twig/twig

npm install
[email protected]

To tell sass to watch .scss files for changes and recompile in real time, execute npm run sass in a terminal while inside this directory.

byof-todo's People

Contributors

raymon-roos avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.