Play Modules: a catalog of open-source modules and demos

525 views
Skip to first unread message

Pere Villega

unread,
May 13, 2012, 3:46:34 PM5/13/12
to play-fr...@googlegroups.com

Hi,


I would like to present a contribution to the community


TL;DR:


Play Modules is a website where you can publish your own Play Framework modules and demos, and search for contributions of other people. It's open-source and free.


URL: http://www.playmodules.net

Source: https://github.com/pvillega/Play-Modules  


It may have errors and it can be vastly improved. Please give feedback and I'll do my best. Thanks!



Long blob of text


I've been trying to learn Play Framework 2.0 (Scala) and the best way to learn is to do something. As we don't have (yet) an official page to store our modules, I thought I could do one.


The site is running in Heroku, 2-web dyno and a Crane db. The layout is based on Bootstrap and it should be responsive (check it on your smartphone/tablet). It's not pretty but it works. I'm using Cloudflare to manage connections, the DNS are being updated at the moment so it could be slightly slower than expected for the next 24h.


The source is available at Github if you want to look at the code, copy it or contribute back.


I'm no Scala nor Play 2.0 expert, so the code may lack refinement or be just abysmal. Please give feedback on things that can be improved or obvious errors I did not notice, I'll learn and the application will work better for all of us.


Pullback requests are welcome, you can also send feedback via the application itself.


What can you do

  • You can browse published modules and demos as an anonymous visitor

  • You can leave comments on published modules and demos

  • You can join via an existing account in Github, Twitter or Google (no personal data is stored and the minimal information in the profile is fully editable)

  • You can publish your own modules or demos

  • If authenticated, you can vote/down-vote modules and demos
  • You can send feedback about the website in the application itself


Tech stuff

  • Play Framework 2.0 w/ Scala

  • PostgreSQL 9.1 database

  • Bootstrap 2.0

  • Uses Pjax to improve performance on many GET requests

  • Uses markup for rich text

  • Play 2.0 Memchache and Mail modules

  • Disqus integration

I hope it may be useful.


Best regards,

Pere Villega

Julien Richard-Foy

unread,
May 13, 2012, 4:10:28 PM5/13/12
to play-fr...@googlegroups.com
Great idea!


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/v718ouMHHBoJ.
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.

Nicolas Leroux

unread,
May 13, 2012, 4:13:58 PM5/13/12
to play-fr...@googlegroups.com
Great job!

-- 
Nicolas Leroux

green

unread,
May 13, 2012, 6:15:29 PM5/13/12
to play-fr...@googlegroups.com
Excellent! One comment: add support to module documentation. Once this is done then it should be able to replace the official repository

Julien Richard-Foy

unread,
May 13, 2012, 6:33:11 PM5/13/12
to play-fr...@googlegroups.com
I’m unable to login with github.

green

unread,
May 13, 2012, 6:37:28 PM5/13/12
to play-fr...@googlegroups.com
Strange. I can login with my github account

On Mon, May 14, 2012 at 8:33 AM, Julien Richard-Foy <j...@zenexity.com> wrote:
I’m unable to login with github.

Nico

unread,
May 14, 2012, 3:03:38 AM5/14/12
to play-fr...@googlegroups.com

Pere Villega

unread,
May 14, 2012, 3:23:08 AM5/14/12
to play-fr...@googlegroups.com
Thanks for the comments :)

@Julien: I'm not sure what may have happened, I'll check logs today, but it's been working fine when I tried. Could you please check again?

@Greenl: I'll try to do an update today or Wednesday :)

@Nico:  no, I wasn't aware of that project, otherwise I might not have done mine

Morten Kjetland

unread,
May 14, 2012, 3:47:23 AM5/14/12
to play-fr...@googlegroups.com
Great!

I've added my play 1.x and 2.x plugins to the site!

-Morten

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/AePJbfRqlcMJ.

Marcel Klemenz

unread,
May 14, 2012, 3:58:22 AM5/14/12
to play-fr...@googlegroups.com
Nice work, i will publish my module on your site next days.
But I don't see any possiblity to use this as a full repository. It would be nice if someone could add this site to the dependencies.yml and directly install modules from this page.

Something like

   - play
   - playmodules.net -> rythm 1.2

repositories:
     - playmodules.net:
        type: http
        artifact: http://playmodules.net/files/[module]-[revision].zip
        contains:
        - playmodules.net -> *


Pere Villega

unread,
May 14, 2012, 6:26:39 AM5/14/12
to play-fr...@googlegroups.com
Hi Marcel,

