Giter Club home page Giter Club logo

week-3-assessment-yellowpages's Introduction

Assessment

This is an open-book checkpoint assessment focusing on building a simple Yellow Pages contact list ruby app using ActiveRecord with SQL database.


The intention of this assessment is to establish an awareness on your current understanding and how would you progress more effectively in the coming week. Once you're aware of your points of improvement, you can spend more time during the weekend to improve. **There is no pass or fail cases so breath out.** Chillax. =)
Included is the ruby framework for the assessment, sourced and upgraded from NEXTAcademy "Ar-ToDo" skeleton.



Purpose

The test is to ensure you are familiar with the basics of ActiveRecord, and how it works with databases like sqlite3 using Ruby. At the end of the assessment, you should be able to:

  1. Understand ActiveRecord and How it Works

    1.1) Able to answer what ActiveRecord is 1.2) Able to answer what ActiveRecord Model and Controllers 1.3) Able to show how to use Model from ActiveRecord

  2. Apply ActiveRecord and Sqlite3 into ruby application

    2.1) Able to show how to use and integrate sqlite3 with ActiveRecord 2.2) Able to create and migrate a migration file 2.3) Able to explore sqlite3 database through Ruby Model without using SQL statement. 2.4) Able to create SQL database table through Ruby Model without using SQL statement. 2.5) Able to CRUD data into SQL database through Ruby Model without using SQL statement.

  3. Know the critical points during application development.

Critical points:

Refers to naming (capitalization, camel case etc), filenames, classes, relations etc.

3.1) Able to explain and show critical points for migration files
3.2) Able to explain and show critical points for database table creation
3.3) Able to explain and show critical points for model and database relation
  1. Using ARGV



Objectives

The main objective for this assessment is to achieve your contact list app exercise designated by your mentor. This supplied framework should give you a quick start for developing your ruby code.

Note:

You'll be exposed to GIT version control software.

For the GIT related question, ALWAYS ask your mentor to help you out.

Do not waste time exploring during the assessment time.



App Requirements

You have the freedom to plan your datebase tables, code structures and testing. However, by minimum it should acheive the following items:


## 1) User is able to list all the contacts ``` ruby app.rb --list ```
This will list out all the contact details. Example:
$ ruby app.rb --list
list    Name        Phone           Address
====    ====        =====           ======
1.      Ping        +60163353373    35, Finance Street, 41120, CA
2.      Holloway    +60129929292    22, Okland Street, 41750, NY
$



2) User is able to add new contact

ruby app.rb --add <NAME> <PHONE> <ADDRESS>

This will add a new user named NAME with the phone number that is PHONE and address like ADDRESS into the database. Example:
$ ruby app.rb --list

list    Name        Phone           Address
====    ====        =====           ======
1.      Ping        +60163353373    35, Finance Street, 41120, CA
2.      Holloway    +60129929292    22, Okland Street, 41750, NY

$ ruby app.rb --add Kelvin +622152232 "52, White House, Washinton DC"

$ ruby app.rb --list

list    Name        Phone           Address
====    ====        =====           ======
1.      Ping        +60163353373    35, Finance Street, 41120, CA
2.      Holloway    +60129929292    22, Okland Street, 41750, NY
3.      Kelvin      +622152232      52, White House, Washinton DC

$



3) User is able to update the contact details

ruby app.rb --update <id> <NAME> <PHONE> <ADDRESS>

This will update the user details such as NAME, PHONE and ADDRESS for the user with the mentioned user ID. If the user is not found, a friendly error should be raised. Example:
$ ruby app.rb --list

list    Name        Phone           Address
====    ====        =====           ======
1.      Ping        +60163353373    35, Finance Street, 41120, CA
2.      Holloway    +60129929292    22, Okland Street, 41750, NY
3.      Kelvin      +622152232      52, White House, Washinton DC

$ ruby app.rb --update 2 Holloway +12422352425 "22, Okland Street, 41750, NY"

$ ruby app.rb --list

list    Name        Phone           Address
====    ====        =====           ======
1.      Ping        +60163353373    35, Finance Street, 41120, CA
2.      Holloway    +12422352425    22, Okland Street, 41750, NY
3.      Kelvin      +622152232      52, White House, Washinton DC

$ ruby app.rb --update 5

Hey, Something went wrong! I can't find that USER! Are you sure that is the
right ID?

$



4) User is able to delete contact

ruby app.rb --delete <id>

This will delete the user with the ID from the list. Should the user is not found, a friendly error should be raised. Example:
$ ruby app.rb --list

list    Name        Phone           Address
====    ====        =====           ======
1.      Ping        +60163353373    35, Finance Street, 41120, CA
2.      Holloway    +60129929292    22, Okland Street, 41750, NY
3.      Kelvin      +622152232      52, White House, Washinton DC

$ ruby app.rb --delete 2

$ ruby app.rb --list

list    Name        Phone           Address
====    ====        =====           ======
1.      Ping        +60163353373    35, Finance Street, 41120, CA
2.      Kelvin      +622152232      52, White House, Washinton DC

$ ruby app.rb --delete 3

Hey, Something went wrong! I can't find that USER! Are you sure that is the
right ID?

$

IMPORTANT NOTE:

Take note of the list number. It should be self-updated in an ascending order from (1-infinity). Hence, be careful with the id that you're using.



Extra Credit: Integrate each users with his/her company and personal profile

This is a feature request AFTER finishing all the steps above. Now, expand your app to be able to hold additional details such as company and personal profile.


You're allowed to design your own app commands, like
$ ruby app.rb add --user 1 --company "Stark Industries" --pokemon "Mew"

and upgrade your table from your existing app.



Assessment Time

Maximum 5 hours



Preparation

  1. Coordinate with your mentors for setting up your assessment.

  2. Fork this repo out by clicking the "Fork" button on the top on the GitHub page. Ask help when needed.

  3. Open a new terminal for your assessment.

  4. Access to desktop.

$ cd ~/Desktop

5) Execute a cloning from your own repo. ``` $ git clone ```
6) Enter the repo. ``` $ cd ```
7) Begin your test > Note: > > Remember to commit small and often. Some good references: > > ```$ git add ``` > > ```$ git commit -m "your commit messages``` > > ```$ git push``` > > Ask mentor if you're bound into git issue.

Important Note:

7.1) You should write your main functions inside "app.rb" file.

7.2) You can create Additional class object files and place them inside app/ depending on its nature.

7.3) User will only need to execute "ruby app.rb" to run your app.

7.4) Explore and try to understand the framework, observe the structure.

7.5) Observe the demo codes and figure out how they require one another.

7.6) Once done, begin your coding.


8) Once done, perform your last "git push" to your repo.
  1. Inform your mentor with the GitHub link.

  2. Your mentor will download it from your GitHub and will perform the assessment for you.



Good Luck

week-3-assessment-yellowpages's People

Contributors

hollowaykeanho avatar pynkvalerian avatar

Watchers

James Cloos avatar  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.