SCALA VIENNA WEBAPP
RELOADED

Felix Amerbauer, @felixamerbauer

Nikolay Kushin, @zikolach
Wanted
to DO it
What we use
Scala Posts

Contributors

Tweet timeline Events and Photos

Integration
SOME BORING TECH DETAILS
Blogs: how to add your own
Go to Scala Vienna Web repository (https://github.com/
scala-vienna/scala-vienna-web)

Fork it ...
Blogs: using Play config
Add new section 

to config
Read it

blogs.default.categories = ["scala", "akka", "play", "reactive...
API: JSON validation
Use case 

classes

case class Contributor(
login: String,
id: Long,
avatar_url: String,
…

Add impli...
Talks: how to add your own
Go to Scala Vienna Web repository (https://github.com/
scala-vienna/scala-vienna-web)

Fork it ...
Talks: file contents example
--title = Integration testing with MongoDB and ScalaTest
speaker = Michal Bigos
meetupEventId ...
Talks: using markdown
Add dependency
libraryDependencies ++= Seq(
"org.pegdown" % "pegdown" % "1.4.2"
)

Read markdown file...
MAKE IT
BETTER
COLLABORATORS
WANTED!!!
“The older I grow 

the more I listen to people 

who don't talk much.”
– Germain G. Glien
Upcoming SlideShare
Loading in...5
×

Scala Vienna Website: reloaded

216

Published on

Published in: Technology, Design
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
216
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Scala Vienna Website: reloaded

  1. 1. SCALA VIENNA WEBAPP RELOADED Felix Amerbauer, @felixamerbauer Nikolay Kushin, @zikolach
  2. 2. Wanted to DO it
  3. 3. What we use
  4. 4. Scala Posts Contributors Tweet timeline Events and Photos Integration
  5. 5. SOME BORING TECH DETAILS
  6. 6. Blogs: how to add your own Go to Scala Vienna Web repository (https://github.com/ scala-vienna/scala-vienna-web) Fork it and checkout Find /conf/application.conf file and add your blog record to “blogs.list” section at the bottom Fix some bugs :) Ensure that everything works Commit changes and make pull request Enjoy and relax!!!
  7. 7. Blogs: using Play config Add new section 
 to config Read it blogs.default.categories = ["scala", "akka", "play", "reactive"] blogs.list = [ {url: "http://blog.papauschek.com/feed/", categories: []}, {url: "http://manuel.bernhardt.io/feed/", categories: []} ] val blogs = Play.configuration.getObjectList("blogs.list") match { case Some(list) => { list.flatMap(b => { try { val url = b.get("url").unwrapped().asInstanceOf[String] val cats = b.get("categories").unwrapped().asInstanceOf[util.ArrayList[String]].toSet Seq(Blog(url, if (cats.isEmpty) defaultCategories else cats)) } catch { case e: Throwable => { Logger.warn(e.getMessage); Nil } } }) }…
  8. 8. API: JSON validation Use case 
 classes case class Contributor( login: String, id: Long, avatar_url: String, … Add implicit Format 
 to the scope implicit val contributorFormat = Json.format[Contributor] Validate JSON def getContributors: Future[List[Contributor]] = { WS.url("https://api.github.com/repos/rafacm/scala-vienna-web/contributors") .withAuth(apiKey, "x-oauth-basic", Realm.AuthScheme.BASIC) .get().map(response => if (response.status == 200) { response.json.validate[List[Contributor]] .recoverTotal(e => { Logger.warn(s"getContributors: ${e.toString}"); Nil }) } else { Logger.warn(s"getUser: ${response.statusText}"); Nil } ) }
  9. 9. Talks: how to add your own Go to Scala Vienna Web repository (https://github.com/ scala-vienna/scala-vienna-web) Fork it and checkout Add new talk /conf/<yyyymmdd-slug>.md That’s too complicated - I skip it Ensure that everything works Commit changes and make pull request Enjoy and relax!!!
  10. 10. Talks: file contents example --title = Integration testing with MongoDB and ScalaTest speaker = Michal Bigos meetupEventId = 106481582 meetupMemberId = 21178561 twitter = teliatko tags = "Scala,ScalaTest,MongoDB" slides = "http://teliatko.github.io/talks/vsug-2013-03_it-with-mongodb.html#/" --* Strategy for testing on our last Play! project * Why we have done integration testing at all * Using ScalaTest for integration testing with MongoDB * Possibilities of integration testing frameworks * Custom DSL for seeding the MongoDB * Small extensions to Casbah for better query syntax
  11. 11. Talks: using markdown Add dependency libraryDependencies ++= Seq( "org.pegdown" % "pegdown" % "1.4.2" ) Read markdown files val dir = Play.getFile(talksDirectory) Convert to HTML private def markdown(markdown: String): Html = Html(pegDownProcessor.markdownToHtml(markdown))
  12. 12. MAKE IT BETTER COLLABORATORS WANTED!!!
  13. 13. “The older I grow 
 the more I listen to people 
 who don't talk much.” – Germain G. Glien
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×