Skip to content

Commit

Permalink
Merge pull request #546 from mkurz/community_driven
Browse files Browse the repository at this point in the history
Emphasize Play is Community driven + Offer Pekko AND Akka
  • Loading branch information
mkurz authored Nov 1, 2023
2 parents 9d503c8 + c51274b commit 851917c
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 77 deletions.
11 changes: 0 additions & 11 deletions app/assets/css/modules/_oneTrust.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@ body .optanon-alert-box-wrapper .optanon-alert-box-bottom-top
body .optanon-alert-box-wrapper .optanon-alert-box-bottom-padding
padding-bottom: 20px

.lightbend-privacy-cookie-footer
padding: 1rem 0 1rem 0
color: white
vertical-align: middle
p
font-size: 0.875rem
vertical-align: middle
.optanon-show-settings-wrapper
display: inline-block
vertical-align: middle

.optanon-cookie-policy-group-name
font-weight: 700

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/Outreachy.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Outreachy @Inject() (components: ControllerComponents)(implicit
reverseRouter: documentation.ReverseRouter,
) extends AbstractController(components) {

def outreachy = Action(Redirect(routes.Outreachy.round15))
//def outreachy = Action(Redirect(routes.Outreachy.round15))

def round10 = Action { implicit req =>
Ok(views.html.outreachy.round10())
Expand Down
2 changes: 1 addition & 1 deletion app/views/blog/graal.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h1>@title</h1>
<p>There is also another edition called the Enterprise Edition which is not open source and you need to acquire a license to use it in production, but according to the docs it’s safe to use for development and evaluation. The Enterprise Edition is currently available for macOS and Linux, it has further benefits (comes with a smaller footprint and has more sandbox capabilities).</p>
<p>In the future the Graal team will probably present us with more options regarding the operating system. For our blog post we stick to the Community Edition on Linux.</p>
<h3 id="play-production-mode">Play Production Mode</h3>
<p>Running Play or any Scala application on Graal is probably as easy as just switching to another Java VM. We will build the <a href="https://example.lightbend.com/v1/download/play-scala-starter-example">Play example project</a>, via <a href="https://www.playframework.com/documentation/2.6.x/Deploying#Using-the-SBT-assembly-plugin">sbt-assembly</a> and copy the production JAR to a regular server.</p>
<p>Running Play or any Scala application on Graal is probably as easy as just switching to another Java VM. We will build the <a href="https://github.com/playframework/play-samples/tree/HEAD/play-scala-starter-example">Play example project</a>, via <a href="https://www.playframework.com/documentation/2.6.x/Deploying#Using-the-SBT-assembly-plugin">sbt-assembly</a> and copy the production JAR to a regular server.</p>
<p>After downloading Graal and unpacking it, one can just run the application via <code>$GRAAL_HOME/bin/java -Xms3G -Xmx3G -XX:+UseG1GC -jar play-scala-starter-example-assembly-1.0-SNAPSHOT.jar</code>. Keep in mind for a production run, one would use a service manager or run the application inside an orchestration system like Kubernetes.</p>
<p>The Play application started without any problem and one could use <code>curl</code> to ensure it is running via <code>curl http://graalserver:9000/</code> and it will print the Play “hello world page”.</p>
<h2 id="-performance-of-graal">“Performance” of Graal</h2>
Expand Down
2 changes: 2 additions & 0 deletions app/views/commonSidebar.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
<li><a href="@routes.Application.communityProcess">Community process</a></li>
<li><a href="@routes.Security.index">Reporting security vulnerabilities</a></li>
</ul>
@*
<@hn>Programs</@hn>
<ul>
<li><a href="@routes.Outreachy.outreachy">Outreachy</a></li>
</ul>
*@
2 changes: 1 addition & 1 deletion app/views/getInvolved.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1>How you can help</h1>
<div class="links">

<h3 class="opencollective">Donate to our Open Collective</h3>
<a href="//opencollective.com/playframework#section-contributors">75+ backers</a>
<a href="//opencollective.com/playframework#section-contributors">300+ backers</a>
<p>
Play uses <a href="//opencollective.com/playframework">Open Collective</a> to collect donations from sponsors. These funds are used to pay contributors and cover project costs, openly and transparently.
Individuals and companies alike can support Play financially by <a href="@routes.Application.sponsors">becoming backers or premium sponsors</a>.
Expand Down
86 changes: 59 additions & 27 deletions app/views/gettingStarted.scala.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
@import controllers.documentation.ReverseRouter
@(examples: PlayExamples)(implicit requestHeader: RequestHeader, reverseRouter: ReverseRouter)

@renderProject(project: ExampleProject) = {
@renderBaseTech(version: String) = @{
version match {
case "2.9.x" => "Akka"
case _ => "Pekko"
}
}

@renderProject(version:String, project: ExampleProject) = {
<tr>
<td>@project.displayName</td>
<td>@project.displayName.dropRight(9)</td>
<td><a href="@project.gitHubUrl" target="_blank">View on GitHub</a></td>
<td><a href="https://github.com/playframework/play-samples/archive/refs/heads/@{version}.zip">Download zip</a> <small>then unzip and<br><code>cd ./@{project.gitHubUrl.split("/").last}/</code></small></td>
</tr>
}

Expand All @@ -30,58 +38,82 @@ <h3><span>&raquo;</span> Learn whether Play Framework is right for your project<
</div>
</div>
<div class="try-option">
<h3><span>&raquo;</span> Try the Hello World Tutorial</h3>
<h3><span>&raquo;</span> Try a Hello World Tutorial</h3>
<div class="try-option-content">
<p>The Java and Scala Hello World projects are self-contained tutorials that include a distribution of the sbt build tool.</p>
<p>Play requires Java 8 or higher. Check your version with the <code>java -version</code> command and if needed, install it from <a href="https://adoptium.net/" rel="noopener">Adoptium</a>.</p>
<p>To try the tutorial, first download the Java or Scala project:</p>
<table>
<p>The Play Java and Play Scala "Hello World" projects are self-contained tutorials that are part of the <a href="https://github.com/playframework/play-samples">play-samples repository</a>. To try a tutorial, you can either clone the repository and check out the respective branch or download its contents as a zip file:</p>
<table>
@examples.sections.map { case (version, section) =>
<tbody>
<tr><th><h4>Play @version Hello World Projects</h4></th></tr>
<tr><th colspan="3"><h4>Play @version Hello World Projects (Built on @{renderBaseTech(version)})</h4></th></tr>
@section.tutorials.getOrElse("java", Seq.empty).map { (project) =>
@renderProject(project)
@renderProject(version, project)
}
@section.tutorials.getOrElse("scala", Seq.empty).map { (project) =>
@renderProject(project)
@renderProject(version, project)
}
</tbody>
}
</table>
<p>To run the tutorial:</p>
<ol>
<li>Unzip the project in a convenient location.</li>
<li>In a command window, change to the top-level project directory.</li>
<blockquote>
<p>
Besides replacing Akka with Pekko, Play 3.0 is identical to Play 2.9. If you don't know what Akka or Pekko is, we recommend using Play 3.0. For more details on which version to use, read <a href="@reverseRouter.latest(None, "General#How-Play-Deals-with-Akkas-License-Change")" target="_blank">"How Play Deals with Akka’s License Change"</a>.
</p>
</blockquote>
<p>To run a tutorial follow the <code>README</code> file instructions in the respective folder. In short:</p>
<ol>
<li>Please check <a href="@reverseRouter.latest(None, "Requirements")" target="_blank">the requirements for using Play</a>: Java and sbt needs to be installed.</li>
<li>Clone or unzip the repo in a convenient location.</li>
<li>In a command window, change to the project directory of the desired tutorial.</li>
<li>Enter <code>sbt run</code>.</li>
<li>After the message <code>Server started, ...</code> displays, enter the following URL in a browser: <a href="http://localhost:9000">http://localhost:9000</a></li>
<li>The tutorial welcome page displays.</li>
</ol>
<p>The tutorial welcome page displays.</p>
</div>
</div>
</div>

<div class="try-section">
<h2>Already know a bit about Play?</h2>
<p>There are a variety of <a href="https://github.com/playframework/play-samples">Play example projects for Java and Scala</a> that are focused on a particular use case. These include everything you need, including <a href="//www.scala-sbt.org/index.html">sbt</a>, Play Framework, and an HTTP server. The examples also support <a href="//gradle.github.io/playframework/">Gradle</a>.</p>
<p>If you are ready to start your own project and have sbt installed, you can create a Play project from the command line.</p>
<p>There are a variety of <a href="https://github.com/playframework/play-samples">Play example projects for Java and Scala</a> that focus on specific use cases. To run these sample projects, please check <a href="@reverseRouter.latest(None, "Requirements")" target="_blank">the requirements for using Play</a>: Java and sbt needs to be installed.</p>
<p>If you are ready to start your own project and have sbt and Java installed, you can create a Play project from the command line.</p>

<div class="try-option">
<h3><span>&raquo;</span> Create a Play Java or Scala project using <code>sbt new</code></h3>
<h3><span>&raquo;</span> Create a new Play Java or Scala project using <code>sbt new</code></h3>
<div class="try-option-content">
<p>In a command window, enter one of the following and respond to the prompts to create a new project:</p>

<h4>Java seed template</h4>
<pre>sbt new playframework/play-java-seed.g8</pre>

<h4>Scala seed template</h4>
<pre>sbt new playframework/play-scala-seed.g8</pre>

<p>After the template creates the project:</p>
<p>In a command window, enter the following:</p>
<pre>sbt new</pre>
<p>
In the interactive menu choose:
<ul>
<li><code>playframework/play-scala-seed.g8</code> for a Play Scala project</li>
<li><code>playframework/play-java-seed.g8</code> for a Play Java project</li>
</ul>
</p>
<p>
Then respond to the prompts. After the project got created:</p>
<ol>
<li>Change into the top level project directory.</li>
<li>Enter <code>sbt run</code> to download dependencies and start the system.</li>
<li>In a browser, enter <a href="http://localhost:9000">http://localhost:9000</a> to view the welcome page.</li>
</ol>

<h4>Using the Java seed template directly instead</h4>
<p>Enter:</p>
<pre>sbt new playframework/play-java-seed.g8</pre>
To create a Play Java 2.9 project:
<pre>sbt new playframework/play-java-seed.g8 --branch 2.9.x</pre>

<h4>Using the Scala seed template directly instead</h4>
<p>Enter:</p>
<pre>sbt new playframework/play-scala-seed.g8</pre>
To create a Play Scala 2.9 project:
<pre>sbt new playframework/play-scala-seed.g8 --branch 2.9.x</pre>

<blockquote>
<p>
Besides replacing Akka with Pekko, Play 3.0 is identical to Play 2.9. If you don't know what Akka or Pekko is, we recommend using Play 3.0. For more details on which version to use, read <a href="@reverseRouter.latest(None, "General#How-Play-Deals-with-Akkas-License-Change")" target="_blank">"How Play Deals with Akka’s License Change"</a>.
</p>
</blockquote>
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions app/views/index.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h1>Play Framework makes it easy to build web applications with Java &amp; Scala
Play is based on a lightweight, stateless, web-friendly architecture.
</p>
<p>
Built on Akka, Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.
Built on Pekko (Play 3) and Akka (Play 2), Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.
</p>
</article>
<article class="feature developer">
Expand Down Expand Up @@ -91,12 +91,12 @@ <h6>Play instances usage</h6>
</div>
<h2>Scale predictably.</h2>
<p>
Underneath the covers Play uses a fully asynchronous model built on top of Akka. Combined with being stateless, Play scales simply and predictably.
Underneath the covers Play uses a fully asynchronous model built on top of Pekko (Play 3) and Akka (Play 2). Combined with being stateless, Play scales simply and predictably.
</p>
<ul>
<li>Stateless Web Tier</li>
<li>Non-blocking I/O</li>
<li>Built on Akka</li>
<li>Built on Pekko (Play 3) and Akka (Play 2)</li>
<li>Real-time enabled</li>
</ul>
</article>
Expand Down Expand Up @@ -124,7 +124,7 @@ <h2>Solid &amp; fast.</h2>
<ul>
<li>Code is compiled</li>
<li>Runs on the JVM</li>
<li>Java NIO via Akka HTTP or Netty</li>
<li>Java NIO via Pekko/Akka HTTP or Netty</li>
</ul>
</article>
<article class="feature techs small">
Expand Down
7 changes: 0 additions & 7 deletions app/views/main.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,12 @@ <h3>Social networks</h3>
</div>
</div>
<div class="credits">
<a href="/" class="logo"><img src="@routes.Assets.versioned("images/logos/play_reverse.svg")"></a>
<a href="//lightbend.com" class="partner"><img src="@routes.Assets.versioned("images/logos/lightbend-reverse.svg")"></a>
<a href="http://zengularity.com" class="partner"><img src="@routes.Assets.versioned("images/logos/zengularity.png")"></a>
<p>
Play Framework is released under the Apache 2 License
</p>
</div>
<div class="lb-legal">
<p>
&copy; Lightbend 2021 |
<a href="https://www.lightbend.com/legal/licenses" target="_blank">Licenses</a> |
<a href="https://www.lightbend.com/legal/terms" target="_blank">Terms</a> |
<a href="https://www.lightbend.com/legal/privacy" target="_blank">Privacy Policy</a> |
<a href="@routes.Application.cookie">Cookie Listing</a> |
<a class="optanon-toggle-display">Cookie Settings</a>
</p>
Expand Down
3 changes: 1 addition & 2 deletions app/views/sponsors.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1>@title</h1>
<article>
<h1>Why sponsor Play?</h1>
<p>
At the end of 2021 <a href="//www.lightbend.com/">Lightbend</a>, the company that sponsored and lead the development of the Play Framework for almost a decade, <a href="//discuss.lightbend.com/t/on-the-future-of-play-framework/8920">handed over the project to the community</a>.
At the end of 2021 <a href="//www.lightbend.com/">Lightbend</a>, the company that sponsored and lead the development of the Play Framework for almost a decade, <a href="//web.archive.org/web/20221219111211/https://discuss.lightbend.com/t/on-the-future-of-play-framework/8920">handed over the project to the community</a>.
Since then the Play Framework uses <a href="//opencollective.com/playframework">Open Collective</a> to gather money to pay contributors and to cover other project expenses in <a href="//opencollective.com/how-it-works">the most transparent way possible</a>.
</p>
<p>
Expand Down Expand Up @@ -60,7 +60,6 @@ <h2>Who is responsible?</h2>
These members are:
<ul>
<li><a href="//github.com/BillyAutrey">Billy Autrey</a></li>
<li><a href="//github.com/octonato">Renato Cavalcanti</a></li>
<li><a href="//github.com/mkurz">Matthias Kurz</a></li>
<li><a href="//github.com/eloots">Eric Loots</a></li>
<li><a href="//github.com/gmethvin">Greg Methvin</a></li>
Expand Down
10 changes: 9 additions & 1 deletion conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ documentation {
{ from = "ProductionDist", to = "Production" },
{ from = "Protocols", to = "https://lightbend.github.io/ssl-config/Protocols.html" },
{ from = "PullRequests", to = "https://github.com/playframework/.github/blob/main/CONTRIBUTING.md"},
{ from = "Samples", to = "https://developer.lightbend.com/start/?group=play" },
{ from = "Samples", to = "https://github.com/playframework/play-samples" },
{ from = "ScalaAnorm", to = "https://playframework.github.io/anorm/" },
{ from = "ScalaEmbeddingPlay", to = "ScalaEmbeddingPlayAkkaHttp" },
{ from = "ScalaFormHelpers", to = "ScalaForms" },
Expand All @@ -146,6 +146,14 @@ documentation {
{ from = "JavaEbean", to = "https://github.com/playframework/play-ebean/" },
{ from = "JavaDatabase", to = "AccessingAnSQLDatabase" },
{ from = "ScalaDatabase", to = "AccessingAnSQLDatabase" },
{ from = "JavaAkka", to = "JavaPekko" },
{ from = "ScalaAkka", to = "ScalaPekko" },
{ from = "AkkaIntegrations", to = "PekkoIntegrations" },
{ from = "AkkaClusterSharding", to = "PekkoClusterSharding" },
{ from = "AkkaHttpServer", to = "PekkoHttpServer" },
{ from = "SettingsAkkaHttp", to = "SettingsPekkoHttp" },
{ from = "AkkaTyped", to = "PekkoTyped" },
{ from = "ScalaEmbeddingPlayAkkaHttp", to = "ScalaEmbeddingPlayPekkoHttp" },

]
}
Expand Down
Loading

0 comments on commit 851917c

Please sign in to comment.