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

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4530a-44b06.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4530a-44b06.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?