Objects are in one hell of a state

State Pattern

  • Via an explicit external call to the object Person.
  • At the beginning of a call to a method of the object Person.
  • When running a method from one of its states.
  • Automatically based on the attribute values of our object Person.

Tips

 by the author.

--

--

--

Engineer / Software architect freelance — https://teknoo.software — https://www.linkedin.com/in/richarddeloge — #php #web

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Richard Deloge

Richard Deloge

Engineer / Software architect freelance — https://teknoo.softwarehttps://www.linkedin.com/in/richarddeloge — #php #web

More from Medium

Simultaneous work on the feature for frontend and backend developers

Elegant and readable randomness using Faker

Dev team productivity tips: Managing multiple apps at scale

Remote Working: Mythbusting With the Top Remote Dev Teams