0

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

6
  • 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? Commented Aug 22, 2013 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. Commented Aug 23, 2013 at 11:13
  • Here is the promised link: pastebin.com/7RDYfY7W Commented Aug 23, 2013 at 13:19
  • You can download some very good documentation on the apigee website as well: apigee.com/about/api-best-practices Commented Aug 23, 2013 at 19:23
  • I appreciate your help, jvandemo. I've implemented my first ever rest API, and it feels really neat! :) Commented Aug 25, 2013 at 0:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.