Some encapsulation about the common functions of the page?

question: in some current projects, such as the first column of the first row of the table is fixed, the form radio and all selections are implemented by themselves using js (not considering using the framework for the time being). So how to effectively encapsulate public methods? Make it possible to reuse in many projects. I have seen a lot of js object-oriented programming, but there is still not a clear idea to encapsulate the existing functions, so how do you improve your ability in this area?


jquery source code is absolutely useful
recommends a book "single-page Web application JavaScript front-end to back-end" this book does not use a framework, all use oop to achieve a spa application, even if you are using the framework I recommend this book to explain the principles of spa.
these two reading levels have definitely soared, and what's left is to accumulate
PS:
if you can, it is recommended to learn an oop language, a functional language, and you can learn a lot of experience from other languages

.
Menu