Top 10 Latvia-Based Software Development Companies
Learn about Latvia's top software development companies and their innovative solutions in our latest article. Discover how these tech leaders can help elevate your business.
Rails is a Rack-compatible framework focused on quick application development. Unfortunately, the “everything out of the box” approach and blind Rails-way behavior often cause the application code to lose quality, both in terms of its reception (readability) and operation.
When it comes to Rails in the Ruby world, we have several alternatives. Other frameworks based on Rack include: – Sinatra, – Roda, – Hanami.
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.
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:
It’s best to use Rails so that you don’t have to use Rails one day.
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)