GithubHelp home page GithubHelp logo

scala-vienna / scala-vienna-web Goto Github PK

View Code? Open in Web Editor NEW
14.0 15.0 6.0 28.72 MB

Play! Framework application powering the Scala Vienna web presence

Home Page: scala-vienna.org

License: Apache License 2.0

Scala 23.55% HTML 28.23% JavaScript 37.77% CSS 10.45%

scala-vienna-web's Introduction

Scala Vienna UG Webapp

Build Status

This is the Play application that powers the web presence of the Vienna Scala User Group!

##Feature Highlights

  • Integration with the Meetup API to display events, photos, ...
  • Talk detail pages rendered from Markdown files with metadata and related tagged photos from extracted from the Meetup API
  • "Blog" section aggregates user group member blog entries via their RSS feeds

Getting started with development

  • Grab and install Play
  • Install the Chrome tools to get the auto-reloading benefits
  • Check your meetup.com API key here http://www.meetup.com/meetup_api/key/
  • Configure the Meetup API authentication (see Getting a Meetup API Key):
    • export MEETUP_API_KEY=<your API key>
  • Optional: configure a different Meetup group ID in the meetup.groupId key in the application.conf file
  • Configure GitHub API authentication. It you are part of the Scala Vienna GitHub organization you will be able to access the client id and the client secret keys in the "Applications" section. Otherwise asks us to be added or generate your own keys.
    • export GITHUB_AUTH_CLIENT_ID=<the GitHub application client id>
    • export GITHUB_AUTH_CLIENT_SECRET=<the GitHub application secret>
  • Use activator to start the app

Deployment

We use Travis CI to automatically deploy to Heroku:

Feature Pipeline

We have even more cool stuff coming up! ;-) https://github.com/scala-vienna/scala-vienna-web/issues?state=open

License

  • This software is licensed under the terms of the Apache 2.0 License which you find in the file named LICENSE.txt in this repository.
  • Aggregated content (blog posts, talk slides, ...) are copyright to their respective owners.

scala-vienna-web's People

Contributors

alexanderdaniel avatar felixamerbauer avatar manuelbernhardt avatar papauschek avatar pebrc avatar pichsenmeister avatar rafacm avatar sebnozzi avatar thedom avatar xpavlic4 avatar zikolach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scala-vienna-web's Issues

Events without a location are not displayed on the front page as upcoming events

We currently have a dojo coming up but is not displayed on the front page. The metup API query returns the following JSON without the "venue" attribute for that event. See below the dojo event without the attribute and the next event with it:

