This week, I would like to talk about Ruby’s ancestor tree. I was just curious that how methods are invoked in Ruby by order. I mean that which class method comes first to invoke and second and goes on. Let’s look at together step by step.
Singleton methods that are defined on only a single object. For example;
We have MyClass object class(below picture) and outside of this class we make a new instance which belongs to this class, and make this instance’s method called instance.my_method which this is how singleton class work. You class a method with…
Object Relational Mapping, commonly referred to as its abbreviation ORM, is a technique that connects the rich objects of an application to tables in a relational database management system. Using ORM, the properties and relationships of the objects in an application can be easily stored and retrieved from a database without writing SQL statements directly and with less overall database access code.(1*)
ORM it’s a completely ordinary library written in your language that encapsulates the code needed to manipulate the data, so you
will NOT use
Structured Query Language (SQL) anymore, but directly use an object of your language.(*2)
Self, Getter and Setter methods and initialize, accessors concepts explained in Ruby
While I was reviewing some concepts in Ruby, I thought it would be nice to make an article about some of main concepts. I will be touching basic concepts of Ruby. However, they are crucial topics.
Self is a keyword in Ruby representing the default object of the current context.
So, in picture 1, we have a class method Drink, this Drink class have a method called show_yourself in line 15. and in picture 2, we have 2 instance of this Drink class. …
How does MapDispatchToProps work in React-Redux ?
In this article, I’d like to talk about map dispatch to props function in react-redux and I will go over this with my existing project.
let’s say that I have an action.js file. This file does post request. After it does post request. We need to connect this to I need to connect to a component that I want to connect. Here is the action.js called addComment.js.
on below picture. I wanted to connect this above action to this below component. …
Object-oriented programming (OOP) is a programming paradigm that uses objects and their interactions to design applications and computer programs.
The basic programming concepts in OOP are:
The first principle of OOP we are going to cover is data abstraction. Data abstraction is just a fancy way of saying that we are going to model our data to look like it’s real life equivalent. So, how do we model a drink? Well a drink should be an object that has a name, size, ingredients, alcoholic constant. It should also be able to give details about itself…
Recently, while I was improving my react redux project, I could not understand how I would connect to my react component to one of my actions. After spending a couple hours on it. I did some improvements of my skill and wanted to share with you.
Let’s walk through together, I have made a project called Stella which user could be able to see a bunch of actors and comment on them like on them and I wanted to add one more functionality which is updating user information.
I have a button for updating user, as I called Update Account…
1-) function declaration
2-) function expression
3-) arrow function
1-) function declaration
Function declaration is a traditional way to write a function with function name like this traditional way.
We could be able to execute the function above this code or below this code.
On picture 1, We are executing the function before writing the function, This way is called hoisting.
Redux is a tool that developers use to make their lives easier. As many of you might have heard, its job is “state management”.
in React, we won’t be able to share data from one component or container to another unless there is a relationships between a parent to a child. As you can see on the above picture. We can’t share data between User Component and Main Component because they are sister components which means that they don’t have parent or child relationship.
I was working on a project that I called footy. Footy is a rails back-end, java script front project, while I was doing this project I especially learned a lot about serializer in rails , improved my java script, rails and custom css.
in the back-end, I have this drawing for project plan.I didn’t implement review and like relationship in java script , I will be doing them later on when I have more time.