However, after hearing about it at Devoxx and Jfokus , I figured I should at least try to migrate. I downloaded Play 2. The first thing I learned about upgrading from Play 1. It's like saying you upgraded from Struts 1 to Struts 2 or Tapestry 4 to Tapestry 5. It's a migration, with a whole new project. Evolutions I started by looking around to see if anyone had documented a similar migration. I found two very useful resources right off the bat:. From Jan's Blog, I learned to copy my evolutions from my Play 1.
I changed my application. Then I began looking for how to load seed data with Play 2. In Play 1. This is no longer a recommended practice in Play 2. Instead, they recommend you turn your YAML into code. After all, the developers had mentioned they wanted to get ride of the magic and moving to Scala allowed them to do that. It seems like a strange shift for Play to reduce type-safety on the backend, but increase it in its templates. Oh well, to each their own. I may eventually move to Squery , but I wanted to do a side-by-side comparison as part of my migration.
Using the aforementioned tutorial from James and Jan's blog posts, as well as Guillaume's Play 2. I wrote a bunch of SQL, typed up some new finders and migrated my tests from ScalaTest to the new default, specs2. The Mosh Pit's Migrating a Play 1. That's when I started having issues with Anorm and figuring out how its parser syntax works.
After struggling for a few days, I finally found yabe-playscala. Since I'd used the yabe tutorial from Play 1. Now, things aren't perfect Workouts aren't ordered by their posted date , but everything compiles and tests pass. To illustrate how little code was required for Anorm 1.
Play 2. The Play 1. I don't know about you, but I kinda like a little magic in my frameworks to reduce the amount of code I have to maintain.
Welcome to Reddit,
I was pleasantly surprised by specs2. First of all, it was an easy migration from ScalaTest. Secondly, Play's FakeApplication made it very easy to write unit tests. The line count on my UnitTests. Summary The first few hours of developing with Play 2 were frustrating, mostly because I felt like I had to learn everything over again. However, I was pleased to find good references on migrating from Play 1.
Last night, I migrated all my Controllers, integrated Scalate and got most of my views rendering. I still have issues rendering validation errors , but I hope to figure that out soon. But these websites are also GitHub repositories that are managed by different teams. So when you send a pull request, it gets automatically reflected into a Tutorial that also has the accompanying code examples that you can download and follow along.
Similar to the Activator experience, I think. EY: Right. And it would actually use the real build tools like sbt or Maven. So you start off with the tools that everyone else is also using. Editor's note: see image below. EY: Yeah. I don't think there's a real name for it. It's been called a project starter and kickstarter and different names.
But essentially, it's the Tech Hub, which is a new portal that we're building for developers. And one of the main features is to have this UI that you can quickly start new projects. And with that, there's also the guide pages. So the idea is sort of start with a problem statement. How would you solve that using the Lightbend way? And these guide documents would go through your problem, and kind of walk you through it implementing using Play or something like that.
OW: That sounds great. I notice that Giter8 is one of the main features that we're kind of working with on the project starter. How does that work? That's kind of interesting. As we're EOL-ing Activator , which like I said had a lot of really interesting ideas that actually worked well, I'm essentially breaking it down and reverse porting it back into sbt. So if you just type that, it will let you pick different templates. So Giter8 is actually an open source tool that's existed for quite a long time.
It was originally started by Nathan Hamblin. So instead of central repository like Activator, it just uses the GitHub repository to post different templates. So if you have a GitHub account, anyone can create a template. And sbt is integrated with the Giter8, so if you type "sbt new" and your repository name, then it will start a project quickly like that. So from the command line, you can also start a project.
So the Tech Hub also integrates with the Giter8. So if you make a Giter8 template and you want to start with a Lightbend technology, you can go to Tech Hub. OW: That's good to know. So what would you tell people that are currently using Activator? What should they do to prepare for the end of life and to try out our new getting started experience?
Play Framework (java)で簡単な検索アプリケーションを開発する
EY: Yes. So if you're already using it -- first of all, I think the command line experience of Activator was essentially a wrapper around sbt. So a lot of that will basically be exactly the same. You can just switch over to using sbt's command line. If you're using the template of the Activator, you want to make sure that those templates are moved over to Giter8. There's a blog post that I wrote showing how to migrate your templates from Activator to Giter8. It's mostly changing repository names and putting it into either your company's Git or your public GitHub repository.
So that's mostly it. OW: And what about for those of our fans out there who have actually built their own Activator templates and have shared those with the community? OW: All right. And all of that can be done on developer. That's correct? OW: Excellent.
So I'm noticing that sbt is really taking a front and center role with a lot of the stuff that we're doing with Lightbend Tech Hub and elsewhere. And I guess it's a good time to talk about our new team that you're the tech lead of.
Share this article
And congratulations. We're calling it the tooling team.
So what is the tooling team and what do you guys do? I joined under Josh Suereth. It was originally called Q Branch.taylor.evolt.org/pabef-tarazona-de.php
Instant Play Framework Starter [Book]
And then it became Reactive Platform Team. And then now, essentially, we're sort of going back to its roots of being the Tooling Team. There is Dale, who is the sbt committer and he's super active on the community talking about sbt. And there is Antonio Tony , he works with dbuild and other tools. So essentially, like three of us, we are the -- we make tools in the open source as well as some of the tools that are used internally within the company.
But we kind of took it and packaged it up so that the other teams can also use these things. So that's basically the tooling team. OW: Right.