Photo by Julian Hochgesang on Unsplash

Rails Shortcuts

You can create your Ruby on Rails apps manually and from scratch if you want to better familiarize yourself with the language. Once you get the hang of writing the code out here are a few basic Rails shortcuts to save you some time when writing the code:

$ rake db:create - Create a databaseresources :names - Creates all the routes for your desired component, it will generate the :new, :create, :edit, :update, :show, :destroy actions$ rails g controller Names - Generate a new controller$ rails g model Photo - Generates a model and initialize a migration table$ rails db:seed - Use sample data and run tests with your database$ rake db:migrate - Run the migrations for your database

Citations

https://gist.github.com/mdang/95b4f54cadf12e7e0415

--

--

Photo by Ryan Quintal on Unsplash

If you are just starting out on web development, utilizing Github will help you keep your work safe and organized. Take a look below to see a few git commands for beginners.

git init — Allows you to create a new repo locally

git clone — Allows you to clone a copy of someones else's repository

git add . — You will be able to save the work you have created and add the files to an index.

git commit -m “message” — Write any messages in the quotations before you send it over to github

git push — Sends the code you saved to Github

git checkout -b <anyname> — Allows you to create a new branch and switch to it

git checkout <anyname> — To switch over to any branch that has been created

Citations

https://git-scm.com/docs

--

--

Photo by JOSHUA COLEMAN on Unsplash

CRUD applications

CRUD stands for create, read, update, and delete. These applications can range from advanced to very basic. Developing basic CRUD apps will help you hone in on your developer skills and with each project you build you can add new things each time. So what does each component of CRUD mean?

Create — This portion of CRUD allows for new records to be made and added to the database.

Read — With this portion of CRUD you can retrieve or search for records in the database.

Update — Update allows you to change a record once you have retrieved it

Delete — Delete allows you to take a record from your database and destroy it.

Citations

https://www.sumologic.com/glossary/crud/

--

--

Photo by Mike Lewis HeadSmart Media on Unsplash

CSS

CSS stands for Cascading Style Sheets. It will play a very important role in your application development. It is used design your application and bring out your creativity in the appearance of your app. There are many ways to incorporate CSS into your apps. There are many websites where you can download a CSS library that will facilitate the implementation of CSS. Flexbox, Materialize, and Bootstrap I believe are best for beginners. Vanilla CSS allows you to write everything from scratch. With CSS you can do a lot stylistically with your apps such as changing the fonts, background color, size, and add animations. A simple Vanilla CSS example that makes your header blue can be seen below:

h1 {
color: blue;
font-size: 2em;
}

Citations

https://developer.mozilla.org/en-US/docs/Learn/CSS/First_steps

--

--

Photo by Danil Shostak on Unsplash

What are Javascript functions?

Functions are a significant portion of learning Javascript. The purpose of functions in Javascript is to take an input and return an output where the two are correlated to each other. Functions looks like a lines of statements that will equate to completing a task or attaining a value. Functions must be defined within the scope of which you are calling it. There are different types of scopes in Javascript as well such as, global, local, and block scopes. However, that is a different topic. In order to declare a function you will need to use the word “function” in your code. For instance, see the code below to declare a simple function:

function salad(dressing, protein, extra){return "The ingredients are' dressing + protein + extra; }

Citations

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions

--

--