Coder Social home page Coder Social logo

football_teams's Introduction

Football_teams ⚽

About :

our website allows user to search about football, teams in specific country (Spain , England), displays the teams in this country, and some details about it.

User journey:

As a user, I will be able to:

  • enter a country name
  • click on search button and see the all teams in this country.
  • click on team name and see more details about them.

Sketch :

Untitled Diagram (2)

Schema:

Untitled Diagram

File structure

  • Public folder:
    • index.html
    • style.css
    • script.js
  • Src folder:
    • server.js
    • router.js
    • handler.js
    • database folder:
      • db_build.js
      • db_build.sql
      • db_connection.js
    • queries folder:
      • getData.js
      • postUser.js
  • config.env

Flow

Blank-Diagram

Team members:

football_teams's People

Contributors

duaah avatar muniralsharif avatar someyaaltous avatar sajalahaleeh avatar jema28 avatar ghassanmas avatar

Watchers

James Cloos avatar

football_teams's Issues

search result

when you search for one thing and then search for another, both results show up on the screen

you can use variables in SQL so you dont need to check what the country is

if (country === "Spain") {
dbConnection.query(
"select teams.logo , teams.description,teams.team_name, countries.country_name from countries inner join teams on teams.id_countries = countries.id_countries where countries.country_name='Spain'",
(err, res) => {

so instead of this, you can do :

dbConnection.query(
      "select teams.logo , teams.description,teams.team_name, countries.country_name from countries inner join teams on teams.id_countries = countries.id_countries where countries.country_name=$1", [country]
      (err, res) => { ...

no tests!

I want you all to pay extra attention in the presentations to how other groups wrote their tests,
I will be asking you questions on this so be warned !

Selecting the country

if (country === "Spain") {
dbConnection.query(
"select teams.logo , teams.description,teams.team_name, countries.country_name from countries inner join teams on teams.id_countries = countries.id_countries where countries.country_name='Spain'",
(err, res) => {
if (err) {
return cb(err);
}
console.log("res", res);
cb(null, res.rows);
}
);
} else if (country === "England") {

You're specifying the country using an if statement, you should use a query insteaed

css problem

when you show the info for a football club, it overlaps with the section under it

Remove unused variables

const url = require("url");
const queryString = require("querystring");
const request = require("request");

These variables are unused in this file. I know you may need it later, but you can require it if you need it. So, you can get rid of it now!

is it on heroku?

couldnt see any link.
if its not on heroku then this is what you should focus on this morning !

Browser shouldn't have an errors

Remove errors from the browser console, this can be done by adding a favicon to the files, this will add a small nice icon to your site app.

Name of foreign key

FOREIGN KEY (id_countries) REFERENCES countries(id_countries),

You are free to use any name for the foreign key, but preferred and the preferred name and the name that makes sense is to name is country_id.

Because each team related to one country. So, it doesn't make sense to add country_id.

commits should be more even...

Screen Shot 2019-07-25 at 09 37 12

these should be even, Someya and Saja have the fewest commits. This suggests you did the least typing, it is the whole teams responsibilty to ensure that these are even

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.