user90150
user90150

Reputation:

Scala or Java based on IDE and Memory footprint

We have huge stack of xml files (around 5000+ files) possibly about 80 MB when not compressed) all of them are device configurations used for read & write data & build user interfaces without any language dependencies. These XML files can be ported to any technologies like Android and Apple world. Not all the 5000+ are loaded at one shot to memory, we might load 200 files into memory based on 1 device connected. We have a .NET/WPF based application which is using those XML files to build the UI and access the device information through protocols like Modbus & Hart (Don't bother protocols now). Anywhere we need custom logic, we have written them in DLL's (in .NET) and we use the reflection & IoC to load those DLLs, create object and access them through interfaces at runtime to complete the XML configuration. On desktop, then we build UI and load configuration

Now We need to develop Android app which runs on Phone and tablet as well. I have 1 year experience working lightly in Java. We could write a core modules which can be used for both phone and tablet and UI layer which is just to render our XML as a UI elements. We know to use Java's Class Loader to create instance so that instead of DLL's we could build .jar file in Android world and load them (if possible?) and access via interfaces. When we load our XML, it will consume nearly 80 to 100 MB of RAM (in WPF & .NET).

When looking into Android world, I could not decide whether to go with Scala or Java. We do not have any Java expert to advise us. Having worked on Python, I feel like Scala is modern & good choice. Also I read that Android apps compiled using Scala is fat(big), take long time to boot up.

But coming from Visual Studio background, we are much sophisticated development team expect everything to run through IDE. Also team has to learn Java/Scala whatever our choice from start.

If we choose to work on Scala on Android, do we except the memory efficiency is near to Java? Also do we have sufficient IDE support (Eclipse or NetBeans or IdeaJ) for Scala?

I am specifically looking for Memory footprint (internals) and IDE support for building Android application. No discussion on performance or productivity..

Upvotes: 0

Views: 430

Answers (2)

Michael Dillon
Michael Dillon

Reputation: 32392

My Scala IDE is Maven in one terminal window and Vim in another. The browser serves up help documentation. If you can base your build process on Maven, then any IDE should do fine. And since you are working a lot with XML files, I suggest that you do base your build process on Maven rather than SBT.

Of course, there is Eclipse support for Scala, Intellij supports it, there is a Netbeans plugin for Scala, even a Komodo language extension for Scala. Lots of IDE choices to try out. Only the developer knows what works for them.

Make half a dozen identical VMs. Install one IDE on each one of them. Get the developers (end users of the IDE) to test them and choose the one that they want. Do all of the build and continuous integration with SVN and Maven. Make that the boundary between the developers'personal toolset (the IDE or Emacs or Vim) and the supported development tools.

Upvotes: 1

soc
soc

Reputation: 28433

If you're coming from C#, I'd advice choosing Scala. That way you could actually preserve some of your business logic, because good C# code might probably look a bit like things are done in Scala, too. E. g. LINQ in C# and Scala's collection classes (v.s Java collections).

The syntax is a bit different compared to Java/C#, but syntax is hardly a real problem these days.

Java's IDE support is pretty good, but if you're coming from Visual Studio, Intellij (or Eclipse) + Scala plugin might be good enough for you.

If you program the same code in Java and Scala, memory consumption should be pretty the same.

You should keep in mind that you should use ProGuard to keep the size of the Android application manageable.

Upvotes: 1

Related Questions