API Development for Social Travel Portal
API Development for Social Travel Portal
Sena Learning.
Vanessa Alexandra Guzmán
Presented by:
José Fernando Mendoza
Guide:
Ga7-220501096-aa5-ev02
Evidence.
API development
Implementation.
Inside the project directory, there is a txt file and a PNG image with the relationships.
that have wanted to be established in the project, however, all of that was, although initially the
Objective, it has had to adapt as certain needs arose. Nevertheless, they have
implemented the following models:
1. Usage model: responsible for user management. Each user has all the
trips that he/she wants and has, in turn, an associated profile
2. Profile model: it is responsible for displaying the user's information for us.
in the view. The intention has been to 'Hide' the user from everything else since that is the objective of
profile. Each profile belongs to a single user
3. Travel model: the main element of our portal. A trip belongs to a user and
has, in turn, as many posts and comments as desired. Only the owner user can
create a post and any user except the owner can make a comment
4. Post model: it is one of the essential parts of the journey, as it is where the user will be able to
express if experience throughout their stay. A post belongs to the user who creates it and
to the trip that contains it. It also has a series of attached documents such as, by
example photos
5. Attached post model: these are the files (photos) that are added to a post.
6. Model comment: a comment is an opinion from a person external to the trip regarding
This belongs to the person who made it and to the journey it refers to.
Mandatory elements
For the description of the recommended mandatory elements directed to the project itself and
review each of the directories
1. Domain entity model
Inside the directory /app/models are all the files that refer to the models of
our application
2. User model
As mentioned in point 1, they can be found in /app/models/[Link]
[Link]
Within some files in the models directory, we will observe the "validate" field.
which implies that certain conditions will have to be met to validate that attribute.
5. Scopes
Within some files in the models directory, we will observe the field 'scope'.
Examples of the scope within the travel model
6. Templates
Within some view files, the template design can be found for later use.
A great use of renders has also been made, we can practically find them everywhere.
views
7. Named routes.
It has been decided to name the most important routes that relate to the
login and logout. we can find the defined routes in the project directory
specifically in /config/[Link]
10. jQuery-UI
Since we couldn't find a way to integrate it in a way we liked, we opted for its use.
simple: use it for the datepickers in the trip creation form
optional elements
Installation of the Bootstrap gem to carry out the adaptation of our site
a Rails
Among others
d
Profile illustration
he
Modifications
As can be observed, some of the views have had to be remodeled (the biggest change is
It will be noted on the login and registration page) that the option to have multiple has been removed.
segments per trip by the option to be able to insert images