{
  "results":[
      {
         "rsvp_limit":16,
         "status":"upcoming",
         "visibility":"public",
         "maybe_rsvp_count":0,
         "id":"157747942",
         "utc_offset":3600000,
         "time":1389718800000,
         "waitlist_count":0,
         "updated":1388740474000,
         "yes_rsvp_count":5,
         "created":1388435382000,
         "event_url":"http:\/\/www.meetup.com\/scala-vienna\/events\/157747942\/",
         "description":"<p><b>Mini Scala CodeRetreat<\/b><\/p> <p>(Summary: #TDD, #pairProgramming, #activities, #constraints)<\/p> <p>We'll program in <b>pairs<\/b>. One pair sits down for a session and tries to solve the <b>problem<\/b> doing a typical <a href=\"http:\/\/coderetreat.org\/events\/global-day-of-coderetreat-vienna-2014\">CodeRetreat<\/a> <b>activity<\/b>. These are based on <b>TDD<\/b>, and usually come with some interesting (and fun!) <b>constraints<\/b>...<\/p> <p><b>Possible activities<\/b>:<\/p> <p>• TDD as if you meant it (only refactor when necessary)<\/p> <p>• Cooperative Ping-Pong (typical TDD cycle, alternating roles)<\/p> <p>• Muted Ping-Pong (silence! you may only communicate with your partner through code)<\/p> <p>• Evil Ping-Pong (make the test pass, but evilly introduce garbage code with it)<\/p> <p>• Code Swap (work on the code from another pair, from a previous session)<\/p> <p>• Extreme Baby-Stepping (commit within 2 minutes of TDD or die... ehmm... revert)<\/p> <p>• No if \/ for \/ built-in-types \/ mutable data-types<\/p> <p>• Functions \/ Methods no longer than 4 lines<\/p> <p>These activities <i>can<\/i> be combined, but usually we do only <i>one per session<\/i>. After the session is over, developers form new pairs.<\/p> <p>Use the comments to raise your voice if you have activities you'd like to try out :-) With the amount of time we'll have at our disposal we'll only manage to have 2 sessions, at most 3.<\/p> <p><b>The problem<\/b> is yet to be defined, but following the CodeRetreat custom will probably be <a href=\"http:\/\/en.wikipedia.org\/wiki\/Conway\">Conway's Game of Life<\/a>. I'm open to suggestions (though it has to be simple enough, yet not trivial).<\/p> <p><b>Requirements<\/b>:<\/p> <p>• Your laptop<\/p> <p>• A working Scala development environment (Eclipse, IntelliJ, etc.)<\/p> <p>• The ability to create a Scala project instantly, <b>with unit-test support<\/b> (see our <a href=\"https:\/\/github.com\/scala-vienna\/dojo-quickstart\">Dojo Quickstart<\/a> project)<\/p> <p>• Installed git client + familiarity with the basics of git<\/p> <p>• Willingness to have fun ;-)<\/p> <p>Hopefully we'll have as much fun as it was in the last CodeRetreat! :-)<\/p>",
         "how_to_find_us":"Location to be defined (or: val location:Future[Location] = defineLocation(); )",
         "name":"Scala Coding Dojo",
         "headcount":0,
         "group":{
            "id":5700242,
            "group_lat":48.220001220703125,
            "name":"Vienna Scala User Group",
            "group_lon":16.3700008392334,
            "join_mode":"open",
            "urlname":"scala-vienna",
            "who":"Scala Types"
         }
      },
      {
         "visibility":"public",
         "status":"upcoming",
         "maybe_rsvp_count":0,
         "venue":{
            "id":11968802,
            "lon":16.355125,
            "repinned":false,
            "name":"Sektor5",
            "address_1":"Siebenbrunnengasse 44",
            "lat":48.186073,
            "country":"at",
            "city":"Vienna"
         },
         "id":"145315622",
         "utc_offset":3600000,
         "time":1390410000000,
         "waitlist_count":0,
         "created":1381648319000,
         "yes_rsvp_count":17,
         "updated":1387746679000,
         "event_url":"http:\/\/www.meetup.com\/scala-vienna\/events\/145315622\/",
         "description":"<p><b>Preliminary Agenda<\/b><\/p> <p>• <i><b>Web UI Testing in Scala<\/b><\/i><b> <\/b>by <a href=\"https:\/\/twitter.com\/radimpavlicek\">Radim<\/a> (under 20 minutes)<\/p> <p>• <i>Add the <b>title of your talk<\/b><\/i> (your name)<br\/>A short summary and approximate duration (without discussion time) <\/p> <p>• <i>Add the <b>title of your talk<\/b><\/i> (your name)<br\/>A short summary and approximate duration (without discussion time)<\/p> <p>Lightning\/micro talks also welcome! <\/p> <p>Follow the conversation on our Google group: <a href=\"http:\/\/groups.google.com\/group\/scala-vienna\"><a href=\"http:\/\/groups.google.com\/group\/scala-vienna\" class=\"linkified\">http:\/\/groups.google.com\/group\/scala-vienna<\/a><\/a><\/p>",
         "headcount":0,
         "name":"January Scala Monthly Meetup",
         "group":{
            "id":5700242,
            "group_lat":48.220001220703125,
            "name":"Vienna Scala User Group",
            "group_lon":16.3700008392334,
            "join_mode":"open",
            "urlname":"scala-vienna",
            "who":"Scala Types"
         }
      },

The code that parses/transforms this JSON is in service.Events.transformEvents and I presume we need to add logic there to handle the case of an event without a venue.

Members page

It would be cool to have a page showing our members with the information being extracted from the meetup API.

The icing on the cake with a D3.js timeline on the top of the page showing the amount of members over time. Later we can add some other metrics we can calculate from the meetup API to see if we are actually doing something interesting to make people come back or not.

500 - Internal Server Error

Execution exception[[JsonParseException: Unexpected character ('r' (code 114)): was expecting comma to separate OBJECT entries
 at [Source: [B@5565a953; line: 1, column: 42263]]]

from the Heroku log:

2014-05-20T10:39:26.425414+00:00 app[web.1]: [error] application -
2014-05-20T10:39:26.425421+00:00 app[web.1]:
2014-05-20T10:39:26.425423+00:00 app[web.1]: ! @6i9mcfnol - Internal server error, for (GET) [/] ->
2014-05-20T10:39:26.425425+00:00 app[web.1]:
2014-05-20T10:39:26.425427+00:00 app[web.1]: play.api.Application$$anon$1: Execution exception[[JsonParseException: Unexpected character ('r' (code 114)): was expecting comma to separate OBJECT entries
2014-05-20T10:39:26.425429+00:00 app[web.1]:  at [Source: [B@5565a953; line: 1, column: 42263]]]
2014-05-20T10:39:26.425431+00:00 app[web.1]:    at play.api.Application$class.handleError(Application.scala:293) ~[com.typesafe.play.play_2.10-2.2.2.jar:2.2.2]
2014-05-20T10:39:26.425433+00:00 app[web.1]:    at play.api.DefaultApplication.handleError(Application.scala:399) [com.typesafe.play.play_2.10-2.2.2.jar:2.2.2]
2014-05-20T10:39:26.425435+00:00 app[web.1]:    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:165) [com.typesafe.play.play_2.10-2.2.2.jar:2.2.2]
2014-05-20T10:39:26.425436+00:00 app[web.1]:    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:162) [com.typesafe.play.play_2.10-2.2.2.jar:2.2.2]
2014-05-20T10:39:26.425438+00:00 app[web.1]:    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33) [org.scala-lang.scala-library-2.10.3.jar:na]
2014-05-20T10:39:26.425440+00:00 app[web.1]:    at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:185) [org.scala-lang.scala-library-2.10.3.jar:na]
2014-05-20T10:39:26.425442+00:00 app[web.1]: Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('r' (code 114)): was expecting comma to separate OBJECT entries
2014-05-20T10:39:26.425443+00:00 app[web.1]:  at [Source: [B@5565a953; line: 1, column: 42263]
2014-05-20T10:39:26.425445+00:00 app[web.1]:    at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1369) ~[com.fasterxml.jackson.core.jackson-core-2.2.2.jar:2.2.2]
2014-05-20T10:39:26.425446+00:00 app[web.1]:    at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:599) ~[com.fasterxml.jackson.core.jackson-core-2.2.2.jar:2.2.2]
2014-05-20T10:39:26.425448+00:00 app[web.1]:    at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:520) ~[com.fasterxml.jackson.core.jackson-core-2.2.2.jar:2.2.2]
2014-05-20T10:39:26.425450+00:00 app[web.1]:    at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:655) ~[com.fasterxml.jackson.core.jackson-core-2.2.2.jar:2.2.2]
2014-05-20T10:39:26.425451+00:00 app[web.1]:    at play.api.libs.json.JsValueDeserializer.deserialize(JsValue.scala:406) ~[com.typesafe.play.play-json_2.10-2.2.2.jar:2.2.2]
2014-05-20T10:39:26.425453+00:00 app[web.1]:    at play.api.libs.json.JsValueDeserializer.deserialize(JsValue.scala:358) ~[com.typesafe.play.play-json_2.10-2.2.2.jar:2.2.2]

