Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend documentation for customers that have not been assisted #4058

Merged
merged 5 commits into from
Jan 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 48 additions & 2 deletions articles/tools/modernization-toolkit/dragonfly.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,28 @@

= Dragonfly Transpiler

Dragonfly Transpiler is the engine that applies a preconfigured set of Vaadin Framework-to-Flow or Swing-to-Flow transformation rules to an application. Dragonfly is a commercial tool that requires a valid license. The Transpiler works by applying the transformation to the full set of sources in the current Maven module or Eclipse workspace, or by applying it to a selection made in the Eclipse Package Explorer.
Dragonfly is the engine that applies a preconfigured set of Vaadin Framework-to-Flow or Swing-to-Flow transformation rules to an application. Dragonfly Transpiler is a commercial tool that requires a valid license. The transpiler works by applying the transformation to the full set of sources in the current Maven module or Eclipse workspace, or by applying it to a selection of sources made by the developer in the Eclipse Package Explorer.


== Disclaimers

Dragonfly Transpiler is a simplified, default-setting configuration of the rich and configurable tool used by Vaadin specialists when performing Vaadin upgrades or Swing-to-Vaadin migrations. Dragonfly is a refactoring tool that works using the same approach as your Java compiler to identify the pieces of your source code and resolve in what libraries these pieces are declared. Dragonfly comes with over 3000 rules that it can apply to make changes to Vaadin Framework and desktop applications.

Dragonfly has thousands of rules but your application uses libraries that are made up of tens of thousands of APIs and classes. If you discover that Dragonfly has a rule for every API in your application, it is a rare and fortunate coincidence and is by no means the default expectation. Most applications get coverage percentages of between 70% - 90%. Still even with a partial solution, many developer teams have found that Dragonfly can significantly reduce the overall effort in a modernization project, reduce the number of errors found by users, increase consistency of the modernized code, and help deliver modernized applications to their users on or ahead of schedule.


== Limitations

All Dragonfly transformation is applied to Java code only. Dragonfly does not change pom.xml files or SCSS files or modify directory structures.

Check warning on line 26 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Abbr] 'SCSS' has no definition. Raw Output: {"message": "[Vaadin.Abbr] 'SCSS' has no definition.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 26, "column": 103}}}, "severity": "WARNING"}

Dragonfly assumes a transformation to the latest Vaadin 24. If you are not able to deploy Vaadin 24 in your organization for whatever reason, please reach out to your contact at Vaadin to discuss.

Check warning on line 28 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 28, "column": 50}}}, "severity": "WARNING"}

Check warning on line 28 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Versions] Don't refer to a specific Vaadin version. Raw Output: {"message": "[Vaadin.Versions] Don't refer to a specific Vaadin version.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 28, "column": 91}}}, "severity": "WARNING"}

Dragonfly Transpiler does not support the modification of rules or addition of new rules. Your project may benefit from a customization of the default ruleset, however. If this is the case, we encourage you to reach out to your contact at Vaadin to discuss how this could work. Vaadin has a standard service called "Fine-tuning" where Vaadin experts can quickly extend the ruleset with the rules you require.

Check failure on line 30 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'ruleset'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'ruleset'?", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 30, "column": 152}}}, "severity": "ERROR"}

