icon-announce

Logic Engine

Check it on Codepen

Working in large org's doesn't always produce maintainable or easily collaborative works and when there's a bunch of peeps all pumping out interactive prototypes made up of patchwork code, the vector for inefficiencies is magnified.

Having inherited one-too-many projects where 'tweaking' the behaviour was consuming more time then structuring the experience, the process had to change. At it's heart, a prototype is to illustrate a flow by simplistically hiding and showing elements, so I set off to construct a 'simple' way of having the logic attached to the element rather then have it abstracted out to a script separated from the object.

The result allows logic to be applied to any element and accepts the target fields values and can be any variation of =, !=, OR AND. The code itself isn't overly efficient yet it achieves 90% of the hide/show functionality with a common language any of the team can see the read the conditions without too much background or having to decipher someone else's code #winning