Skip to content
This repository was archived by the owner on Oct 12, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions _posts/2018-04-05-to-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
layout: post
title: To-Do
date: 2018-04-05
categories: projects
description: A flask web application to keep organized with a list of tasks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/flask/Flask/

author: Spencer Mycek
author-image: https://avatars1.githubusercontent.com/u/32203066?s=460&v=4
author-bio: First year computer security with an interest in web development
author-email: Spence.mycek@gmail.com
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to double check, it is Spence.mycek and not Spencer.mycek?

author-social:
github: https://github.com/SpencerMycek
linkedin: https://www.linkedin.com/in/spencer-mycek-5aa926152/
---

## To-Do
The idea for To-Do came to me as a way to organize what I have to do in terms of homework and other important matters. At the time I had not heard of Trello or other similar things, but even after hearing about them I decided to continue with the creation of To-Do.
I created To-Do with Flask, a mySQL database, and it is currently running on an ubuntu server.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/mySQL/MySQL/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ubuntu/Ubuntu/


### Flask
Flask is a web framework. It tools and technology that makes it easier to build a web application. It is also a micro-framework, meaning it has a very small list of dependencies that a user needs to grow and build if they need more plug-ins.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "Flask is a Python web framework", at least?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"It consists of tools and technology that make building web applications easier."

Writing the flask-side of this application was a fun learning experience. I already knew the python required, but I had to learn the flask to back it up. I also had to tackle each bug and issue as it arose. I had to adapt my code as I learned better practices for flask, such as the application factory model. The application factory model builds each separate module, such as error handling or authentification, is built and connected to the application instance during startup.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Writing the Flask side..."

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/python/Python/
s/flask/Flask/
s/authentification/authentication/
Try "The application factory model builds and attaches each individual module (such as error handling or authentication) to the application instance during startup."

Flask also has many plug-ins which facilitate the creation of a web application, such as Flask-WTF for web forms and user input, SQLAlchemy for integrating SQL databases, and Werkzeug for a utility library.

### Database
During the creation and testing of the application I used SQLite as a database because it was small and useful for someone wihout access to a server, or the know-how to use one.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/wihout/without/

When I did deploy the To-Do application onto an ubuntu server, I made the switch to MySQL. SQLAlchemy made it easier to switch databases and migrate the database in case of a change. In creating this application I learned how to create effective database tables and relationships.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ubuntu/Ubuntu/


### Server
As I had said above, I had no experience in creating or manipulating a server.
I used a 1GB memory vm running ubuntu 17.10. There were only a few things I needed to download and install: OpenSSH, OpenSSL, Let's Encrypt CertBot, ufw, pymysql, gunicorn, nginx, and supervisor.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/vm/VM/ (or, even better, s/vm/virtual machine/)
s/ubuntu/Ubuntu/

OpenSSH was useful to SSH into the server and work on it easier. OpenSSL and the Let's Encrypt CertBot were used to obtain an SSL certificate for the application. I used ufw, the UncomplicatedFirewall as a way to secure the website.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"...was useful, as it allowed me to SSH into the server..."

Gunicorn is a better way to deploy flask applications than the standard way of running the application. And supervisor is a great way to watch over and run the application in conjunction with gunicorn.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/flask/Flask/
Explain what the "standard way of running the application" is.

I used nginx to facilitate serving my application on ports 80 and 443.
Those and other services were very useful in creating a server for my flask application and this project was a very good way to discover my way around linux based servers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Those/These/
s/flask/Flask/
s/linux/Linux/


* * *

My source code is all available on [GitHub](https://github.com/SpencerMycek).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link to the specific repository?