React: initial project setup, structure and architecture

Starting with React is quite easy. You just need to install the npm package and can create your components. However, unlike Angular, React is not providing a whole ecosystem which comes with a architecture and everything necessary like router, module system, components, templates already prepared for immediate start. Angular is a framework, whereas React is a library for creating ui interfaces! This is a huge difference (framework vs. library). In this short article I show an example architecture which you can use, if you don’t know how to structure your app.

Continue reading “React: initial project setup, structure and architecture”

PHP: Installation of newest package version vs. update package

There is the little bit misleading composer command: composer update. It also allow to only update 1 to n packages with composer update package1 package2 (package names as arguments. Howevery, there is a constraint to be considered! composer update is updating the packages within the defined requirements – thus it is not updating the package.json!

If you want to install the newest package version, you must add the package as a new requirement with composer require. This way the newest (or older version if dependencies are blocking the newest) package will be used. composer install overwrites the package.json.

Custom deployment of Angular applications within your Continuous Delivery

Angular provides already a ng build command as well as an option for production environment. But how can this be transfered to your existing continuous delivery infrastructure. Imaging you have got a Bamboo or Jenkins responsible for building and deploying your software application.

Continue reading “Custom deployment of Angular applications within your Continuous Delivery”

String comparison failure

Expected “this is a string for 2.000 €” is not equal to “this is a string for 2.000 €”

If you are writing tests and have string comparisons done, it can be sometimes tricky. Common problems are:

  • character encoding, eg. UTF-8 vs. ISO 8859-15
  • whitespace or non-visible (in your editor) characters at the end/beginning
  • non-breaking space characters, eg. in the example above between amount and currency