I wasn't aiming to make it work as a repository but as an index of available modules. Now that you mention this, it might be a good idea. The problem is that I'm not sure what may be required to achieve this and how hard will it be to implement in Heroku (no file system available).

If someone gives me more information on how to achieve that, I might give it a try. But I can't promise anything :)

Marcel Klemenz

unread,
May 14, 2012, 6:47:50 AM5/14/12
to play-fr...@googlegroups.com
I'm not familiar with Heroku, but perhaps you could store the file in the database?

Anyway, I'm thinking about writing a small and lightweight play-repo for private and company internal modules. I'll see and report how easy this is.

Steve Chaloner

unread,
May 14, 2012, 7:02:19 AM5/14/12
to play-fr...@googlegroups.com
Very nice work!

There's also the modules.playframework.org project in github, which will be used as Play's repo manager - https://github.com/playframework/modules.playframework.org

Tom Carchrae

unread,
May 14, 2012, 10:54:37 AM5/14/12
to play-fr...@googlegroups.com
Hi Pere,

Great work.

In terms of saving things on Heroku, you just need a database somewhere.  The Elastic Search module I posted some time ago will let you save data on an S3 bucket from Heroku.   But you could also do something more traditional with an EC2 micro instance and a DB - I do this all the time.  The hosted DB options on Heroku (and most places) are pretty expensive IMHO.

If you like, I can offer a postgres DB for the project.  I can send you a link if you like.  You can then just plug that into your applicaiton.conf and you can persist.

Tom



--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/XOmxNzA8Cd8J.

Tom Carchrae

unread,
May 14, 2012, 11:00:57 AM5/14/12
to play-fr...@googlegroups.com
Btw, github login failed for me too.  Looked like your code threw an exception somewhere when it tried to read the token.

Also I did not like the auto tagging on space.  I tried to add a two word tag.  Then I tried to use ' to outsmart it, but that failed too and I could not delete the tag.  A comma separated list would be much more intuitive IMHO.  

Tom

Marcel Klemenz

unread,
May 14, 2012, 1:07:56 PM5/14/12
to play-fr...@googlegroups.com
Github login failed for me, too. 500 error response.

Nilanjan

unread,
May 14, 2012, 1:55:36 PM5/14/12
to play-framework
Great work!

Nilanjan

On May 13, 1:46 pm, Pere Villega <araco...@gmail.com> wrote:
> Hi,
>
>  I would like to present a contribution to the community
>
>  *TL;DR:*
>
>  Play Modules is a website where you can publish your own Play Framework
> modules and demos, and search for contributions of other people. It's
> open-source and free.
>
>  URL:http://www.playmodules.net
>
> Source:https://github.com/pvillega/Play-Modules
>
>  It may have errors and it can be vastly improved. Please give feedback and
> I'll do my best. Thanks!
>
> *Long blob of text*
>
>  I've been trying to learn Play Framework 2.0 (Scala) and the best way to
> learn is to do something. As we don't have (yet) an official page to store
> our modules, I thought I could do one.
>
>  The site is running in Heroku, 2-web dyno and a Crane db. The layout is
> based on Bootstrap and it should be responsive (check it on your
> smartphone/tablet). It's not pretty but it works. I'm using Cloudflare to
> manage connections, the DNS are being updated at the moment so it could be
> slightly slower than expected for the next 24h.
>
>  The source is available at Github if you want to look at the code, copy it
> or contribute back.
>
>  I'm no Scala nor Play 2.0 expert, so the code may lack refinement or be
> just abysmal. Please give feedback on things that can be improved or
> obvious errors I did not notice, I'll learn and the application will work
> better for all of us.
>
>  Pullback requests are welcome, you can also send feedback via the
> application itself.
>
>  *What can you do*
>
>    -
>
>    You can browse published modules and demos as an anonymous visitor
>    -
>
>    You can leave comments on published modules and demos
>    -
>
>    You can join via an existing account in Github, Twitter or Google (no
>    personal data is stored and the minimal information in the profile is fully
>    editable)
>    -
>
>    You can publish your own modules or demos
>    - If authenticated, you can vote/down-vote modules and demos
>    - You can send feedback about the website in the application itself
>
>  *Tech stuff*
>
>    -
>
>    Play Framework 2.0 w/ Scala
>    -
>
>    PostgreSQL 9.1 database
>    -
>
>    Bootstrap 2.0
>    -
>
>    Uses Pjax to improve performance on many GET requests
>    -
>
>    Uses markup for rich text
>    -
>
>    Play 2.0 Memchache and Mail modules
>    -

Pere Villega

