ÐΞV Experiences by Serendipity HQ

Value Objects, Immutable objects and Doctrine Embeddables

3 July 2015 by Aerendir 7 Comments

I was thinking about some entities I need, when I came across a very interesting concept: Immutable Objects.

The Immutable Objects are very handy to manage the so called Value Objects.

In the Domain Driven Design (DDD) properties of an Entity can have two different values: other Entities (Order->getProduct() – here Product is an Entity and its properties can change) or simple values (Product->getPrice()).

Price, in our example, is a simple value, not conceptually an Entity. Until now, it probably is a simple property in your Entities (as it was in mine!).
But, in this second case, the Value Objects play their parts: they represent those values in an immutable state.

In fact, if you reflect about the data Price , you realize that a Price is something like “100 Eur”. If you put your attention on the value, you can recognize more than one smaller parts in it: a numeric value – 100 – and a string value – Eur.
A Price is a Price only if we indicate both the numeric part of it (100) and the string part of it (Eur): If we indicate only one of the two, it is not a Price because we don’t know how much money does it represents or in which currency the price is expressed.
So we need both the “amount” and the “currency” to have a real value. Think it as a “composite value”.

And the important thing to consider to understand what Immutable stands for: if in the Price we change the amount, we have a different price. If in the Price we change the currency, we have, again, a different price.
But if in a Product we change the Price, we don’t have a different Product but the same one with only a different Price.

Read more

DoctrinePHPSymfony

Deploying a WordPress CMS website to Google AppEngine Cloud Platform

21 August 2014 by Aerendir Leave a Comment

Deploying a WordPress website to Google AppEngine is something documented by Google itself.

Anyway, this guide illustrates you in details all the steps you need to take to have a WordPress website up and running on the Google’s Platform, integrating this procedure into the bigger one of the continuous deployment of WordPress websites and extensions.

Please, if you like, feel free to comment with links or instructions that you think are useful (all comments, obviously, will be patiently and meticulously evaluated).

Read more

Google AppEnginePHPWordPress

Deploying a Joomla! CMS website to Heroku

13 July 2014 by Aerendir Leave a Comment

Install Joomla! CMS on Heroku is an operation quite simple if you know the steps to follow.

This guide for developers teaches how to deploy a Joomla! CMS website to Heroku, explaining commands and guiding the reader step-by-step through the Installation and configuration process.

Read more

HerokuJoomla!PHP

  • « Previous Page
  • 1
  • 2
  • 3
  • Languages
    • PHP
    • Javascript
  • Tools
    • Symfony
    • WordPress
    • Amazon Web Services
    • Docker
    • Heroku
    • Genestrap
    • Google App Engine
    • Apache
    • Doctrine
    • Webpack
    • Webpack Encore

We are proud of

  • Genestrap
  • AWS SES Monitor Bundle
  • Commands Queues Bundle
  • Stripe Bundle
  • Features Bundle
  • PHP Value Objects
  • PHP Text Matrix
  • PHP Array Writer
  • Then When
  • Stopwatch Component
  • Console Styles Bundle Component

Star us on GitHub

About Serendipity HQ
Make. Ideas. Happen.

Serendipity HQ is the digital company providing digital solutions to "wannabe digital" entrepreneurs.

  • Deeply involved in the open-source world contributing with tons of lines of code;
  • Follows the latest best practices and uses the newer technologies in the tech scene;
  • Has an open-mind that always puts it at the cutting edge of technology and the digital world.

Make. Ideas. Happen.

Make. Ideas. Happen.

Il nostro network

  • eCommerceRS.NET, Commerciante, vendi on-line!
  • Commerciante, dimostra che sei affidabile!
  • Dal 1907, complici di un sicuro successo
  • PayPal
  • Visa
  • Visa Electron
  • Mastercard
  • American Express
  • Postepay
  • Discover
  • JCB
  • Serendipity HQ è un sito sicuro
  • Serendipity HQ è protetta da certificazione digitale
  • ÐΞV Experiences
  • Chi siamo
  • Lavora con noi
  • Privacy Policy
  • Cookie Policy
Copyright © Serendipity HQ. Via Papa Giovanni XXIII, 6 - 84014 - Nocera Inferiore (SA).