Does validation in CQRS have to occur separately once in the UI, and once in the business domain?

I think my question has just been solved by another article, Clarified CQRS by Udi Dahan. The section “Commands and Validation” starts as follows: Commands and Validation In thinking through what could make a command fail, one topic that comes up is validation. Validation is different from business rules in that it states a context-independent … Read more

What’s the least redundant way to make a site with JavaScript-generated HTML crawlable?

Why didn’t I think of this before! Just use http://phantomjs.org. It’s a headless webkit browser. You’d just build a set of actions to crawl the UI and capture the html at every state you’d like. Phantom can turn the captured html into .html files for you and save them to your web server. The whole … Read more

Is it possible to share a masterpage between MVC and webforms?

You can absolutely share the same master page. Your MVC master page must simply point to the WebForms masterpage via its MasterPageFile attribute. This applies your WebForms MasterPage styles to your MVC MasterPage. I am using this setup in production. The declaration on my MVC Master Page, pointing at the Web Forms Master Page: <%@ … Read more

Gulp task with different source depending on arguments

You were on the right track with your second try, just needed to utilize a bit of DRY and closures function createTransformTaskClosure (destination) { return function () { return gulp.src(config.sourceJSX) .pipe(gulp.dest(destination)); }; } gulp.task(‘dev’, createTransformTaskClosure(config.output_development)); gulp.task(‘prod’, createTransformTaskClosure(config.output_production));

How to specify version in only one place when using pyproject.toml?

After you have installed your project – either in editable mode by poetry install or from the wheel – you can access several metadata via importlib.metadata (importlib_metadata for python < 3.8). So keep the version only in the pyproject.toml and use this in your python code: import importlib.metadata __version__ = importlib.metadata.version(“mypackage”)