Social Marketing

With Ror, watch out to never repeat in your code !

One of the great ideas of Rails is DRY, Do not Repeat Yourself ! Rails provides the architecture and tools needed to avoid duplicating code unnecessarily for the developers . To them to play the game up to the end. To repeat in the code is a wound : what to make if the code in question needs to change? Here you have to change all the rehearsals, which really is not easy when you accumulate many files throughout your project. So avoid repeating yourself.

There are two ways to repeat least, thanks to helpers and gems.

The helpers

Rails helpers are tools that enable sharing of Ruby code between the different views. The interest is to make lighter HTML files by moving the recurring code in a helper.

The gems

The gems are products code modules by other developers that provide functionality to your Ruby Savvy application - they are not limited to Rails. Rails itself uses some gems. The list of gems used is in the Gemfile to the root of your application. When adding a gem in Gemfile, you must download and install. These two things are done automatically with the bundle install command to the terminal. The gems are then uploaded to the site indicated in the front line of Gemfile the source. This line almost never changes. When you download an application written in Ruby, the first thing to do, is to look if there is a Gemfile. If this is the case, make a bundle install.

Rails guides developer

Rails provides many scripts for generating skeletons of these code.All these tools are based on the naming conventions of Rails and file organization.

- Project generation Script
- Model Generation Script
- Controller Generation Script
Rails provides by default a number of code generators (model, controller, webservice , mailer ... ).

Contact the best ruby on rails development company here !

Say what you think.

Les publications similaires de "SEA blog"

  1. 26 Avril 2020The ways of working on your programing in Php148 clics
  2. 23 Mars 2020Php developers training !240 clics
  3. 18 Fév. 2020Our team as a web agency377 clics
  4. 28 Janv. 2020Our Php programmers will bring something extra to your project488 clics
  5. 13 Août 2019Advanced solutions in Php development1069 clics
  6. 30 Juil. 2019Specialized Php website development @Simplyphp756 clics
  7. 8 Avril 2019Understanding the needs for Php programming944 clics
  8. 2 Avril 2019We talk about the London bootcamp dedicated to web code1122 clics
  9. 24 Fév. 2019What is top class Php development ?1049 clics
  10. 17 Déc. 2018The importance of Php development for dynamic websites1136 clics
  11. 26 Août 2018A strategic location with freedom of content and speech1354 clics
  12. 25 Juin 2018All you need to know about hosting1932 clics
  13. 10 Mai 2018Is Laravel ruling web development?1557 clics
  14. 4 Mai 2018Setting up a PHP application1967 clics