Open davidvoler opened 5 years ago
Thanks, @davidvoler .
If I understand correctly, by Generator you mean a function that returns the page content (represented as a Hiccup data structure, probably).
This seems like the straightforward way to do what we want imho.
It returns a webpage with a hiccup template, but also takes care of packaging requires js and css.
Do we need a generator at vip-repl? The generator is a software component, part of the architectural design, not necessarily a microservice. In many frameworks and libraries (is vip-repl a framework? or a library? this is a question for another discussion) you have a mechanism to generate pages, Django, for example, has the view/template mechanism, angular, which is a client-side mechanism has a similar view components mechanism. The idea is that that you combine data, configuration, and design to produce the view. In other words data, HTML, CSS and functionality the generate the final view. The generator is implicit when you call the vip-repl API and ask to create a map and a chart and a single filter (zoom in and out) that controls both the chart and the map. The following tasks are done by the Generator:
What if we work without a generator? Do we need to load all possible JS/CSS libraries we support - as we do not know which of them we are going to use? Use Clojure script to generate visual elements and functionality ( it is a generator only implemented on the client side)?
Let me know your comments