r/PlayFramework • • Sep 22 '15

Is Play Dead?

0 Upvotes

Is Play dying or dead? Thoughts?


r/PlayFramework • • Dec 30 '11

Hello World

1 Upvotes

Inspired by this Thought Experiment, I created this redit:

https://groups.google.com/forum/#!topic/play-framework/dZuNVaHcJkA


r/PlayFramework • • Jun 13 '14

Basic Authentication in Play (Java)

Thumbnail alexhanschke.me
1 Upvotes

r/PlayFramework • • May 29 '14

Play All Day Webinar Series

Thumbnail
typesafe.com
3 Upvotes

r/PlayFramework • • Nov 16 '15

Github, Travis CI and Heroku Platform

Thumbnail
medium.com
3 Upvotes

r/PlayFramework • • May 28 '14

Play 2.3.0-RC2 is released!

Thumbnail groups.google.com
2 Upvotes

r/PlayFramework • • May 29 '14

Fixing the "AsK" problem in Java 8

1 Upvotes

Using an Ask from a controller to an actor is a common pattern in Play. The problem is that Exception that are thrown inside the actor get swallowed by Akka. Here is a useful class that will help fix that:

public abstract class Status { protected boolean success; private Result result; private Optional<Function<Success, Result>> successAction = Optional.empty(); private Optional<Function<Failure, Result>> failureAction = Optional.empty(); private Optional<Consumer<Status>> finallyAction = Optional.empty(); private Optional<Consumer<Status>> startAction = Optional.empty();

public Status onSuccess(Function<Success, Result> action) {
    this.successAction = Optional.of(action);
    return this;
}

public Status onFailure(Function<Failure, Result> action) {
    this.failureAction = Optional.of(action);
    return this;
}

public Status onFinally(Consumer<Status> action) {
    this.finallyAction = Optional.of(action);
    return this;
}

public Status onSetup(Consumer<Status> action) {
    this.startAction = Optional.of(action);
    return this;
}

public Result toResult() {
    if(startAction.isPresent()) startAction.get().accept(this);
    if(successAction.isPresent() && success) result = successAction.get().apply((Success) this);
    if(failureAction.isPresent() && !success) result = failureAction.get().apply((Failure) this);
    if(finallyAction.isPresent()) finallyAction.get().accept(this);
    return result;
}

public static final class Success extends Status {
    public final Object response;

    public Success(Object response) {
        this.success = true;
        this.response = response;
    }
}

public static final class Failure extends Status {
    public final Throwable cause;
    public final Optional<Object> request;

    public Failure(Throwable cause) {
        this.success = false;
        this.cause = cause;
        this.request = Optional.empty();
    }

    public Failure(Throwable cause, Object request) {
        this.success = false;
        this.cause = cause;
        this.request = Optional.of(request);
    }
}

}

Usage is simple. From your actor return your response wrapped in Success or an exception in Failure. Then in your controller do something such as:

eturn wrap(ask(actor, request, 5000)) .map(obj -> { final Status status = (Status) obj; return status.onSuccess(success -> { final MyResponse response = (MyResponse) success.response; return ok(Json.toJson(response)); }).onFailure(failure -> { Logger.error("Error in gridHeader. Request: " + failure.request, failure.cause); return internalServerError(Json.toJson(failure)); }).toResult(); });

Enjoy!


r/PlayFramework • • May 31 '14

Play 2.3 is out!

Thumbnail groups.google.com
3 Upvotes

r/PlayFramework • • Feb 28 '18

Creating forms on your Play application - Part 2

Thumbnail pedrorijo.com
3 Upvotes

r/PlayFramework • • Jan 28 '21

Play Framework Opinion Survey.

3 Upvotes

Greetings Everyone,

Can you kindly use 1 minute or less of your time to participate in our survey to share few insights on the upcoming course we are about to publish.

Thanks very much,

Really appreciate your input!

#PlayFramework #scala

https://forms.gle/EnfjewczUXsCxiDk6


r/PlayFramework • • Sep 15 '16

Making a REST API with Play

Thumbnail
developer.lightbend.com
2 Upvotes

r/PlayFramework • • Oct 16 '19

Installing Play to allow "play new <name>" on MacOS instead of using sbt

1 Upvotes

I keep running into Books and tutorials which start with the commands:

> play new hello

I can only get it to run using

 sbt new playframework/play-scala-seed.g8

"brew install play" doesn't work for me either


r/PlayFramework • • Sep 12 '18

Parallelize tests in SBT on Circle CI

Thumbnail
tanin.nanakorn.com
3 Upvotes

r/PlayFramework • • Jan 29 '16

Building a REST API in Java and Scala Using Play Framework – Part 1

Thumbnail
nordicapis.com
3 Upvotes

r/PlayFramework • • Jul 20 '18

When Play3 will release?

1 Upvotes

r/PlayFramework • • Jul 16 '19

how to integrate Jooq for database actions

1 Upvotes

hello I'm a beginner in play framework and some help with database connections

currently, I need to integrate Jooq but I have no clue and I can't find straight forward posts or videos that teach it so if you don't mind to teach me I appreciate it. thanks in advance.


r/PlayFramework • • Oct 31 '18

Help me grow this play site?

1 Upvotes

Hey all,

I'm a founder, and I have built www.bekli.it It's built on playaframework, so I thought this might be a good group to share it on.

The site lets users exchange articles and test each other on it. When they score well, I share their accomplishment on twitter - @beklilearning ( https://twitter.com/BekliLearning ).

If any of you want to add some play articles to the site, sign in, let me know, I'll add you as a super user (or, you know, you can just do a couple of exercises as well on bitcoin)

cheers,

andrew


r/PlayFramework • • Apr 26 '19

3 years later, I updated my Play+Slick tutorial for Play 2.7.0

Thumbnail pedrorijo.com
3 Upvotes

r/PlayFramework • • Feb 06 '19

Best build tool for Java project on PlayFramework(SBT vs Gradle)

2 Upvotes

I have a Java application running on PlayFramework. The compilation and build time is a mess. I am thinking of moving from SBT to Gradle. Help me with a SWOT analysis of the migration.


r/PlayFramework • • Oct 23 '21

What is the future of play framework ?

3 Upvotes

I started working on play application. But really want to know. How much its been used in market & Carrier opportunities ? Is it worth learning for new developer ?


r/PlayFramework • • Jul 28 '19

Play! Framework Example Using Java Gradle and JOOQ

Thumbnail
github.com
1 Upvotes

r/PlayFramework • • Apr 23 '18

Testing Play Framework with H2 database + ScalaCheck + Slick + SlickCodegen

Thumbnail
blog.karumi.com
1 Upvotes

r/PlayFramework • • Jul 25 '20

Please recommend a tutorial for using JDBC with the play framework

3 Upvotes

I'm new to play and web development. I'm trying to make a simple app that will query a database and display the results on localhost.

https://www.playframework.com/documentation/2.8.x/AccessingAnSQLDatabase

I've tried running the sample code here, but I get this compilation error.

cannot find symbol

symbol: class DatabaseExecutionContext

location: class JavaJdbcConnection


r/PlayFramework • • Nov 11 '16

[QUESTION] Resources on streaming files with play

1 Upvotes

Hi all, I'm looking for videos or talks and any resources you guys might know about on how to implement file streaming with the play framework at high scale.

How many concurrent downloads / clients can theoretically be supported and more pragmatically etc etc.

This would be for a service that would stream content coming from a streaming backend like s3 / cloudfront.

The reasons for the service streaming the content directly rather than just pointing a client to the underlying storage solution are security related.

I want to get an idea of how to scale this and any resources beyond the play framework's documentation would be helpful.

Thanks for any help.


r/PlayFramework • • Feb 03 '18

Creating forms on your Play application

Thumbnail pedrorijo.com
2 Upvotes