Check warning on line 30 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.We] Try to avoid using first-person plural like 'we'. Raw Output: {"message": "[Vaadin.We] Try to avoid using first-person plural like 'we'.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 30, "column": 191}}}, "severity": "WARNING"}

Check failure on line 30 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'ruleset'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'ruleset'?", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 30, "column": 375}}}, "severity": "ERROR"}


== Warning

Dragonfly will modify the source code in your workspace. It is advised to ensure you are working on a safe copy before proceeding. Dragonfly processes all of the files in your workspace or your selection in one single batch. How long this batch takes will depend on how many lines of code you have in your input. Performance will vary depending on the specs of your system but a good rule of thumb to start with is to expect about 10 minutes for each block of 100 000 lines of code.

Check warning on line 35 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Will] Avoid using 'will'. Raw Output: {"message": "[Vaadin.Will] Avoid using 'will'.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 35, "column": 11}}}, "severity": "WARNING"}

Check warning on line 35 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Will] Avoid using 'will'. Raw Output: {"message": "[Vaadin.Will] Avoid using 'will'.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 35, "column": 252}}}, "severity": "WARNING"}

Check warning on line 35 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.Will] Avoid using 'will'. Raw Output: {"message": "[Vaadin.Will] Avoid using 'will'.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 35, "column": 326}}}, "severity": "WARNING"}


== Installing
Expand All @@ -23,12 +44,37 @@

pass:[<!-- vale Vaadin.Versions = NO -->]

Once you've installed Dragonfly, a [guibutton]*Migration Menu* option appears in the main Eclipse menu. Switch your view so the Package Explorer is active -- not the Project Explorer. Set the transformation in process by selecting [guibutton]*Transform Swing to Vaadin* or [guibutton]*Transform Vaadin 7/8 to Vaadin* from the [guibutton]*Migration Menu*.
Once you've installed Dragonfly, a [guibutton]*Migration Menu* option appears in the main Eclipse menu.

There are two ways to perform the transformation process - either on all of the Java files in the workspace or a selection of files that you make in the Package Explorer.

Check warning on line 49 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.ThereIs] Don't start a sentence with 'There are'. Raw Output: {"message": "[Vaadin.ThereIs] Don't start a sentence with 'There are'.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 49, "column": 1}}}, "severity": "WARNING"}

=== Process entire workspace

Check warning on line 51 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.HeadingCase] 'Process entire workspace' should be in title case. Raw Output: {"message": "[Vaadin.HeadingCase] 'Process entire workspace' should be in title case.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 51, "column": 5}}}, "severity": "WARNING"}

Launch the transformation by selecting [guibutton]*Transform Swing to Vaadin* or [guibutton]*Transform Vaadin 7/8 to Vaadin* from the [guibutton]*Migration Menu*.

=== Process just those files you have selected

Check warning on line 55 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.HeadingCase] 'Process just those files you have selected' should be in title case. Raw Output: {"message": "[Vaadin.HeadingCase] 'Process just those files you have selected' should be in title case.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 55, "column": 5}}}, "severity": "WARNING"}

Switch your view so the Package Explorer is active -- not the Project Explorer. Select in the Package Explorer which files and packages you wish to transform. Then launch the transformation by selecting [guibutton]*Transform Selection Swing to Vaadin* or [guibutton]*Transform Selection Vaadin 7/8 to Vaadin* from the [guibutton]*Migration Menu*.


== Verifying Execution

When processing is complete, Dragonfly will place three log files in the `reports` folder of the user home. These include a `changereport` and a `csvreport` that give information on which rules have been executed and how they have changed the sources, and a `log` file that contains information about execution time for each source in the project.


== Finishing

Before your application can successfully build, there are a number of steps to complete manually.

=== Modify pom.xml or build.gradle

Check failure on line 69 in articles/tools/modernization-toolkit/dragonfly.adoc

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Gradle' instead of 'gradle'. Raw Output: {"message": "[Vale.Terms] Use 'Gradle' instead of 'gradle'.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 69, "column": 29}}}, "severity": "ERROR"}

Your changed application will no longer be compatible with your project settings. Things to consider include introducing or updating the Vaadin version, updating the Java and Spring versions to match the version required by Vaadin, removing references to old Vaadin addons or Desktop libraries, and adding references to the Vaadin Feature Pack product.

=== Fix the code

The assumption is that there will be a lot of errors in your code. These should be immediately visible in Eclipse by inspecting the Java problems in the Problems view and by seeing red markings appear in the code window. By analyzing the Dragonfly Transpiler log files and filtering for rules not executed, and by analyzing the error log in the problems view, you can move forward smartly so you can eliminate all errors linked to each non-converted API in one go.



pass:[<!-- vale Vaadin.ProductName = YES -->]
pass:[<!-- vale Vaadin.Versions = YES -->]
Loading