angularjs - Creating a web application that communicates with another web application seamlessly? -
i trying develop web application can communicate web application. app1 app developed using angular.js , struts2. apps sole purpose perform search queries on several databases , returning information products user view. app2, current app developing, developed using angular.js , flask/python. app responsible storing products user selects in shopping cart , allowing user make purchase.
i stuck how 2 applications communicate(passing login information, selected items ids, etc.) eachother.
i have tried passing information via url redirect (http://www.example.com/?myvar=somedata&...) angular giving me lot of trouble try , around that. if can work, think insecure data user shouldn't know exposed in url.
my second thought somehow access session data app1 in app2 lead security issues.
my final thought how make call app1 returns json object can parsed in app2 not entirely sure how pass information along.
how can 2 applications communicate each other?
thanks help
in opinion isn't within scope of angularjs. however, believe best, accepted practice communication between web applications in day , age restful web services.
it's not small topic, once concept behind can use in any programming language supports web applications (java i'm assuming you're using because of struts has multiple rest libraries, prefer jersey that's me).
it's amazing way use angular front end talk own end. entire angular $resource framework built around idea of using restful services.
check out link on wikipedia brief synopsis of makes service restful: http://en.wikipedia.org/wiki/representational_state_transfer#applied_to_web_services
now, applies of asked. far login information concerned, that's going depend on security implementation. lot of times can put information in header of web services request, , accept requests come trusted servers, etc. there's bit of stuff understand there. it's entirely separate topic.
hopefully helps started. let me know if you'd more information or pointers.
Comments
Post a Comment