I need to build a backend for an iPad app done in Objective C. I have two choices for that, one being Java and other C#.
With a backend built in either one of those, what options do I have to put the backend and frontend together? One option could be to use XML messaging. What are the other options?
Also what is the standard way of doing this? i.e. if we have an objective C frontend, then what should the backend be in and what communication mechanism should be used between the two?
I did some reasearch and am sure that either of Java or C# would work, but I could not find much information on how to make them work with the frontend? (Please bear in mind someone else would be doing the frontend)
Thanks.
You have a few things to consider. Wire protocol and Message protocol.
Wire Protocol:
This will contains things like the Message Id, Sender, Subject, Type, Timestamp, Message Size, etc. This is just as important as the Message Protocol. In order to recommend a Wire protocol I’d need to know more about your system. If you want a simple Wire protocol that will work on all those platforms you can take a look at STOMP. It is a simple ASCII based protocol for transmitting messages. It can be useful for debugging messages etc. ActiveMQ and RabbitMQ are Brokering systems that supports STOMP. I prefer RabbitMQ.
Simple STOMP message:
You can also use HTTP as a simple wire protocol. It is simple and ASCII based like STOMP. Plus SOAP typically uses HTTP as it’s transport protocol. SOAP also typically uses XML for it’s message format to encode the Envelop, header and body of a message.
There is also JSON-RPC.
Message Format:
Most of the information in the Wire Protocol is used to determine where the message goes, if it got there, what type of information is in the message etc. Generally it is only used by the messaging system you put in place to send and receive messages. What your business logic is interested in, is the message content itself. You need a way to encode that content that both sides understand. There are plenty of choices for this: JSON, XML, Google’s protobuf (binary).
I would have a hard time recommending any of these without more knowledge of what you need to do. They each have their own strengths and weaknesses.
Real-world mapping for wire and message protocols:
UPS, US Postal, FedEx = wire protocol
letter from mom, loan application, birthday card = message