Success/Error Design Pattern For Ajax

‘Success/Error’ design pattern for Ajax requests is a JSON encoded string in a specific format – each response has a minimum of two elements in it – ie ‘success’ and ‘error’ – like this…

{
"success":"Task done successfully",
"error":false
}

OR

{
"success":false,
"error":"Database Connection Error!"
}

This method is used extensivly in Nexty. Almost all Ajax response in Nexty ares in this format.

Since this is in the JavaScript domain, I thougt it might be better to pubish the details in my OpenJS site. Read more about Success/Error Design Pattern For Ajax.

About Binny V A 102 Articles
Freelance Web Developer on the LAMP Platform. Maintains a blogs http://blog.binnyva.com/. Other sites include Bin-Co and OpenJS

Be the first to comment

Leave a Reply

Your email address will not be published.


*