Skip to content

branaway/play

 
 

Repository files navigation

About

bing.ran@iclass.com

This fork came from the HEAD of master in the original Play framework, at about a post 1.4.x version.

It contains
1. basic JDK8 support.a few patches that make using Play in dev mode faster.
2. special code to work with Japid for better japid views’ error reporting in DEV mode. Most of japid grammar errors will be pointed back to the original view files.

h3.Local changes vs. the original distribution

I have made a few patched that fix a few bugs and inconvenience

  1. simplified the error message in case of ActionNotFoundException.
  2. MemecachedImpl: clean keys with space and delegate to super class loader for primitive array types
  3. UrlEncodeParser: changed to use “_body” from “body” to avoid conflicts with user’s body parameter
  4. NoRouteFoundException: added the action name in the error message.
  5. Invoker: synch the creation of the suspended invocations.
  6. Play: added a delay in detecting changes to avoid run the detection for very requests in a burst.
  7. PlayHandler: added keep-alive header to the HTTP 1.0 request.
  8. Wrapped the HotswapAgent in PlayAgent.jar to be used as the JVM agent instead of the whole play.jar. This way start script for applications can be simplified to the point that I can use regular Eclipse run/debug instead of using the remote debugging mode.
  9. added option to invoke ActionInvocation without going through the intermediate executor. The option to add to application.conf: “action.invocation.direct” with value of “true”/“false”;

History:

2016.12.8: FileService.java: use zero-copy in serving static file. saw double-triple performance improvement. would work for direct access of files in public folder, or files with RenderBinary result.
2016.6.25, added a bare-bone Japid sample controller and view to the default application skeleton.
2016.6.14, replacing systemout uses in the ApplicationClassLoader. Let the PropertiesEnhancer and LVEnhancer to enhance only the applicable classes for better performance. Users can use “play.LVEnhancer.enabled=false” and “play.PropertiesEnhancer.enabled=false” in the application.conf to disable these two enhancers all together if no Groovy templates are used in the app.
2016.6.13, reinstate PropertiesEnhancer and MailerEnhancer in CorePlugins. So the behavior of this version should match that of the original 1.4.×.
2016.3.13, merged jdk8 branch to the master
2016.3.3, update bytecode parser with invokedynamic support in controllers, which would blow out with LVEnhancer.
2016.3.2, merged with the original git://github.com/playframework/play1 master branch, which was about post 1.4. added latest javassist.jar for better compatible with hibernate and JDK8.
2014.11.18, fixed the TestRunner controller in the TestRunner module to avoid not implemented methods in Controller.
2014.7.17, removed artificial code in Play.mapJapidError() to activate the mapping.
2014.4.24, fixed integer group of arguments support in controller redirect
2014.4.22, mostly replaced javassist with ASM for enhancers. controller and model enhancers seemed to work now.
2013.9.3, roll back a unfinished hack on error pages.
2013.8.14, merged upstream master.
2013.8.5, version 1.2.5.3, tested with japid 0.9.22
1. bug fix: error in passing the source file to the error line mapper.
2013.8.3, version 1.2.5.2, tested with japid 0.9.22
1. added bytecode to the application class from pre-compiled code in ApplicationClassLoader, about line 123. Required by using with post-controller japid in pre-compiled mode.
2012.3.9, version 1.2.5.1, tested with japid 0.9.3.3
1. disabled PropertiesEnhancer for Japid Views.
2012.3.9, version 1.2.5, tested with japid 0.9.3.1
1. added Play.runingInTestNode() to make the Cobertura module happy. Bad naming.
2. fixed UniqueCheck in the string concatenation for updates.
3. added enum filter to the LVEnhancer, not sure 100% though.
4. improvement: mapped Java code compilation error to the original view line, for better problem error pinpointing.
5. added optimization in ApplicationClassLoader#detectChanges to fine tune dirtySig to avoid whole app reloading when a japidview file is changed, a performance improvement at dev time.

For More changes I have made, please see the bottom of this page.

Play framework makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Play is a perfect companion to agile software development.

Learn more on the https://www.playframework.com website.

Getting started

1. Install the latest version of Play framework and unzip it anywhere you want:

unzip play-1.x.zip -d /opt/myplay

2. Add the play script to your PATH:

export PATH=$PATH:/opt/play-1.x

3. Create a new Play application:

play new /opt/myFirstApp

4. Run the created application:

play run /opt/myFirstApp

5. Go to localhost:9000/ and you’ll see the welcome page.

6. Start developing your new application:

Get the source

Fork the project source code on Github:

git clone git://github.com/branaway/play.git

The project history is pretty big. You can pull only a shallow clone by specifying the number of commits you want with —depth:

 git clone git://github.com/branaway/play.git --depth 10

Compiling the source

cd to framework and “ant”. To create a new release, create a new version tag and associate the tag with the recent version and ant again.

“ant package” will create a distribution in the dist.

Reporting bugs

Please use the github issue to report bugs

License

Play framework is distributed under Apache 2 license.

Synch with the original repo:

To synch with the original play repo, I have added a remote called “upstream” that is mapped to git://github.com/playframework/play1, which is the play 1.x repo.

then:

$ git fetch upstream
$ git merge upstream/master

After a successful merge,

$ git push origin master

Packages

No packages published

Languages

  • Python 66.8%
  • Java 18.8%
  • JavaScript 9.7%
  • HTML 3.4%
  • C 0.6%
  • CSS 0.5%
  • Other 0.2%