JavaScript: Module architecture suggestions -
i wanna create website have left side search filter option panel, sort through data on website.
i thinking using revealing module pattern.
but should create module each filter options have there own filter logic -and create init module render selected filters?
what best module architecture in situation ? ?
thanks in advance.
no need use modules that. keep simple.
just use simple functions implement same "interface" (though there no concept of "interface" in js unless use typescript or similar language).
you can use library such lodash give lot tools define such kinds of functions , manipulate , compose them.
that implementation of filter functions though. application bit more complex that, may want check out how structure code of application if new you. mvc pattern start, bigger applications there other architectures may more suitable , want use framework react/redux or angular implement them properly.
Comments
Post a Comment