(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-5LHNRP9'); thecodest, Author at The Codest - Page 11 of 13

Popular Rails and Rails-way problems

Problems mentioned in: article on Shopify

Additional problems

Alternatives to Rails

When it comes to Rails in the Ruby world, we have several alternatives. Other frameworks based on Rack include: – Sinatra, – Roda, – Hanami.

What makes them unique?

Both Sinatra and Roda offer us a block routing syntax, but routing in Sinatra is a list and in Roda – a tree. In both frameworks, we have to deal with the implementation of the model layer ourselves. In the case of Roda, it is a good idea to use the Sequel gem.

Roda is inspired by Sinatra. It is very light in itself, but it has a lot of plugins.

Hanami is the closest to Rails when it comes to areas covered by the framework. The most important differences in terms of use are:

Hanami version 1 strongly limits the use of ROM it is based on (version 3, and it is already 5), so it is not worth using the model layer proposed there. However, as it is a very open framework, it is quite easy to implement there the model your own.

Supplements for Rails

It’s worth using solutions that aren’t dependent on Rails and are closer to “pure” Ruby. The tools mentioned in the presentation are:

Sequel is easy to put in a project, it is based on plugins and also implements the active record pattern. It has better low-level query support than Rails‘ ActiveRecord.

ROM uses Sequel, but its concept is to translate between records in the database(s) and Ruby objects. It aims for speed and data transformation. Clearly separates the persistence layer in the application.

Dry-rb libraries are very useful tools:

Conclusions

It’s best to use Rails so that you don’t have to use Rails one day.

Sources

Articles

Frameworks

Gems

Specifications

Read more:

What is Ruby on Jets and how to build an app using it?

Vuelendar. A new Codest’s project based on Vue.js

Codest’s weekly report of best tech articles. Building software for 50M concurrent sockets (10)

en_USEnglish