I want to build a RESTful webservice api handle phonegap application request.
I am familiar with Python and Django.
Restful webservice is a social network like Twitter, required to use Mongodb. Everyone can post status photo from mobile app to server and can follow anyone. I have read about django-tastypie to build restful api but I want to use mongodb. About mongodb driver for django I have read mongoengein.
What about commbo django + django-tastypie + mongoengien? Is is suitable for me?
There is this https://github.com/mitar/django-tastypie-mongoengine . Weather the tastypie model is the right choice depends on many factors, but it's ability to create a standards compliant REST that works with backbone.js will continue to encourage use. It's pretty nice to extend as well - taking alot of inspiration from the way you define ModelAdmins in django. Not having to come up with your own authentication system or integrate oauth by hand is appealing (but sometimes an existing authentication is required if you are building this into an old application).
I have tried to implement basic API endpoints with plain mongoengine and ran into many serialization issues (ObjectIDs and many other fields) and inability to get relations or easily or control the inclusion and detail of embedded documents, so it is worth at least putting some time into evaluation and tinkering with Tastypie. Like the mongoengine django admin - you wont find 100% seamless recreation of the SQL version but rolling your own solution here is a high level of effort.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
can anybody give me some example?
A web service will expose an API.
Not all APIs are web services - any library will have an API.
APIs are the public interface of a piece of code - it is what you can call from within your code. It may be a web service, but it could also be a JavaScript library, a compiled library for your platform (say .NET assembly, java JAR, a PE DLL and more).
API is more of an abstract concept it is a programatic interface for your application it can be implemented in veraity of methods and technologies. Webservice is a spesific implemenation of such concept that using SOAP and HTTP technologies.
API is an acronym that stands for Application Programming Interface, as such it can be used to describe any piece of software you can use inside another software to develop an application or part of it. As an example the library/module/classes that allow you to open a file and read its contents is an API: you don't know how it works but you can use it into your software to achieve a possible complicate goal.
A web service is usually a remote piece of software capable of responding to web requests which provides some sort of functionality. Usually the word is used to indicate SOAP web services, but a RESTful application is a web service as well. In a broader sense of the word any web site is a web service as they provide a service over the web, but usually we do not consider them in that category because we refer to machine-to-machine interactions.
Now, if you consider that a web service can be used by your application to deliver part of your application logic then a web service IS an API.
They are same thing, Web Service is a specific type of API that is accessed over the web.
Facebook - offers a Web service / API
Twitter - offers a Web service / API
Windows - offers an API
An "Application Programming Interface" was originally used to describe the interface offered by system software(Windows) to be used by application programs (word, Microsoft paint etc...). The term API has since then evolved to encompass pretty much any software interface.
A web service is a software interface that is accessed over the web.
IMO API's that are accessed over the web should only be called Web Services, However the masses have started calling them API's - so that is what it is.
I wrote more about API's here: http://www.woodstitch.com/resources/what-is-an-api.php
I have a CakePHP based web application deployed on Apache (LAMP stack). Now I am doing a Web Services API using bottlePy that will expose services to be consumed by an Android application. The thing is both the applications will be working of the same MySql DB tables and reading/writing to the same. The reason its been done this way is because the CakaPHP based application is already available and was done a while back. Now we have a need to do an Android app and hence need to expose a Web Services API and since I am more comfortable with Python I would rather use. But before I dive deep in this direction I wanted to get answer to the following:
Can I have both the CakePHP web app and BottlePy based Web Services API served from the same Apache server? If not what will be an alternate?
Will two different apps accessing the same MySQL DB cause any issues in terms of locks, data integrity etc?
Anything else I need to be careful about?
So, I have implemented it anyways and it has been working great. I guess that answers the question, that yes it can be done.
I have both cakephp and bottlepy app served from same apache server.
I havent seen any issues and data gets written from both cakephp web app and bottlepy web api connected to android app.
Getting cakephp and bottlepy served from same apache server was a bit tricky but I got it working. I am not a webserver expert so dont know if the problems I faced were trivial or I solved something difficult. In either case it is working. If you face similar issues, let me know and I will post a detailed reply on how I did the setup.
i have prepared a multi user chat using flash media server. now i want to save that chathistory to save it in a database. for that i decided to use webservice for database connectivity. now in one of the tutorials i found that webservice will not support ssl. is it true or not. All my project had ssl v
The FMS docs say that the Server-Side ActionScript WebServices class doesn't support security features. I'd suggest asking in the FMS forum, though, because engineers from the team answer questions there.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
what is the purpose of web services?
i mean isn't all web applications a web service ?
also why do people create API web services? is it to let developer's use the website's functions? kinda like facebook and youtube ?
is it possible to make a API for web service where you can use C++ or VB to use the functions? therefore, someone could make a desktop application based on your web application's API ?
how do you create a web service API and a web service ?
what is the purpose of web services?
Allow the easy consumption of a service using web technologies? I mean, you can potentially code your application to do what the browser does ( that's how many applications for stackoverflow have been done in the past )
The problems are:
it is much harder than using an API
Since there is no API, changes in the website do crash your application ( while responsible API's will allow you to use your old version )
i mean isn't all web applications a web service ?
Not at all. A web app is an specific application designed to be used by a webbrowser ( firefox, chrome, etc ) While a webservice is meant to be consumed by other application.
You can consume a webservice in pretty much any programming language out there.
also why do people create API web services? is it to let developer's use the website's functions? kinda like facebook and youtube ?
Not the website functionality but to allow them to create own applications that use some functionality of that website.
For instance YouTube allow you to upload videos with it's API, otherwise you'll have to "simultate" the HTTP post which can be problematic.
That way, some tools offer the capability of "uploading" your video directly from the app.
is it possible to make a API for web service where you can use C++ or VB to use the functions?
That's the point, among other programming languages.
therefore, someone could make a desktop application based on your web application's API ?
Exactly!!!
Here's an example of the Object-C application I use for Twitter ( tweetie http://www.atebits.com/tweetie-mac/ )
(source: cachefly.net)
how do you create a web service API and a web service ?*
It is not much different from creating a API for an internal fremework/product/library.
You have to define what are you going to offer ( your public interface, your services that is )
Create a list of in/out parameters and interchange formats ( XML, json, text/plain, YAML, whatever )
And finally provide and endpoint in the web ( or why not intranet )
Webservices could are harder to control than regular APIs, you have to check security concerns, work load etc.
To see a working API refer to that mentioned by Nathan here
There are basically two different types of webservices, one that is SOAP-based and the other is REST-based.
Either can be accessed by desktop applications. I have written applications, such as screensavers, that will interact with the server through both of these types of webservices.
An API is useful so that people can write applications, as you mentioned, to use these services, as, without applications using them, these webservices are pretty useless.
A SOAP-based webservice is basically just a web application that sends and receives using an xml message format that follows a standard.
A REST-based webservice is the cgi-based application that is similar to using an html form element, generally using GET, but, if you are doing anything that can be destructive, or change databases, you will want to use POST.
You can write applications using these APIs in any language, which is the advantage, as you can then choose which language is best for the server-side, and that has no impact on what you do on the client-side.
How to create a webservice will depend on which of the two main types you want to create, and which language you choose to use.
A web service is a type of program running on a web server built especially for other programs to use, by submitting information requests to it in a particular format (usually some information wrapped in XML).
The API part (Application Programming Interface) is usually a class or set of classes that have the code that knows how to format the information to make requests from the Web Service - so that your program only needs to make the usual function calls to the API classes.
It simplifies your use of the web service.
Here is an example of how to make one, and use it for .NET languages: http://www.codeproject.com/KB/XML/BeginnerWebService.aspx
Any program that uses the web for its interface is a web application, like this site or Facebook.
An Application Service Provider is a company that helps you write web apps (http://en.wikipedia.org/wiki/Application_service_provider) or provide other services.
Normally a API is developed to create program that interact with the site, like the Twitter API, that you can use Twitter functions in a program.
If you ever developed applications that rely on libraries or dlls in terms of windows programming. Think of a web service as a dll hosted on a web server that has a direct URL to it.
So your application or website can read the data exposed from the URL that you can use as function calls.
Web services transmits data via xml, once the language you write your application in can read xml, you can write it to make calls to the web service, that is passing parameters and the function name to the service, then if expecting a return value, your application reads the data from xml.