21 May, 2020
Ans. Ruby is a high-level programming language like Perl and python, and ruby is also an object-oriented programming language like Smalltalk, Java and ADA in simple words ruby is a blend of conceptual elegance of Smalltalk, ease of python and pragmatism of Perl.
Ans. Rail is an extremely productive framework of the web-application rail written in ruby, and we can develop web applications very much faster with rails when we are using rails there is no need of compilation. We can just configure our code with the database schema.
Ans. If you obtain complete advantage of Ruby on Rails, you will be capable of developing complex applications in very less time. And we must not ignore that Ruby On Rails(ROR) contains extensive gems which several modern technologies do not possess. Therefore, ruby on rails is deserving of acquiring the knowledge on ROR(Ruby On Rails).
Ans. There are two main disadvantages to using ruby.
Performance issues though it resembles Python and Perl, Ruby is, however, a paraphrased language also we should not resemble it among high-level programming languages like C++ or C.
Threading model Ruby does not practice primary threads. Ruby threads are assumed within the VM preferably than operating as primary Operating System threads.
Ans. Advantages of Rails are
Ans. Rails provide us with three environments they are:
Ans. Embedded ruby is prepared in the backend before sending a request to the web browser. Embedded ruby lets you keep the ruby codes within the HTML file, embedded ruby checks every line, and at a point when the ERB came across the ruby code which is embedded in the document, it begins executing the code.
Ans. ORM is abbreviated as Object Relational Mapper when you are using ORM there is no need to call the database manually, ORM implies an active record that retrieves the data that is stored within the database by using columns and rows for example if you want to retrieve the data of all the students then instead of writing code to connect the database and then writing the SQL query like SELECT * FROM students and then obtaining the result within an array you can simply write students.all and this active record gives all the student information that I want to know.
Ans. MVC framework in ruby on rails breaks the work into three separate yet cooperative subsystems the MVC is abbreviated as Model View Controller
The three subsystems are
Model: an active record which maintains the relations among database and objects and Model also handles transactions, validation, association and so on.
View: an action view is a presentation of data in a specific format triggered through a controller determination to impersonate the data. These are sprint-based systems like PHP, ASP, JSP and quite simple to integrate with AJAX technology.
Controller: an action controller is fluency in the application that manages the traffic, querying the models for particular data and on the other hand it also sorts, searches and messages the data into a specific form that suits the requirements of an assigned view.
Ans. Benefits of using rails migration are
Ans. There are eight basic types of migrations
Ans. A rake is a native tool used in ruby, the rake is very similar to make in Unix rake is utilised to handle administrative tasks or commands these are stores either on a rake file or within a .rake file. Rake lets us write the tasks in RUBY and execute them upon a command line.
Ans. Rake db: reset drops the database and loads the schema with and load the schema with rake db:scheme: load and after that it seeds the data by using
rake db: seed.
Ans. The four important characteristics or features of Object-Oriented programming language
Ans. There are four types of variables.
Ans. Render produces rails to create an acknowledgement whose content is given by rendering one of the templates. Which means it will instantly go to the view page.
Ans. Redirect_to produces an acknowledgement that, alternatively of delivering content through the browser, simply explains it to inquire different URL. Means it initially checks activities within the controller also then moves towards the view page.
Ans. The methods that run after or before the controllers' action method got executed. They are necessary when you desire to guarantee that each presented section of code runs beside whatever the action method is called.
Ans. There are three types of filters.
Ans. The standard ORM model contains
Ans. A Gemfile is a kind of file we design which is utilised for defining gem mandates to Ruby programs. A gem is an acquisition of Ruby code that we will obtain within any "collection" that we can call afterwards. It allows you to designate which gems you desire to practice, and which variants of those gems to practice.
Ans. 'Fat Model, Skinny Controller' alludes to how the M and C parts of MVC in a perfect world work together. In particular, any non-reaction related rationale ought to go in the Model, preferably in a pleasant, testable technique. In the interim, the "inside scoop" controller is essentially a pleasant interface between the view and Model.
By and by, this can require a scope of various sorts of refactoring. Yet, everything boils down to one thought: by moving any rationale that isn't about the reaction to the Model (rather than the controller), have you advanced reuse where conceivable as well as made it conceivable to test your code outside of the setting of a solicitation.
Ans. A module is a group of constants, class variables and methods.
Ans. PORO is abbreviated as Plain Old Ruby Object is being utilised more frequently nowadays. In a remark on my last post, somebody communicated disappointment that I didn't approve the abbreviation. After a snappy Google search, I saw that nobody had made a special effort to bring up its significance.
Ans. Observers are similar to the callback. However, it is utilised when the strategy isn't straightforwardly related to question lifecycle. Likewise, the spectator stays longer, and also it very well may be disengaged or appended whenever. For instance, showing esteems from one Model in the UI and refreshing model from client input.
Ans. Callbacks are the type of methods by which we can be called at specific snapshots of an article's life cycle, for instance, it very well may be considered when an item is approved, made, refreshed, erased, A get back to is brief. For instance, running a string and we can give a call back to which is called when string ends.
Ans. We can list all the routes for any application by writing rake routes within the terminal
Ans. A sweeper is used for terminating pr removing the caches whenever the model object is changed.
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills .