![]() Do not just place all of your overrides in one file and let it grow over time. In these cases, be sure to use best practices when applying the overrides. There will be times when it is necessary to override a class. Also, if you decide to upgrade to a newer version of ExtJS, there’s a chance your override will no longer work as intended. There’s a good chance you will introduce a few defects in the process. It’s important to understand that if you override a base class, the functionality will affect every instance of that class and any classes that inherit from it. Ext.overrideĮxt.override is a function that allows you to override classes and add or change any functionality you desire. When in doubt, the best code structure you can conform to is the ExtJS source code itself. A set standard will help fight against spaghetti code, promote reusability, and facilitate learning. Your source code should conform to a coding standard. Adding another folder in the hierarchy will have very little impact in the execution of the application, but has the potential to save some frustration. ![]() ![]() As the project grows and the number of views increases, more tiers should be added to your folder structure. Group views in sub-folders based on relevance and function. Placing every view under “views” in a directory is likely to cause headaches somewhere down the line, especially if a developer unfamiliar with the project needs to find the source of a particular view. Folder and Code Structureįirst, two pieces of advice that are not specific to ExtJS, but still helpful: Worse yet, performance issues may arise that can be tricky to deal with once they have a foothold within your application.Įquipped with some tips from Senchacon ‘13 and my past experience with ExtJS, I’d like to share some knowledge that will help you be proactive against these issues and avoid potential roadblocks. Your project structure might grow to become unruly, steepening the learning curve for developers new to the framework. If you are inexperienced or careless with your implementation, your development effort can quickly spin out of control. ExtJS is a powerful Javascript framework for developing rich Internet applications-but with great power comes great responsibility.
0 Comments
Leave a Reply. |