Reputation
620
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
4 15
Newest
 Yearling
Impact
~68k people reached

Nov
17
comment Is the Java package name convention flawed?
My point is that a jar file is merely an archive of the compiled classes in their package structure. It can be manipulated with any tool capable of opening an archive with no problems (like the maven's shaded jar plugin), and is prone to human-made errors. The .dll / .exe is a solid file with more specific format. You can hardly achieve the probing and replacement scenario without involving "dedicated" tools, which unlike in the world of Java, is not among the accepted practices. The bottom line is that MS have good reason not to adopt RDN, while Java development scenarios may depend on it
Nov
17
comment Is the Java package name convention flawed?
@AllonGuralnek, there is an exception I can think of - shaded jars - an approach we use at our company. The shaded jar is a single executable which has the unpacked contents of all dependent jars. In theory, this should work as normal jars do, but I have seen how package name collisions break shaded jar application because classes get overwritten. The .NET alternative - puttig DLLs as embedded resources and loading them at runtime is safe from that problem. By strictly following RDN one could reduce such risks ,still uniqueness has to be maintained in the internal package structure as well.
Nov
16
comment Is the Java package name convention flawed?
I think the strong uniqueness is more a Java problem. In .NET, the code of a library/executable is compiled to a single whole, called "assembly" (.dll or .exe). It contains all namespaces (packages) and compiled types inside in their binary form. The Java concept is different - the compiler produces a separate binary image of each class, and physically places those classes in folders replicating package hierarchy in the compiled output. Two libraries with naming collisions can override each others classes when referenced by a single project, which makes uniqueness a needed solution in Java
Nov
11
awarded  Yearling
Jul
6
revised Best practices for using HTTP sessions(Java)
minor improvements to code and text (paraphrasing)
Jun
17
awarded  Nice Answer
May
3
awarded  Popular Question
Dec
20
awarded  Necromancer
Nov
26
comment Expected behavior when an request for a collection will have zero items
Very reasonable explanation. The result returned should not cover for invalid state, we have exceptions for this.
Nov
26
revised Does a create() method exist as part of a pattern?
added 708 characters in body
Nov
26
comment Does a create() method exist as part of a pattern?
Actually, the naming is more a choice to me rather than part of the pattern. For instance, with spring (my second example), you have the ability to tell Spring which your init method is, so you can say <bean class="foo" init-method="create" /> This will invoke the create method of your foo class before it returns a foo instance to where it was requested. You can specify anything other than create as long as it is a valid method. If you need to establish the usage of create method, you can use an interface.
Nov
26
answered Does a create() method exist as part of a pattern?
Nov
25
comment Why is the use of JavaScript in HREF attributes discouraged?
@GrandmasterB, I would not take into account any source that recommends one thing over another without showing a brief pros/cons comparison of the alternatives (but that's me). I think that the OP might have been told so by people he works with, or supervise him in any way (and thus can hardly be quoted like a persistent written resource). It might be that non of them gave reasonable explanations, he seeks answers here, which is not necessarily ranting, or a bad thing in general.
Oct
9
revised What is wrong with Java's generics?
minor improvements and fixes
Oct
9
revised Why use partial classes?
added 3 characters in body
Oct
9
comment What is wrong with Java's generics?
Being both Java and C# developer, I am wondering why would you prefer Java collections?
Oct
9
suggested approved edit on What is wrong with Java's generics?
Sep
30
awarded  Explainer
Sep
24
awarded  Autobiographer
Sep
1
revised Why use partial classes?
added 105 characters in body