javascript api restful name functions, good practices -


i need advise name functions inside service calls restful api (i know there not standards); let's see how used in 2 ways on angular.io site:

  1. on tutorial , http section : https://angular.io/docs/ts/latest/guide/server-communication.html

save () delete () put () post ()

  1. on developper guide http, hero.services.ts :

https://angular.io/docs/ts/latest/guide/server-communication.html#!#http- client

getheroes () addhero ()

search() in file: search.services.ts

  1. on tutorial on web:
    http://offering.solutions/articles/angular/consuming-a-rest-api-with-angular-2-http-service-in-typescript/

getall
getsingle
add
update delete

(i don't not camelcase ) names clear

my question is:

a. when functions's name have no object's name , addhero (), use simple add () on service , component consumed ?

b. search service can joined on same file service?

c. there advise api restful?


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -