Points 200
PHP-to-NodeJS + NodeJS + Database
....YOU ARE GOING TO WORK In your group teams on this project (up to 3 people max) that you were assigned to
router.post("/storeData", ControllerDatabase.storeData); //note sometimes the router object in our sample code and in the book is called app
//note you will have had to define the ControllerDatabase before this to point to the Controller code located in controllers/database
- Read in ALL the POST data comming from your finalOrder.php into this as a POST request
- Open up a connection to your mLab MognoDB database that you created (see ITEM 5)
- Write to the ORDERS, BILLING, CUSTOMER, SHIPPING collections-the corresponding information you read in from the POST request data
- Close the connection to your database
- will render a storeData.ejs (in views directory) that will return the content of the order with a "THANK YOU FOR YOUR SUBMITTED ORDER" MESSAGE ON THE TOP that is NICELY formatted --this response will be returned to the calling finalOrder.php program. Note: the storeData.ejs will be a formatted output (html with ejs) that displays the Order summary.
- NOTE1: each time this function is called it will always write a new document in CUSTOMER eventhough they may already exist --we are not going to first check if it is in the database already or require some login to identify --while for a "real" system you most definitely would do this we dont have time to fully implement a real solution --and frankly it is more of similar programming
|
The output of this PHP and EJS program(s) as well must keep the same style of the web site
Order Validity
Your PHP program must only check that some kind of data has been entered into the forms, if it is blank your program for the time being can use some default values for the missing fields.
SECTION 1) DESCRIPTION SECTION: Word document containing one-page (not 1 sentence!!!) description of how code is structured and how it works. You must list the name of EACH PHP file and NoeJS (e.g. A.pl) and give a description. GIVE URL TO your website!!!AND LIST ALL THE PEOPLE IN YOUR GROUP --- every person in the group must turn in ALL the deliverables and everyone recieves the same score unless a student did not participate at all and then it is at the instructors discretion.
SECTION 2) CHECKOUT PROCESS: containing series of screen shots from web-browsers showing the processing of the series of forms used in the check out process.
SECTION 3) DATABASE RESULTS FROM ORDERING:Printout of database BOTH before and after the order from item 2 was made. (you can do screen shots showing before an after of ORDERS collection in your GUI admin tool on mLab..in this case you will need to turn in a word document). Label the Before and After data (or screen shots) --- I MUST see the new entries in ALL of the collections. LABEL each picture BEFORE or AFTER.
- for collection CUSTOMERS
- for collection BILLING
- for collection SHIPPING
- for collection ORDERS
SECTION 4) STATUS: here you must state what pages and requirements you have implmemented and ESPECIALLY TELL ME what you have not finished or is not workin