Digital Craftsman
  • Search
Sign in Subscribe
javascript

JS: The Right Way

  • Christian Kolb

Christian Kolb

02 Feb 2014

A quick reference to best practices for writing JavaScript — links to code patterns and tutorials from around the web

JS: The Right Way

Read models with native queries and the Symfony serializer

Read models with native queries and the Symfony serializer

UPDATE: I've released a package to handle those cases: https://github.com/digital-craftsman-de/deserializing-connection I'm using CQRS in all my projects. It enables me to have processes that are very easy to understand and are independent from each other. As every endpoint has separate read models,
12 Jan 2024 4 min read
Using Nowdoc instead of single or double quotes for Postgres queries in PHP

Using Nowdoc instead of single or double quotes for Postgres queries in PHP

When using aliases in a Postgres SQL query, you need to use double quotes in your query. $sql = ' SELECT facility.facility_id AS "facilityId" FROM facility '; When using strings (for example to build JSON objects), you need to use single quotes in your query. $sql = "
03 Jan 2024 2 min read
Automatically register doctrine types in Symfony with compiler pass

Automatically register doctrine types in Symfony with compiler pass

I'm using more and more value objects in my projects. To integrate them with doctrine, I also create custom doctrine types. Usually you have to register them manually one by one. But you can also register them through a compiler pass to make your live easier. To register
19 Sep 2023 1 min read
Digital Craftsman © 2025
  • Datenschutz
  • Impressum
Powered by Ghost