-
Regarding the modular approach of Pi4J V2. Pro
Cons
The use of Are there ideas, suggestions, contributions which can make this approach more clear and easy to use? Some of the related issues and discussions |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 5 replies
-
Pi4J started as a library to provide access to Raspberry Pi GPIO pins. That's what people look for in order to enable their Java appliactions to interact with those GPIO pins. I'm using Pi4J 1.x since 5 years and it worked well so far. In my opinion the modular approach of Pi4J V2 add just many layers of abstraction with no use for most users. Even worse, it uses |
Beta Was this translation helpful? Give feedback.
-
In the foojay article you provide a differnt list of pros and cons. Maybe you could harmonize that with the pros and cons given here. I'd also need some more details because some arguments are not obvious to me and I'd tend to disagree with them. E.g., why do you think you have to use a module.info? Nobody forces you to provide a module.info in order to support some modular design. I also don't understand why using a ServiceLoader should preclude using a FAT jar. I guess I am missing some context here. |
Beta Was this translation helpful? Give feedback.
-
Thanks @mipastgt @tpnela and @camueller for your feedback. I took some time of last week, but will get back to you asap with some more info to get this topic sorted asap. |
Beta Was this translation helpful? Give feedback.
-
As I needed some more info myself to fully understand the fat jar issue, I documented this further. You can find it as a new page on our Pi4J website: https://pi4j.com/documentation/building/fat-jar/ There is also an open issue related to the use of modules: #84 |
Beta Was this translation helpful? Give feedback.
-
So your fat-jar issue is basically a shortcoming (or I would even call it a bug) of the |
Beta Was this translation helpful? Give feedback.
-
The FAT JAR issue is fixed! Jieha ;-) Thanks to the feedback in this discussion and replies to this tweet by Robert Scholte and Karl Heinz Marbaise, a working example could be created. Full info on: https://pi4j.com/getting-started/minimal-example-application-fatjar/ More detailed FAT JAR info on: https://pi4j.com/documentation/building/fat-jar/ |
Beta Was this translation helpful? Give feedback.
The FAT JAR issue is fixed! Jieha ;-)
Thanks to the feedback in this discussion and replies to this tweet by Robert Scholte and Karl Heinz Marbaise, a working example could be created.
Full info on: https://pi4j.com/getting-started/minimal-example-application-fatjar/
More detailed FAT JAR info on: https://pi4j.com/documentation/building/fat-jar/