unread,
May 14, 2012, 5:58:44 PM5/14/12
to play-fr...@googlegroups.com
Hi,

thanks for all the feedback, is great! I'm working on it.

Right now I did a quick update to solve some issues:

- Fixed issue when showing description of modules and demos
- Displaying badges on Profile tables for Modules and Views
- Tag controls now delimit tags on comma or enter. Tag names can contain spaces
- Limited characters allowed in a tag to avoid issues in cache/db
- Solved issue when removing tag from a tag control
- Solved issue when a tag with whitespaces in the name tries to use the cache

I hope to do another release on Thursday adding module documentation and some of the other suggestions.

Keep them coming! :)

GrailsDeveloper

unread,
May 16, 2012, 3:05:22 AM5/16/12
to play-fr...@googlegroups.com
Great site. How ever if I was loged in at github I can't login to your side via github,
Niels

Marcel Klemenz

unread,
May 18, 2012, 10:28:43 AM5/18/12
to play-fr...@googlegroups.com
Hallo Pere, it's me again
I see you have an "I like this!" button on your page, but what's about an "I use it!" with a counter?

Another interesting thing would be a place for module requests. Not everyone has the free time or the skills to write any kind of complex module, but there are many people out there looking for new challanges in their free time ;)

Best regards, 
Marcel Klemenz

Tom Carchrae

unread,
May 18, 2012, 11:05:37 AM5/18/12
to play-fr...@googlegroups.com
I see you have an "I like this!" button on your page, but what's about an "I use it!" with a counter?

This is a great idea.  

But going further, I think feedback and other developer's rating modules would be really useful.  There are some modules that I've blown many hours on because they were overly complex and badly documented.  Other ones are fantastic.  So, yelp for Play Modules.  (maybe we can create some fake restaurants for each module and just use Yelp? :) ) 


Pere Villega

unread,
May 19, 2012, 4:11:24 PM5/19/12
to play-fr...@googlegroups.com
Hi,

thanks for the feedback. I'm implementing some of it, hopefully I'll release an update tomorrow night.

In the meantime, I'm having problems trying to replicate the Github issue. If someone having the problem reads this, could you please post a link to your github homepage?

Thanks!


Marcel Klemenz

unread,
May 20, 2012, 3:14:39 AM5/20/12
to play-fr...@googlegroups.com
I don't see why you need a link to my github homepage, but here it is: https://github.com/maklemenz

To replicate this issue (every time) I just open your site, click on login, githublogin, type in my password and there it is: a nice 500 internal server error.

after inspecting it with firebug i see 3 requests:

with parameters:
authenticity_token   Abf26zk1sOB5OJCqhkeWNx00CZ/KJAkEWgM4At0djVE=
commit    Log in
login    maklemenz
password    I dont tell :D
return_to    /login/oauth/authorize?client_id=fac9577f6e4c452dc681

client_id   fac9577f6e4c452dc681

and the internal server error response:
code   e7973a024687e84190c0

I hope it helps a bit

greets,
Marcel Klemenz

Jörg Viola

unread,
May 20, 2012, 2:51:35 PM5/20/12
to play-fr...@googlegroups.com
Hi,
great contribution.
But sorry, I could authorize with neither github nor twitter.

Joerg

Pere Villega

unread,
May 20, 2012, 7:21:20 PM5/20/12
to play-fr...@googlegroups.com
Hi,

I pushed an update that should solve the most common issues:

-Solved authentication issues with both Twitter and Github. I found the issue was that some people didn't complete their profiles, and when retrieving the minimal information I use to fill the local profile, the server got some exceptions from the Json parser. Fixed. 

- Solved potential Javascript issue in Chrome related to tags

- Solved javascript issue related to Pjax

-Removed some back buttons that were forcing a confusing navigation flow. Only pages with a unique flow back to their origin (like edit pages) will have back buttons, for other scenarios use the browser back button :)

-Added a link to show all the votes raised on a Module/Demo (by popular request). 

-Added links to share both Demos and Modules to Twitter, Reddit, YCombinator and a link for Instapaper (also by popular request)

-Now Modules can have releases attached. A release is an entry that states the date of creation and provides documentation. There is an improvement (table of content based on documentation) incoming.


Also, please be aware that the application is currently using Heroku's Crane DB, which is officially in beta. I mention this as I'm seeing some requests that have problems connecting to the database. That does not happen often but, be warned. Try again and it should work.

@Marcel Klemenz I requested the github page so I could check your user via the API and see the issue. Thanks to that I detected the bug, thanks a million!
@Jörg Viola both Twitter and Github should work now

Thanks for all the feedback. I'll do some additional updates (most likely minor ones) next week.

Best regards,
Pere Villega

Marcel Klemenz

unread,
May 21, 2012, 1:07:09 AM5/21/12
to play-fr...@googlegroups.com
Nice, but I still have trouble with adding tags.

greets

sas

unread,
May 21, 2012, 1:20:00 AM5/21/12
to play-framework
Excellent work pere!!!!

You could join forces with steve, and help him out with the officil
play modules app

More over, if you are thinking about hosting the modules and need
access to a file system, you can try deploying to openshift, you have
a data folder (at $OPENSHIFT_DATA_DIR) where you can save anything you
want.

check this: http://playlatam.wordpress.com/2012/05/01/deploying-play-framework-2-apps-with-java-and-scala-to-openshift/

saludos

sas

Pere Villega

unread,
May 21, 2012, 3:24:17 AM5/21/12
to play-fr...@googlegroups.com
@Marcel Klemenz which kind of problems are you having with the tags? Could you please tell me which steps are you following and which browser are you using?

Marcel Klemenz

unread,
May 21, 2012, 10:33:34 AM5/21/12
to play-fr...@googlegroups.com
I'm using Chrome  Version 19.0.1084.46 m (should be the most actual chrome now)
I'm in "Editing Module" and type some tags in the tagsfield "minify gzip response optimization yui htmlcompressor". Click on save and see the "Module details updated!" message. All my tags are gone.
Same in firefox 12. Is it because they are new tags?

biesior

unread,
May 21, 2012, 2:07:24 PM5/21/12
to play-fr...@googlegroups.com
ellou' Pere,

After last changes Description of the module/demo isn't displayed anymore while displaying its details. I've checked in the edit mode - the data is still available in the form's textarea.

My other suggestions (for future, of course I don't want to tell you how to built your own, nice project :)), it would be nicer it it was possible to:

 * Sort items also by creation/last edit time
 * Filter by version 2.0 * (so both, Scala an Java examples would be displayed with this choice)

Just to consider :)

greetings, biesior

Pere Villega

unread,
May 21, 2012, 3:45:10 PM5/21/12
to play-fr...@googlegroups.com
Hi,

I can see the description and the tags worked fine for me on both chrome and firefox... mmm I'm wondering if it may be some cache issue? Could you please double check that by cleaning your local cache? Just to be sure. I'll keep debugging just in case.

Sorry about that :(

biesior

unread,
May 21, 2012, 4:48:45 PM5/21/12
to play-fr...@googlegroups.com
Arrrrgh.... Pere, please! Don't be sorry for doing pro Play bono things :D

I checked all my browsers (I'm on Mac OS, so there's no IE) and everywhere else, all data are displayed as required. (Chrome, Safari, Opera).

But my FireFox doesn't display Description section and also doesn't display comment form (sorry I didn't mentioned it before, just realized). Clearing the cache doesn't help but... suddenly I also discovered that if I turn-on FireBug panel (anyone), then  all elements of the page are displayed as required (magic?)

So, going by this clue I disabled FireBug in the FF preferences - it helped - all elements was displayed. Re-enableded FireBug and now playmodules.net works as excepted. So from this lesson we can learn, that we need to learn more about FireBug behaviours o.O

If you need/want more debugging write me a private message, if I it will be possible I'll try to find the reason.

I'm sorry if I've created misunderstanding,

greetings, biesior

W dniu poniedziałek, 21 maja 2012 21:45:10 UTC+2 użytkownik Pere Villega napisał:
Hi,

Marcel Klemenz

unread,
May 22, 2012, 1:14:33 AM5/22/12
to play-fr...@googlegroups.com
Cache cleared, but still the same problem.

Pere Villega

unread,
May 22, 2012, 4:06:54 AM5/22/12
to play-fr...@googlegroups.com
@biesior no misunderstanding, you found the issue was firebug and that's a relief! Thanks a million :)

@Marcel mmm I'm wondering if you are just adding the tags all together and just submitting? Try to add comma to separate the tags ("yui, gzip, ..." etc), that could be the reason. I realize it's not straighforward enough, I'll add a small tip to the control.

Marcel Klemenz

unread,
May 22, 2012, 12:33:15 PM5/22/12
to play-fr...@googlegroups.com
My bad, no it's working for me, too :)

Pere Villega

unread,
May 22, 2012, 12:57:45 PM5/22/12
to play-fr...@googlegroups.com
That's good news, great :) Thanks!
Reply all
Reply to author
Forward
0 new messages