Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor for PDO & Modularity #15

Open
runninguru opened this issue Nov 25, 2017 · 3 comments
Open

Refactor for PDO & Modularity #15

runninguru opened this issue Nov 25, 2017 · 3 comments

Comments

@runninguru
Copy link

runninguru commented Nov 25, 2017

PDO would allow this to be database-agnostic, and while it's refactored to support PDO, it should be implemented in a more modular way.

  • create a Connection class and store each database connection there. This will make url-shortener more portable, because other projects are more likely to have a modular approach to creating & managing database connections.

  • place the SQL statements in separate methods within the UrlShortener class. This, combined with the use of bindParam(), is a best-practice.

I've cloned the project and partially finished these changes. If you want, we could create a branch and I could push my current changes to it so we can work on it before pushing it to the master branch.

@amarlearning
Copy link
Member

I've cloned the project and partially finished these changes. If you want, we could create a branch and I could push my current changes to it so we can work on it before pushing it to the master branch.

@runninguru Great! Let me know when you are done with the changes.

@runninguru
Copy link
Author

I'm finished with the changes. If you create a branch, I can make a pull request to that branch so you can review what i've done before you merge it with the master branch.

@amarlearning
Copy link
Member

@runninguru you can push your changes in the develop branch for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants