Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@marcospereira
Copy link
Member

Purpose

Lots of improvements to Play getting started experience. This is the result of work with @rstento and replaces #8295.

References

playframework/playframework.com#206


Play APIs are available in both Java and Scala. The Framework uses [Akka](https://akka.io) and [Akka HTTP](https://doc.akka.io/docs/akka-http/current/index.html) under the hood. This endows Play applications with a stateless, non-blocking, event-driven architecture that provides horizontal and vertical scalability and uses resources more efficiently. Play projects contain Scala components, but you do not need to learn Scala to use Play successfully if you are a Java developer.

The following describe just a few of the reasons why developers enjoy using Play framework:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could say "Here are just a few of the reasons developers love using Play Framework:"


To define a route for the new Hello page:

Open the `conf/routes` file and aFdd the following line:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/aFdd/add/


Open the `conf/routes` file and aFdd the following line:

@[hello-world-hello-route](code/commonguide/routes)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the routes generation is a big part of the "magic" that Play provides, I think it'd be helpful to explain what it's actually doing. In other words, something like:

"When you add a route to the routes file, Play's routes compiler will automatically generate a router class that calls an instance of your controller. For more information see the routing documentation. The controller instances are created using dependency injection."


This was just a simple example to get you started. Next, pick one that demonstrates functionality of interest to you. The examples you can download cover the following topics:

### Java
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer if we can example service API directly to render the examples, so we don't have to manually update with new versions/examples.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that too, but it would be easier to keep this page on playframework.com. However, if we are linking to another page, why not to link directly to Tech Hub? So I understand this list as a hand pick of the examples.

Maybe we should not include all of them here?

@rstento, what do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we update the example code server so it can render an iframe listing all templates which we can just embed here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richdougherty nice idea.

But I'm not sure this is something that is part of the Tech Hub, maybe we are the only "customer" that needs it? Anyway, we can always do our own page that is embeddable. ;-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that having something that refreshes itself is good. However, I found the "laundry" list of Play examples on Tech Hub daunting and difficult to sort through. I have a request in to the tooling team to implement a filter that allows you to view only Java or only Scala examples, but it is a WIP. I think for a new user, providing a brief explanation of what the examples are so they know where to go next is important. It that can be done, either by modifying the cards in Tech Hub, or pulling in the info in a different way, I'm all for it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a request in to the tooling team to implement a filter that allows you to view only Java or only Scala examples, but it is a WIP.

I think it is possible to do it on our side too. But agree that this should be something Tech Hub provides.

I think for a new user, providing a brief explanation of what the examples are so they know where to go next is important. It that can be done, either by modifying the cards in Tech Hub, or pulling in the info in a different way, I'm all for it.

We already have some explanation, but it is not that brief. It is another piece of data that needs to be present at the Tech Hub service I think so we can manage all the data related to the example in a single place.


Play’s lightweight, stateless, web-friendly architecture uses Akka and Akka Streams under the covers to provide predictable and minimal resource consumption (CPU, memory, threads). Thanks to its reactive model, applications scale naturally--both horizontally and vertically. See [Elasticity](https://developer.lightbend.com/elastic-scaling/) and [Efficient Resource Usage](https://developer.lightbend.com/efficient-resource-usage/) for more information.

Play is non-opinionated about database access, and integrates with many object relational mapping (ORM) layers. It supports [[Anorm]], [[Ebean|PlayEbean]], [[Slick|PlaySlick]], and [[JPA|JavaJPA]], out-of-the-box but many customers use NoSQL or other ORMs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use spaces for "out of the box" with no comma before. Also "users" instead of "customers" (it's an open source framework, not a company). e.g. "It integrates with Anorm, Ebean, Slick and JPA out of the box, but many users use NoSQL or other ORMs with Play.


Play example projects available from [Lightbend Tech Hub](https://developer.lightbend.com/start/?group=play) automatically download dependencies and have `./sbt` and `sbt.bat` launchers for Unix and Windows environments, respectively. You do not have to install sbt to run them.

If you are ready to start your own project and want to use sbt, refer to the [sbt download page](https://www.scala-sbt.org/download.html) to install the sbt launcher on your system. See [sbt documentation](http://www.scala-sbt.org/release/docs/Setup-Notes.html) for details about how to setup sbt. We recommend that you use the latest version of sbt. With sbt installed, you can use our [giter8](http://www.foundweekends.org/giter8/) templates for Java or Scala to [[create a new project with a single command|NewApplication]].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does installing the sbt launcher have to do with starting a new project? In other words, what is the downside of using the ./sbt script?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be reworded, but the idea is that "with sbt installed, you can use our giter8 templates for Java and Scala to create a new project with a single command. Maybe this should be at the start of the paragraph instead of the end. What do you think about this:

But if you want to use sbt to create your project, you need to install the sbt launcher on your system. With sbt installed, you can use our gitter8 template for Java or Scala to create a new project with a single command, using sbt new. Refer to the sbt download page to install the sbt launcher on your system and sbt documentation for details about how to setup it.

@rstento what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice rewording!

}
//#hello-world-hello-action

/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to uncomment and move these to a separate file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

I can do that to the one that compiles, but not to the one that does not.

This is an example template showing compile time dependency injection using [Macwire](https://github.com/adamw/macwire).

* [playframework/play-macwire-di](https://github.com/playframework/play-macwire-di)
Play uses [Lightbend Tech Hub](https://developer.lightbend.com/start/?group=play) to publish tutorials that cover a huge number of cases. There you can find projects in Java, Scala and for multiple versions of Play.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead this should be "The Play team uses Lightbend Tech Hub.."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, this was another place where the examples list was duplicated, but with additional details and categorization. I decide to remove it from here in favor of linking to Tech Hub. As I said before, an alternative is to have these links listed in a page on playframework.com.

@rstento what do you think?


## Introduction to Play

As illustrated below, Play is a full-stack framework with all of the components you need to build a Web Application or a REST service, including: an integrated HTTP server, form handling, Cross-Site Request Forgery (CSRF) protection, a powerful routing mechanism, I18n support, and more. Play integrates with many object relational mapping (ORM) layers. It supports [[Anorm]], [[Ebean|JavaEbean]], [[Slick|PlaySlick]], and [[JPA|JavaJPA]] out-of-the-box, but many customers use NoSQL or REST layers and other ORMs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REST layers <-- doesn't seem to fit into this list of ORMs and NoSQL?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... but many customers use NoSQL or REST layers and other ORMs.

Rewrite to:

but many customers use NoSQL, other ORMs or even access data from a REST service.

WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I like the rewrite ...but many customers use NoSQL, other ORMs or even access data from a REST service.


[[images/play-stack.png]]

Play APIs are available in both Java and Scala. The Framework uses [Akka](https://akka.io) and [Akka HTTP](https://doc.akka.io/docs/akka-http/current/index.html) under the hood. This endows Play applications with a stateless, non-blocking, event-driven architecture that provides horizontal and vertical scalability and uses resources more efficiently. Play projects contain Scala components, but you do not need to learn Scala to use Play successfully if you are a Java developer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Play projects contain Scala components, but you do not need to learn Scala ...
-->
Play projects contain Scala components, but because Play has a Java API, you do not need to learn Scala ...

Here are just a few of the reasons developers love using Play Framework:

- Its Model-View-Controller (MVC) architecture is familiar and easy to learn.
- Direct support of common web development tasks and hot reloading save precious development time.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

save -> saves

1. Define a route
1. Customize the greeting

## Create the Hello World page
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, but perhaps put a number in front of this heading and the following headings so that they match the numbering in the list above?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


[[images/hello-page.png]]

## Customize the greeting
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this could be in a section about "Automatic reloading and display of errors" or something like that.

:
@[hello-world-hello-error-action](code/scalaguide/hello/HelloController.scala)

In the `conf/routes` file, add a (name: String) parameter at the end of the `hello`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add backticks around (name: String).


In the browser, enter the following URL and pass in any name as a query parameter to the hello method: <http://localhost:9000/hello?name=MyName>. Play responds with a helpful compilation error that lets you know that the render method in the return value requires a typed parameter:

[[images/hello-error.png]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice to demo this!


This was just a simple example to get you started. Next, pick one that demonstrates functionality of interest to you. The examples you can download cover the following topics:

### Java
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we update the example code server so it can render an iframe listing all templates which we can just embed here?


Play is a high-productivity Java and Scala web application framework that integrates components and APIs for modern web application development. Play was developed by web developers for web application development.

You will find Play's Model-View-Controller (MVC) architecture familiar and easy to learn. Play provides concise and functional programming patterns. And, the large community developing Play applications provides an excellent resource for getting your questions answered.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove , from And,.

# Creating a new application

## Using Play Starter Projects
To learn about Play hands-on, try the examples as described below, they contain everything you need to build and run them. If you have sbt installed, you can create a Play project with a single command, using our giter8 Java or Scala template. The templates set up the project structure and dev environment for you. You can also easily integrate Play projects into your favorite IDE.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could sbt installed link to the sbt page or sbt installation page?

## Using a project template

> **Note**: If running Windows, you may need to run sbt using `sbt.bat` instead of `sbt`. This documentation assumes the command is `sbt`.
If you already have sbt installed, you can use a giter8 template, similar to a Maven archetype, to create a new Play project. This gives you the advantage of setting up your project folders, build structure, and development environment--all with one command.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again link to sbt from the sbt installed words?


You can also [create your own giter8 seeds](http://www.foundweekends.org/giter8/usage.html) and based off this one by forking from the <https://github.com/playframework/play-java-seed.g8> or <https://github.com/playframework/play-scala-seed.g8> GitHub projects.
1. Enter `sbt run` to download dependencies and start the system.
1. In a browser, enter <http://localhost:9000> to view the welcome page.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned earlier, maybe make this an so the user can click it? I suggest using a fixed target too so that it always opens in a specific tab.

## Development mode

## Running the server in development mode
In this mode, sbt launches Play with the auto-reload feature enabled. For each request, Play will watch your project files and recompile required sources when they change. If needed the application will restart automatically.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems ambiguous about whether Play will recompile eagerly or only when a request is made. Maybe something like the following?

When you make a request, Play will automatically recompile and restart your server if any files have changed.

<!--- Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> -->

# Play Requirements
Play is a series of libraries available in Maven Repository so that you can use any Java or Scala build tool to build a Play project. However, much of the development experience Play is known for (routes, templates compilation and auto-reloading) is provided by sbt or Gradle.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Play application only needs to include the Play JAR files to run properly. These JAR files are published to the Maven Repository so you can use any Java or Scala build tool to build a Play project. However, Play provides an enhanced development experience (support for routes, templates compilation and auto-reloading) when using the sbt or Gradle build tools.


## Introduction to Play

As illustrated below, Play is a full-stack framework with all of the components you need to build a Web Application or a REST service, including: an integrated HTTP server, form handling, Cross-Site Request Forgery (CSRF) protection, a powerful routing mechanism, I18n support, and more. Play integrates with many object relational mapping (ORM) layers. It supports [[Anorm]], [[Ebean|JavaEbean]], [[Slick|PlaySlick]], and [[JPA|JavaJPA]] out-of-the-box, but many customers use NoSQL or REST layers and other ORMs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I like the rewrite ...but many customers use NoSQL, other ORMs or even access data from a REST service.

1. Define a route
1. Customize the greeting

## Create the Hello World page
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


This was just a simple example to get you started. Next, pick one that demonstrates functionality of interest to you. The examples you can download cover the following topics:

### Java
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that having something that refreshes itself is good. However, I found the "laundry" list of Play examples on Tech Hub daunting and difficult to sort through. I have a request in to the tooling team to implement a filter that allows you to view only Java or only Scala examples, but it is a WIP. I think for a new user, providing a brief explanation of what the examples are so they know where to go next is important. It that can be done, either by modifying the cards in Tech Hub, or pulling in the info in a different way, I'm all for it.


Play example projects available from [Lightbend Tech Hub](https://developer.lightbend.com/start/?group=play) automatically download dependencies and have `./sbt` and `sbt.bat` launchers for Unix and Windows environments, respectively. You do not have to install sbt to run them.

If you are ready to start your own project and want to use sbt, refer to the [sbt download page](https://www.scala-sbt.org/download.html) to install the sbt launcher on your system. See [sbt documentation](http://www.scala-sbt.org/release/docs/Setup-Notes.html) for details about how to setup sbt. We recommend that you use the latest version of sbt. With sbt installed, you can use our [giter8](http://www.foundweekends.org/giter8/) templates for Java or Scala to [[create a new project with a single command|NewApplication]].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice rewording!

@marcospereira
Copy link
Member Author

@rstento, @richdougherty, and @gmethvin.

I've made most of the changes suggested, so this should be good to go.

The sample projects listing needs some additional work that will happen in another project, so I would say to keep the list as is here and later add new features to playframework.com or the Tech Hub.

WDYT?

@rstento
Copy link
Contributor

rstento commented May 15, 2018 via email

@TimMoore
Copy link

TimMoore commented Aug 2, 2018

@marcospereira @richdougherty could you have another look at this?

1. [Play Scala Starter Example](https://developer.lightbend.com/start/?group=play&project=play-scala-starter-example)
1. Unzip and run the example following the steps in the `README.md` file.

## Introduction to Play
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcospereira, should we take this section out, since it is a duplicate of what is in the example? Or could it be moved elsewhere?

@@ -0,0 +1,114 @@
<!--- Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> -->

# Implementing Hello World
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely think we should remove these instructions since they now duplicate those in the Hello World self-contained examples for Java and Scala. @marcospereira WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with that if we publish the examples to somewhere that is easier to find and consume. The current state is that search engines don't index them and you need to create/run a project to read them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like these instructions. In the PlayAppOverview (just before this one) you see code that's in the app already. This page is a call to action with enough hand-holding that if something breaks it should be immediate to spot the error.

To me, the PlayAppOverview is a canary feature: if you checkout the code and the canary feature doesn't work, there's definitely something wrong. If the canary works, move forward and add a new route/controller/page yourself and, If something breaks, well, check back with the canary.

@@ -0,0 +1,51 @@
<!--- Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> -->

# Play Application Overview
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcospereira same comment here, this page can be removed.

@rstento
Copy link
Contributor

rstento commented Sep 19, 2018 via email

@marcospereira
Copy link
Member Author

Which content specifically do you think should be indexed by search engines?

The complete Hello World tutorial. It should be possible for me to google for "playframework hello world" and reach the proper documentation page.

Copy link
Member

@ignasi35 ignasi35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a handful of comments:

  • some cosmetic issue wrt links dendered twice (affects few places, I haven't tagged all of them)
  • coherence around route/controller/view order (some sections use route/controller/view and some sections use controller/route/view... a bit confusing)
  • minor cosmetic or typos.

Another very helpful tool provided by Play is a translation report, which shows which files have not been translated, and also tries to detect issues, for example, if the translation introduces new files, or if the translation is missing code samples. This can particularly help when translating a new version of the documentation, since the addition or removal of code samples will often be a good signal that something has changed.

To view the translation report, run the documentation server (like normal), and then visit <http://localhost:9000/@report> in your browser. By default it will serve a cached version of the report if it has been generated in the past, you can rerun the report by clicking the rerun report link.
To view the translation report, run the documentation server (like normal), and then visit <a target="play-docs" href="http://localhost:9000/@report">http://localhost:9000/@report</a> in your browser. By default it will serve a cached version of the report if it has been generated in the past, you can rerun the report by clicking the rerun report link.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change renders wrong (at least locally). What seems to happen is that two <a> objects are created:
screen shot 2018-09-20 at 11 49 04

(See the two icons and also the two <a> elements in the inspector).

This problem happens in fe places in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done here and at other places.

- Provides type safety
- Is compiled so that errors display in the browser

To learn more about Play's benefits, visit the [Play website](https://www.playframework.com). Now, let's dive into what a Play application looks like.
Copy link
Member

@ignasi35 ignasi35 Sep 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this last line isn't necessary. Readers are on the play site already. :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, pointing to Introduction and Philosophy pages make more sense.


1. The browser requests the root `/` URI from the HTTP server using the `GET` method.
1. The Play internal HTTP Server receives the request.
1. Play resolves the request using the routes file, which maps URIs to controller action methods.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

routes should be back-ticked:

1. Play resolves the request using the `routes` file, which maps URIs to controller action methods.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

1. The browser requests the root `/` URI from the HTTP server using the `GET` method.
1. The Play internal HTTP Server receives the request.
1. Play resolves the request using the routes file, which maps URIs to controller action methods.
1. The action method renders the `index` page, using Twirl templates.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optionally, we could link "Twirl" to the twirl docs (not sure if you left the link out to avoid making too much noise)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid the noise of linking Java & Scala versions here.

Next, let's look at the tutorial project to locate the implementation for:

1. The controller action method that defines how to handle a request to the root URI.
1. The routes file that maps the request to the controller method.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backticks for routes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these 3 bullet points should be reordered.

In previous paragraphs, the request handling is presented as:

  1. read routes
  2. locate a controller
  3. render a view

I think the files inspected here should follow the same logical order: present routes first always.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one. Done.

1. The `app` subdirectory contains directories for `controllers` and `views`, which will be familiar to those experienced with the Model View Controller (MVC) architecture. Since this simple project does not need an external data repository, it does not contain a `models` directory, but this is where you would add it.
1. The `public` subdirectory contains directories for `images`, `javascripts`, and `stylesheets`.
1. The `conf` directory contains application configuration. For details on the rest of the project's structure see [[Anatomy of a Play Application|Anatomy]].

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the two paragraphs above could be move to the end of this section. With that changed the whole Explore the project would look like this:

- in `pathX` there's router, it looks like this (show snipet)
- in `pathY` there's the controller, it looks like this (show snipet)
- in `pathZ` there's the twirl template,...

Use a file browser to navigate the rest of the folder which include `app`, `models`, `public`, `conf`, ... (see Anatomy of a Play App). 
-- END OF SECTION --

So the section goes from the relevant meat of a simple router/controller/twirl to a more general overview.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this is one these points where I'm always in doubt how much instructions we should give. Like, should we expect that developers know how to navigate through files and folders?

@rstento, what do you think?

@@ -0,0 +1,114 @@
<!--- Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> -->

# Implementing Hello World
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like these instructions. In the PlayAppOverview (just before this one) you see code that's in the app already. This page is a call to action with enough hand-holding that if something breaks it should be immediate to spot the error.

To me, the PlayAppOverview is a canary feature: if you checkout the code and the canary feature doesn't work, there's definitely something wrong. If the canary works, move forward and add a new route/controller/page yourself and, If something breaks, well, check back with the canary.

Check the project's structure, make sure all necessary dependencies are downloaded. You can use code assistance, navigation and on-the-fly code analysis features.

You can run the created application and view the result in the default browser `http://localhost:9000`. To run a Play application:
You can run the created application and view the result in the default browser <a target="play-docs" href="http://localhost:9000">http://localhost:9000</a>. To run a Play application:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's another case. (not tagging all of them, though)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All fixed. :-)

# Creating a new application

## Using Play Starter Projects
To learn about Play hands-on, try the examples as described below, they contain everything you need to build and run them. If you have [sbt installed](https://www.scala-sbt.org/1.x/docs/Setup.html), you can create a Play project with a single command, using our giter8 Java or Scala template. The templates set up the project structure and dev environment for you. You can also easily integrate Play projects into your favorite IDE.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always find very hard to spot when a tutorial presents two exclusive alternatives. This page has two sections and it's hard for me to understand I need to decide for one of them and will be able to ignore the other.

Is it just me?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not just you. We should later find a better way to explain seeds vs starter projects.

@marcospereira
Copy link
Member Author

@ignasi35 done for most of the suggestions.

- Is compiled so that errors display in the browser

To learn more about Play's benefits, visit the [Play website](https://www.playframework.com). Now, let's dive into what a Play application looks like.
To learn more about Play's benefits, see Play's [[Introduction]] and [[Philosophy]]. Now, let's dive into what a Play application looks like.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@ignasi35
Copy link
Member

LGTM. Merge at will :P (fix conflicts, coordinate with other PR merges...)

@dwijnand
Copy link
Member

@marcospereira Could you summarise what's blocking this from being merged, please?

@dwijnand dwijnand removed the request for review from wsargent September 27, 2018 13:21
@dwijnand dwijnand dismissed richdougherty’s stale review September 27, 2018 13:22

Looks like Rich's review comments have been addressed

@dwijnand dwijnand merged commit 85936b7 into playframework:master Sep 27, 2018
@marcospereira marcospereira deleted the getting-starter-experience-improvements branch September 27, 2018 21:03
ignasi35 pushed a commit that referenced this pull request Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants