Introduction
In this article, we will discuss the Embedded Application Properties in Vaadin, but before this, let's briefly know what Vaadin is.
Vaadin is an open-source framework in Java that helps us build reliable web applications with great UX faster than before.
Now, coming to the topic of Embedded Application Properties, the first question arises: What do you mean by Embedded Application?
Embedding applications are an alternative to writing monolithic front ends for your applications.
It is also known as micro frontends. Embedded Applications are isolated and self-contained pieces of code that can be maintained by different teams using different frameworks. You can take a simple example of an embedded calendar on a web page as the calendar functionality is isolated and has no relation to the logic of the main application.
Also, Embedding an application is similar to adding a client-side widget to a page. The only difference is that the embedded application has back-end logic and is an actual application in its own right.

Now, let's discuss the Embedded Application Properties, which cover the following-
- Defining web component properties for the embedded Vaadin applications?
- Handling of the property changes on the server side?
- Firing custom events on the client side?
Embedded Application Properties
Defining Web Component Properties.

The WebComponentExporter class defines the properties exposed by the WebComponent public API.
Calling WebComponentDefinition'addProperty () - It defines a property and adds it to the web component's public API, which supports `Integer, Double, Boolean, String, and JsonValue.
Example:
We use the addProperty() method to define web component properties in this example. It defines three properties: name (a string type), age (an integer type), and is-adult.
public class PersonExporter
extends WebComponentExporter<PersonComponent> {
private PropertyConfiguration<PersonComponent,
Boolean> isAdultProperty;
public PersonExporter() {
super("person-display");
addProperty("name", "John Doe")
.onChange(PersonComponent::setName);
addProperty("age", 0)
.onChange(PersonComponent::setAge);
isAdultProperty = addProperty("is-adult",
false);
}Property Event Attributes
In this, we are adding a property that exposes a fluent API that we can use to configure the property.

Properties have two event attributes:
- .onChange(): It registers a callback that is called when the value of the property changes on the client side.
- .readOnly(): It sets the property to read-only mode so that the property's value cannot be changed on the client side.
Return type of addProperty() Method
The addProperty() method generally returns a PropertyConfiguration<C, P> object that provides the fluent API for configuring the property.






