Skip to content
This repository has been archived by the owner on Feb 6, 2018. It is now read-only.

add angular2 http client support #64

Closed
josx opened this issue Jul 15, 2016 · 9 comments
Closed

add angular2 http client support #64

josx opened this issue Jul 15, 2016 · 9 comments

Comments

@josx
Copy link

josx commented Jul 15, 2016

Right now you support as external transport jquery, request, superagent, fetch.
Is there any plan to add angular2 http client support?

@josx josx changed the title add angular2 http support add angular2 http client support Jul 15, 2016
@marshallswain
Copy link
Member

marshallswain commented Jul 15, 2016

It's not in the plan. Can you explain the benefit that would come from implementing it?

@josx
Copy link
Author

josx commented Jul 15, 2016

Let angular2 projects dont rely on external dependencies (just feathers client).

@daffl
Copy link
Member

daffl commented Jul 15, 2016

@Harangue wrote the Angular 2 guide but it uses the Superagent client. If you want to avoid external dependencies why not go with websockets all the way? They're faster than using a REST client anyway.

@jack-guy
Copy link

@daffl Has there been any talk of separating the .jquery, .fetch, .etc from the feathers-rest library? There are a thousand and one HTTP clients out there and I think it'd be nice to be able to just add your own, or install a prebuilt-extension feathers-rest-jquery or whatever.

I think people are going to cling pretty tightly to REST for the most part since websockets are unfamiliar.

@daffl
Copy link
Member

daffl commented Jul 15, 2016

You can implement your own client as a custom service any time. Most of the existing adapters are only a couple of lines of code (see e.g. https://github.com/feathersjs/feathers-rest/blob/master/src/client/fetch.js).

But yes, I think we will potentially separate those out when making Feathers backend framework independent (see feathersjs/feathers#258).

I still think there are many good points to be made for going websockets all the way though, especially in application that already uses Feathers as the client:

  1. Usage through the Feathers client is exactly the same
  2. You get real-time events (if you want to use them)
  3. It is faster
  4. Everything is still RESTful (as an architectural design pattern REST does not prescribe what protocol to use even though it has become synonymous with HTTP)
  5. Authentication support via feathers-authentication
  6. In most browsers with decent webtools Websockets can now also be debugged the same way as network request.

@josx
Copy link
Author

josx commented Jul 26, 2016

thanks @daffl, I have changed my app to use websockets.
Also I have found this feathers example with angular2 , websockets and observables.

@elaijuh
Copy link

elaijuh commented Aug 31, 2016

use websocket is a good solution regardless of http client, but any perf issue if i maintain a stream traffic in websocket connection?

@ekryski
Copy link
Member

ekryski commented Oct 16, 2016

@elaijuh pretty loaded question as it depends on how many connections you have and the number of servers you have. But you can throw more servers at the problem and use feathers-sync to scale easily with websockets.

@daffl
Copy link
Member

daffl commented Nov 8, 2016

I'm going to close this. From what I understand the Angular HTTP client should work with Feathers anyway (especially combined with RxJS and feathers-reactive). If someone is interested in making a feathers-rest client connector for it we're happy to help but it is not going to be a part of the official roadmap.

@daffl daffl closed this as completed Nov 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants