0

We have a project implemented using ASP.NET MVC 4. it is a multi page application.

We use jQuery for handling client side interactions. Now the js file has a lot of callback functions. Is there a better way to define and manage them?

Can you suggest any js library to define these callback functions and to handle the response from the server?

I have gone through backbone js and knockout js. it has been mentioned that it is extremely useful in organizing single page applications.

Would it be helpful in our project (which is a multi page appilcation) or will it cause an overhead?

Vijayasarathy
  • 43
  • 1
  • 7

2 Answers2

0

I am not understanding your question clearly. Are you looking for reduce the no of files? what you are mentioning here for the term Organize. Here i added points for improving performance

Hope this will be useful,

  1. Make the repeated functionalities as a common function and differentiate with various parameters or flags.

  2. Reduce the new variables creations mostly.

Nagarajan
  • 432
  • 3
  • 12
  • 28
  • The js file has a lot of callback functions. is there a better way to define and manage them? can you suggest any js library to define these callback functions and to handle the response from the server. – Vijayasarathy Sep 30 '13 at 09:53
0

I think this will be useful,

Node.js: What techniques are there for writing clean, simple callback code?

See "Trevor Burnham" answer. Also see the links given here.

Community
  • 1
  • 1
Nagarajan
  • 432
  • 3
  • 12
  • 28
  • can we use plugins like jQuery Observable so that based on the response status we receive from an AJAX response, we can execute our desired functions? – Vijayasarathy Sep 30 '13 at 11:12
  • can we use Amplify.js - which provides methods to facilitate the Publish and Subscribe messaging pattern for handling the callbacks? – Vijayasarathy Sep 30 '13 at 14:50