Git Product home page Git Product logo

cdi-scala's Introduction

Case Study: Functional Programming in Scala with CDI

Intro

This presentation is a case study on the compatibility strength of merging the Scala programming language with CDI (JSR 299: Contexts and Dependency Injection for the Java EE platform [http://jcp.org/en/jsr/detail?id=299]). CDI is a Dependency Injection framework that is inspired by the Seam, Spring, and Guice frameworks. It integrates with technologies like JavaServer Faces (JSF) 2.0, Enterprise Java Beans (EJB) 3.1, the Java Persistence API (JPA) 2.0 and JAX-RS (Java API for RESTful Web Services) 1.1 and does so in a type-safe manner. Scala and other functional programming languages depend heavily on type safety. It is because of CDI’s type safety that this presentation will be valuable. Goals for this presentation are to answer and demonstrate the following questions in an unbiased way:

  • How purely functional can you operate in CDI?
  • Can you inject reuseable functions with ease in CDI?
  • Is there hindrance in using Scala with Mojarra JSF and AJAX frameworks?
  • Do functional design patterns work in the CDI environment?
  • How does Dependency Injection in Scala + CDI compare with Scala’s Cake Pattern?
  • How does Scala + CDI + JSF compare with Scala Web Frameworks like Lift?
  • How does Scala + CDI + JAX-RS + JMS compare with Scala messaging frameworks like AKKA?
  • Can integration and acceptance testing in Scala + CDI + Arquillian be used with popular Scala testing frameworks like ScalaTest, Specs, and ScalaCheck?
  • Can a CDI implementation work with SBT (Simple Build Tool) and how will it compare to Maven?
  • Do Scala structures like implicit work in CDI?

Requirements

Setup

Clone repository from this repository or fork:

% git clone [email protected]:dhinojosa/cdi-scala.git cdi-scala
% cd cdi-scala

Run sbt update to download dependencies

% sbt update

Run sbt package to create war file

% sbt package

Deploy war file located in target/scala_2.8.1/cdi-scala_2.8.1-1.0.war to either JBoss or Glassfish

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.