Need advice about which tool to choose?Ask the StackShare community!
Dropwizard vs Play: What are the differences?
Introduction: When comparing Dropwizard with Play framework, there are key differences that can help developers make an informed decision based on their specific requirements.
Architecture: Dropwizard is a bundled framework that comes with pre-configured libraries for building RESTful APIs, focusing on simplicity and expedited development. In contrast, Play framework is a full-fledged, comprehensive web framework that provides a more modular architecture encompassing a broader range of functionalities such as templating, persistence, and asynchronous operations.
Language Compatibility: Dropwizard is primarily geared towards Java developers, leveraging the power of Java and its ecosystem. On the other hand, Play framework supports multiple languages including Java, Scala, and Groovy, offering developers the flexibility to choose the language that best suits their project requirements and expertise.
ORM and Persistence: Dropwizard integrates seamlessly with the Hibernate ORM for database interaction and persistence tasks. In contrast, Play framework comes with its own built-in persistence layer known as eBeans, which simplifies database operations and eliminates the need for external ORM libraries.
Concurrency Handling: Play framework excels in handling concurrent requests through its actor-based model using Akka toolkit, enabling scalable and efficient processing of multiple requests simultaneously. Dropwizard, while capable of handling concurrent requests, might require additional configuration and libraries for achieving similar levels of concurrency as Play.
Community and Ecosystem: Play framework boasts a larger and more active community compared to Dropwizard, resulting in extensive documentation, vibrant forums, and a plethora of third-party libraries and plugins. Developers working with Play framework can benefit from a supportive community that offers assistance and resources for various development requirements.
Deployment and Scalability: Dropwizard provides a straightforward deployment process, typically bundled as a self-contained JAR file ready for execution, making it easy to deploy and scale applications. Play framework, with its built-in support for reactive programming and distribution capabilities, offers enhanced scalability options for handling high traffic loads and demanding applications efficiently.
In Summary, Dropwizard and Play framework differ in architecture, language compatibility, ORM integration, concurrency handling, community support, and deployment strategies, catering to distinct development needs and preferences.
In the past few months, a project we're working on grew up quite fast. Since we're adding more and more features, I'm considering migrating my Express/TS REST API towards a more solid and more "enterprise-like" framework. Since I am experienced with TypeScript but not so much with Rails nor Play (Scala), I'd like to have some advice on which one could provide the best development experience, and most importantly, the smoothest paradigm transition from the JS/TS world. I've worked on some personal project with Rails, but I've found the Ruby language really distant from what the TypeScript ecosystem and syntax are, whereas on the opposite - during the brief tours I've taken in the past weeks - it's been a pleasure coding in Scala. Obviously, there are some key differences between the two languages - and the two frameworks consequently - but despite all the ROR automation and ease of use I don't despise at all Scala's pragmatic and great features such as static typing, pattern matching, and type inference. So... Please help me out with the choice! Regards
I don't have the Scala experience to compare the two, but I can say that Ruby is a wonderful language. For procedural programming where you don't need a lot of concurrent execution threads, it's superior to Node.JS in my opinion. All of the concepts from Typescript have equivalent syntax in Ruby, but there are fewer symbols (e.g. () => { ... }); ) and more keywords (eg 'do ... end'). It's a very flexible language and allows for a lot of different approaches to how it's written, so coding standards and careful organization is important. In the long run, however, you'll find it quicker to debug than Node.JS and just as powerful.
If you are comfortable with TypeScript, why not evolve to a C# ecosystem? Asp.Net Core + Entity Framework is a mature and well supported technology. As far as I can see in the enterprise market, the most adopted choice is still Java. So, maybe you may have a look to SpringBoot - and ultimately Quarkus.
This is advice regardless of your background and requirements. The Play framework has a terrible and complicated design, don't risk it. I even suggest Spring and Kotlin over it! You can use Scala for small services and Data Engineering stuff and benefit optimizations and threading of JVM. RoR, on the other hand, has a huge development speed, which I believe is a big advantage cause you can handle performance bottlenecks later. Also, Scala has another downside, which is featureful in terms of OO and FP paradigms, which makes anyone write code freely with any personal style and makes it a problem in a team, Hence a coding style has to be defined if there would be Scala development team.
If software performance is your top priority, then Scala/Play is probably best. If developer productivity is your top priority, then Ruby on Rails is the best choice in my opinion.
The Rails framework is batteries-included. The framework takes care of many things by default so that you don't have to. Logging, security, etc. It's also well-integrated; for example, controllers understand models out of the box. I had a better experience with RoR than with Play.
On the other hand, Scala and the JVM are more performant in general, so they can scale to serve more requests per second on the same hardware.
If you're considering serverless functions, then Scala is probably a better choice because it would be faster to load, giving you better economics.
Starting a new company in 2020, with a whole new stack, is a really interesting opportunity for me to look back over the last 20 years of my career with web software and make the right decision for my company.
And, I went with the most radical decision– which is to ignore "sexy" / "hype" technologies almost entirely, and go back to a stack that I first used over 15 years ago.
For my purposes, we are building a video streaming platform, where I wanted rapid customer-facing feature development, high testability, simple scaling, and ease of hiring great, experienced talent. To be clear, our web platform is NOT responsible for handling the actual bits and bytes of the video itself, that's an entirely different stack. It simply needs to manage the business rules and the customers experience of the video content.
I reviewed a lot of different technologies, but none of them seemed to fit the bill as well as Rails did! The hype train had long left the station with Rails, and the community is a little more sparse than it was previously. And, to be honest, Ruby was the language that was easiest for developers, but I find that most languages out there have adopted many of it's innovations for ease of use – or at least corrected their own.
Even with all of that, Rails still seems like the best framework for developing web applications that are no more complex than they need to be. And that's key to me, because it's very easy to go use React and Redux and GraphQL and a whole host of AWS Lamba's to power my blog... but you simply don't actually NEED that.
There are two choices I made in our stack that were new for me personally, and very different than what I would have chosen even 5 years ago.
1) Postgres - I decided to switch from MySql to Postgres for this project. I wanted to use UUID's instead of numeric primary keys, and knew I'd have a couple places where better JSON/object support would be key. Mysql remains far more popular, but almost every developer I respect has switched and preferred Postgres with a strong passion. It's not "sexy" but it's considered "better".
2) Stimulus.js - This was definitely the biggest and wildest choice to make. Stimulus is a Javascript framework by my old friend Sam Stephenson (Prototype.js, rbenv, turbolinks) and DHH, and it is a sort of radical declaration that your Javascript in the browser can be both powerful and modern AND simple. It leans heavily on the belief that HTML-is-good and that data-* attributes are good. It focuses on the actions and interactions and not on the rendering aspects. It took me a while to wrap my head around, and I still have to remind myself, that server-side-HTML is how you solve many problems with this stack, and avoid trying to re-render things just in the browser. So far, I'm happy with this choice, but it is definitely a radical departure from the current trends.
Pros of Dropwizard
- Quick and easy to get a new http service going27
- Health monitoring23
- Metrics integration20
- Easy setup20
- Good conventions18
- Good documentation14
- Lightweight14
- Java Powered13
- Good Testing frameworks10
- Java powered, lightweight7
- Simple5
- Scalable4
- Great performance, Good in prod3
- Open source2
- All in one-productive-production ready-makes life easy2
Pros of Play
- Scala81
- Web-friendly architecture55
- Built on akka55
- Stateless50
- High-scalable47
- Fast46
- Open source40
- Java34
- High velocity27
- Fun24
- Lightweight9
- Non-blocking io8
- Developer friendly6
- Simple template engine5
- Scalability4
- Pure love3
- Resource efficient2
Sign up to add or upvote prosMake informed product decisions
Cons of Dropwizard
- Slightly more confusing dependencies2
- Not on ThoughtWorks radar since 20141
Cons of Play
- Evolves fast, keep up with releases3
- Unnecessarily complicated1