Toolkit selection: scala, ruby, java and more

I am part of a group that launches a new development project from scratch. He is currently on a hobby, but we strive to make him our living in a period of 1-2 years. We are senior developers from a variety of languages ​​and technologies, with most of the focus on Java over the past few years.

Now we are thinking about choosing toolkits and languages ​​(the future is bright when starting from scratch). We want to make efficient use of modern architectures and good experience with Java and other JRE-based methods.

The project is based on a lot of I / O, databases and a decent user interface, which probably should be a website and feel quite efficient.

One route is classic Java and building a user interface using GWT (or layers on top of GWT), the other is Scala + lift.

Then there are other methods based on Ruby, Groovy, etc.

Now my question is: what would you choose as tools for the new long-term project mentioned above. Is Scala here, for example, from those who have only temporary advertising?

What other methods do you consider for larger projects from scratch?

+4
source share
7 answers

Perhaps your biggest binary choice is whether you decide to stay on the Java Virtual Machine (JVM) through Java or one of the other languages ​​that compile to bytecode or move to another platform, perhaps Ruby or Python (with the difficulties of working with different architectures / operating systems, which may entail). Personally, I decided that I really wanted to stick with the JVM, and so your choice of language would be ...

Scala

All I can give is my own experience, coming from the Java background: the transition to Scala has become easier due to its natural integration into the Java ecosystem and the ability to continue to use pretty much the same toolbox in the same way.

At this last point, I mean that the statically typed nature of scala means that all refactoring and code navigation features are still available to the developer, but scala type output means that this happens without unnecessary verbosity of type declarations that are garbage throughout your code.

I can still use my favorite things like Spring, ant, IDEA, and I can still use all the libraries I have ever written in Java (this is an argument for choosing a language that integrates with Java on top of a completely new one, like Ruby, Smalltalk, or Python).

In terms of whether scala is worth staying as a JVM language, this bothers me the most. But consider how many SO questions have been tagged by Jython (161), JRuby (176), clojure (388), and Groovy (661), provided that you choose to stay on the JVM . Not only scala is now far ahead of them (815), but it is growing at a fairly high speed.

Finally, although I did not use Lift, a colleague was very impressed with it (and I would probably look at it if I were writing a web application). An alternative to fat-client (scala swing) I found more than useful (better than a raw swing, anyway!).

Groovy

It is worth noting that the creator of Groovy recently said that if he knew about the existence of Scala, he would never want to bother to create Groovy!

Juby / jython

I combined these two languages ​​because both of them represent an attempt to port the syntax of a dynamic language to the JVM. If this syntax is no longer familiar to you, why don't you go this route? I must say that the statistics of SO (above) does not indicate that they have momentum at the moment.

I would also suggest that moving from a statically compiled to a dynamic language is a big step, and you might be surprised at what you miss (in terms of refactoring and development assistants, etc.) - you can also take care of the fact that the interpreted nature of these languages makes them an order of magnitude slower than Scala .

Clojure

I have no real opinions about clojure, except to say that with an imperative background, its syntax is scary and its stream is extremely insignificant. I am more impressed with the functional paradigm , but I felt that clojure was too far for me; I would be a fish out of the water in this language without previous LISP / Scheme experience .

+7
source

The choice of language implies many other options, which together can be more important than the choice of language itself. More specifically, when you select a language, you also select this web language infrastructure, ORM, IDE, build tool, etc.

For example, if you choose Groovy, you also implicitly select the Grails web infrastructure, if you select Scala, you select Lift, etc. Although you can use Eclipse / Netbeans / IntelliJ for almost any JVM language, experience varies depending on which language you use. Eclipse is a great Java development environment, but pretty crappy for Groovy / Grails development.

The problem with this question is that if you ask a guy who uses the X language, he will tell you to choose X, and then list all the reasons why X is so big, and a few small reasons not to use Other languages. Examples of such minor criticisms include:

