Week 8 Express, Handlebars, ORM, MVC design and Sequealize

Day 34: Learning servers and using express

Monday arrived 🥇 and we continue reviewing servers through the express package, this helps us create URLs that are linked to or different elements in our front end. To maintain the connections between the front and back end “healthy”🌟 and avoid errors, the best thing to do is to constantly check in the different steps that those steps are currently working properly.

In the case of backend our teacher recommend us to use Postman 👩🏼‍🚀, this can help us check links and through .get and also .post, this way we don’t need to have a completed front end.

We then continue our class by taking user input through the front end ☄️, using ajax and then connecting to our server and then showing the information requested. Then we were introduced to ✌🏼Heroku, a place where we can deploy our websites! super cool, but we need to make sure that we change our port!

For doing this we practice by creating a reservation page for restaurants 🌭, here are some sketches and how it finally looks

Day 35: Reviewing express, API routes and the introduction to Handlebars

Today was a more working and reviewing day 📖, we continue creating our website to make reservations for a restaurant. In this activity, we combine all our knowledge for front and back end making it really interesting, as we see, test and understand better how things are working 🧐.

Then our teacher send us the code he developed 📝 for this activity and showcased a different and agile way to solve the problems and our main role was to read the code and this part is crucial when you start working on a team where the code has already been established 🏗. You need to dedicate time to understand the logic and hierarchies that developer has established so you can adapt and make it run 🏃‍♀️ .

Finally, we were introduced to the idea of a server rendering our HTML 🙌🏼, but when we finish the activity we realize that the code wasn’t “super” readable so tomorrow we are going to start with Handlebars and I hope this can help in the process.

Day 36: Introduction to handlebars

Today I started the class reviewing constructors and the code for this week homework that you can view in the following link 📖. This hour before class really helps me set the intention for the upcoming class.

Wednesday main topic was handlebars and how this npm package can help us create blocks of HTML🧩 that can be interconnected without having to copy and paste it. It is important to maintain a specific structure of directories or folders 📁 so it can understand the path. Here you can see an example of how the code is displayed to create these connections between different files.

The main benefit is how little HTML we need and how little is repeated 🤹🏻‍♀️ making the creation of the code faster and more agile. Is true that I still need to get used to some new ways of coding but definitely the more we practice the better we will develop it.

Day 37: ORM and MVC design

Today we were introduced to the idea of ORM or object-relational mapping, the “space” between our server and our database 📌, where we can create functions to connect and acquire the data we want. We are going to define our ORM in the structure of our files and we then are going to require in our server.

This is going to make our early stages of developing our platform easier ✌🏼, as it simplifies the functions and we can use objects to model our data.

We were then introduced to MVC ✏️ design or model view controller design, where we organize our folders with logic, at first it can seem a little bit confusing managing all of this files but, at the end having everything divided makes updating technologies easier and less complicated👏🏼.

Day 38:

Friday arrives and another week is over 🥇, today we started reviewing handlebars and how we should order our files in order to have them connected all together. We then continue with the structure and the relation between the client, the server and the DB or database.  

Yesterday we were introduced to the ORM ( the place where we add our MYSQL commands in functions) and today we were introduced to Sequelize 👩🏼‍💻. This npm package 📦 helps us create MySQL commands without the need to use MySQL code. This package works well when you are in dev mode, as it helps us interact with our DB in fewer lines of code and without our ORM but it can take a load of data slower.

This weekend we are going main focus is to review all of this new packages and code 🤹🏻‍♀️

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google photo

Estás comentando usando tu cuenta de Google. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

Conectando a %s

A %d blogueros les gusta esto: