Skip to content

Commit

Permalink
Update dragonfly.adoc
Browse files Browse the repository at this point in the history
Fixing for #4055
  • Loading branch information
bennewi authored Jan 9, 2025
1 parent fa59523 commit 660702f
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions articles/tools/modernization-toolkit/dragonfly.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ pass:[<!-- vale Vaadin.ProductName = NO -->]

= 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 of sources made by the developer 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 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 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 with 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 coincidence and should not be 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.
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 failure on line 26 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 'scss'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'scss'?", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 26, "column": 103}}}, "severity": "ERROR"}

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 commercial contact at Vaadin to discuss.
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 commercial representative 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.
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 proceding. Dragonfly processes all of the files in your workspace or your selection in one single batch. So if you have a million lines of code, reserve about 90 minutes for the process to complete.
Dragonfly will modify the source code in your workspace. It is advised to ensure you are working on a safe copy before proceding. Dragonfly processes all of the files in your workspace or your selection in one single batch. So if you have a million lines of code, reserve about 90 minutes for the process to run to completion.

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 failure on line 35 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 'proceding'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'proceding'?", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 35, "column": 120}}}, "severity": "ERROR"}

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.So] Don't start a sentence with 'So'. Raw Output: {"message": "[Vaadin.So] Don't start a sentence with 'So'.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 35, "column": 225}}}, "severity": "WARNING"}


== Installing
Expand All @@ -44,12 +44,37 @@ You can install the Dragonfly Transpiler for Eclipse through the Eclipse Marketp

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"}

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.JustSimply] Avoid using 'just'. It may be insensitive. Raw Output: {"message": "[Vaadin.JustSimply] Avoid using 'just'. It may be insensitive.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 55, "column": 13}}}, "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 you have a buildable runnable application, there are a number of steps to complete manually.

Check failure on line 67 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 'buildable'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'buildable'?", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 67, "column": 19}}}, "severity": "ERROR"}

=== Modify pom.xml or build.gradle

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

View workflow job for this annotation

GitHub Actions / lint

[vale] reported by reviewdog 🐶 [Vaadin.HeadingCase] 'Modify pom.xml or build.gradle' should be in title case. Raw Output: {"message": "[Vaadin.HeadingCase] 'Modify pom.xml or build.gradle' should be in title case.", "location": {"path": "articles/tools/modernization-toolkit/dragonfly.adoc", "range": {"start": {"line": 69, "column": 5}}}, "severity": "WARNING"}

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 -->]

0 comments on commit 660702f

Please sign in to comment.