Add controller for seperate app to access database

Permalink
hi, im writing a mobile application the interacts with my concret5 website

i need instructions on how to add a controller to my site.

I need to get a list of blogs similar to the rss feed.

but i also need an endpoint to get the blog data from database.

i need an endpoint for users to comment on the blog.

I need an end point for requesting a list of items in the shop from the database
and then more detailed information.

website currently uses paypal to pay for the downloadable content
i can use the the paypal sdk for iphone but i need an end point to transefer the product to the app.

prefereably all get and post requests should return nice json for me

Thank you if anyone can help.

if you need more info let me know ill be happy to provide anything needed to get this done

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi JohnHarris,

Have you read through the concrete5 documentation yet?

Will this be a concrete5 5.7 project?
JohnHarris replied on at Permalink Reply
Hi,
Thank you for your reply.

I have read some of the docs and haven't found anything like what I'm looking for. I may have got my self in a panic though and be missing something. The concrete5 site is already live and has been for some time. Another developer set it up, I was asked to write a mobile app on iPhone that shows all the clients social media channels and feeds (he has many) which I have done and is basically finished but also crucial to the app was 2 things from this pre existing concrete5 site :

1. The client has a shop on his concrete5 site where users can buy digital content and event tickets via with PayPal. I need to be able to do the same on the app.
2. He has a blog on the concrete5 site I need to be able to get each blogs content and images and also be able to add comments like on the concrete5 site.

I'm a .net mvc5 developer in my day job, and moonlighting as an iOS dev.
I've never come across a cms before and never concrete5. Although I can se code in the docs I can't find anywhere on the clients concrete5 site that has any code at all.
From what I read on the docs I thought I could add code to a theme but that didn't work. I'm really stuck I've got 6 months of development riding on this.
If I was making the site from scratch I'd do it with a separate Api that can be called from and client application with authorisation. Is this possible with concrete5 is the main question and if so how do I even get started the when j Google examples I'm struggling to find what I want apart from a pass through controller that I don't really understand, basically quite clueless at the moment but if it can be done. I'll get my act together and learn it. Just don't know where to start at the moment. I've read the basic docs.

it's a current app I'm ashuming it's up to date when I log in a message always pops up saying it's updating
exchangecore replied on at Permalink Reply
exchangecore
John,

What you're attempting to do via a data API would not be a trivial task in concrete5. Not because it's difficult to build a rest api or similar, this can be done easily via Controllers (seehttps://www.concrete5.org/documentation/developers/5.7/working-with-... ). However, CMSs are no small feat to tackle the database of, especially one as robust as Concrete5.

I would suggest simply developing either a mobile theme, or making the site responsive, and then simply embedding an iframe in your iOS app to accomplish the duplicate functionality.

Hope you find this helpful. Best Wishes.
Phallanx replied on at Permalink Reply
Phallanx
Take a look at the Ajax Lessons addon.

http://www.concrete5.org/marketplace/addons/ajax-lessons/...