Skip to main content

Posts

Console.log How to turn on/off console in development

How to turn-off Console logs? Traditional browsers doesn't support console object. This is one way to turn off console logs for your web application. How to switch off console object in Production? Call this util method when Ext application is ready. i,e inside init() or Launch() of Ext.app.Application class Example: init: function(app) { handleConsoleFn(false, false); } /* * Call once at begining to ensure your app can safely call console.log() * and console.dir(),even on legacy browsers that don't support it.You may not get useful logging on those browsers, * but at least you won't generate errors. * @params alertFallback if 'true', all logs becomes alerts in Legacy browsers like IE, if necessary (keep 'false' in production) * @params debugModeON if 'true', console object will be enabled, (keep 'false' in production) */ handleConsoleFn: function(alertFallback, debugModeON) { var me = this; if (typeof console ===...

ExtJS4 FAQ

Extjs 4.2 FAQ: What is Ext? The Ext namespace (global object) encapsulates all classes, singletons, and utility methods provided by Sencha's libraries. Ext is singleton object. Ext.Base – all classes inherit from Ext.Base. It provides basic low-level functionality used by all classes Ext.Class – a factory for making new classes Ext.ClassLoader – responsible for ensuring that classes are available, loading them if they aren’t on the page already Ext.ClassManager – kicks off class creation and manages dependencies Ext.ComponentManger -base class for all Ext components The onReady() function takes  a function as an argument. The onReady() function is called when the document is loaded and DOM is ready. Adds a function to be called when the DOM is ready, and all required classes have been loaded Ext.onReady(function () { }); - Ext.define to signal class definition to complete. Ext.define -> Ext.Class { Pre-Processors: loader - extends - mixins - config - Static...

Techno Links

Javascript ! http://www.w3schools.com http://www.javascriptkit.com http://codingforums.com http://javascriptinterview.blogspot.com http://www.dotnetfunda.com http://js-x.com http://www.quackit.com http://javascript.internet.com http://www.javascript-examples.com http://dhtml-menu.com http://www.javascriptbank.com http://www.comptechdoc.org http://www.jscharts.com http://www.javascriptguide.com http://www.1stwebdesigner.com http://www.bestpsdtohtml.com http://snippetdb.com http://www.jsworkshop.com jQuery ! http://api.jquery.com http://learningjquery.com http://jqapi.com http://jqueryui.com http://forum.jquery.com http://bassistance.de/jquery-plugins http://visualjquery.com http://jqueryfordesigners.com http://filamentgroup.com/dwpe http://downloadify.info http://appendto.com http://fuelyourcoding.com http://ui.jquery.com http://docs.jquery.com http://tablesorter.com/docs jQuery Blogs! http://jquery-howto.blogspot.com http://jqueryfordesig...

JavaScript Design Patterns

Javascript Design Patterns http://addyosmani.com/resources/essentialjsdesignpatterns/book/ References The Essentials of Writing High Quality JavaScript http://net.tutsplus.com/tutorials/javascript-ajax/the-essentials-of-writing-high-quality-javascript/ JSPatterns http://www.jspatterns.com/ jQuery Anti-Patterns for Performance & Compression http://paulirish.com/2009/perf/ How DRY Affects JavaScript Performance http://velocityconf.com/velocityeu/public/schedule/detail/21634 Object Oriented JavaScript http://www.packtpub.com/object-oriented-javascript/book JavaScript Patterns http://shop.oreilly.com/product/9780596806767.do JavaScript: The Good Parts http://shop.oreilly.com/product/9780596517748.do Pro JavaScript Design Patterns http://jsdesignpatterns.com/ Essential JavaScript Design Patterns For Beginners, Volume 1. http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/ Eloquent JavaScript http://eloquentjavascript.net/

EXTJS4 - 2015 Fiddles

EXTJS Fiddles (2015) Grid - Generate Fake store with pagination http://jsfiddle.net/prajavk/Ufeyw/ Grid - Reconfigure grids http://jsfiddle.net/prajavk/t2bVJ/ Grid - Load two stores, hide columns, apply state http://jsfiddle.net/prajavk/P7ES5/ Grid - row expander + grouping http://jsfiddle.net/89Ljt/ Grid - load child grid on row expander http://jsfiddle.net/prajavk/9t3JE/ Nested grid with row expander http://jsfiddle.net/prajavk/3TxkA/ Grid - Preselect checkbox grid http://jsfiddle.net/prajavk/97fXp/ Combo - two fieldsearch http://jsfiddle.net/prajavk/7j4uW/  Grid - cell click event loads child grid http://jsfiddle.net/prajavk/5eq3T/ Grid -Action column with checkbox event http://jsfiddle.net/prajavk/ZLmY6/ Ext.Direct simulator- load nested grids http://jsfiddle.net/prajavk/622kF/ Ext.Ajax comet simulator for continous response http://jsfiddle.net/prajavk/3msnf/ Hasone - model http://jsfiddle.net/prajavk/yLLuG/ Grid - simulate live data ...

The Basics of Object-Oriented JavaScript

What is the difference between undefined value and null value? undefined means a variable has been declared but has not yet been assigned a value . On the other hand, null is an assignment value . It can be assigned to a variable as a representation of no value. Also, undefined and null are two distinct types: undefined is a type itself (undefined) while null is an object. Unassigned variables are initialized by JavaScript with a default value of undefined . JavaScript never sets a value to null. That must be done programmatically.   "undefined" is   not  a reserved word in JavaScript. undeclared variables don't even exist undefined variables exist, but don't have anything assigned to them null variables exist and have null assigned to them //eg: undeclaredVariable = 1;  //undeclared, when a variable doesn't use var keyword var x = {}; // empty object var u; // declared, but undefined var n = null; // declared, defined to be null undeclar...

EXTJS Code Style Guide with examples

EXTJS Style Guide: -familiar and simple to learn -fast to develop, easy to debug, painless to deploy -well-organized, extensible and maintainable Naming conventions for ExtJS application: 1.Class Class name should be in CamelCased. Do not use underscores, hyphens, or any other nonalphanumeric character. eg: MyCustomClass Classes that are not distributed by Sencha should never use Ext as the top-level namespace. Class name should be with atleast one unique namespace separated by dot (.). eg:TopLevelNamespace.MyClassName The top-level namespaces and the actual class names should be in CamelCased, everything else should be all lower-cased. //Good eg:TopNamespace.midlevelnamespace.MyCustomClass eg:MyModule.view.UserGrid //Bad eg:MyCompany.useful_util.Debug_Toolbar  2.Use Namespaces to Group Related Components Namespaces should be based on directory structures. Directories should group components into logical modules based on functional business components. ...