Category: PHP, api, javascript

In almost any Web-application there is some set of values that are used on both backend and frontend parts. Sometimes there are some user input validation values that are used at the same time in frontend and backend input validation.

The vast majority of modern Web-applications consist of frontend and backend parts.

Here constants are set in backend code and a special backend API method is created which the frontend part uses to get shared constants.

On the other hand, code generation on Web-request is easier to implement as it is enough to have reflection mechanism in the programming languages used by backend in order to get shared constants values defined in some part of backend code.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners