程序代写代做 AWS html go algorithm database Java flex kernel javascript graph Computing for Voluntary Welfare Organisations, AY2019/20—Assignment 1

Computing for Voluntary Welfare Organisations, AY2019/20—Assignment 1
National University of Singapore
School of Computing
Computing for Voluntary Welfare Organisations (CVWO) AY2019/20
Assignment: Riding on Rails
Issue date: 6th December 2019
Due date: 30th December 2019 (mid-assignment submission)
25th January 2020 (final submission)
1 Overview
In this assignment, you will learn about the programming skills required for CVWO’s summer project and go through a website development cycle. The focus of this as- signment is to promote proper code structure, coding techniques and familiarity with various development tools. You are expected to build up a good web development foundation through this assignment, and prepare yourself for one development cycle during your stint over the summer.
Let’s begin…
Aside from web development foundations, this assignment mainly aims to familiarize you with Ruby on Rails, an open source Ruby framework with strong MVC patterns. As CVWO uses Rails as its main framework, it is important to have a good under- standing of this framework in order to work effectively on the projects.
Reminder: Please read the entire assignment before starting.
Tip: If you do not know what MVC is, it is strongly recom- mended that you do your own reading before attempting this assignment. During the course of CVWO and beyond,
independent learning is the key to staying ahead.

Computing for Voluntary Welfare Organisations, AY2019/20—Assignment 2 2 What you need to know
“Babies are always more trouble than you thought – and more wonderful.”
—Charles Osgood
The following sections are provided to aid you in your assignment. They include modern programming languages and technologies that are widely used in the indus- try.
2.1
Ruby on Rails
“Ruby on Rails⃝R is an open-source web framework that’s optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration.”
2.1.1 Introduction
Ruby on Rails is a free and open source web framework. As the name suggests, this framework is written in Ruby. Notice that at this point, we have not explicitly asked you to learn the language. This is because the language is relatively easy to pick up and you should be able to get a sufficient grip on the language by yourself.
Rails provides a reusable boilerplate code which reduces the complexity of the code. There are also many auxiliary libraries that we can use to speed up the development process. Furthermore, it is also relatively easy to deploy as it is supported by many hosting service providers. Hence, we have chosen to utilize Rails for its suitability in carrying our projects further.
Rails usually ship with a default web server and database adapter, Puma and SQLite, which should be sufficient for this assignment. We do not impose any restrictions on the choice of either for the purpose of this assignment.
—From the homepage of Rails
Tip: Although not needed in order to complete the assignment as you could learn by trial and error, learning Ruby be- fore attempting the assignment would make your life much easier. Unlike other frameworks such as PHP, Ruby is much easier to pick up although there are some gotchas that you may or may not run into during the assignment.
There are many good online resources available.

Computing for Voluntary Welfare Organisations, AY2019/20—Assignment 3
Although having a more in-depth lesson on Rails would be appropriate here, staying true to one of Rails’ major philosophy, DRY, we shall leave this task to a more estab- lished resource from the community, the Rails Guide http://guides.rubyonrails. org/. The following chapters are compulsory reading and they would help greatly in the assignment given later.
• Chapter 1: Getting Started with Rails http://guides.rubyonrails.org/getting_started.html
• Chapter 2: Active Record Basics http://guides.rubyonrails.org/active_record_basics.html
• Chapter 3: Active Record Migrations http://guides.rubyonrails.org/active_record_migrations.html
• Chapter 4: Active Record Validations http://guides.rubyonrails.org/active_record_validations.html
• Chapter 5: Active Record Callbacks http://guides.rubyonrails.org/active_record_callbacks.html
• Chapter 6: Active Record Associations http://guides.rubyonrails.org/association_basics.html
• Chapter 7: Active Record Query Interface http://guides.rubyonrails.org/active_record_querying.html
• Chapter 8: Layouts and Rendering in Rails http://guides.rubyonrails.org/layouts_and_rendering.html
• Chapter 9: Form Helpers http://guides.rubyonrails.org/form_helpers.html
• Chapter 10: Action Controller Overview http://guides.rubyonrails.org/action_controller_overview.html
• Chapter 11: Rails Routing from the Outside In http://guides.rubyonrails.org/routing.html
2.2 Relational Database
Suggestion: Although you will not likely be writing any SQL for this as- signment, it is important to have at least a basic under-
standing of databases.

Computing for Voluntary Welfare Organisations, AY2019/20—Assignment 4
2.2.1 An overview of relational databases
Relational databases are databases that store data in tables, each containing a num- ber of columns and rows. It is called ”relational” because tables are linked to other tables through foreign keys. For example, the Singapore Government’s address database may use the NRIC/FIN of individuals to link addresses in the addresses table to names in the names table. In this case, the column containing NRIC/FIN in the addresses table is called the foreign key as it references the primary key in the names table.
In this assignment, we will be going through fundamental database concepts. Usu- ally, an application will use one database, with several applications sharing the same database server. For instance, if you and a friend each had a blog, each blog needs one database but the same server could have two databases defined, one for each blog.
At the highest level, a database contains a schema. A schema is a blueprint of your tables, containing their structures and relationships.
Tables can contain one or more columns, each defining an attribute that requires stor- age. (For example, a students table containing students’ personal data might contain five columns: matric no, name, address, phone, date of birth. In MySQL, columns have types: in this case, name is of type text (varchar(255)) and date of birth is of type datetime).
Actual information is stored as rows in a table. Each row must be uniquely identi- fiable; if two rows cannot be distinguished from each other, then there is no way to change the content or delete one of the rows. Therefore, it is common practice to dedicate one column that is guaranteed to be unique for each row. We call such a column a primary key. In this instance, the matric no is probably a good choice to be the primary key as it uniquely identifies a row, since no two students can share a matric number. You will be prevented from inserting a new row when another row with the same primary key already exists in the table.
Keywords to look up: SQL, primary key, foreign key, Entity- Relationship Diagram. Try to get the overview before diving into details.
Relations indicate relationships between two tables. For example, the home faculties table may contain two columns: matric no and faculty, indicating a mapping from a student to her faculty. We can link this to the students’ table by using matric no. As discussed earlier, matric no in the home faculties table is called the foreign key. The foreign key must map into the primary key column set of another table. Note also that students may become members of two faculties when doing double degrees.
Other important concepts includeindexed columns (where searching within the col- umn is fast, at the expense of increased time required for modification), unique keys (which enforces uniqueness among values for non-primary key columns), and rela- tion cascading (where deleting a row from a table can automatically update/delete all related entries in tables which reference this key).
After this section, you should be ready to produce a schema for your application. Consider how efficient your schema will be: How complex will it be to access the most commonly accessed data? Think about the number of queries and the number of tables accessed to complete a single user query. Your schema should be graphical,
What happens if you need to relate two tables together to retrieve an attribute? For instance, you might have a student in the double-degree programme and you need to retrieve his CAP for each of his faculties.
This is called an Entity- Relationship Diagram

Computing for Voluntary Welfare Organisations, AY2019/20—Assignment 5 with the table names, column names/types, primary keys, and relationships clearly
indicated.
2.3 HTML, CSS & JavaScript
2.3.1 HTML and CSS
HTML (the Hypertext Markup Language) and CSS (Cascading Style Sheets) are two of the core technologies for building Web pages. HTML provides the structure of the page, CSS the (visual and aural) layout, for a variety of devices. Along with graphics and scripting, HTML and CSS are the basis of building Web pages and Web Applications.
Below is a list of HTML tags you will be using frequently.
,,
,