Earlier quoted context omitted.
my framework of choice is aurelia. it is probably as fully featured as vue, but at a glance its templating and minimal need for glue code makes it look more similar to dagger.js than vue, to the point that i think it should be easy to convert from aurelia to dagger.js and back. like vue, by default aurelia uses a build step, but serving it directly from a CDN or your own server is possible. i am actually working on a…
Aurelia is a great framework — I really like the way it ties template, JS, and CSS together into one unit. That convention makes it very natural to organize components and reduces boilerplate. You’re right that dagger.js takes a different approach: it treats HTML, JS, and CSS as independent modules that you explicitly wire together. The reason is to keep everything buildless and decoupled — you can serve each piece d…
aurelia doesn't need a build step to wire things together. nor does it remove transparency or flexibility. because you can still specify all parts explicitly if you want to.
it should not be hard to create a function that does the same for dagger.js:
a configuration like this:
{
"remote_view_module": {
"uri": "./thispage.html",
"type": "view"
},
"remote_style_module": {
"uri": "./thispage.css",
"type": "style"
},
"remote_script_module": {
"uri": "./thispage.js",
"type": "script"
},
"remote_json_module": {
"uri": "./thispage.json",
"type": "json"
}
}
can easily be generated with a function: function load_modules(name) {
return {
"remote_view_module": {
"uri": "./"+name+".html",
"type": "view"
},
"remote_style_module": {
"uri": "./"+name+".css",
"type": "style"
},
"remote_script_module": {
"uri": "./"+name+".js",
"type": "script"
},
"remote_json_module": {
"uri": "./"+name+".json",
"type": "json"
}
}
}
thus reducing 18 lines to one: load_modules("thispage")
anyone who needs the flexibility can still specify the parts they want to wire together manually. this is just about making the default easier.you could even allow some names to be specified and still reduce the code a user needs to write:
load_modules({ name: 'thispage', style: 'other.css', json: undefined })
that would use 'thispage' as the default name, but override the style and remove json.