"Server not found" errors

I'm still getting a lot of "Server not found" errors when opening the page for the first time.

The strange thing is: Even when I've successfully opened the page in one browser, trying to load it in another browser results in a "Server not found" error. Refreshing the page after a few seconds solves the problem.

Anybody else experiencing similar problems?

Talks Section (Markdown Version)

Talks section implemented as Markdown files in the codebase.

Workflow: Push a new Markdown file to the GitHub repo, Travis CI builds the app and pushes it to Heroku.

URLs
List of all talks: http://scala-vienna.org/talks
Single talk: http://scala-vienna.org/talks/2013/11/20/exploring-the-unit-type

Content

  • Title e.g. "Exploring the Unit Type"
  • Slug e.g. “exploring-the-unit-type"
  • Date e.g. 2013-11-20
  • Author e.g. "Alexander Daniel"
  • Slides link
  • Relevant links to meetup.com, twitter profiles...
  • Video e.g. embedded youtube video or link
  • DISQUS comments (not sure if these can be migrated to https://prismic.io/ later)

Implementation Details
Talks controller parses all available talks in Play Global onStart method and keeps them in-memory for further usage.

Picks of the week

Picking up the idea from http://vienna-rb.at/blog/categories/picks/

"Imitation is the sincerest [form] of flattery"
-- Charles Caleb Colton

It would be cool to have a website secition at http://scala-vienna.org/picks-of-the-week/2013/12/04 that shows a series of posts that the Vienna Scala community thinks are worth sharing.

Me thinks one of the "easiest" ways of implementing this would be via a Twitter hashtag like #pick in tweets addressed to @ScalaVienna that @ScalaVienna then retweets. We need to built in a mechanism to avoid spam. This is way retweeting would be requirement to apperar on the page.

Past events

Extract from the meetup.com API the list of past events to be passed to the template code for rendering.

Update About page

The about page should contain at the beginning the description we have on meetup about the group:

We are a bunch of software developers interested in discovering Scala, learning about new techniques and frameworks and meeting other Scala developers in the Vienna area. Our aim is to meet regularly in 4 week cycles and share knowledge and experiences about the Scala programming language and its ecosystem.

We our Google group for communication, so make sure you subscribe to it to be informed: http://groups.google.com/group/scala-vienna

We post our code to: https://github.com/scala-vienna

We are on Twitter as @ScalaVienna, we use hashtags #scalavienna or #vsug.

We are part of a worldwide network of Scala meetups: http://scala.meetup.com/

Developers from all skill levels eager to learn more about this great language are welcome! Come on and join us!

Group/member projects

Add new section with a list of scala-based open source projects which can be used as a tutorials.

  • name of project
  • short description
  • screenshots
  • link on repository
  • link on demo website

Planet Scala

We were talking that it would be cool to have a section on the website to aggregate blog posts from member or our community. Manuel mentioned the words "Planet Scala" for that section so we take that as a working title.

Some initial/rough/thoughts:

  • research what's out there in regards to RSS feed libraries (like http://rometools.github.io/rome/) ,....
  • The page should show a summary of the article but the full article should be on the original blog so there should be a "Read more.." link that takes the user to the actual blog post
  • configuration of which blogs should be aggregated could be done with a .conf file. So if someone wants her blog added to the section she just needs to send a pull request to the repo and the CI server will push the changes to the live app.
  • posts should by filtered out by words/tags/categories etc.

Tests are failing on Travis (hence no deploy to Heroku)

Occurs on https://travis-ci.org/scala-vienna/scala-vienna-web/builds/16658705 and also locally (no MEETUP_API_KEY set like on Travis):

[error] c.g.h.h.HtmlPage - Error loading JavaScript from [http://localhost:19001/docs-assets/js/ie8-responsive-file-warning.js].
java.io.IOException: Unable to download JavaScript from 'http://localhost:19001/docs-assets/js/ie8-responsive-file-warning.js' (status 404).
    at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1125) ~[htmlunit-2.12.jar:2.12]

It is strange that it also happened on https://travis-ci.org/scala-vienna/scala-vienna-web/builds/16307545 and the build succeeded. Does anybody have an idea why?

Retrieve photos from the meetup API

Retrieve some random photos via the meetup API to display on the front page.
Probably worth having a model case class with the photo info that can be passed to the template for rendering?

Dojos section

Similar as for the "Talks" #14 section we could have a "Dojos" section!

Upcoming events

Extract from the meetup.com API the list of upcoming events.
Probably it will be handy to have a model case class that we can pass a list of to the template code to be rendered.

Add "About/credits page"

  • with credits to contributors with link to the "contributors" GitHub tab
  • mention the stuff that we use: libraries, ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.