I was in the process of developing an app in Titanium Mobile. (It's a great way to develop apps btw if you're a web dev).
This app communicates and gets data from a Wordpress server.
(In case you're not familiar with Titanium Mobile, I request you to keep reading the question. Knowledge of that platform is not necessarily important in this case. Thanks)
After a lot of research I finalized on the Wordpress JSON API as a method of communication between the app and the server.
I've got it all up and running successfully and it's great. So far so good.
Now the problem is that my app requirements exceed the functionality provided by the JSON API.
For example, I would like a user to "log in" and maintain a session while using the app. He should be able to edit his Wordpress profile info, etc.
I just want to have an idea how I would be able to best implement this.
One way could be to have a php script running on the server which handles each and every function. Another could be to manually edit the JSON API to add more functionality to it. But that'll take time and I haven't developed a Wordpress plugin before.
Can anyone suggest me a better or easier way of doing the above? I hope I've described what I'm looking for. Apologies if it's too long. I wanted to best explain it.
Thanks for the help in advance!
Wordpress has a XML-RPC interface already, no need to re-invent the wheel.
Wordpress XML-RPC SupportCodex
Wordpress XML-RPC APICodex
Related
I went through several topics on SO but I am not sure what fits my needs as I am newbie.
I am creating an Android application for my website.
I reckon that the users can be over 800000 online at the same time.
Users will be able to:
- Submit data through the application
- Read news and updates
I want the updates to happen in real time..
The question is what approach or technique should I use?
In some SO topics is mentioned that there should be on the server side some php files that will accept http/post/get requests and they will return JSON data as feedback.
Is the above-mentioned a proper technique to serve a huge amount of users at the same time(for my standards "huge" means around 800000 users at the same time)?
I recently came across node.js. From what I read it seems like it can act as service where a user/ app can request or post data.
Can anyone give me a suggestion or links where the things are clear? How can I make sure what approach is the right one for my application?
Whatever the case is can anyone describe the right way of doing this thing?
For example: How Android chat aplications suchs as whatsapp, facebook etc work? How they do it?
I do NOT want you to post any code.. just ideas!
Thanks in advance!
If you want create an app like Facebook, Snapchat ... YES you must have a WebService, an API.
The API is linked with your database like your website and return to the app JSON, with the content of your app.
Your API (web service) can be programmed in various language as PHP, Node.JS ...
If you want to know Facebook had their API in PHP before that they created their own language.
Some other app have their API in other language.
I don't really know what is THE BEST language, the BEST language is the language which you are good with, and know it.
I think think nodejs will be best option.
NodeJs is helpfull when there are large number of clients.
Nodejs works best when building chat and gaming applications.
I think this link will help you a lot to learn nodejs.
If you are asking how facebook and whatsapp works they are implementing websockets which provides bidirectional flow of data helps in real-time communications between clients.
If your scenario is sending chats back and forth nodejs is a really good option, Most of the online tutorials you will find about nodejs develop a chat application and its super easy to do so with nodejs. Infact the biggest catch with nodejs is its easy configurations and deployment plus its lightweight. However it might be a good idea to have a look at XMPP as tech giants such as whatsapp use it to send messages and maintain presence. This link can be a good head start for nodejs learning http://code.tutsplus.com/tutorials/nodejs-for-beginners--net-26314
Total beginner question (apologize in advance for the stupidity :( )
I am trying to learn how to develop apps using ionic framework/angular.
I created a simple news feed (UI part of it anyway).
I then installed MySQL, PHP and Apache on my Mac (MAMP). I have created some tables and inserted some dummy data.
Now, I am completely lost on what kind of routine/procedure to write on my server, and what code to write in my Angular service so i can show the dummy data in my app?
Basically, how do these two discreet "things" on my system know how to connect and exchange data?
I googled it for few days, but most tutorials don't seem to address this basic question.
I don't actually expect somebody to take me through the steps, but if you can point me to some tutorials/resources on this, it would be much appreciated.
Thanks in advance.
You will have to think in terms of web/RESTful services to expose data to your Angular app. I can point you to a couple of introductory tutorials on the MEAN stack (MongoDB, Express, Angular, Node), but you'll get the idea:
Learn to Build Modern Web Apps with MEAN
Mastering MEAN: Introducing the MEAN stack
Several references to online resources, by ericdouglas
Since you are using AngularJS, your frontend app is a single-page app I suppose. All data your frontend app based on is provided by your backend, here is PHP/MySQL.
You need to use PHP to create a REST service to provide JSON data, which can be consumed by AngularJS app. While MySQL is behind your PHP app as a storage provider, it doesn't talk to your AngularJS app directly.
I've one website built in PHPFox. The website is functioning properly. Now the mobile apps for iPhone and Android smartphone are under development which will use the same database that PHPFox website is using.
So, I want to make the existing APIs that are used for a PHPFox website available to the mobile apps (both iPhone and Android) as well. I don't want to reinvent the wheel again and want to re-use the same existing code for mobile apps.
I did a lot of research about this. I've spent almost four days on the research. I didn't get a single link which will explain me how to access the existing APIs from a PHPFox website for mobile apps (iPhone and Android).
One option I found from my research is creating new RESTful webservices using PHP or implement any such framework like Slim, apigility, etc.
But I think following any of the above two approaches will be a overhead and re-usability of code will also not be achieved. If the code which is working fine for website should also be used used on mobile apps. There should be no need to write the same code again. That's what I think.
So using the existing APIs from PHPFox website is the best solution that I think, might be I'm wrong. If you think I'm wrong please correct my approach.
If you could explain with some useful example it would be really great.
I've gone through PHPFox docs as well but couldn't get anything useful which could help me in the issue I'm facing. If you are also interested in documentation of PHPFox please go to below links:
http://unity.moxi9.com/docs
http://unity.moxi9.com/kb
If you could find anything useful related to the issue I'm facing please do let me know.
Well everything you are looking for is already there in the docs. Your mobile app would be registered as an app with PHPFox. You can then use their API. The remaining question is, if the end users need to authorize your mobile app from their "normal" web browser or if this authorization can be performed from the mobile app as well. At least that's what I read from the docs. Since you have an up and running installation at your hand: Just try it! Register an app and perform some requests to their API.
Can anyone recommend a tutorial or point me in the direction of some easily implemented .net or PHP code that i could use to setup a third party application server for C2DM.
I am a Front-End Developer with some PHP/.net experience, but very minimal Java experience, our app is setup with the required java code/classes and I have registered with C2DM, but i'm struggling with the application server part of the equation.
I would like to setup a server application that can handle form requests to send a message out to our app.
Any help or advice would be greatly appreciated!
The server part of C2DM is a piece of cake compare to the client (in my opinion). You can find below some tutorials about the server part :
One for JAVA very easy to understand even if your are not JAVA developper.
One for PHP and Zend framework.
A basic example for C# on stackoverflow
A common mistake to avoid if you want some performance : Don't connect for each message to send.
You just have to auth one time to the google server and then you can send multiple notification message.
Also don't forget that Google will periodically refresh the token in an Update-Client-Auth header. You should handle this header to keep your tokens up to date. Have look to this discussion about it
You may want to have a look at this post. It is a basic PHP implementation using curl.
I am building a server-side C2DM based on Drupal CMS.
While it is not 100% ready, if you want I can try and help you building it.
Using Drupal as the server-side, and its amazing modules such as Services and Rules, you can create a very interesting applications very easy, almost "out-of-the-box".
The title may not be the best way to describe my question.
I am working on another social network type site similar to a facebook site in PHP. I would like to eventually pay someone to build me an iPhone/iOS app that will be similar to the facebook iPhone app but work with my PHP site instead.
So a major concern for me will be to have the iOS app to be as fast as possible for the users.
From others experience, what would be the best way for my PHP sites API to get the data for the iOS app? I would think that a simple REST type API that returns results with JSON and XML formats would be the way most sites work with an iPhone/iOS app?
Is my theory correct or is there a different way to do it? Please help
Yes, that's the best solution. The only alternative I know of would be to connect with via TCP/IP, and skip the higher level HTTP protocol. That means using sockets.