|
Some frameworks are opinionated and some aren't so it depends if youstructure.
are going to end up fighting conventions or not. I think just about
any framework with an MVC design pattern will group like code/objects
together and I even do that for my RPG stuff (which has no opinion).
Node itself I don't think cares about structure. It is what ever is
familiar to you, but in most cases my guess is that you'll follow
either a logical grouping of like code:
/Model
/View
/Controller
Or use a naming convention: model1.js, view1.js, controller1.js under
a single folder. My Java and Rails projects follow the convention
above; A structured, opinionated layout. My Node projects follow the
latter unless they use a framework that has it's own opinionated
--
I'd say with complex apps, MVC by folder groupings may be easier. For
small apps I'd keep it simple....
Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
Twitter - Sys_i_Geek IBM_i_Geek
On 1/11/2018 12:20 PM, Justin Taylor wrote:
Are there standards for how Node code should be organized? I
scaffold'd an Express app for R&D, and it gave me a dir structure.
I'm just not sure where my various bits of code should go.
Thanks
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To
post a message email: OpenSource@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
https://archive.midrange.com/opensource.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.