Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
45 views2 pages

Client Side Development Exercise

Client Side Development Exercise by Mosh Hamedani learn Client Side Development from this small document which is one of the best document.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views2 pages

Client Side Development Exercise

Client Side Development Exercise by Mosh Hamedani learn Client Side Development from this small document which is one of the best document.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Client-side Development By: Mosh Hamedani

Exercise
1- Add DataTable plug-in to the list of movies so we get searching, sorting and
pagination out of the box.

2- DataTable should be fed using the API you built in the last section (/api/movies).

3- Remember to remove all the code for rendering the list of movies on the server. (That
includes both the controller and view code).

4- This exercise requires modifying the movies API to return genre. So you need to
create a separate DTO for that and configure AutoMapper accordingly.

5- Add a delete column with a link to delete a movie. Use Bootbox to display a
confirmation box and use jQuery to call the movies API.

Approach
As always, one step at a time.

1- Add the DataTable plug-in first without using the movies API as the data source.
Ensure the plumbing code works even when you generate the movies on the server. If
that works, then modify the DataTable configuration and supply an AJAX source.

2- Modify the DataTable to use movies API as its data source. Do not worry about
deleting movies. Do not worry about eager loading genres. Just ensure that you can get
a simple table rendering with what you currently get from movies API.

3- Once that works, return genre from movies API and add it in the table.

4- Add a delete button in the third column of the table. Use native JS confirm method
and make sure when you call the delete link, confirmation box is shown. Do not worry
about calling the API.

1
Client-side Development By: Mosh Hamedani

5- Once that works, call the API to delete the movie.

6- Once that works, replace the native JS confirmation box with Bootbox.

7- Finally, remove the corresponding record from DataTable.

You might also like