Computers, Programming
What is Ruby? The programming language "Ruby"
At the moment there are a huge number of programming languages, each of which has its own peculiarities and patterns. In this article we will discuss one of them.
History of Ruby
Ruby as a programming language has existed for a very long time. Work on the first edition of this incredibly popular language began today in the distant 1993, and the first official version dates back to 1995. The creator of the language, Yukihiro Matsumoto, was a programming enthusiast since the days of the students, but the idea of creating his own instrument appeared much later. So what is so remarkable about this programming language that today it occupies one of the leading positions in the world software development arena?
Philosophy of Ruby
When creating his brainchild, Matsumoto, as a dedicated fan and enthusiast of object-oriented programming, created a certain philosophy for programmers who want to learn his language. So, the Ruby programming language is designed to create simple, and at the same time, understandable applications. Ruby's main focus is not on the speed of the program, but on the simplicity and readability of the code.
The main characteristics of the language
What is "Ruby" as a programming language? This is primarily an object-oriented language. There are no primitive types - all structures and data units are objects (unlike the same Java language, there are primitive data structures). Each function in "Ruby" is a method. Many properties and features are brought by creators from other programming languages, so you can safely say that Ruby (language) has absorbed the best of many other languages and technologies.
Language Paradigms
Answering the question about what "Ruby" is as a multi-paradigm language, you can unexpectedly find yourself in the heat of a dispute. After all, this language allows you to use any of the programming paradigms equally successfully: procedural programming style, object-oriented or functional approach. The developer is free to choose for himself the paradigm that is closer to him, and his set of tools from this will not become more limited or weaker. The Ruby programming language only encourages this choice.
Reasons for popularity
Popular frameworks
If we talk about popular frameworks that exist on the market today, then among them is worth highlighting Rails. Many people, answering the question about what "Ruby", intuitively mean RubyOnRails. This set of software components has become an industry standard among developers. It is constantly maintained, developed and supplemented by a community of programmers, while remaining free. This framework describes the components of the web application within the MVC (Model-View-Controller) template, and provides ready integration with the application server and an interface for accessing the database. These 3 components, in fact, allow in a few hours to write and run on the Internet a simple blog or a private web page.
Importance of writing tests
Another important component of the Ruby language ecosystem, and its web-oriented part, are frameworks and libraries for writing tests. RubyOnRails preaches the philosophy of BDD (behavior-driven development), which means that first the programmer creates a sequence of tests that describe the expected behavior of the program, and then creates the code that must successfully pass these tests. The unspecified standard in this area is RSpec - this framework allows you to write test cases on an understandable even for inexperienced developers.
Ruby gems
Thanks to the detailed standard that all Ruby packages and libraries must match, the development of add-ons is not difficult. Therefore, among the so-called gems (from the English - a gem), you can find modules to solve almost any problem - from integration with social networks and third-party services to ready-made platforms for e-commerce. All you need to use a third-party library is to describe the dependency of your project on some library located in a remote or local repository, and the next build will automatically load this library into the application. This also simplifies project migration between developers, since there is no need to manually share the dependencies for the project build.
Similar articles
Trending Now