Energize your Web applications with the OutgoingMessage Class
In today’s digital world, a smooth and intuitive user experience is key to any web application’s success. A critical part of this experience is providing users with easy access to various resources—whether documents, images, or other data types. To make this possible, your server must manage and deliver different content formats efficiently.
With 4D’s 20 R7 new REST server feature, managing diverse content delivery is now easier than ever. Previously, the REST server could only return scalar, entity, or entity selection data. Now, it can deliver full web content directly—content ready for a browser to handle.
Downloading files or receiving binary data from the REST server is now straightforward, thanks to the new OutgoingMessage class. With it, you can easily customize responses to suit your needs.
Read on to explore how the OutgoingMessage class can enhance your application!
Introducing Session Singletons
Singletons have been one of the standout features of 4D 20 R5. Previously, developers could leverage two types of singletons:
- the process singleton, which is unique to each process but different across processes,
- and the shared singleton, which is unique across the whole application.
With 4D 20 R7, we are releasing a new type of singleton: the session singleton!
REST and Qodly Support of Singletons
With 4D 20 R5, we released singletons. And with 4D 20 R6, we now allow you to directly call the exposed functions of your shared singletons through REST calls. Similarly, you can use the exposed functions of your shared singletons in events when designing your Qodly Pages. Let me delve deeper into these new capabilities.
Shared Classes
Do you want a simplified way to use shared objects, following the classic object syntax and automatically calling use/end use when needed?
Fasten your seatbelts; here come the shared classes!
Singletons in 4D
4D 20 R5 delivers a powerful feature for developers: Singletons!
The singleton design pattern creates a single instance of a class accessible throughout your application.
This pattern offers many benefits, including:
- host for interprocess values,
- utility classes,
- a base for the factory design pattern,
- and many more.
Keep reading for more information about this new concept!