3 ms·
If you choose Ruby, rspec and rspec-expectations (https://relishapp.com/rspec/rspec-expectations/docs https://relishapp.com/rspec/rspec-expectations/docs) grant
by wallflower 6y ago
If you choose Ruby, rspec and rspec-expectations (https://relishapp.com/rspec/rspec-expectations/docs https://relishapp.com/rspec/rspec-expectations/docs) grant you very powerful abilities to write unit tests for your APIs out of the box. You can pretty much mock anything from method calls to network responses.
Also, when running an rspec test that touches/creates/modifies ActiveRecord database objects, the rspec scaffold will automatically create a new database transaction for running your test so that the test database you are using is not affected.
In general, don't worry if the Ruby that you write looks nothing like the concise and sometimes 'magic' Ruby that more experienced developers can produce. You'll get there when you get there. Try to learn as much about Enumerables as you can https://ruby-doc.org/core/Enumerable.html https://ruby-doc.org/core/Enumerable.html
Vue.js is a good choice. Not as popular as React... yet.
Rails, as other commenters have noted, has a learning curve. As long as you try to stick within the normal usages of Rails, you should be fine.
Whatever you do with Rails, stay far away from their template markup languages (haml). Write the front-end in Vue.js, consuming APIs, don't do any server-side rendering of anything. If you really want to do server-side front-end, ditch Ruby/Rails and just go full blown Node.js front and back end.
Good luck, just get started!
- tdeck 6y ago> Whatever you do with Rails, stay far away from their template markup languages (haml). Write the front-end in Vue.js, consuming APIs, don't do any server-side rendering of anything. This is far from a consensus opinion. Depending on your application you can actually get great results with Turbolinks, meaning you write very little client side code. It's worth reading up on that option as well.
- wallflower 6y agoOk, we can agree to disagree. Given the OP’s stated personal choice of using Vue.js, I assume that they want to build a SPA. In my understanding, using Turbolinks makes use of most every JavaScript client-side framework, including Vue.js, more difficult as the JavaScript components have to be adapted to work with Turbolink caching.
- tdeck 6y agoIndeed, I wouldn't recommend using them together either if OP goes with Vue.
- wallflower 6y agoThanks for the clarification, we will agree to agree :) I still have not-so-fond memories of using Rails 4.x to render HAML partials to "support" basic JavaScript dynamic interactivity.