Home     |      Learn AJAX     |      Forum     |      Register     |      Submit Resource     |      Submit Article      |      Contact Us

Home AJAX-Tools
 

Dealing with Console.log

 

Firebug has always been one of the most favorite tools among developers. This small development tool can easily outdo other debugging tools because of its ability to directly deal with the application online. The code will be extensively scrutinized and would be compared to actual online performance. In an Ajax based application, it can significantly weed out unnecessary spaces and functions to speed up the data processing.


But even though firebug is a very important function, certain limitations have to be placed by developers in their code as soon as they are done dealing with firebug. Without additional limiting codes and functions, the application might not be able to work as expected and might not even work at all.


That is why a solution has been recommended by some developers. To better understand the problem, the main source of concerns for developers in dealing with Firebug is the console.log. It would offer the browser a good idea of the application but it will confuse the browser at the same time.


Console.log Solutions

There are two types of solutions in dealing with console.log in an Ajax – the long version and the short version. Each has their own advantage and disadvantages that could be considered by developers.


The Long Version

Dealing with console.log the longer way entails specific reaction to different functions. You can use the log/warn/error/info functions so the application would have the appropriate reaction to any errors. If there are any errors, the application would have the right function which will prevent the application from going down.


This is highly recommended for those who wanted to work with Firebug aggressively. Since Firebug will be extensively implemented in all functions of the applications, it is just correct to properly outline the reaction of the function.


On the other hand, the log/warn/error/info functions could take a lot of time and would use a lot of resources just to be implemented. This would seemingly make the application a lot more complicated since there are thousands of additional lines to consider. If you are not careful on how you deal with firebug and the additional functions, don’t do it at all.


The Short Version

The shorter and probably the better version in dealing with console.log is to use the EmptyFunction. By this function, it will wipe out all functions that will come with console.log. You should expect a smooth transition of your application without any problem.


On the other hand, what you should remember is that this will not completely address the problem. If you only use firebug in a very limited function, this solution could be your perfect solution. The best part of Firebug is that it could be implemented in smaller functions.


These are your options in dealing with console.log. The long way will give you a lot of security and assurance of functionality. On the other hand, the short way is perfect for those who wanted to use firebug in a limited functions. Just make sure you are properly implementing the techniques to ensure a quality Ajax based application.



Read Next: Working with JsonML



 
Related Topics


 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links