polyccon / Crumbs

A library for all your favourite biscuits!
http://crumbs-fac.herokuapp.com/
0 stars 0 forks source link

Naming is important. Think about it a little more. #44

Closed sohilpandya closed 7 years ago

sohilpandya commented 7 years ago

As we all know naming is hard but is probably the most important part of this process.

You have split out your routes and handlers in different files, which would be fine if your naming was consistent across both the files. https://github.com/polyccon/Crumbs/blob/master/src/router.js#L7 the route is /get but the actual handler is called queryGetData try to keep some consistency in the naming, never assume that because you have this line

'/get': handlers.queryGetData,

that users will know exactly the method to look for in the handler and vice-versa.

Be more specific. What type of data are you getting? https://github.com/polyccon/Crumbs/blob/master/src/queries/getData.js#L2 it looks like biscuits, then call the endpoint biscuits and then your method get-biscuits.