miércoles, 30 de abril de 2014

What is HAML?

HAML

HAML is a variation of HTML used for RAILS framework. Language is indented, which helps reduce the amount of code that the developer must write. Below I show an example.









As noted in the previous image, the amount of code is much smaller, so it becomes much easier to read the code. This language is used by developers to lower the amount of time writing code, has the same functionality but with a different ERB syntax and sometimes even simpler.

I had to learn how to use this language as a prototype project design was done in HAML, and only had to adapt. It was necessary to investigate and modify the controllers and actions of each controller for proper functionality in HAML. After that, you just had to adapt the "form_for" tag ERB to HAML.

If we compare the existing documentation regarding HAML from ERB is much smaller, but in this case it did not have much weight because, after reading some HAML, ERB to HAML pass is very intuitive.

I had no major problems, that of learning a new tool. Besides that language is very convenient.

If I had to implement the same project again I would do it the same way and had to do another project from the beginning I would do it the same way too.

martes, 29 de abril de 2014

Layouts and Renders in Rails

Layouts and Renders in Rails

To display the contents of a view automatically, this view must have the same controller name that is invoked. The other must be in the correct path, this route must also have the name of the controller, for example controller_name.html.erb.

Should I do this in the following way, if you have a controller with the following name,

app / controllers / examples_controller.rb


app / views / examples / some_view.html.erb






In this way, when the program is executed and invokes the function examples some_view controller, the view is automatically displayed for you on the route the driver name and the name is the function that is invoked.

What is Active Admin?

Active Admin 

Active Admin is a framework for the administrative part of the websites. It works as a simple way to manage all the information the database without the need for large development procedures.

This tool is very useful and easy to use but when you want to customize the style of design and style of the windows is very complex. This is because it is a more business-oriented style as the next.


It is normally used when websites have two parts, the part of the client or end user and administrative part. This is when you take more importance as it allows to have all the updated quickly efficiently and safely without the need to stop the operation of the website.

This framework has everything necessary for full development, from windows containing general information from different tables in the database. It also has other windows to create, edit, display and delete different elements, even with very efficient search filter.

Active Admin, I've used two projects currently, and has been of great benefit to the management of information, but I've had great hindered when customize the interface to not use that comes by default, is not impossible but if a bit tricky. To resolve the above, it was necessary to investigate further the existing documents which are fully updated.

After the experience, if you were to implement an administrative site, use this framework. It is very easy to use and very intuitive for developers to end users.

lunes, 28 de abril de 2014

What is Devise gem?

Devise Gem

It is a tool that is used for authenticating users to a website, it is very useful as this has all the necessary security validations to make your project a safe place. Among the main views that brings are: to register, log in, change password and forgot my password.

When this gem is implemented on a project from its beginning, its adaptation is very quick and easy but if the project is advanced, can generate some difficulties such as: adaptation to the database, conflicts in the project design.

As mentioned above, be used for user authentication, and is very common because it is implemented, development speed is much better. If a developer focuses on the same implement this, it may take a few days, but if this gem is implemented, you deal with only one day to have it working properly.

This gem, I had to implement a project which currently has about 500 users. These come from a user data migration, so lost passwords for security, since it was necessary to implement this gem to have all users correctly again.

When was implemented this gem, I had problem with the name of certain elements of the current database. To fix that, it was necessary to create the tables again to conflict no longer existed.

If I had to deploy again, I would do from the start of the project to avoid problems with designs nor database.


In general, this gem helps to improve speed of development of the project as it brings all ready to be used by any developer.