Home Page > > Details

Help With COMP3322A Assignment, NodeJS/Express Assignment,Java Programming AssignmentDebug ,Help With Java Course Assignment C/C++ Programming|Debug Matlab Programming

tag)
1.2 When a mailbox link in the mailbox division is clicked, retrieve your specified
number of the newest emails in the corresponding mailbox from the server side and display
them in the email division, order them in reverse chronological order, and display the
corresponding function buttons in the function division. (Hint: use the JS event onclick).
1.3 Whenever “<” or “>” is clicked, newer or older emails in the corresponding mailbox
(of your specified number) will be retrieved and listed in the email division. (Hint: use the JS
event onclick).
1.4 Implement AJAX codes in the event handler functions to communicate with the
server for retrieval of emails from the database.
2. Server Side.
In app.js, create the following middleware to handle requests from the client side:
x HTTP GET requests for http://127.0.0.1:8081/retrieveemaillist. In the middleware,
HTML
retrieve information of a number of emails in the respective mailbox from the emailList
collection in the database, according to the request from the client, and send them to
the client (note that only necessary information for the email list display should be
retrieved and sent to the client, e.g., the email content is not retrieved/sent). You should
decide what data the HTTP request should carry for the server side to retrieve emails
from the database accordingly, and the format of the data sent back to the client in the
response body.
Task 3 (15 marks) Display email content
When you click each email entry in an email list display (on sender/recipient, title or time), a
request will be sent to the server, which will retrieve the content of the email from the
emailList collection in the database, and send it back to the client. The client should display
the content in the email division, replacing the email list, in the format as shown in Fig. 3.
This should not cause reload of the entire web page as well.
Fig. 3
On this page view, when “<” or “>” is clicked, the content of the previous (i.e., immediately
newer) email or the next (i.e., immediately older) email in the same mailbox will be retrieved
and displayed. If the current email is the newest one when “<” is clicked or the oldest one
when “>” is clicked, the page view remains unchanged.
1. Client Side.
Similar to Task 2, you should decide the JS events to trigger, implement the corresponding
event handling AJAX code on the client side.
Email ,
2. Server Side.
In app.js, create the following middleware to handle corresponding requests from the client
side:
x HTTP GET requests for http://127.0.0.1:8081/getemail. In the middleware, retrieve
information of the specific email from the emailList collection in the database, according
to the request from the client, and send them to the client. You should decide what data
the HTTP request should carry for the server side to retrieve the correct email from the
database accordingly, and the format of the data sent back to the client in the response
body.
Task 4 (20 marks) Move emails
To the left of each email entry in an email list display, there is a checkbox, which you can click
to check and uncheck. When the web page is displaying a particular mailbox view, after you
select some emails in the email list and select an entry in the drop-down list of “Move to …”,
a request will be sent to the server to update the “mailbox” field of the corresponding email
documents to the selected mailbox correspondingly.
After these updates have been successfully done on the server side, the server will further
retrieve information of Y older emails (if you moved Y emails in the current email list display),
and send them to the client. On the client side, you should remove the selected email entries
from the email list display in the email division, and append the Y newly retrieved email
entries to the bottom of the list, such that the total number of email entries displayed is still
the same as before (or smaller only if all older emails have been retrieved). All these should
not cause reload of the entire web page as well.
On an email content page view as shown in Fig. 3, if you select an entry in the drop-down list
of “Move to …”, the current email being displayed should be moved to the selected mailbox,
i.e., a request should be sent to the server to update the “mailbox” field of the
corresponding email document to the selected mailbox. Then the page view should go back
to the email list display as shown in Fig. 1 or Fig. 2, showing the first page of emails in the
mailbox which the moved email originally belonged to.
1. Client Side.
Similar to previous tasks, you should decide the JS event to trigger, and implement the event
handling AJAX code on the client side.
2. Server Side.
In app.js, create the following middleware to handle corresponding requests from the client
side:
x HTTP POST requests for http://127.0.0.1:8081/changemailbox. In the middleware,
update the mailbox field of the corresponding email document(s) in the emailList
⽤ POSE ⽅
_
response ⽤ get
collection, according to the request from the client; then retrieve information of emails
according to the email list to be generated on the client side, and send them to the client.
You should decide what data the request should carry for the server side to update the
email document(s) accordingly, and the format of the data sent back to the client in the
response body.
Task 5 (15 marks) Compose new email
When the “Compose” button is clicked, the page view should be as shown in Fig. 4. The “Move
to …”, “<” and “>” buttons should be disabled on this page view. You can compose a new email
message on the page; when “Send” is clicked, a request should be sent to the server side for
inserting a new email document into the emailList collection, containing information of the newly
composed email. Upon receiving success response from the server side, the page view should go
back to the email list display as shown in Fig. 1 or Fig. 2, showing the first page of emails in
the mailbox – the one whose email or email list you were viewing before clicking the
“Compose” button.
Fig. 4
1. Client Side.
Implement the “To” and “Subject” fields using text input boxes and the message content field

Contact Us - Email:99515681@qq.com    WeChat:codinghelp
Programming Assignment Help!