Giter Site home page Giter Site logo

allelomorph / holbertonschool-higher_level_programming Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 7.0 317 KB

Object-oriented programming component of the Holberton school core curriculum, with a focus on the basics of Python, plus an introduction to SQL databases and Javascript.

Shell 0.41% Python 86.57% C 4.71% JavaScript 6.28% HTML 2.03%

holbertonschool-higher_level_programming's Introduction

holbertonschool-higher_level_programming

Description

Object-oriented programming component of the Holberton school core curriculum, with a focus on the basics of Python, plus an introduction to SQL databases and Javascript.

Note

Also considered part of this track is the AirBnB clone project arc, which combines many of the skills learned in this track along with those from the System Engineering and DevOps track to create a fully functional website with its own back end console and database storage.

Four iterations of the project were produced, each in its own separate repository. See AirBnB clone section for a list of relevant assignment overiews linked from each repository.

General requirements

bash

  • Interpreter conditions:
    • Ubuntu 14.04 LTS
  • First line of executable scripts will be #!/bin/bash

C

  • Compilation conditions:
    • Ubuntu 14.04 LTS
    • gcc 4.8.4
    • flags -Wall -Werror -Wextra -pedantic
  • Compliance with linters:
  • Test mains will typically not be in same directory as the task solutions, add -I. to gcc flags to allow test mains to include headers from main directory

Python

  • Interpreter conditions:
    • Ubuntu 14.04 LTS
    • python3 (version 3.4.3)
  • First line of executable scripts will be #!/usr/bin/python3
  • Compliance with linter:
    • pep8 (version 1.7.*) (now known as pycodestyle)
  • Docstrings are expected to follow the Google style guide:
    • Per module (python3 -c 'print(__import__("my_module").__doc__)')
    • Per class (python3 -c 'print(__import__("my_module").MyClass.__doc__)')
    • Per function
      • both inside a class (python3 -c 'print(__import__("my_module").MyClass.my_function.__doc__)')
      • and outside a class (python3 -c 'print(__import__("my_module").my_function.__doc__)')
  • Test scripts will typically not be in same directory as the task solutions, use export PYTHONPATH='.' before running test scripts from project directory to allow includes
  • Unit tests will be required on some projects:
    • using the unittest module
    • located in a tests/ folder, with a file structure mimicing that of your project, but with a test_ prefix added to all file/directory names
    • tests should be capable of being run with python3 -m unittest discover tests, or individually per file with python3 -m unittest <test file>

SQL

  • .sql file comments prefixed with --
  • Interpreter conditions:
    • Ubuntu 14.04 LTS
    • mysql Ver 14.14 Distrib 5.7.8-rc, for Linux (x86_64) using EditLine wrapper

Use of MySQL

  • sudo apt install mysql-server to install
  • Interactive mode with sudo mysql, non-interactive with:
$ service mysql start
$ cat <script> | mysql -uroot -p
  • Import a SQL dump:
$ echo "CREATE DATABASE <database>;" | mysql -uroot -p
$ curl <dump_file_uri> -s | mysql -uroot -p <database>

Javascript


First introduction to scripting in Python 3, and basic use of strings.

Introduction to functions and basic flow control in Python.

Introduction to how Python source files can reference one another through the use of import.

Introduction to the use of lists and tuples: indexing and methods, list comprehensions, sequences, and del.

Introduction to the use of sets and dictionaries, how they differ from lists, iteration, key-value pairs, and lambda functions.

Introduction to exceptions: raising, catching, and when best employed.

Introducing Object-Oriented Programming, and how Python's implementation teaches about the concept more broadly.

Introduction to how to create and use a battery of tests, implement tests inside docstrings, and finding edge cases.

Further exploration of Object-Oriented Programming concepts as represented in Python, such as attributes (class vs instance,) and methods (class vs static, getters vs setters, __init__, __str__, __repr__.)

Investigating the mutability of objects in Python, comparing classes vs objects vs instances, and reference vs assignment vs aliases.

How one class can be derived from another, how attributes and methods of a parent class are accessible by the child, plus the use of relevant built-in Python methods like isinstance and issubclass.

Introduction to reading from and writing to files in Python, and serialization/deserialization using the JSON format.

In preparation for the AirBnB clone project cycle, a review of all Python concepts covered so far: importing, exceptions, classes, private attributes, getter/setters, class/static methods, inheritance, unit testing, file I/O, and JSON serialization. In addition, args and kwargs are introduced.

Introduction to database storage via MySQL and creating SQL queries and functions.

Addtional database and SQL concepts: managing user privileges, PRIMARY KEY/FOREIGN KEY, querying multiple tables, JOINs and UNIONs.

Bridging the gap between Python and SQL in two ways: using the module MySQLdb to connect to a database and execute SQL queries, and using the SQLAlchemy module as an introduction to Object Relational Mapping.

Introduction to the basics of HTTP requests and responses, URLs and their components, and using curl from the command line.

Continued exploration of the Pythonic approach to HTTP requests and responses, this time using the urllib and requests packages.

A simple introduction to JavaScript, when used as a scripting language and for web front-end.

Introduction to Object-Oriented Programming in JavaScript: objects, classes, inheritance, scope, closure, this, and undefined.

Pulling JSON data from the web using JavaScript's request module and Fetch API to make HTTP requests, plus file I/O with the fs module.

Using JavaScript and JQuery to get and modify HTML, JQuery Ajax to handle HTTP requests, and JavaScript to listen and bind to user or DOM events.


AirBnB clone

Review of concepts like unit testing, JSON serialization/deserialization, and *args/**kwargs in Python, plus an introduction to UUIDs and the cmd module. Creating a command line interpreter to store data objects in local JSON files.

Introduction to HTML (elements, tags, and attributes) and CSS (classes, selectors, specificity, box properties.) Establishing style choices in a static web page which will serve as a framework for dynamic content in later versions.

Review of Object Relational Mapping. Building a MySQL database as a second storage engine accessible from our back end Python console.

Revisiting Continuous Integration/Continuous Deployment and Nginx concepts from holberton-system_engineering-devops, plus an intrduction to the Python library Fabric. Deploying the static web content from (268) 0x01. AirBnB clone - Web static to a simple architecture of two web servers and one load balancer.

Using the Python library Flask along with Jinja templates to create a web application to dynamically display the contents of our storage engines.

Using Flask in Python to create an API that can query the storage engine and serve JSON reponses.

Serving dynamically generated HTML content by querying the API built in the previous iteration using JQuery Ajax. Listening and binding to user or DOM events.


Student

holbertonschool-higher_level_programming's People

Contributors

allelomorph avatar

Stargazers

whitex avatar  avatar saeed avatar Hajar Lamharchi avatar

Watchers

 avatar

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.