Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm trying to wire up my angularjs application to get JSON data from a database (mySQL), using PHP as the server-side language (a language I taught myself this summer, and am most comfortable with).

Having looked at these links: (Angular JS: Full example of GET/POST/DELETE/PUT client for a REST/CRUD backend?) (How to access the services from RESTful API in my angularjs page), I feel very confident in how the AngularJS code should look, but I don't know what the URL is doing in these $resource examples.

I've never implemented a RESTful API in any language, and I'm having a lot of trouble understanding what the code should be inside the tags. Explanations on the web are often too technical for my skill level. I've tried asking my professors, but I haven't found one who has implemented REST before.

I appreciate any time and any help, Andrew

share|improve this question
1  
That's a very broad question. It's like asking how to create a website. Do you have experience with PHP? Are you already using a PHP framework? –  jvandemo Aug 22 '13 at 19:32
    
Hello thanks for your response. I read through and created some php projects based on the O'Riley text 'Building Dynamic Websites using Php, MySQL, CSS and Javascript', which is a procedural based programming style. I have considered using cakephp or Laravel, but I don't think I'm ready for that layer of abstraction yet. At any rate I found an example that helped me, and I will post it later for anyone else who might be at the same level as me. I'm on my phone at the moment, but will share my resource when I'm on my computer. –  Andrew Allbright Aug 23 '13 at 11:13
    
Here is the promised link: pastebin.com/7RDYfY7W –  Andrew Allbright Aug 23 '13 at 13:19
    
You can download some very good documentation on the apigee website as well: apigee.com/about/api-best-practices –  jvandemo Aug 23 '13 at 19:23
    
I appreciate your help, jvandemo. I've implemented my first ever rest API, and it feels really neat! :) –  Andrew Allbright Aug 25 '13 at 0:12
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.