Giter Site home page Giter Site logo

kittee / project-blog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from johnathon101/project-blog

0.0 0.0 0.0 361 KB

Warm-up application for students to get familiar gathering requirements, planning, and then building a small-size web application using Ruby.

Ruby 100.00%

project-blog's People

Contributors

kittee avatar sumeetjain avatar

Watchers

 avatar

project-blog's Issues

Research

The Omaha Code School blogs:

Other blogs or blog-like sites I follow:

Requirements and Plan

Requirements

User info (possibly multiple users, but I’m not sure if this is an individual’s blog site or a blog site for multiple people to sign up), which will have:

  • ID
  • Username
  • Password
  • First name
  • Last name
  • Email address? (for recovering lost passwords maybe; I can’t think of anything else my super basic blog site would want it for)
  • Social media links (Facebook, Twitter, etc.)

Profile page, displaying the user info and maybe previews of blog posts

Blog posts, which will have:

  • ID
  • User foreign ID (if there are going to be multiple users)
  • Title
  • Date posted (user cannot set this)
  • Blog content
  • Pictures?

Comments, which will have:

  • ID
  • Post foreign ID
  • Commenter name
    • I am not going to force people to sign up to leave a comment, so there will be no need to have any sort of Commenter class keeping track of commenters (at least in the foreseeable future). If a commenter leaves multiple comments, they will not necessarily be related to one another by the commenter. Each Comment is a standalone object.
    • I am doing this mainly because people don't like being forced to sign up for stuff just to leave a comment. I'm sure that for now this will be a small enough thing that making people sign up won't be necessary.
  • Comment post date
  • Comment content
  • Commenter email?
    • Maybe I'd like to contact them directly about something they say, or at least confirm they are a person and not a bot.
    • This will not be visible to the public, just required to leave a comment and then only available to me.

Plan

Set up folder structure and files.

  • Check when done.

Create a database with tables for all that stuff in the requirements.

  • Users table (which may only have one row if this is just for one user)
  • Posts table
  • Comments table

Write tests, I guess. ):

  • Test ALL the tests! (And fail, for now.)

Write the back-end Ruby that allows for updating the database.

Needed classes:

  • User
  • Post
  • Comment

Needed methods and their associated classes (will keep adding to this as needed):

  • User: Create new user?
    • If there is only one user (myself), it probably won't be necessarily to write a method for this. I would just add myself manually using SQLite in the terminal.
  • User: Edit user info
  • Post: Create post
  • Post: Edit post
  • Post: Delete post
  • Add a picture (only for posts) No uploading pictures for now ):
  • Comment: Create comment
  • Comment: Edit comment (only allowed by user)
  • Comment: Delete comment (only allowed by user)

Write the front-end views where the blog is displayed, using Sinatra.

  • Log in/sign up page
  • Main page, where the latest blog posts are displayed
  • About (profile page)
  • Archive
  • Contact
  • Make a post
  • Edit a post (perhaps similar to the view for making a post)

CSS

  • CSS ALL the pages!

Learn Things!

I think I have an idea, but feel a little sketchy on:

  • Having the user sign in and out
  • Denying certain permissions to someone who is not the appropriate user
  • Delete things out of the database that were just tests. It would be nice when running tests if the test could auto-delete what it inputted after it’s done.

I have no idea how to:

  • Store pictures. Can pictures even go in a database? Will they have to be uploaded elsewhere else and we just store the URL? This is very important to my blog in particular since a lot of what makes Cara is a Kitty fun is the doodles. This won't be happening for now.
  • Have a post know what the current date and time is. I sort of remember something like this from pre-work.
  • Rename columns using SQLite. I don't want to get a lot of comments only to discover I need to edit the table and have to drop the whole table and start over. In the past when I've tried to edit column names, SQLite wouldn't let me.

Bonus Features

These things may or may not be out of the scope of this project. (They are probably out of the scope, I'm guessing.)

  • Multiple users
  • Customizable themes, like Wordpress and Tumblr have
  • Users befriending and following other users, but that would be many:many and therefore craziness

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.