-
1. Re: Weld and metadata
nickarls Oct 23, 2009 11:44 AM (in response to asookazian)I don't even have a clue what it could be replaced with, either it's centralized somewhere (XML) or it's close to the place where it's used (annotations). Where else could it be and how different could it be from the existing corresponding solutions? Sure, you can do stuff a bit differently but what new stuff could it be that's so unheard of that it would be worth parting from the stuff that is already used? Both XML and annotations have their place...
-
2. Re: Weld and metadata
gavin.king Oct 23, 2009 3:43 PM (in response to asookazian)Nick, the correct answer is that you have a new language (i.e. not Java) that fully supports both declarative and procedural modes of expression. Annotations are a (very) half-step in that direction. Of course, this is well outside of the scope of JSR-299.
-
3. Re: Weld and metadata
asookazian Oct 23, 2009 11:02 PM (in response to asookazian)It's outside the scope of 299 but I brought it up anyways because it's somewhat relevant. (Plus I was interested in hearing some answers from the 299 Gods ;)).
So how do languages like Scala handle metadata? (Scala is a hybrid language, no?) Weld written in Scala would be interesting... Will 299/Weld always be tied to Java??
-
4. Re: Weld and metadata
luxspes Oct 26, 2009 4:53 PM (in response to asookazian)
Arbi Sookazian wrote on Oct 23, 2009 23:02:
It's outside the scope of 299 but I brought it up anyways because it's somewhat relevant. (Plus I was interested in hearing some answers from the 299 Gods ;)).Probably Weld will get a Java configuration option as Spring does in the near future. (The only advantage of XML configuration is that it does not need to be recompiled... so I guess a
Groovy configuration option
or aBean Shell configuration option
or aJRuby configuration option
or even aClojure configuration option
is all we need to finally drop those ugly XML files).
So how do languages like Scala handle metadata? (Scala is a hybrid language, no?) Weld written in Scala would be interesting... Will 299/Weld always be tied to Java??Scala is, AFAIK an hybrid between Object Oriented and Functional Oriented language... since it is particularly good to create DSLs, I guess it could be used to provide a new way of configuring IoC a
Scala configuration option
-
5. Re: Weld and metadata
luxspes Oct 26, 2009 5:05 PM (in response to asookazian)
Arbi Sookazian wrote on Oct 23, 2009 23:02:
Weld written in Scala would be interesting...Weld written in Scala, I don't think so, and implementation of JSR 299 written in Scala? could be interesting...
a new JSR taking advantages of Scala features to offer new exciting features? even better!
Will 299/Weld always be tied to Java??Weld is written in Java, but that does not mean it is
tied
to it, AFAIK nothing prevents you from having your projects written in Scala, Clojure or Groovy and use Weld for your IoC needs.Of course, it would be interesting to have extensions on top of Weld like equivalent to the Bindforge DSL for Guice (which is implemented in Scala, while Guice is (AFAIK) implemented in Java). And nothing prevents anyone from doing that.