• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"Scala Programming": Java frameworks and Scala

 
Ivano Pagano
Ranch Hand
Posts: 54
Java Mac OS X Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day again Venkat,

One of the aspects that I'm mostly concerned about regarding Scala is it's interoperability with Java Libraries and Frameworks.
I got evidence that, based on bytecode translation knowledge of Scala, one can safely assume to be able to do almost anything with your self-developed code.

The point is: does this stay true for java frameworks and Scala?
For example, can I think of developing business logic in Scala and use Eclipse OSGI Runtime to create the GUI and access Scala code? I worry that sophisticated frameworks and libraries usually assume that you must implement some interface or base class to hook your own logic in the application, sometimes through configuration and with the help of classes dynamically generated by the framework itself.

My question is: do you have any experience in such field? Would you suggest avoiding the issue completely by using alternative solutions directly targeted and developed for Scala?

Thank you for your attention,
Ivano
 
Venkat Subramaniam
Author
Ranch Hand
Posts: 109
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ivano, the frameworks and especially OSGi runtime are working with bytecode. It does not matter to them how the bytecode
was generated. Especially in the case of OSGi, what matters the most is the interfaces (in some cases) and manifest information.
You can use Scala seamlessly along with Java for these purposes. One of the key requirements of languages on the JVM is that
they can be used as such.
 
Ivano Pagano
Ranch Hand
Posts: 54
Java Mac OS X Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd say this sounds great to me!
Maybe I should try some simple experiment on this.

Thanks for your time,
Ivano
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

As you're talking about frameworks, is there currently any possibility to tightly integrate Scala into Java based frameworks which rely heavily on Java annotations and the like? I don't know anything Scala about support for this kind of "meta data" but I could imagine that there is still some gap between both worlds here. OK, basically Java annotations end up as bytecode, too. But would really all needed information be available in Scala as well?

That said, one thing I see definitely the need for improvement is tool support. Obviously every language that compiles to bytecode can potentially interact with other languages on top of the JVM. But I think the days are gone were a text editor was sufficient tool support for application development. Thus I suppose good tool support (ranging from frameworks to IDEs) could make a big difference regarding the acceptance of a programming language regardless if the basic concepts of the language are really good or not so good.

Where do you see Scala's future here? Should or will the community start porting tools and frameworks to Scala? Or will the Scala core language first have to become more major and stable before its own libraries and frameworks start to grow?

Marco
 
Venkat Subramaniam
Author
Ranch Hand
Posts: 109
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marco, using annotations is not a concern. You are right about tool support, that is important. There is quite a bit of support already and a lot more
can be expected. Some really smart guys are putting significant effort to improve Scala support in different IDEs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic