Ateam Hikkoshi Samurai Inc. Advent Calendar 2017 It is the 20th day. Today, @ taka999, a middle-aged web engineer who loves sweets, will be in charge of the second year of Ateam Connect.
Recently, development with Ruby has become more active around. Nani Nani in Ruby, Nani Nani in Ruby ... Is it okay in PHP? .. .. There is no trick to complain without knowing anything, so I decided to investigate ruby even though I was a beginner of WEB engineer.
Since I am a "beginner" myself, I can't explain much with the source code, and I choose a reference site that is not explained with the source code.
First of all, it is commonplace, but search for "What is Ruby?" ・ All object-oriented ・ Interpreter method ・ High degree of freedom of syntax
I see! A word that is somewhat understandable to those who have done programming, but is not kind to those who do not know it.
How many people can explain this well? .. .. I can only understand it somehow, so refer to the following. Object-oriented programming that can be understood in 5 minutes What is object-oriented? I tried to explain with an easy-to-understand example.
Objects (things) can be inherited, and if you make a basic thing, you can easily make another thing based on it and listen to applications. In the game, it's like making one basic character and then making a character with different colors and strengths based on this one.
Since the instructions of the programming language are interpreted and executed one by one in machine language, the source can be written and executed immediately.
■ Merit Since you can check it while executing it a little during program development, it is easy to create a program and debug it.
■ Disadvantages Since it is interpreted one by one each time, the execution speed becomes slow because the execution is performed while checking the mapping between the identifier and the position in the memory when accessing the variable.
When it comes to syntax, there is no choice but to look at the code, so I will describe it for a moment.
■ Define integer type variables
For Java
int var = 123;
For Ruby
var = 123
■ Repeat
For Java
for (int i = 0; i < 10; i++) {
System.out.println(i);
}
For Ruby
10.times do |i|
puts i
end
■ switch (case) statement
For Java
switch(num){
case 1:
System.out.println("a");
break;
case 2:
case 3:
case 4:
System.out.println("b");
break;
}
For Ruby
case num
when 1
puts 'a'
when 2..4
puts 'b'
end
It's easy because the amount of code is small ~ Since there are few restrictions on grammar, individual tastes are likely to be reflected in Moro
There are various types such as Ruby on Rails, Sinatra, and HANAMI. Not just Ruby on Rails! 6 Ruby Frameworks
Considering the history and popularity so far, "Ruby on Rails" seems to be a good choice.
~~ The library for Ruby is called "gem", and it seems that there are quite a few gems. ~~ It seems that there are many libraries used in Ruby that are packaged in a format called Gem. Even if you don't bother to make it from scratch, if you search for the function you want, there is a high possibility that it will hit and development will be easier.
I can't decide because it's a sloppy level, but although it has the same characteristics in other languages including PHP, it seems easy to develop if you can write a short code with abundant libraries (gems) without hesitation in selecting a framework. I think it's possible to start with Ruby. However, if you have already developed in another language (PHP, perl, etc.) and you are not in trouble, you do not need to change to Ruby. I sometimes choose this language because it is easy to develop, but to realize what I want to do, this language! I think it is important to select.
Ateam Hikkoshi Samurai Inc. Advent Calendar 2017 How was your 20th day? Tomorrow, the front engineer @ hashimoto-1202, who was addicted to psychology for a while at Ateam Moving Samurai "I tried to create a SPAv (single page application) using vue-rooter" Please look forward to it.
The Ateam Group is looking for friends who will work together to improve web services and technologies and create the future. I changed from a business system engineer to a WEB engineer in my late 30s, and I am taking on new challenges, so if you are an engineer who could not take a step up to now, or if you are interested in Ateam Group, please do not hesitate to contact us. Please apply from the link. We are looking forward to your application! !!
[Ateam Group Recruitment Site (Web Development Engineer)](http://hikkoshi.a-tm.co.jp/recruit/request.php?ea=[Enter the key to identify the click here])
Recommended Posts