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 on rails - the capacity shortage of cloud 9 and ec2 cannot be solved
- ruby - rails email sending error doesn't go away
- ruby - rails nomethoderror cannot be resolved
- ruby - rails server can't start
- ruby - i want to start a rails server
- ruby on rails - why is the root directory in scss path specification not "~/"?
- ruby - [rails] resolve nameerror in items#new and want to be able to save image data
- ruby on rails - in rails command, undefined method `application' for rails:module (nomethoderror) comes out
- ruby on rails - rils i don't want to make transitions by hand (you will be redirected before entering the edit screen)
- ruby on rails - i want to hit api with curl
- ruby - i want to handle exceptions using rails rescue
- ruby - the formhelper module set by rails is not loaded
- ruby on rails 5 - rubyonrails tutorial chapter 10 assert error
- ruby on rails - undefined method `' for nil:nilclass in rake assets:precompile after deploy is executed
- ruby - when editing the rails profile, only the comments are not reflected
- ruby - rails server does not start the server
- [ruby on rails] flash message is not displayed when updating tweets
- ruby - rails carrierwave how to resize by image type
- ruby on rails - reason why params and current_user cannot be used in rails model
- ruby - error in heroku
- ruby - my app is heroku, but the page "we're sorry, but something went wrong"
- ruby - [rails] i want to change the table to reflect using conditional branching
- ruby - trello-like task management app card move
- ruby - the contents that violate the gemfile are installed
- ruby - rails deletion function cannot be implemented well
- ruby - [rails] please tell me about email encode
- mysql - after deploying rails app and heroku, db:migrate fails in production environment
- ruby - i want to move to the profile page by pressing the link described in the content of the information window (infowindow of
- ruby - nomethoderror in posts#edit undefined method `content' for nil:nilclass in rails