Sep 22, 2020

ZEF Expression Language – Our first open source contribution

As we already mentioned, we plan to open source our core Convoworks library and make it available for other integrations. Managing an open source project is not a joke. There are whole lot things to cover expect development of some uber-cool new feature that everybody are waiting for. That’s why we decided to test-run and learn the whole process by extracting small reusable chunk as a standalone library and publish it on Github and Packagist.

ZEF Expression Language is the small improvement on Symfony Expression Language component that we developed to overcome some issues we encountered with it.

The first thing is that with it you can evaluate non existing values. Instead of throwing the exception in such case, now it will just evaluate missing value to null and evaluate the rest of expression.

The second improvement is not that much critical. It just gives you ability to use some shorthand syntax.
Instead of referencing an array items with the square brackets now you can use dot notation like in Javascript, meaning that

  • myarr[‘name’] === myarr.name

There is also shorthand when referencing object getters:

  • myobj.getName() === myobj.name
  • myobj.isValid() === myobj.valid
  • myobj.hasAny() === myobj.any

The both improvements are inspired with Java Unified Expression Language behavior.

Tihomir Dmitrović

Tihomir Dmitrović

Full stack developer with 20+ years of professional experience, specialized in solving complex problems in a scalable manner. Founded Convoworks, which is a GUI based tool for creating voice and chatbot applications through WordPress.

Feb 7, 2023  |  ,

A Fun and Easy Introduction to Working with GPT – Using Your WordPress Website!

You certainly could not miss the ChatGPT hype all over the Internet lately. No wonder, it is extraordinary technology…

VIEW FULL POST
ngrok logo

Jun 14, 2021  | 

Developing Alexa skills locally through WordPress with ngrok

In any sort of development, speed and flexibility are key. Having to wait one minute for a process to…

VIEW FULL POST