Building the back-end server for an iPhone App - ios

I'm looking at building a simple login-based iOS application that needs secure access to create, read, updated and delete data from a MySQL database - with certain actions available to specific users based on roles.
I've done some research and it looks like I need to build a RESTful Web service which provides Web Services which the iPhone app calls to access the data.
I have very little experience of web services development, are there any books/tutorials that are worth checking out? Is it worth looking at a web framework, rather than start from sractch?
I've done some basic web development in PHP/Python so would prefer to build in that I think..given that hosting it would be relatively cheap..
Have done some basic C#/Java; would it be worth looking at these instead? I tried creating a simple ASMX webservice but most of the examples cite using a MSSQL server, not sure if that is the way to go though.

Use a framework. No point reinventing the wheel and giving yourself a headache. A good PHP based solution would be to use Drupal to build the backend using the Services module to provide data via webservices. Drupal is so flexible and so popular now, that you can get a lot of what you want done without any code at all.
Roughly:
Install Drupal 7 on a webserver according to the instructions
Install the Services module
Design the entities that will make up your MySQL database
Tell the services module how you want to expose things
Some examples of API calls are here.
A case study of someone else who has used Drupal as the backend for iPhone/Android is here.
You will have a learning curve to get your head round Drupal, but you'll have one anyway to get your head around webservices and the benefits you gain from having everything else Drupal offers are enormous, e.g.
The difficult bits are already done for you, so the amount of code will be massively reduced, if you even need any at all
Using Drupal's hugely flexible entities system, you can design a flexible and extensible mysql database scheme using the web based UI, which will be ready to work with any of Drupal's other modules, so you can expand add features with minimal effort in the future
There's an enormous community of people who can help you and the forums on drupal.org are very active
You would have a great UI for users, in case you ever need to give them access to their data through a normal website interface. Drupal has loads of pre-built themes (I recommend Omega) which look awesome and again, little to no code is needed to get a whole site ready made along with HTML5, standards compliance etc.
Drupal provides you with ready-made modules to provide access control via roles, as well as everything else you can imagine e.g. managing a mailing list for your users, providing you with usage statistics, admin interface for user and role management etc.
Drupal use is exploding globally and there's a serious skills shortage, so you'd be even more employable :)

First, it's not compulsory that you use a REST web service. It's just that WS si more or less standard for web-based applications.
I'm not really familiar with PHP, but in python you have django-piston. On the IOS side you have restkit to pair the server with.
What I could say from my experience is that writing a prototype in django is quite easy and you can definitely use this to develop your app.

Related

I wanna fetch my blogposts from my website, to my iOS app. What knowledge is required to do this?

My website is up and running with support from Wix.com, I used the drag and drop builder to set it up and I didn't need to do any Client side/Server side programming for it to work.
What should I do if I want to keep the app updated with the website as soon as I upload any article/post on the website.
Consider taking a different approach and migrate to a platform/architecture that better suits your specific case.
My suggestion would be Microweber - it's a pretty advanced platform for websites with CMS and e-commerce features. It's been around for quite some time (3 years or so) and I'm using it for about 12 live active projects.
It's very neat if you plan to write custom code as it's based on Laravel and everything is easily extendable.
However, I'm using it mainly because of the support. Although it's free and open-source the team is online most of the time and have replied to my every request so far.
This is critical for me as many website solutions come and go and none is
perfect. What makes this one better is the reaction time and adequacy.
This is my personal opinion with regard to the fact that it's very hard to pick one solution among so many given that you didn't state more specific requirements.
It cannot be done without any server side scripting and backend database for the mobile app. you need to develop database for it.and then you will need to develop web service for the passing the data between mobile and backend.
A dirty way to do this would be through an HTTP request that reads HTML. However the best way would be through Wix's REST API.
Edit: I'm regards to keeping the app updated, you're going to need a backend service that is consistently checking for updates.

Marklogic web interface update xml documents

What is a good approach to building a web interface for updating xml documents in a marklogic database.
I came across roxy, which is a ruby gem for configuring and deploying marklogic applications, but after playing around with for a while it seemed that it was more helpful for querying and displaying data rather than updating documents.
Roxy is also a framework that allows you to:
- use/extend MarkLogic's REST API
- use Roxy's REST API - with CRUD rewrite rules in place for you to map to your controllers
- The mVCframework itself is also neatly organized and not overly complicated. We use it quite a bit.
So, if you do CRUD via MarkLogic's REST api or Roxy or any other, none of these actually give you a frontend of their own.
Our usual formula is a 2-tier solution using Roxy within the MarkLogic app server that also serves the front-end code written in AngularJS. Then everything is managed under Roxy nicely.
If you are interested in samplle 3-tier apps with CRUD support, have a look at github and search for samplestack. It's a set of reference frameworks for MarkLogic. It's for MarkLogic 8, but it may give you some ideas..
The MarkLogic REST API is a good place to start. That gives you a lot of control over the documents, including the ability to update them, while working with the language of your choice.
With Marklogic 8 you can use the new Node.js client + e.g. Express (a small web framework). If you like mainstream development, this seems the best way now.

