I want to know how to work with angularjs without using a backend. I know the option of using $httpBackend and mock, but I want a real life example.
In my team we are considering the possibility of using an express server that simply works with JSON files (no database) If there is no alternative.
Any recommendations? Thanks in advance.
For tests or to begin work when the backend is not ready yet, I often use services to mock REST or SOAP API, such as: www.mockable.io.
Otherwise you can have a simple server to serve static JSON files.
Related
I have a GRPC service running written in Python. I have the python support proto file for the same.
I want to integrate this backend with AngularJS+Typescript UI.
Questions are:
Is it possible?
Do I have to change anything in the Python grpc server end?
I checked online and it seems Envoy help in doing similar thing, is Envoy the only solution? As I tried a lot and its not working.
What all changes are required.
Yes, gRPC support javascript, you don't need to modify the server, just use service proto generate client javascript files, and use typescript call the function. You need add the grpc-web to your client project. Envoy is not necessary for request server.
Yes, you can integrate gRPC API's with angular(typescript).
follow here it will helpful.
I'm building a React client and a REST server with Django REST framework, neither of which are something I'm particularly good at.
Anyway, on the client side, I find myself writing various calls to fetch, and managing the endpoints and content types, which seems dumb.
I noticed that I can use CoreAPI to build a schema of my API and somehow automagically make an API client.
Can I, and would it be sensible and straitforward, to somehow autobuild that client and inject it into my app, and then call it.
This sounds nice and feasible, but not sure how to go about it, thoughts?
Thanks.
The best library I have found for writing js client for DRF is https://github.com/tulios/mappersmith
I have a Laravel + mySQL app that use either ajax or Angular $http service and I want to integrate websockets into that mix.
So I thought of trying Firebase, which is great and easy to use, but am a bit confused about a couple of things. I am seeking for someone's help in clearing that confusion.
is it possible to change the app url name for firebase ?
So instead of something like https://vivid-torch-xxx.firebaseio.com can I change it to https://myawesomesite.firebaseio.com?
how the schema on Firebase should be structured ?
Or better yet how not to use it all and just use Firebase as websocket server instead of ajax ?
I essentially don't want to have 2 databases to manage the data.
there is a Firebase package for php/laravel, but I don't know why would I need it. Or what exactly is the benefit of using it if am already using a REST-ful backend with angular.
The schema will basically be how you want your JSON for your front-end will read it. Are you displaying notifications? Then investigate how that would be structured. Firebase will give you the power to push updates to the front-end which then will no longer have to pull data via the API on what the actual data is it needs to display the notification.
I use the mongolab wrapper to access the data, but how can this be setup without exposing the api-key.
Is this wrapper only ever usefull for development?
thanks
You cannot protect a key inside an AngularJS application. Everything inside this application is sent to the client so easily accessible.
To protect your database, you need a custom API. You can use a service like Parse to create one easily or develop it yourself with frameworks like Express for Node.js or Flask for Python.
I've been looking for the best way to build a search web/ios/android application with user login and a REST Webservice. I have landed on CakePHP for the Website creation and REST api handling.
I would also use the RestKit API for iOS, and not sure for what RestAPI I'd use for Android.
I also want to be able to use OAuth-2.0 for communicating with Twitter/Facebook/Pinterest.
My Question:
Is there a way to use CakePHP and Parse.com together to handle all the user authentication, and would I need to separate data tables (one on parse.com and the other on another hosting service with CakePHP)?
I would like to keep everything at Parse.com if I could. Any help would be awesome!
I'm not familiar with CakePHP, but if you can completely ignore whatever DB/ORM comes with it by default, you can use Parse on your server and in client apps. There's an un-official PHP library you can use for the server, and they offer iOS and Android SDKs.