-
-
Notifications
You must be signed in to change notification settings - Fork 545
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
rework the demo application #304
Comments
In the last few days I was playing around with the demo application. After looking a bit deeper into it, I feel, that we should consider to rework / simplify the demo application a little bit. In its current state the demo application might look quite confusing for new developers, who are interested in using PF4J. Therefore I'm proposing the following improvements / modifications:
These changes aim to provide a better starting point for new PF4J developers. They can simply copy the demo application and already have a solid base for their first experiments, which later can easily be migrated into their own application. Finally one question comes to my mind regarding PF4J 3: Should we migrate the demo application to Java 11 with modules or should we stick with the "old school" approach? - I don't have a final opinion about this yet. But I think, that modules are the future, we should follow the latest developments of the Java platform and we should not invite new developers to adapt old / outdated techniques. But of course we could also provide separate demo applications for Java 8 and Java 11 with modules. Please let me know, what you think about all this. |
This is a very nice goal.
I don't understand very clear. The demo-app module contains only two extensions
The
The actual approach offer us multiple benefits:
This is actually the purpose of the demo application. The first step is to create a project that contains demo application, verify that everything is OK (you can compile and run the application) and after this you can try to make modifications according to you goal/business. An idea is to extract
It's an idea but I don't know if this approach doesn't confuse the people. Normally, your application will contain only one plugin type format (JAR or ZIP). In this context is more easy to push most of Maven's settings of each plugin in the parent pom of plugins (see my discussion above, about this subject).
I think that the "old school" approach is OK (at least for the first phase). |
Maybe I'm still a bit confused about the demo application. I think, that other developers, who want to discover the features PF4J, might feel the same. ;)
When running
I assumed this is a plugin file. But now I realize, that this is some sort of application bundle. Sorry, this was my mistake. :)
I understand your idea behind the
That's interesting indeed. I wasn't aware of this
You might also put these default plugin settings in the root
You are somewhat inconsistent here. On one hand you only like to create JAR plugins and on the other hand you are using two different extension providers in the
Before making any changes, I guess we should answer the question: What is the main purpose of the demo application?
From my point of view: Assuming we're going to provide an Archetype in the future, I think the demo application should be considered as an addition to the documentation. Therefore it should implement (and comment) different concepts (ZIP / JAR plugins, service extensions / legacy extensions, etc).
I was asking, because I've migrated the demo application to Java 11 on my local system for the purpose of testing PF4J with the Java Module System. But I agree, that it might not be necessary for the demo application. But maybe it might not be that much of a deal to provide separate Archetypes for Java 8 and Java 9+. |
Both demo plugins are currently build as JAR files in the same way. To make it easier for new users and to better document the features of PF4J it might make sense, if one of the plugins is created as ZIP file (including a 3rd party library in the
lib
folder).Because I'm always using ZIP plugins in my project and already have a working Maven configuration for this, I would provide a pull request, that changes the build process of the 2nd demo plugin in order to create a ZIP archive.
This would make it easier for new users to use one of the demo plugins as an example for their own project. We also might point from the packaging page of the documentation to both example plugins.
Let me know, what you think about this and if I can provide a pull request for this.
The text was updated successfully, but these errors were encountered: