WDI Day Twenty-Two: Sinatra Lab

Working on associations and ActiveRecord is actually pretty fun. Today was a lab day, so for the entire day I coded away on a Pokemon lab app and a Landlord app. I didn’t bother putting in too much extra work with the Pokemon one, but I had some fun with styling and creating more dynamic drop downs for the landlord one. The apps focused on searching records, the association between records, and being able to add, update, and delete records. Seeing CRUD in action made it make a lot more sense to me.

One cool thing I learned today? The dependent destroy association, where you can delete all records of a table that are related to the record of another table. It was definitely a very cool moment realizing there was a simple way to resolve an issue I had. The more I delve into this whole coding thing, the hungrier I get to learn more. I’m excited to see how much progress I make next week. I never thought I’d understand CRUD so well, and with every repetitive line of code I write for these assignments, the more it sinks in.

landlord-app

WDI Day Twenty-One: Sinatra and Getting Started on a Lab

Today was  a blur. We started off doing a quick coding exercise in JavaScript, and I realized I really need to hop around a lot more with these languages. You definitely get a little rusty when you put one language aside for a little bit.

Next we reviewed CRUD with ActiveRecord and Sinatra. The instructor walked us through setting up basic adding, deleting, and editing items in a simple Sinatra app. Then we worked on tackling the same work-flow, and later the class broke to begin working on a CRUD lab as well as another CRUD-related homework assignment.

One thing I’m noticing is that this bootcamp definitely gives you your fair share of highs and lows. Sometimes there are highs when you’ve managed to solve a problem creatively. Other times there are lows when you haven’t been able to figure something out. I guess the moral of the story is to keep at it when you’re having a low, because soon enough you will get another high.

WDI Day Twenty: Sinatra and Active Record

We covered a lot of ground with Sinatra that reminded me of rails back when I took the back-end web development course at GA, dealing with views and embedding Ruby code in html templates.

We reviewed REST, otherwise known as REpresentational State Transfer, which refers to the way browsers interact with servers. This includes the five main methods: GET, POST, PUT, PATCH, and DELETE. We also learned about how query parameters can be set up in web applications where you pass in dynamic params.

The rest of the day involved working with ActiveRecord and Sinatra. Overall, understanding the structure of prepping files in Sinatra will take a little bit of review for me. There are some strange conventions involved with naming files and requiring other files, that will only take a matter of time before they are second nature to me.

WDI Day Nineteen: Sinatra

We played around with Sinatra, which is a framework for quickly creating web applications in Ruby. Other ways include Rails, Express/Node.js, and Django. We reviewed how to set up routing, which tells the application what the URLs should be for different pages. You can also pass variables into the URLs for more dynamic URLs.

There’s different ways of working with data on the server, which include:

  • GET – for ‘getting’ info (no data is changed)
  • POST – for ‘creating’ new data (usually by submitting a form)
  • PUT – for ‘updating’ existing data (usually by submitting a form)
  • DELETE – for ‘deleting’ data

To create views in Sinatra, you let it know which pages you want to route to with erb files, which are files that include a mixture of HTML and Ruby code. You even can share variables in different views.

Later in the day we met with Outcomes where we had someone come in to speak to us about networking on Linkedin. We also worked on our brand statements and then did an exercise where everyone went around the room and said what the good qualities were of our different classmates. Here’s what everyone had to say about me:

  • good eye for design
  • picks up things quickly
  • understands development
  • ahead of the game
  • quick learner
  • quickly dissect a problem
  • a leader
  • focused
  • detail-oriented
  • humble
  • perfectionist
  • resourceful