Using MVC, Web API, and JavaScript Create a website that has the following:
1. Landing page that displays a list of machines (name, description)
2. Each machine has a link to show its details. (Use Asp.Net MVC).
3. Display machine details and let the user enable or disable it (Use Asp.Net Web API).
4. Next to the machine details, show a list of "measurements" for the machine by polling the server every 3 seconds and append the measured information which is returned from the server (random number) to the list. (Use JavaScript + Web API).
Notes: Machines must be persisted in memory, having an initial set of 10 machines.
Data points for each machine don’t have to be persisted. Each machine has the following properties: Id, description and status (enabled, disabled)
Use bootstrap or similar for layout and styling.
Can someone give me the code for bove or point me to rsources on the web . I am completely new to MVC and any help is welcome
Thanks
ROHITJGC
Can someone give me the code for bove or point me to rsources on the web . I am completely new to MVC and any help is welcome
THis is a basic application. Please see tutorials from http://www.asp.net/mvc
Hi ROHITJGC,
ROHITJGC
1. Landing page that displays a list of machines (name, description)
2. Each machine has a link to show its details. (Use Asp.Net MVC).
You could refer to this article below:
# MVC Music Store
http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-1
ROHITJGC
3. Display machine details and let the user enable or disable it (Use Asp.Net Web API).
Just need to update the record in the database
ROHITJGC
4. Next to the machine details, show a list of "measurements" for the machine by polling the server every 3 seconds and append the measured information which is returned from the server (random number) to the list. (Use JavaScript + Web API).
Using jQuery AJAX to request the data.
ROHITJGC
Notes: Machines must be persisted in memory, having an initial set of 10 machines.
You could store the data in the session
ROHITJGC
Use bootstrap or similar for layout and styling.
Please refer to:
# Bootstrap Overview
You need to try it by yourself, if you have the issues, please create the thread for each issue.
Best Regards
Starain
I have completed the first 2 points
3. Display machine details and let the user enable or disable it (Use Asp.Net Web API).
First they dont want check boxes but Enable and Disable Buttons , I saw on below site
http://jameschambers.com/2012/07/bootstrapping-mvc-say-no-to-checkboxes/ but getting error
0x800a1391 – JavaScript runtime error: ‘$’ is undefined
Also How to use ASP.net Web API to do the edits??????
4. Next to the machine details, show a list of "measurements" for the machine by polling the server every 3 seconds and append the measured information which is returned from the server (random number) to the list. (Use JavaScript + Web API).
I have no idea about polling the server every 3 seconds what does this mean and How to append this information to a list
Hi ROHITJGC,
ROHITJGC
First they dont want check boxes but Enable and Disable Buttons , I saw on below site
http://jameschambers.com/2012/07/bootstrapping-mvc-say-no-to-checkboxes/ but getting error
0x800a1391 – JavaScript runtime error: ‘$’ is undefined
Also How to use ASP.net Web API to do the edits??????
For this error, you need to load the jQuery files.
About the issue of Web API, please post it to the
Web API forum.
ROHITJGC
I have no idea about polling the server every 3 seconds what does this mean and How to append this information to a list
Please refer to:
# JavaScript Timing Events
http://www.w3schools.com/js/js_timing.asp
# jQuery.ajax()
http://api.jquery.com/jquery.ajax/
Best Regards
Starain