Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 4701 Project-1 Project Phase II Instructions n Download XAMPP l XAMPP includes: Apache, PHP, MySQL, and other goodies. No need to download and install.

Similar presentations


Presentation on theme: "CSE 4701 Project-1 Project Phase II Instructions n Download XAMPP l XAMPP includes: Apache, PHP, MySQL, and other goodies. No need to download and install."— Presentation transcript:

1 CSE 4701 Project-1 Project Phase II Instructions n Download XAMPP l XAMPP includes: Apache, PHP, MySQL, and other goodies. No need to download and install them separately, XAMPP does it all. l Download: https://www.apachefriends.org/download.htmlhttps://www.apachefriends.org/download.html l FAQs (Includes instructions on how to install it and set it up): à Windows FAQs: https://www.apachefriends.org/faq_windows.htmlhttps://www.apachefriends.org/faq_windows.html à OSX FAQs: https://www.apachefriends.org/faq_osx.htmlhttps://www.apachefriends.org/faq_osx.html à Linux FAQs: https://www.apachefriends.org/faq_linux.htmlhttps://www.apachefriends.org/faq_linux.html

2 CSE 4701 Project-2 Project Phase II Instructions n Download Aptana Studio l Aptana Studio is a web development IDE rooted on Eclipse. You can use your preferred IDE for the project, it does not need to be Aptana. l Download: http://www.aptana.com/products/studio3/download.html http://www.aptana.com/products/studio3/download.html l You can download Aptana Studio 2, 3 or either as an Eclipse plugin. For the instructions on this guide, we will use the standalone (not the Eclipse plugin) version of Aptana Studio 3.

3 CSE 4701 Project-3 Project Phase II Instructions n Sample API (Slim Framework) l Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. l Slim Framework documentation: http://docs.slimframework.com/ http://docs.slimframework.com/ l See : TBD n Sample GUI Web-App (for CRUD operations) l A sample CRUD (Create, Read, Update, Delete) web-app that interfaces with the MySQL database to use. l See : TBD

4 CSE 4701 Project-4 Setting up a Sample DB n XAMPP bundles in PhpMyAdmin (http://www.phpmyadmin.net/home_page/index.php)http://www.phpmyadmin.net/home_page/index.php

5 CSE 4701 Project-5 Set PhpMyAdmin web-app n Go to: http://localhost/phpmyadminhttp://localhost/phpmyadmin n If you don’t use Port 80 – Use http://localhost:{yourport}/phpmyadmin; where {yourport} is the custom port.

6 CSE 4701 Project-6 Setting up the Sample API n Add sample_api, to you XAMPP’s htdocs folder n With sample_api in place: l Open Aptana Studio (or your IDE) l Click File -> Import l Select Existing Folder as New Project l Select a folder. Navigate to your C:/xampp/htdocs/sample_api folder l Give the project a name l Select PHP and Web - Primary as the project types l Click on Finish

7 CSE 4701 Project-7 Sample_gui – customers.php

8 CSE 4701 Project-8 Sample_gui – employees.php

9 CSE 4701 Project-9 Sample_api – index.php

10 CSE 4701 Project-10 Sample_api – index.php

11 CSE 4701 Project-11 Sample_api – index.php

12 CSE 4701 Project-12 New sample_gui_v02.zip sample_gui.zip. now contacts the sample_api via (/customers; /employees ) and grabs the result, decodes JSON into a PHP variable, and then loops n The important code there is this: n $jsonResponseAllEmployees = http_get("http://localhost/sample_api/employees", array("timeout"=>1), $info); // Need PCL for this $array = json_decode($jsonResponseAllEmployees);http://localhost/sample_api/employees The function http_get creates a GET request to the URL specified in the first parameter and grabs whatever the response is and stores it into the $jsonResponseAllEmployees n $info variable contains info on the request itself (not the response) in case debugging is necessary

13 CSE 4701 Project-13 Sample_gui_v02 – customers.php

14 CSE 4701 Project-14 Sample_gui_v02 – employees.php

15 CSE 4701 Project-15 Sample_gui_v02 – employees.php


Download ppt "CSE 4701 Project-1 Project Phase II Instructions n Download XAMPP l XAMPP includes: Apache, PHP, MySQL, and other goodies. No need to download and install."

Similar presentations


Ads by Google