I am developing an Cloud Media application. There will be an android app that will use the cloud to upload/download photos, audio and videos.
So, There will be an Web Servicethat will have all Web Methods.
Photo (GetAll, GetByTag, GetByAlbum, GetFavorites)
Audio (~Same)
Video (~Same) Also Auth functions + Other functions
So, my point is, there will be 1 ASMX with all these functions.
It would be better to seperate functions like this:
Photosasmx (Contains only 4-5 functions which return photos)
Audioasmx(same)
Videoasmx (same)
Authasmx (web methods only for auth)
What is better?
Related
My sites architecture. Both components are hosted on AWS via elasticbeanstalk.
Frontend: React gets data via API Endpoints served from backend
Backend: Django REST Framework
I want to restrict api access such that:
only the frontend can grab data from the REST API, some data is public to anyone on the site, some only accessible to signed in users
whitelisted developers can access data from the REST API such that they can develop the frontend display of that data
No other machine, site, service, person, alien can access the REST API unless we know about it!
Willing to research and learn required to implement a solution like this, just would like to have some guidance as I am a young Padawan.
I'm building a Web application as an interface for a Business Network. I would like to reuse some of the REST Server functionality (e.g. GitHub login and storing cards in a MongoDB database) but do a few things differently. For example, I want to generate all cards on the server, so that the users won't have to upload them. Plus, I need to serve the static files from somewhere. I'm trying to figure which architecture I should use.
The app would serve 10's - 100's of users, potentially scaling to 100's of 1000's.
So far, I thought about these options:
1. Have a different app on a different port; REST endpoints called from the client.
2. Same, but REST endpoints called from the server (also means that I'll have to forward the login process somehow).
3. Extend the REST server with custom functionality (is it possible?).
4. Don't use the REST server but steal some of its code to use it in my app.
Questions:
Is it possible to extend the REST server with custom routes?
What is the recommended architecture for a Web interface for a Business Network in production?
Yes you can take the REST server and customise, its open source
See https://github.com/hyperledger/composer-knowledge-wiki/blob/latest/knowledge.md#information_source--node-js-application-development-questions-eg-build-real-time-apps-login-etc for some insights, resources and guidance. The business network is essentially a smart contract (including transaction logic, code, queries, access control lists etc etc) deployed to a blockchain runtime (running as native chaincode in Fabric). Your web interface to interact with the ledger (ie through business network cards stored in wallets (whether server based or cloud based ) could be using Angular (app) / Typescript / React JS (for UI elements) but the salient point is that you can interact with the deployed business network card using the Composer APIs, JS and REST. The application users would interact from the app, using their business network cards, which connection info, the user's blockchain identity and some other metadata. See more info here on Composer's architecture.
We are developing a dashboard application. In the home screen it has four charts and list view. The data for these charts and list view are stored in different tables in the backend database. We are planning to create web services for fetching the data from server.
My question is, do we need to write separate web services (in this case 5 web services) for fetching the data or can we create a single web services that returns all the data in a single call?
If we write different services, then we need to invoke five services from the mobile device (iPad/Android Tablet). If we write single service, the response time will be delayed due to the joining table in the server side.
We are creating our application using Sencha touch framework. Our app is a cross platform mobile application. The web services are writing using restful wcf services and it returns JSON.
Please give ur your suggestions
I want to develop an app with mirror api for the novel google glasses. Is it possible to call an external web service from the glassware? I have to use this web service to obtain the informations to display in the timeline cards.
If it is possible, how I can do it?
You need to provide a web service that interacts with the user's timeline to insert cards, but you can interact with whatever other web services you want from within yours in order to get the data that you push. Something like this:
insert timeline get 3rd party
cards data response
User's <-------------- Your Mirror <------------- Third party
Glass --------------> web service -------------> web service
subscribed make request
notifications for 3rd party
(menu items, data
location)
The simple answer is YES.
You'll probably want to develop your Glassware using the Google Mirror API as a server-based web application. (This doesn't require you to run any code on Glass, instead your application is written in PHP, Java, Python, .NET or one of the other languages supported by the Mirror API and resides on a web/cloud server.)
Your web-based application can then make any sorts of web-based API calls to other external web services or APIs, retrieve data or information and then format and send this information to your Google Glass device. How you consume these 3rd party web-services depends on your choice of programming language, but pretty much all of these languages have support for consuming external web service via XML, REST, JSON or SOAP.
Lets have an example scenario:
Client opens a web site and finds the sum of two numbers which he enters from the textboxes.Then clicks on the ADD button.Two parameters are HTTP GET'ed to server where PHP code is written to add the numbers and result is echo'ed.
Based on this scenario could anybody explain the difference between Web services and application?
In your case if you have User Interface for providing two numbers and then getting the result, it should be called a web application. But if you have an API exposed to receive two numbers and return result over http , then it should be called a web service.
At low level, both Web application and web service are kind of same thing. But the main point is that web services are for machine/program to machine/program communication whereas Web application is for Users.
I'd say that web applications are intended for users and web services are intended for other applications. That's the most important difference. Web applications usually present data in HTML which looks nice to the user and web services usually present data in XML which easy to parse by other applications.
A person drives a car. That car could be powered by an internal combustion engine, electric motor, or nuclear reactor. The power source doesn't matter to the driver though, as all they need to see are the controls and the road ahead.
The application is the car. Web services are the nuclear reactor.
To add 2 no.s we write a web service, to subtract we write a diffrent web service, however calculator is an web application that uses add,subtract and many other webservices in combine.
Lets take an example of Google search.
We can use Google search in two ways. First, we can visit http://www.google.com and put out query for search. Google the returns the result. Second, we can integrate Google Search in our websites with custom search API.
In first case Google Search is acting as web application while in second example it is acting as web service.
Here we can point out few differences,
User interacts with web application while machine interacts with web service.
To access web application, one must visit application. While web service can be access from anywhere (from any application which integrated it). We don't need to visit the service explicitly.
A webservice is equivalent to a method in java that has a web wrapper around it. It lives on the server and it can be sent data / queried etc. and may or may not return a result. It does not have any front end it can only be accessed via http get, put, delete etc.
A web Application is a fully functional piece of software that lives on a sever that is designed to help people achieve a task. This would have a front end that would allow users to interact with it / enter data etc.
A web application could use multiple webservices to achieve its goal / end result
There is little difference between web application and web services.
Web Application: In web application when user request any data then the server embeds the response into some HTML and forward it to the user and on browser the HTML is rendered.
While in web services it's done differently that when some user requests for some data then the server returns it a json or XML array of objects and the data can be displayed by anyway the web designers wants.
Thanks Hope it resolves the matter.
Web service is for application consumption , invoked through web application
To communicate with webservice data should be sent as SOAP message or as REST i.e XML over HTTP
Most of the times web service is not part of application because to facilitate the use by other web applications and it is not for direct consumption to end users
Web application is for human consumption invoked directly by GUI which may or may not use web service for giving response