Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJs best practices

it seems that most ExtJS books and ExtJS introductions just focus on showing all the nice features but most of them don't really explain how to build stable, maintainable layouts / applications with ExtJS. And how to write them without creating an unreadable mess...

I've no specific application in mind, I'm just wondering how I can "beatify" my ExtJS code. So if you need an example, a "regular" application for item management (library) or something like a job board would best describe what I was thinking of.

So can anyone share some good links or advices on how to structure such applications when I want to build them with ExtJS for the client side code?

Thanks in advance, Cheers

like image 685
pagid Avatar asked Jan 22 '11 20:01

pagid


1 Answers

In my company main code reviewer enforcing:

  • As component always talk to PAPA - never to you sibling (own children offcourse allowed)
  • Try to avoid bubblling
  • If you follow #1 you do not have need to use Ext.getCmp () it too expensive, so DO NOT
  • Consider each component reusable by someone else in your team
  • Use proper hierarchy in namespaces (and use namespaces)

As only a few main rules on top of follow documentation... :)

like image 189
bensiu Avatar answered Sep 16 '22 23:09

bensiu