javascript - File structure preference -
javascript - File structure preference -
i'm young developer , i'm trying best practice down.
i hope question isn't subject much sentiment , can standard reply here.
basically have big ol' js file wrote, couple one thousand lines long. there 3 main types of things? (objects?).
exported functions utilize on node.js server manipulate info submitted variables used exported functions , else functions called exported functions in file , else.i'd split them don't have scroll much when making edits. in head create sense have 3 files, "exported functions" file calling variables , functions needs on top.
is mutual practice? there best way phone call variables , functions file? advice here appreciated.
as long you're asking preference that's gonna get. today want share part of personal experience programmer that's why i'm writing reply rather commenting.
modular programming goodas long software can managed , modified ease maintain is. if starts become cumbersome consider oop.
structured flexibilitythe real powerfulness of oop lies in flexibility create programme easy implement because planning done beforehand. help of uml diagrams can decide how best represent application.
oop acronymsthe scaring part of oop acronyms, take sometime digested , may sound scary. those acronyms help think of software improve perspective in long run.
consider design patternssince javascript not real oop language used think design patterns not applicable it. indeed, patterns more solving problems teaching best practice. consider structural patterns inspiration.
programming journeybecause you're young believe have plenty of time making mistakes , learning them. create decision. seek something. learning curve boost in right direction.
finally, remain close stackoverflow. there's much larn around here.
javascript node.js file-structure
Comments
Post a Comment