Open saxena-aditya opened 6 years ago
If we do start over what all sections can be reused? Can we reuse HTML code?
Yes. We can use almost all the existing HTML code. Only Back-End needs to be updated, and a new AND improved database model will need to be created.
So let's first design the skeleton of back-end and then start working on it.
On 09-Feb-2018 5:17 PM, "Aditya Saxena" notifications@github.com wrote:
Yes. We can use almost all the existing HTML code. Only Back-End needs to be updated.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Vishu-Chaudhary/hackathon/issues/2#issuecomment-364412916, or mute the thread https://github.com/notifications/unsubscribe-auth/ANZ8LD7mjZCKNxRyLTmL9V84PHa-pKAiks5tTDBogaJpZM4R-h7V .
This is just a Suggestion!
Present Stage
So as of now, we have done the following:
and some other small things.
Basic Work-Flow
There are specific
.php
files that are used to perform activities listed above. For example - for the login action, the user seeslogin.php
file to log in. The URL will be -https://site.com/login.php
What I think is, that this
.php
at the end of URL is very ugly. URLs should be pretty! likehttps://site.com/login
&https://site.com/register
etc etc.Solution: Pseudo MVC pattern in PHP
I came across an awesome thing some time ago. You guys must have heard of it. What we do is - we catch the URL and break it. For example - suppose the URL is
https://site.com/login
, the PHP script will take the URL and break it into pieces, it can then form an array that'll have '/' separated string values, 'site.com' and 'login' in this case. We then deploy aswitch
statement to check for the value.. and then run the required function from there.This script will break the URL into an array named
$values
. This array contains URL values exploded @/
Pros:
https://site.com/projects/project-name/file-name
Cons: