jeudi 24 mai 2018

what is the design pattern for solving this rails service

I should implement a service which is rails but without active record relations i will collect the data from 3 other services and should and should keep the controller skinny and dry also should be in model at the end let's say

Post =>>>>>

our current service

User_posts

another service which i will got the user_post ids

Comments

service which take the post_ids and response with comments data

Likes

also the same like comments but response with likes based on post id

Finally i need to send requests to these services and merge the results in the post model but with a good patten ,

Aucun commentaire:

Enregistrer un commentaire