Java

Java is a set of computer software and specifications developed by Sun Microsystems, which was later acquired by the Oracle Corporation, that provides a system for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers.

Spring Logo

Spring Framework

The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment platform. A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments.

Hibernate Logo

Hibernate Framework

Hibernate ORM is an object-relational mapping framework for the Java language. It provides a framework for mapping an object-oriented domain model to a relational database.

Wednesday, July 29, 2015

Play Framework Installation




Installing Play Framework:

The following are the steps to install a play framework:

Step 1: In order to run Play framework , we need JAVA 6 or higher versions. To test in your system java is installed or not, use the following commands in your terminal or command prompt:
javac and java.

And also add the JAVA_HOME to the environment variable.

Note: Play Framework 2.4  recommended to use JAVA 8.

Step 2:  Download the latest Play framework( Activator) from the following site:
https://www.playframework.com/download

here i am downloaded Play 2.3.9 (activator)

Note: Instead of installing latest Activator use previous versions because may be there some issues in latest activator.

Step 3:  Extract the downloaded play framework and add it to the Class path:

Right Click on Computer --> Properties --> Advanced System Settings --> Advanced --> Click on Environment Variable --> select PATH and click on Edit. In Variable value append the extracted play framework location.

Step 4: Check the play framework installed properly or not using the following command in terminal or command prompt:

C:\Users\Ranga>activator help

Usage activator [options] [command]

Commands:
ui                 Start the Activator UI
new [name] [template-id]  Create a new project with [name] using template [template-id]
list-templates     Print all available template names
help               Print this message

Options:
-jvm-debug [port]  Turn on JVM debugging, open at the given port.  Defaults to 9999 if no port given.

Environment variables (read from context):
JAVA_OPTS          Environment variable, if unset uses ""
SBT_OPTS           Environment variable, if unset uses ""
ACTIVATOR_OPTS     Environment variable, if unset uses ""

Please note that in order for Activator to work you must have Java available on the classpath.
----------------------------------

Congratulations, you are successfully installed play framework in your system.

Happy Learning!

About Play Framework

About Play Framework:


  • Play is an open source modern web application framework for writing scalable web applications. It is written in both Scala and Java languages.
  • Play was created by software developer Guillaume Bort, while working at Zenexity.
  • Play is Action based MVC web framework for applications.
  • Play is based on a lightweight, stateless, web-friendly architecture. 
  • Play Framework is Built on Akka, Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications.
  • Play Framework is a high-productivity Java and Scala web application framework that integrates the components and APIs you need for modern web application development.
  • The main aim of play framework is optimize developer productivity by using convention over configuration.
  • Play by design has a stateless and non-blocking architecture. This makes it easy to horizontally scale web applications written using the Play Framework.
  • Build and deployment was migrated to SBT(Simple Build Tool) and templates use Scala instead of Groovy.
  • Play framework has built in JBoss Netty web server. We can also create WAR file and deploy into other application frameworks like Tomcat, JBoss etc.
  • Play supports for push and pull based application controller calls. ( Push-based architecture also called "action-based". These frameworks use actions that do the required processing, and then "push" the data to the view layer to render the results. DjangoRuby on Rails, Spring MVC are good examples of this architecture.  An alternative to this is pull-based architecture, sometimes also called "component-based". These frameworks start with the view layer, which can then "pull" results from multiple controllers as needed. In this architecture, multiple controllers can be involved with a single view. Tapestry, JBoss Seam, Java Server Faces(JSF) and Apache Wicket are examples of pull-based architectures.)
History:

Version Released on Features
Play 1.0 October 2009
Play 1.1 November 2010 Migration from Apache MINA to JBoss Netty, Scala support, native GlassFish container, an asynchronous web services library, OAuth support, HTTPS support and other features.
Play 1.2 April 2011 Dependency management with Apache Ivy, support for WebSocket, integrated database migration, a switch to the H2 databaseand other features
Play 2.0 March 13, 2012 Typesafe Stack 2.0
Play 2.1 February 6, 2013 Upgraded to Scala 2.10 and introduced, among other new features, modularisation, a new JSON API, filters and RequireJS support.
Play 2.2 September 20, 2013 Upgraded support for SBT to 0.13, better support for buffering, built in support for gzip and new stage and dist tasks with support for native packaging on several platforms such as OS X (DMG), Linux (RPM, DEB), and Windows (MSI) as well as zipfiles.
Play 2.3 May 30 2014 Introducing the activator command, Build improvements, Java improvements, Web Services enhancements, Support for Scala 2.11, Actor WebSockets, Custom SSLEngine for HTTPS, Upgrade to Netty 3.9.3
Play 2.4 May 26 2015 Dependency Injection, Testing, Embedding Play, Aggregated reverse routers, Java 8 support, Maven/sbt standard layout, Experimental Features, Upgraded to Ebean 4, HikariCP is the default connection pool, WS supports Server Name Identification (SNI)
Reasons to learn Play Framework: 

We have several web application frameworks like Spring, Struts, JSF etc but still why we want to learn play framework because of the following reasons.

1. Developer friendly: what it means if you changing any thing in java code no need to stop and start the server. Here just you need to hit browser refresh button it automatically compiled (if any errors is there automatically displayed in browser) and runs the application. Play supports reload for the Java Code, Templates etc..

2. Supports both Java and Scala Programming: Play framework supports both Java and Scala programming language. Because of this reason, developer can select appropriate language for their development.

3. Reactive by nature:  Play frame has built in Server called JBoss Netty. It supports the non-blocking I/O operations. It is very easy and inexpensive to make remote calls in parallel, which is important for high performance apps in SOA ( Service Oriented Architecture).

4. REST Support: Play framework makes it very easy to write RESTful application. It has very good support for HTTP routing. HTTP routing translates HTTP requests into action calls. It has in built in JSON API for marshaling and un-marshaling so no need to add new library.

Play Framework Architecture:



Lets see the Pros and Cons of Spring and Play framework:

Spring MVC:
  Pros:
     1. Good raws throughput.
     2. Type safety reduces code rot
  Cons:
     1. Not developer friendly.
     2. Threaded synchronous approach difficult to scale for lots of I/O in a SOA environment.

Play:
    Pros:
       1. Fast for raw throughput.
       2. Non Blocking I/O at the core makes concurrency easy.
       3. Hot reloaded makes it is possible to get the things done quickly.
       4. Strong type safety throughout reduces code rot.
    Cons:
       1. Even with hot reload, a compiled statically typed language isn't quite fast as an interpreted dynamically typed language.
References:
1. https://www.playframework.com/documentation/2.4.x/Home
2. https://en.wikipedia.org/wiki/Play_framework
3. https://blog.openshift.com/day-30-play-framework-a-java-developer-dream-framework/
4. https://stackoverflow.com/tags/playframework/info
5. http://www.ybrikman.com/writing/2014/03/10/the-ultimate-guide-to-getting-started/
6. https://www.playframework.com/changelog

Happy Learning!

Wednesday, July 15, 2015

About Me

About Me:

Ranga Reddy:
Ranga Reddy is a Senior Software Engineer from India. He is expertise is in Core Java and J2EE technologies, but  he also has good experience with front end technologies like Java Script, JQuery, AngularJS, KendoUI.

Ranga Reddy has good experience on technologies and tools like Java, JSP, Servlets, Spring, Hibernate, MySQL, Oracle, Maven, Gradle, Javascript, JQuery and AngularJs. He is always keen to know about new technologies, new updates in the current technologies and trends in the market. His current interests include Play Framework, Spring, Hiberante, Angular.js.

Contact: rangareddy.avula@gmail.com

Utilities

Utilities posts coming soon...

JS Frameworks

JS Frameworks Posts coming soon...

Java Frameworks Posts

Java Frameworks Posts coming soon....

Core Java

Core Java Posts Coming Soon...