After about two Ruby on Rails tutorials, you can finally create a page that you can post and browse based on it.
To create a web service in the future with Ruby on Rails, I want to create a web site with different functions in one site. (I want to pack in one heroku paid plan)
You can link to each website from the home screen and want to display the link to the same home screen at the top of every page. At first glance, it is a different web service, but overall, I'm going to make something that is in one domain.
It seems that various things such as controllers, models, style sheets, layouts files in views, etc. will be messed up, but those who have such experience, those who have been devised for proper use and naming etc. I would like to borrow wisdom.
Also, it would be helpful if you could tell me the advantages and disadvantages of incorporating functions into one application, alternative methods if the idea is wrong, what to study if you have the necessary knowledge, etc. . Thanks for your consideration.
Answer # 1
No, if you just want to stuff into one paid heroku plan, you should n’t make it one site.
If most of the models are shared, one site may be fine, but if you don't share basically, the prospects will only worsen if you combine them into one. Rather than that, I think that it is better to think about how to save money or something that can be operated with two paid plans.
On the other hand, there are various ways to make multiple Rails apps look like one site, using reverse proxy. You can use the same domain, but you can also alias the top-level subdomain.
Answer # 2
If there are many common parts, you can use Rails Engine
However, it is an image that divides functions by one service rather than multiple services
If there are few common parts, there will be little benefit for trouble, and if there is no common part, there is no meaning of living together
As a precautionary point, as described in the reference article, it will deviate slightly from the rail, so it will be necessary to devise such as deployment and migrate
Reference: Recommendation of de-microservices using Rails engine
*) There are also concerns about what will happen to heroku deployment
Answer # 3
Studying refactoring and object orientation
Read both a book you can understand and a book that feels a little difficult
Try writing some dirty code on purpose and refactor itHave a third party check the code and design
Pair programming, code review, etc.
If you don't have such an environment, do you need to work with your team members and increase the number of people ...Make a habit of thinking about cost effectiveness
Labor costs and time required for function correction
Profits gained by adding or modifying functions
I wrote a lot, but there are things I haven't done ... (especially the last one)
- ruby on rails - installation of rails will fail
- ruby - error due to rails db:migrate when deploying (standarderror:)
- ruby on rails - rails dbconsole doesn't work with rails
- i want to solve the disconnection of the local host of ruby on rails
- ruby on rails - is this ok for the procedure to add a new rails update method?
- ruby on rails - records are not displayed correctly
- ruby on rails - save is not done during wizard type implementation
- ruby on rails - asynchronous communication does not work
- ruby on rails - how to improve automatic line break of each item in rails view?
- ruby on rails - get individual id by routing
- ruby - tell me about the rails save method
- ruby on rails - rails tutorial 21 heroku deployment the page you were looking for doesn't exist
- ruby on rails - i want to create a post form and a post button
- ruby - [rails] uninitialized constant actionview :: compiledtemplates :: users
- ruby - i want to implement a comment function with rails
- ruby on rails - [aws] error during automatic deployment
- ruby on rails - form_with create action does not respond
- ruby on rails - url regular expression does not load properly
- ruby - render doesn't work with rails
- ruby on rails - [novice] rails wants to retrieve and display columns of specific records in other tables from the db
- ruby - error deploying rails heroku
- ruby - error in heroku
- ruby - my app is heroku, but the page "we're sorry, but something went wrong"
- gem cannot be read even though "bundle install" was successful in the local development environment of ruby on rails (
- ruby - rails5 ssl/https communication does not become effective under local environment
- ruby - rails follow function
- about strong parameters of ruby on rails
- ruby - an error will occur if validation is set
- ruby - windows 10 "rails s" cannot be started cannot access localhost: 3000
- heroku - i suddenly cannot send emails with sendgrid