by Elijah Manor
The front-end and back-end of your application inevitably progress at different speeds. In order for each layer to develop independently it is optimal if the front-end piece can work regardless of the back-end, which is where the Mockjax plugin comes in. Mockjax can intercept and simulate ajax requests made with jQuery with minimal effort and impact to your code. Another tool that works well with Mockjax is mockJSON which provides a random data templating feature. This can be very handy when you want to mock a JSON response from a AJAX call, but instead of manually building the response you can build a template to do it for you.
As you are developing, Mockjax can also be used to help Unit Test your front-end code. You can setup a static mock responses to your requests and then Unit Test your Ajax success and fail event handlers.
United States United States, Mountain View
16th–17th April 2011