- The more code you have the more possible to make errors and the more code you have to maintain.
- Use Plugins are around to make life easier after all to write less code
- Never write html code in the js files , always put html code in html file , and access html element in jquery .
Object Oriented Programming - Don't put Parent Class in the Child Class , always pass the data to the child class from the Parent Class. e.g. App is parent Class then App should not be in the Child Class . Because it is the method of abstraction.
- Put the Code related to the Class only in Class else put in Project (App) Class of the Project.
- To Pass the Parent Class use the context .e.g. for passing config variable to the child class.
- Each Class is separate entity and should be complete,not dependent on any class and should not give error if something changed in other class.
- Best OOPS Principles http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
- http://www.dofactory.com/Patterns/Patterns.aspx
Tuesday, November 16, 2010
Best Coding Practices
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment