New in4D 20 R10

AI — 4D Vector

AI — 4D Vector

Model meaning directly in your data

Start building smarter, more responsive experiences by storing AI-ready vectors directly in the new 4D.Vector object. These aren’t just numbers—they’re compressed representations of meaning, designed for comparison. And that makes all the difference.

Instead of searching for exact words, respond to what users actually mean. Serve the correct HR policy when someone types “employee exit”. Surface the right supplier contract from a vague query like “printer service”. Detect near-duplicates across inconsistent product listings—even when phrasing differs wildly.

It’s all possible because the new 4D.Vector class brings built-in operations like cosine similarity, dot product, and euclidean distance to your app. These let you rank, filter, and group records by conceptual similarity—not just string matches.

And because the class is both memory-efficient and class-compatible, it integrates directly into your schema. Add it to typed fields, run fast, local comparisons, and skip the middleware entirely.

More on 4D.Vector

4D AI KIT

4D AI KIT

Generate vectors from natural language in one method call

Start with the words your users already type — queries, descriptions, notes, logs — and transform them into something your app can reason through. With a single method call, OpenAIEmbeddingsAPI.create(), generate semantic vectors from plain text.

These aren’t strings. They’re meaning, encoded. Store them in the 4D.Vector fields and use them immediately: rank results by intent, match related items, classify context—all from within your 4D code.

No extra setup required. No API plumbing. Just connect to any compatible cloud-based AI service like OpenAI — or to locally running AI models like Ollama — and start using the same AI infrastructure that powers today’s leading products.

More on OpenAI vector integration

4D ORDA

ORDA

Add lifecycle awareness to your data model

React to changes before they reach the database. With the new onTouch() event and support for entity constructors, your business logic can now execute the moment an entity is created, loaded, or modified in memory.

This means you can initialize values as soon as an entity is instantiated, enforce custom validation rules when data is accessed, and automatically adjust related fields in real time. You don’t wait for safeguards—you act on interaction.

Use it to auto-fill fields, apply timestamps, check permissions, or trigger dependent logic at the exact moment the data enters or shifts inside the system.

And because these lifecycle hooks run server-side by default (with optional client-side support), you gain centralized control over behavior that’s both scalable and secure.

More on ORDA lifecycle events

4D DATABASE

DATABASE

Bind classes to object fields and generate UUIDs built for scaling

Make your structure do more than just hold data—make it enforce your logic. Assign a class directly to an object field in the structure editor, and 4D maintains its shape both at runtime and compile time.

This gives you property-level autocompletion, syntax checking, and data validation right from your schema. Your structure doesn’t just store—it protects.

Add support for version 7 UUIDs and you gain identifiers that are chronologically sortable, timestamped, and ready for distributed systems. With both in place, your data model becomes predictable, scalable, and self-aware.

More on class-typed fields and v7 UUIDs

USER INTERFACE

USER INTERFACE

Build forms that respond to logic, not to hard-coded values

Break free from rigid bindings. With OBJECT SET DATA SOURCE FORMULA, any form object can now be linked to a formula—driven by context, calculation, or condition.

Pair this with listbox expressions like lk selected items expression, and you obtain interfaces that react in real time, without manual triggers or fixed links.

The result? Cleaner, more dynamic UIs that respond to logic, not hardcoded assumptions.

More on dynamic formulas for UI

4D NETWORK

NETWORK handling

Handle real-time communication with full control over protocols

Send and receive connectionless packets using the new 4D.UDPSocket class. Look out for events using onData, track errors with onError, and monitor activity via 4DTCPUDPLog.txt. UDP is now fully integrated, event-driven, and ideal for device signaling, real-time messaging, or internal protocols with low overhead.

And with the new .connectionTimeout property in TCPConnection, you can define precise limits for response time. End slow requests, maintain UI responsiveness, and manage unreliable connections with confidence.

Together, these tools give you fine-grained control over both stateless and connection-based protocols—enabling fast, resilient communication across every layer of your application.

More on 4D.UDPSocket and TCP timeout control

DEPENDENCY MANAGER

DEPENDENCY MANAGER

Resolve and load component chains automatically

Add components and let 4D automatically handle their dependencies. The updated Component Manager now performs recursive discovery, loading all required sub-components in the correct order and blocking circular references before they start causing issues.

Enforce version compatibility, resolve load order, and surface every link in the dependency tree—declared or inherited—through the updated interface.

Keep your architecture modular, your builds predictable, and your code centered around behavior, not configuration.

More on recursive dependency support

4D NETKIT

4D NETKIT

Manage Microsoft 365 and Google calendars from your app

Create, update, or delete calendar events with full support for attendees, recurrence, notifications, and meeting links using the updated cs.NetKit.Office365.calendar and cs.NetKit.Google.calendar classes.

Everything runs through OAuth2 authentication and gives you precise event lifecycle control from within your app—no middleware required.

More on calendar API features

SECURITY

SECURITY

Prevent unwanted logic from entering your application

Prevent injected behavior without interrupting your workflow. When you paste a formula from an external source, 4D now inserts either the raw source (if unevaluated) or the evaluated result—never both.

This helps protect against hidden logic being smuggled into fields like 4D Write Pro or multi-style inputs.

The safeguard is silent, but the impact is apparent: a more trustworthy, secure editing experience.

More on secure paste behavior