~Bill
Bill Johnston wrote:I'd really appreciate it if you would be able to offer one significant "DON'T DO", that can be applied to desktop application design and development as well as web dev, as an example of what you "talk" about in your book?
Spring Boot in Action - Spring made easy!
Spring in Action - Build powerful applications!
Build Talking Apps for Alexa - Add voice to your applications!
~Bill
Craig Walls wrote:
DO NOT disregard the power of interface-driven development. This means that even if you think you only need a single implementation of something, still go ahead and hide that implementation behind a stable interface and only work with it through that interface. The loose-coupling benefits of working with interfaces far outweigh the tiny cost of creating those interfaces. These benefits make themselves evident in many places including OSGi, Spring, and unit-testing.
SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Spring Boot in Action - Spring made easy!
Spring in Action - Build powerful applications!
Build Talking Apps for Alexa - Add voice to your applications!
Craig Walls wrote:
For example, let's say that you have two classes: com.javaranch.Foo and com.javaranch.Bar. If each of these is in a separate bundle, then when OSGi tries to satisfy a package import for com.javaranch, it will find one of them, and stop looking. So, the bundle(s) that imports com.javaranch will only get Foo or Bar, but not both.
Craig Walls wrote:
There are two ways to fix this: If nothing else in your app depends on Lucene, then you could wrap the Compass JAR and embed Lucene within it (I show how to do this exact thing in the book). Or, you could wrap Compass and use Require-Bundle: to specify the Lucene dependency in Compass' MANIFEST.MF.
SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Kengkaj Sathianpantarit wrote:This sounds kind of a bug to me. Is it a bug? Have OSGi folks any plan to fix this problem?
I'm not sure what you mean by "wrap". Do you mean open the Compass JAR and modify it?
Spring Boot in Action - Spring made easy!
Spring in Action - Build powerful applications!
Build Talking Apps for Alexa - Add voice to your applications!
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|