back-end and front-end options in RoR3?

i am starting learning Ruby on Rails, and as far as i am understanding, there are two ways about how to aproach programming in RoR and designing the web application:
Designing the back-end in RoR (data model, engine, etc), offering API in JSON (it could be done by team A). By this way, you can build up the front-end in HTML5+CSS3+JavaScript separately, and communicating with the back-end through JSON (done by team B).
Building up the web application entirely on RoR, the back-end and front-end integrated.
As far as i understand with this two ways, the first option is advisable when you are programming not only for web application, but for other plataforms, like mobiles or tablets (iphone, ipads, etc), because you are offering a REST API to communicate with different platforms. But the second option is ideal if you want to get the power of productivity of RoR, because you dont have to design API.
What are my options if I want to design a web app with mobile features capabilities for the future?
I am interested in your experiences with this decision. Please back your answers up with facts.
I feel that Rails companies are now looking for people who are familiar with the full stack(front and back end), --you will always have people who are stronger in one area or another of course--
For personal experience I can say that I've seen better results when front and back end are integrated, people are exposed to both sides and are able to sort out issues while the project is in development and to be honest I can't think of any reason why following this method would affect future mobile development.
Hope this helps.

Which framework offers similar functionalities to ADO.NET Data services

I am new to both Django and Rails. I am thinking of developing an Web 2.0 style application and is planning to expose Restful services, which my UI tier would call to make CRUD operations (Something similar to ADO.NET Data services)
I am yet to decide on the platforms and is looking for some advice on which one to side develop on?
I am currently thinking of Ruby on Rails or Django.
The benefit of using DJango / Python is that I can move to google AppEngine in future with some code changes, but on the down side I hear DJango is not RESTful.
I am also new to both Ruby and Python. So, what would be your advice on which platform to use?
Well if you want to couple the view and controller with REST then you are right that django is not RESTful, because with django you would have to (de)serialize django objects and manipulate that by yourself in the front end using your favourite javascript framework. Saying that, if your only concern is to send and receive data RESTfully without caring how to do it, then django should be sufficient for you since you've already got your heart for it.
Django is fine for REST applications. Rails claims to provide some functionality to that makes REST easier, but it is largely inaccurate - things like human-readable URIs don't really matter to REST. Rails auto-generates POST/GET/DELETE/PUT stuff for you, but it's just as easy to do in Django too - and it really doesn't have much to do with REST, either, it's just proper HTTP usage.
REST is a general type of architecture, it has very clear constraints, but there is no one, single way to do a REST application. This is a good discussion by the architect of REST, Roy Fielding, on some common misconceptions: http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
I recommend Python and Django, but not for REST-related reasons. (Better documentation, a saner API with Django, less nasty monkey patching and black magic, less coupling, etc)
A RESTful interface is used for building distributed applications. Does your UI tier and services tier really need to be physically separated? Seems overkill to me.

Rails and Flex to build an RIA

Any thoughts on using Flex to build an RIA for administering a complex rails app?
We are starting to find it difficult using ajax to keep our admin section intuitive and easy for users to work with.
You've got RoR guys working on this program and you've managed to develop a complex rails app that has enough subtleties that the admin section is difficult to use.
The answer to this problem is not to use a different programming language to create a whole nother kinda app to do the admin.
It will help more to get assistance in simplifying and organizing your admin section. Work through some paper sketches to get a better idea of how to present this complexity and maybe reveal complexity as you go along.
Complexity is handled often by using wizards or revealing suboptions as you go along. Spend some time with your users and watch them do their tasks.
With more details I could edit this answer with more specifics.
Try investigating this book:
Flex is certainly worth considering in your scenario. Generally, Flex is more mature development platform than AJAX is so if your server-side data are exposed via some reasonable interface (web services, REST-full services etc.), building a Flex front-end would make sense.
It really depends on your needs - Flex vs. AJAX is an interesting topic on its own.
If you want to use XML for communication then there isn't much you need to do on the rails side. But if you want to use an AMF gateway you will want to checkout RubyAMF.
But I agree with MattK if you just want to redesign your admin section it's not worth adding in Flex. I think you just need to do some usability testing, take that feedback and refractor your interface.
I would only consider using Flex in your situation if you already have Flex developers or if you could outsource that part of your project. The Flex modules simply call web services (written in Ruby or whatever) so there is a very nice separation between the two parts of your project. Since the interface between the two parts is an easily-mockable web service, outsourcing works well. There should be plenty of web shops local to you who could handle the work. An admin site should take only two to three weeks to develop in Flex if the developers are knowledgeable.

Resources