Glancer_Test
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
This directory is for scripts that are either front-end scripts called by HTML interfaces, or are simple string manipulators called by the backend.
In this application, we have different directories for /controllers and /utils:
Aspect | Controller | Util |
---|---|---|
Purpose | Orchestrates business logic and workflows | Provides small, stateless helper functions |
Scope | High-level, often involves services or side effects | Low-level, narrow in focus (e.g., string, date ops) |
State | Works with application or user-specific data | Stateless – input in, output out |
Output | Often returns domain-specific result objects | Returns generic, context-agnostic values |
Example Names | syncDataToNotion , generateUserReport | formatDate , slugify , chunkArray , debounce |
Depends On | Services, repositories, other controllers | Pure logic, no external dependencies (ideally) |