6 ms·
I've also been working with Play Framework and I'm pretty impressed at how awesome and easy to use everything is. The documentation is great, the performance is
by saosebastiao 11y ago
I've also been working with Play Framework and I'm pretty impressed at how awesome and easy to use everything is. The documentation is great, the performance is great.
I'm using it for just a web API, and I've had several scala developers tell me to use akka-http instead because it is simpler. I tried, but the route api is quite horrid in comparison to a simple file-based routing description, and the utilities (like the web service client) were a nightmare to work with and debug. And to top it off, the performance was still worse than play. Maybe all of that will get better, but as of right now, Play is hard to beat.
My only complaints so far:
1) Slick is bloated and kludgy and still produces bad SQL queries...I've resorted to using the plain SQL interface which is nice, but not great.
2) It could use some support for API description languages like swagger.
3) Testing your code using the dependency injection framework has been very unintuitive (I'm pretty new to dependency injection frameworks though, so maybe it's just me).
4) Action composition has been a lot harder than expected (for example: http://stackoverflow.com/questions/36683676/play-action-composition-hardcoding-parameterized-parser http://stackoverflow.com/questions/36683676/play-action-comp...)
5) I wish I didn't have to deal with an opaque SBT plugin, and that the project just used a regular SBT project structure. I realize there are reasons for needing a plugin (like codegen for routes, etc.), but at least document how to work with the plugin better. SBT is like working with a black box as it is, no need to make it worse.
- neverminder 11y agoYes there are issues, but what framework doesn't have them? I am too annoyed by 22 element tuple limit in context of slick and other stuff, but when you look around there are no better alternatives without major downsides. Try to find a decent framework written in functional strictly typed well scalable language and you end up with Play.
- yareally 11y ago> "I'm using it for just a web API, and I've had several scala developers tell me to use akka-http instead because it is simpler" Have you tried Spray? It still uses akka for actors, but I consider it easier to use than akka-http. http://spray.io/ http://spray.io/
- redtuesday 11y ago> 1) Slick is bloated and kludgy and still produces bad SQL queries...I've resorted to using the plain SQL interface which is nice, but not great. You could check out quill [1]. Haven't used it in a real application yet but the codebase seems easier to understand and the sql it produced seemed reasonable. virtualwhys could probaly tell you more - if I remember correctly he is a contributor for quill (and was/is (?) a longtime user of scalaquery/slick). [1] http://getquill.io/ http://getquill.io/
- hhandoko 11y agoJust a couple of comments: On (2): There is a number of Play Swagger plugins (e.g. https://github.com/swagger-api/swagger-play https://github.com/swagger-api/swagger-play), each with different approaches. On (3): DI can actually be quite practical. Use different implementation via configuration (bind at startup), use fakes for testing, benchmark two implementations before swapping them, etc. Develop to an interface, not to an implementation :)
- dk8996 11y agoSlick is good. Although we use the plain SQL interface because it offers the most flexibility. The docs for Slick should be much much better since it can get fairly complex. I would say its not very newbie friendly especially if you trying to learn Scala at the same time. When you figure out Slick it's very easy to use.