Scala

  • bad tool support
  • functional programming is esoteric for typical OO developers.

Groovy

  • dynamic languages ​​unsuitable for large projects
  • dynamic languages ​​do not work well

Jython

  • space expression as delimiters of code blocks
  • dynamic languages ​​(see above)

Juby

  • reputation for poor performance
  • funky syntax (from a Java developer POV, at least)

Clojure

  • very funky syntax (from almost everyone's POV)
  • very immature

I must emphasize that I do not always believe that any of the above statements is true, the point I am trying to make is that it is very easy to fire languages ​​without any real experience (I know only one of the languages ​​above ) Therefore, I would not too believe that people speak against a certain language, if you are not sure that they really used it.

If I were faced with your choice, I would use Groovy / Grails, because I believe that this is an extremely productive and enjoyable technology for working with web applications with good tool support. Are there other options that could be even better? Of course, but Groovy / Grails is enough for me (for now).

+4
source

If you all have a strong Java background and no background of functional and / or dynamic languages, then you are likely to succeed by saving Java or by switching to Scala.

I do not want to neglect any other language here, but Scala will be more familiar to you, and you can make good use of your familiarity with Java. Whether you need to switch to Scala or not is another question. However, if you do, please note that you do not need to go in cycles on the lift. Not only do other web frameworks exist in Scala, but people successfully combine Scala with traditional Java frameworks such as Wicket.

+2
source

I worked a lot with Scala, Groovy and JRuby, and I can share my experience.

Scala

  • This language has been developed very professionally. You can see it in all its aspects.
  • No performance issues as it is a static typed language.
  • It is interesting to study and play because of its functional nature.

BUT:

  • It is very difficult. You cannot spend the evening writing a welcome world program. You should spend at least a weekend)) Dmitry Dzhemerov (one of the creators of IntelliJ) said that Scala is much more complicated than C ++.
  • Lack of good tool support. I believe the IDEs for Groovy and Ruby are far superior.
  • Not well integrated into the java ecosystem. Of course, you can use java libraries, but you will dance a lot of conversions from one collection to another etc
  • Lack of clean Scala libs. You always need to write a little shell over java lib.

Groovy

  • Has shortcuts for most java templates.
  • Great IDE integration.
  • Interaction with Java is so natural and easy. It doesn't matter if you use the java class or the Groovy class, it just works.
  • Great for writing DSL

BUT:

  • This is a slow language (but I think this is not a problem in most cases)
  • Since integration with java is Groovy's main goal, there are some unnatural aspects of the language.

Juby

  • One of the best languages ​​I've ever seen.
  • There are many cool libraries you can use.
  • The best language for writing internal DSL
  • Easy to learn.

BUT:

  • Integration with java sucks.

In my opinion, it is too early to use Scala in production systems. This is too complicated due to the lack of tools and libraries. I used Groovy in many large projects quite successfully, so it may be the best tool in these three languages.

+2
source

With the information provided, you can choose any proposed language. They will still be here in 5 years.

If you cannot decide which tool to choose for your requirements, we cannot help you. The information provided is simply unclear for a decision. Start prototyping for all languages ​​/ frameworks and see what works best. Perhaps after this the requirements will become more clear.

+1
source

Have you tried Jython - is Python working on the JVM? I often use it to perform various database tasks, and it works great with databases such as Oracle, PostgreSQL, and Informix. I do not create classic user interface applications, but I read that well-known Python Web frameworks such as web2py or django work with Jython.

0
source

If you have experience using dynamic languages ​​and you can write unit tests to support them, go this way. The development speed should be more than what you can achieve with a static language. However, as the project gets larger, it can become harder and harder to maintain (it can only be me, but checking the compilation time will help you a lot).

If, however, you have Scala experience, I would choose this instead. I believe Scala is a good mix between Java and Ruby.

Good luck

0
source

Source: https://habr.com/ru/post/1300737/


All Articles