1.What is ruby on rails????
->Ruby on Rails is a framework that makes it easier to develop, deploy, and
maintain web applications.
2.What is framework?????????
->Framework is the collection of software tools which help to develop application in easy step, pre-written code libraries and data organization structure to assist in writing web application.
3.What is ruby on rails application architecture ???????
->Ruby on rails follow MCV architecture.
MODELS->The model is responsible for maintaining the state of the application. Model Sometimes this state is transient, lasting for just a couple of interactions with the user. Sometimes the state is permanent, and will be stored outside the application, often in a database. A model is more than just data; it enforces all the business rules that apply
to that data.
to that data.
VIEWS->The view is responsible for generating a user interface, normally based view on data in the model.
CONTROLLERS->Controllers orchestrate the application. Controllers receive incoming events Controllers(normally user input), interact with the model, and display an appropriate
view to the user.
view to the user.
4.Why ruby on rails????????????
->It gives agility to web development.
->Developer can create web application width neat effect.
->Rapid development of application.
->Convention Over configuration : Less code, Less Repetition.
-> Not need of XML.
->ROR has support of rest services which simple and fast.
->ROR has build command RAKE which make development fast and easy.
->Application is easy to maintain when application grow.
->ROR has build in testing.
5.What is active record????????????
->Active record is the ORM(Object relational Mapping ) layer supply width rails. It closely follow the ORM model: tables map to the classes, rows to the objects and colons to object attributes.
6.What is active migration?????????
->Active record is an approach to accessing data in a database. A database object or view is wrapped into a class; thus an object instance is tied to a single row in the table. After creation of an object, a new row is added to the table upon save. Any object loaded gets its information from the database; when an object is updated, the corresponding row in the table is also updated. The wrapper class implements accessor methods or properties for each column in the table or view.
Migrations can manage the evolution of a schema used by several physical databases. It‘s a solution to the common problem of adding a field to make a new feature work in your local database, but being unsure of how to push that change to other developers and to the production server.
Migrations can manage the evolution of a schema used by several physical databases. It‘s a solution to the common problem of adding a field to make a new feature work in your local database, but being unsure of how to push that change to other developers and to the production server.
7.Explain MCV working process in ROR?????
->IN Rails application, incoming requests are first sent to a router, which works out where in the application the request should be sent, and how
the request itself should be parsed. Ultimately, this phase identifies a
particular method (called an action in Rails parlance) somewhere in the action
controller code. The action might look at data in the request itself, it
might interact with the model, and it might cause other actions to be
invoked. Eventually the action prepares information for the view which
renders something to the user.
8.What is session and cookies???????
->Session: are used to store user information on the server side.
cookies: are used to store information on the browser side or we can say client side
Session : say session[:user] = “pravin_mishra” it remains when the browser is not closed.
cookies: are used to store information on the browser side or we can say client side
Session : say session[:user] = “pravin_mishra” it remains when the browser is not closed.
9.What is script directory?????????
->The scripts directory holds programs that are useful for developers. Runany of these scripts with no arguments to get usage information.
- benchmarker
Get performance benchmarks on one or more methods in your application.
- breakpointer
A client that lets you interact with running Rails applications.
- console
Allows you to use irb to interact with your Rails application methods. irb
- destroy
Removes autogenerated files created by generate.
- generate
A code generator. Out of the box, it will create controllers, mailers,models, scaffolds, and web services
- profiler
Creates a runtime-profile summary of a chunk of code from your
application.
application.
- runner
Executes a method in your application outside the context of the web.
You could use this to invoke cache expiry methods from a cron job,
or handle incoming e-mail.
You could use this to invoke cache expiry methods from a cron job,
or handle incoming e-mail.
- server
A WEBrick-based server that will run your application.
10.What is request.xhr????
-> A request.xhr tells the controller that the new Ajax request has come, It always return Boolean values (TRUE or FALSE).
11.What is use of SUPER in ROR????
->Ruby uses the super keyword to call the super class implementation of the current method.
12.What is ORM in rails????
->ORM tends for Object-Relationship-Model, it means that your Classes are mapped to table in the database, and Objects are directly mapped to the rows in the table.
13. What is the Install rail package????
->There are several packages that you can download and install. The prebuilt Rails installer called Install rail which currently is only for Windows.
14.How will you update rails????
C:\InstantRails-2.0-win_2\rails_apps>gem update rails
15.How to clean up previous library????
C:\InstantRails-2.0-win_2\rails_apps>gem cleanup
16.How to update previous worked file after updating rails????
C:\InstantRails-2.0-win_2\rails_apps>rake rails:update