A Journey With Scala
A Journey With Scala
If you're considering picking up Scala, see what one longtime Java dev has to say. Where does it work? What weaknesses does it have? And how's the ecosystem?
Join the DZone community and get the full member experience.Join For Free
Java-based (JDBC) data connectivity to SaaS, NoSQL, and Big Data. Download Now.
To those who are regular visitors of this blog, it is well-known that when it comes to developing code, I am a Spring/Java guy. Also, I use different technologies like Node or Python, but this depends largely on the project’s needs.
Due to some recent projects and courses involving Spark, stumbling upon Scala was inevitable. After some investigation, I decided to adopt it as one of my main tools, and there are plenty of reasons for that.
From a Java Developer's Perspective
- It evolves faster
- It has flexible syntax
- It is statically typed
- It is pretty recent and thus exciting, but in a JVM flavor
I remember back then when I was anticipating the release of Java 7 — lambdas, streams, and putting some functional programming into action. All those features that Scala provided. Unfortunately, lambdas were dropped from Java 7 and released as part of Java 8. Thus it took three years to get your hands on lambdas.
The Scala syntax is great and increases productivity. I really fancy the fact that you can skip a lot of boilerplate that you had to deal with using Java. Let alone the options like tuples, switches, and parameter name specification on function calls. The list could go on and on.
I've used both dynamically and statically typed languages, though from developing mainly on Java I am a bit biased. I believe that static typing is a good choice because you can detect errors early, build reliable code, and increase maintainability. Also, it makes collaboration with others much easier.
Every new technology is exciting and feels like a new toy. However, adopting a new technology comes with a lack of libraries and frameworks (Node anyone?) that were, or used to be, essential for your development process. Fortunately, you can always bet on the JVM and use your Java libraries with your Scala source code.
From an Ecosystem Perspective
If you come from Java EE or Spring MVC, you have an already proven and tested framework for your web application. Luckily, Play comes to the rescue. Is Play sufficient for all your needs? I doubt it, but frameworks evolve. And considering we live in a microservices architecture era, you can work with Java components.
From a Project Perspective
The cloud and the overall technological burst has brought a variety of different types of applications. Developing applications has become more challenging and some of them involve Big Data processing, streaming, and machine learning. Scala comes in first place with these types of applications, so if your objective is to work in the Big Data world, mastering Scala will definitely assist you.
It does the filtering for you. As mentioned previously, Spring/Java can be used for various types of projects, batch Applications, CMS apps, REST APIs, etc. Scala has a more specific identity and targets certain types of projects. By searching for opportunities and contracts that include Scala, you already have a sense of the project’s nature and the challenges ahead.
Talk is cheap! There are many tutorials ahead to author and document my experience. Stay tuned for more Scala content.
Published at DZone with permission of Emmanouil Gkatziouras , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.