As no real problems have been reported about 1.1.1RC1, the Play 1.1.1
final release is now available.
This version is a maintenance release of Play 1.1 and doesn't provide
any new functionality. You can check the list of resolved issues in
the release notes page,
http://www.playframework.org/documentation/1.1.1/releasenotes-1.1.1
Now because I know it is frustrating to see a new release without new
functionality, here what you can expect for Play 1.2:
Already available in master:
- Ability to run Java test cases in any JUnit test runner (typically
directly in eclipse)
- Dependency management for both jars and modules
- Ability to customize the database/transaction management per request
- Built-in database migration tool (called 'evolutions')
Almost ready, and will be merged soon in master:
- New async system using continuations
- Streaming support for HTTP responses (chunked)
- H2 database instead of HSQL
Experimental, and in development:
- Dev web console to evaluate SQL and Java code in the context of a
running application
- Websocket support
We plan to release the 1.2 during March.
Have fun with Play!
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
2011/1/26 Ω Alisson <thelin...@gmail.com>:
--
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
public static void getNewMessages(String chatRoom) {
ChatRoom room = ChatRoom.get(chatRoom);
List<Message> messages = wait( room.getNewMessages() );
renderJSON(messages);
}
Here room.getNewMessages() returns a Task<List<Message>> (which is
also a Future<List<Message>>). And wait is the merged
suspend/continuation mechanism.
When you call wait(...) the current execution stack is frozen and
returned to the framework with the associated future task. When the
future task is completed the action will be invoked again and will
continue from the frozen point.
Another example:
public static void createMashupPage() {
Task<HttpResponse> videos =
WS.url("http://www.vimeo.com/....").async().get();
Task<HttpResponse> news =
WS.url("http://www.tumblr.com/....").async().get();
Task<HttpResponse> code =
WS.url("http://www.github.com/....").async().get();
List<HttpResponse> neededResources = wait( Task.waitAll(videos,
news, code) );
renderPage(neededResources);
}
Again wait(...) will free the thread until 3 http request are actually
completed.
Or to generate a large CSV response and stream the result:
public static void generateVeryLargeReport() {
CSVReport report = new CSVReport();
while(report.hasMoreData()) {
ReportData data = wait( report.nextData() );
renderChunk(data);
}
}
Here the while loop uses continuations and is non-blocking.
And we will of course use the same mechanism to properly handle WebSockets.
2011/1/26 Ω Alisson <thelin...@gmail.com>:
The scala module is a separated project. But it looks like the data
access component is almost ready, and I now need to check it and to
update the sample applications and documentation.
The engine is now ready and we will add more annotations like
@NoTransaction, @NoDatabase, etc... Btw the mechanism is totally
generic and can be used to customize any plugin based on the request
annotations.
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com
https://github.com/playframework/play/blob/master/framework/src/play/db/Evolutions.java
Basically you have to create a db/evolutions directory in your
application. Each evolution is an SQL script in this directory
(starting at 1.sql)
In this SQL script you have 2 parts, Ups and Downs. For example:
1.sql
-------
# ---- !Ups
CREATE TABLE customer (First_Name char(50), Last_Name char(50));
# ---- !Downs
DROP TABLE customer;
Of course the engine takes care of detecting and resolving conflicts,
for example if 2 developers create a 2.sql evolution script
independently.
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
>
--
In my idea it's better to keep predictable file names for evolution
and to add comments directly inside the sql script. Why? Because if 2
developers create both 2.sql scripts, it will force one developer to
merge both during the 'git merge'. Then the merged 2.sql script will
be detected as different by the evolutions engine, and it will apply
OLD 2 DOWNS and NEW 2 UPS.
> - I presume you made the decision deliberately to put both upgrades
> and downgrades in the same SQL instead of separating them as per the
> DB Migrate module. Is there a reason why you did this? The nice thing
> about having them in separate files is it's very easy to run or re-run
> a broken SQL from the command line without needing to edit the "main"
> table. I see you have a hashcode stored for each Evolution, this is
> very cool but will it allow for the case where in development you
> create an Evolution then realize you screwed up the SQL so you need to
> roll it back and reapply it with the new upgrade code?
>
Yes if you modify your last evolution script, it will be detected as a
new evolution and it will apply OLD DOWNS and NEW UPS. If it can't
because of SQL error, it will ask you to manually resolve the conflict
(I'm not sure that the manual conflict resolution step is actually
already implemented).
> - Is there any chance you will build a migration script for people
> with existing migrations in the DB Migrate module format? Migrating
> the SQLs will be easy, but creating and updating the new tables may be
> a little trickier. Would your recommendation be to "reset" the
> database to version 1 when moving to Evolutions? I hope not because we
> have our entire DB schema in the DB Migrate module format at the
> moment.
>
I'm not sure. The current migrate module is not mine and I have to
check exactly how it works.
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com