A simple CRUD application in Play! Framework using Kundera and Cassandra as a Database.

playing-kundera-cassandra: This is a classic CRUD application, backed by Play 2.3.0, Kundera & Cassandra. It demonstrates:

  • Accessing a Cassandra database, using Kundera.
  • Achieving, Futures to use more idiomatic error handling.
  • Accessing JS & CSS libraries by WebJars.
  • Bootswatch-United with Twitter Bootstrap 3.1.1 to improve the look and feel of the application

Instructions :-

  • The Github code for the project is at : playing-kundera-cassandra
  • Clone the project into local system
  • To run the Play framework 2.3.0, you need JDK 6 or later
  • Install Typesafe Activator if you do not have it already. You can get it from here: download
  • Install Cassandra if you do not have it already. Instructions
  • Start Cassandra Server and create schema/tables
[default@unknown] create keyspace EmployeeExample;
[default@unknown] use EmployeeExample;
Authenticated to keyspace: EmployeeExample
[default@EmployeeExample] create column family employees with comparator=UTF8Type and default_validation_class=UTF8Type and key_validation_class=UTF8Type;
  • Execute activator clean compile to build the product
  • Execute activator start to execute the product
  • playing-kundera-cassandra should now be accessible at localhost:9000

References :-

This is the start, from next week onwards we would be working on this application to make it grow. We would look at how we can make it more functional, then we would be adding more modules to it together. If you have any changes then feel free to send in pull requests and we would do the merges 🙂 Stay tuned.

About Anand Kumar Singh

Hi, I’m Anand Singh and I specialize in Computer Software. I’m passionate about what I do, and I love to help people. Nothing is more fulfilling than being part of a team with similar interests, and an organization that values its employees. I'm Lead Software Engineer at Sapient. Having 5+ years of experience in Java, Grails/Groovy and Scala language. Anand also knows about Javascript, jQuery, CSS and other UI design technologies. Certified developer in: * Principles of Reactive Programming – Coursera * Functional Programming Principles in Scala – Coursera * Functional Program Design in Scala – Coursera * Introduction to Big Data with Apache Spark – edX * Oracle Certified Associate (OCA) * Sun Certified Java Programmer (SCJP) I'm passionate to work with upcoming technologies and bleeding platforms providing the new way to programming & development. He is actively involved in development & maintenance of several software projects. He has been enjoying Scala for more than a year now. Anand completed his MCA from IGNOU. As a Developer, I'm continuing my journey by actively collaborating with other Developers in my field. I'm actively contributing on the TechMonad & Playing Scala platform. I likes to spend his free time in Cooking, watching Discovery for new Technology and visiting new places with friends.
This entry was posted in Akka, Architecture, Bootstrap, Cassandra, CSS, Future, JavaScript, jQuery, Kundera, Non-Blocking, Play Framework, Reactive, Scala, Web and tagged , , , , , , , , , . Bookmark the permalink.

5 Responses to A simple CRUD application in Play! Framework using Kundera and Cassandra as a Database.

  1. Reblogged this on Play!ng with Scala and commented:

    playing-kundera-cassandra: Play 2.3.0, Kundera & Cassandra

  2. Goran says:

    Wholy Moses!
    Congratulations, you managed to copy the Java bloatware architecture we all love to hate and the reason for leaving java and use Scala.

    In this ‘Simple CRUD application’ you describe one single database entity Employee in at least 7 classes;
    models.process.EmployeeProcessImpl (class)
    models.process.EmployeeProcessImpl (obj)
    ( I might have missed a few)

    That’s a really good job of migrating java bloatware design to Scala.
    Imagine now a more realistic world case example with a database consisting of 120 tables. That will be about 840 classes.

    • it is because of DI, we got into multiple scala classes. Definitely it can be done in couple of scala classes. This is what i will be posting another blog post to address this problem.

  3. Kamaraju says:

    Hi ,
    I am facing an issue as the entities are not available at run time , it won’t be loaded as entity.

    Any suggestions , i tried to bundle them in a jar and kept under root folder , But i still face the same exception.

  4. Vinit Sharma says:

    I am using Play! 2.4.6 framework and Cassandra 2.2 database. I want to integrate with Cassandra database, I have gone through several examples on internet including this one as well. But none of them were helpful to me for connecting a Play! with Scala application with Cassandra. I am getting error for javax.persistence. Because of which at runtime it shows the error in routes file. I just want simple steps for connecting my Play! for Scala application with Cassandra database. My Play! framework version is 2.4.6. What steps should be performed so as to include Kundera’s dependency in my project, and also adding the javax.persistence dependency as well ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s