wood burning stoves 2.0*
The moose likes Scala and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Scala
Bookmark ""Scala Programming": Java frameworks and Scala" Watch ""Scala Programming": Java frameworks and Scala" New topic
Author

"Scala Programming": Java frameworks and Scala

Ivano Pagano
Ranch Hand

Joined: Dec 16, 2006
Posts: 47

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

Joined: Jan 28, 2008
Posts: 79
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

Joined: Dec 16, 2006
Posts: 47

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

Joined: Mar 07, 2007
Posts: 1280

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

Joined: Jan 28, 2008
Posts: 79
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "Scala Programming": Java frameworks and Scala
 
Similar Threads
How to use hibernate in scala
Scala for GUI?
Required knowledge to read "Programming Scala"
Enterprise Programming with Scala
Help fixing crash on Mac OS 10.3.9