Tuesday 22 January 2019

Code structure and call flow

I want to create a service which returns the github users who has repos in a specified programming language and a username. The response should contain the user info i.e. name, followers etc.​This is the url on localhost once this is receivedI obtain list of users with this urlThen for each user his info is available in the json returned above in the url field (like this)I have written the first draft of the functionality and code is available here​My main concern is what functionality should userController do and what should the userService do. Should I write separate file to make the rest calls (as both url calls are get and was thinking to reusing the code).​Any help to make the code modular following the SOLID patterns would be appreciated and I am thinking to cache the response for certain period of time in redis (for pagination). Is this the right way to go?​

Submitted January 22, 2019 at 03:24PM by stopcharla

No comments:

Post a Comment