2015-07-22

Pitching Scala

I find myself in a position of pitching Scala to a couple of players tomorrow, and I thought I would organize my thoughts on what I might pitch to them in bullet points. These are IT generalists having a good familiarity with Java and the JVM, but not terribly familiar with Scala. I decided to arrange my bullets in the following manner, going from most important to least important:

  1. Headline pitch. A one-liner that both frames what Scala is, and is provocative enough to capture the listener's attention.
  2. What is Scala? A short list of bullet points that both gives a brief summary of what Scala is, at the same time promoting some of the core benefits of adopting and using Scala.
  3. What else makes Scala so awesome? More in depth points demonstrating the power and promise of Scala. Valuable topics of discussion, but things that I won't mind too much if the conversation wanders and I don't get around to mention.
Here's my pitch list. What do you think? Please let me know in the comments!

Headline Pitch:
  • Scala is a natural successor to the Java programming language, and is certain to be a key player in the Java ecosystem for years to come.
What is Scala?
  • Scala is a function/object-oriented hybrid. It is easy to program in Scala with a very Java like style, and to adopt the best features of functional programming at your own pace.
  • Scala/Java interop is seamless, allowing you to painlessly integrate with the thousands of Java libraries available on the JVM, as well as with your own legacy Java code.
  • Like other next generation languages that run on the JVM, you can code in Scala with massively less boilerplate than in Java.
  • Unlike other next gen JVM languages, Scala is strongly typed, improving code quality and coding productivity on large projects and in a team environment. Scala’s type system is actually quite a bit more expressive than Java’s, providing even more compile-time safety to the development team.
What else makes Scala so awesome?
  • A wide variety of Scala libraries and frameworks that are constantly becoming more robust and fully featured.
  • Many of these, such as Akka, Play, and Finagle, provide both Java and Scala APIs, making business-wide transitions from Java to Scala even easier.
  • The Scala community enthusiastically embraces reactive principles, paving the way for more robust, resilient, and scalable systems. This is especially notable in three areas:
    • Scala has powerful asynchronous tools such as Futures and Promises built right in to the language library.
    • ReactiveX styled asynchronous streams in RxScala.
    • Akka is unquestionably the premier actor framework running on the JVM.
  • Spark, written in Scala with APIs in Scala, Java, Python, and R, is rapidly becoming the go-to big data processing and analysis tool.
  • The Scala community is full of friendly and enthusiastic people!

Here are some of the sources I drew on to put this list together:
  • http://www.scala-lang.org/what-is-scala.html
  • https://twitter.github.io/finagle/
  • http://www.reactivemanifesto.org/
  • http://www.reactive-streams.org/announce-1.0.0
  • https://spark.apache.org/docs/latest/
  • http://www.typesafe.com/resources/video/reactive-streams-1-0-0-and-why-you-should-care



2015-07-19

Introducing Emblem - TypeKeyMaps

This is the third post in the Introducing Emblem series, where I discuss a reflection-based utility library I have developed called emblem. If you want to try emblem out on your project, follow these instructions. Or read this if you just want to explore try it out in the Scala REPL.

In the previous post, we looked at the core building block of the emblem library: the TypeKey. In this post, we begin to explore the utility of the TypeKey using TypeKeyMaps.

2015-06-03

Advancing Enterprise DDD - Acknowledgements

Many of the ideas I discuss in this series originated in discussions many years back with two good friends excellent software engineers, Andrew Tolopko and Armen Yampolsky. I am grateful to Armen and Andrew for sparking many different avenues of critical thought regarding JPA, Hibernate, and Domain Driven Design. I would also like to thank Andrew for introducing me to Domain Driven Design in the first place, back in 2005 or so.

Thanks goes to Eric Evans for initially developing the concepts of Domain Driven Design, and presenting them in a book by that same name. This is really a wonderful book that has profoundly changed my way of thinking about software engineering like few other resources have. It was a bit of a challenging book for me on first read, mainly because the ideas he presents were so counter to the ways I typically thought about software engineering. Like many of the best programming books I've read, I didn't really grasp everything the first time through, and I read it a second time in short order. I've read this book three times now, and often re-read sections of it when working on particular problems or challenges. While this book is a little difficult to get through, I highly recommend you give it a read, and keep a copy on your shelf. It's worth the investment.

I would also like to thank Vaughn Vernon for his excellent book, Implementing Domain Driven Design, and for advancing the field of DDD into areas such as CQRS and event-driven architecture. His book provides specific programming and architectural patterns for applying DDD using a variety of technologies, including JPA, and has influenced my thinking here a good deal.

Thanks to the developers of Java, Spring, and Hibernate, for providing a great back-end developer stack that gave me so many employment opportunities over the years. In hindsight, it is easy to focus on all the limitations of this stack, and to overlook it's power and all the ways that it was so innovative for its time. Thanks to Scala and MongoDB for helping the software world take that next step forward.

Thanks to StarUML for helping me produce all the pretty UML diagrams found in this series. Also, thanks to Blogger for providing me with a platform to write and share my work.

Finally, I'd like to thank my family, Josie, Jamey, and especially Shu, for being so supportive of me while I worked through this series. They've been very gracious and patient as I've stolen moments from here or there, and disappeared for brief spells on Sunday nights to post.

2015-05-31

Advancing Enterprise DDD - Moving Forward

In the last essay of the Advancing Enterprise DDD series, we wrapped up our discussion on immutability, as well as the technical discussion overall. In this essay, we wrap up the series by reflecting on what we've learned, and discussing how to apply these lessons as we move forward.

2015-05-24

Advancing Enterprise DDD - Entities, Value Objects, and Identity

In the previous essay of the Advancing Enterprise DDD series, we saw how we might improve our Domain Driven Design model by making our entity classes immutable. Here, we continue to investigate immutable entities by seeing how this affects one of the core DDD building blocks: the value object.

2015-05-17

Advancing Enterprise DDD - Migrating to Immutability

In the previous essay of the Advancing Enterprise DDD series, we saw difficulties emerge in maintaining intra-aggregate constraints. These difficulties arose due to the mutability of our entities, and the Java collections they use to maintain relationships between entities. We also saw that it would be difficult or impossible to use immutable alternatives within JPA. In this essay, we set aside the constraints of JPA for a moment, and imagine a world where entities are composed of immutable objects.

2015-05-10

Advancing Enterprise DDD - Maintaining Intra-aggregate Constraints

In this essay of the Advancing Enterprise DDD series, we begin look to at immutable objects - a common point of contrast between functional and object-oriented programming approaches. In the last essay, we saw at how MongoDB would be a much better vehicle than RDB for persisting well-shaped DDD aggregates. In this essay, we continue to investigate at the way the tools we use affect our thinking and coding, as we witness the contortions we have to go through to make something as straightforward as an intra-aggregate constraint work in the face of mutability.