Bledar Gjocaj - Java open source

Preview:

Citation preview

Developing with open source tools and frameworksJava case study

What this talk is about● Developing with JAVA based open source solutions

● Which tools and frameworks are out there?

● Who uses Java for their web applications? Should I ?

There is a lot to say and there are many interesting open source projects.

This presentations wants to be an introduction to what you can find in the java world.

What this talk is not about● JAVA vs …

● Use JAVA, do not use ...

● Best framework for java web development is ...

● Best IDE for JAVA is ...

Java and open source

● The open-source mindset is pervasive in the Java world

● Java goes all the way from mobile to enterprise

● Open source solutions are production grade

● Open source communities and companies

Java and open source ● It's not just a language it's a platform

● It's not just a platfrom, it has plenty of tools too

● Not only tools, also great communities and projects

● It's an ecosystem

Java and open source

There's a JAR for that

Using Java for your next web project● Pick a framework

● Pick an IDE

● Get tools to help you

● Start coding

●Picking a framework

Two main MVC flavors: Request based and component based

Request centricManual request parameter processingDeveloper handles HTML/JSMore boilerplate code, more control.

Request centricAutomatic request parameter processing

Components render HTML/JSLess boilerplate code, less fine grained control.

s

Both can be used to create the same kind of applications .Component based frameworks can be a better when you have a lot of forms, validations, rules etc.

Request based can be a better fit if you want more control and need to handle the request at a lower level.

●Picking a framework

http://zeroturnaround.com/rebellabs/top-4-java-web-frameworks-revealed-real-life-usage-data-of-spring-mvc-vaadin-gwt-and-jsf/

●Picking a framework

● You can also go the RESTFUL path

– Have a backend developed in JAVA that exposes resources in the REST

architecture style

– Use one of the many great *JS frameworks for your UI (AngularJS,

BackboneJS, EmberJS and many more)

●Picking a stack

● You will also need other capabilities like ORM, Transactions, REST,

SOAP, Security etc.

● This means you will need a STACK of technologies

●Picking a stack

●Picking a stack

JAVA EE 7JSF (component based)JAX-RS (For REST)

SpringSpring MVC (Request based , for web applications and REST)

NOTE: JAVA EE specification vs implementation

●Spring framework

http://docs.spring.io/spring/docs/current/spring-framework-reference/html/overview.html

●Java EE 7

http://blog.eisele.net/2013/06/javaee7-is-final.html

Picking a stackJava EE and Spring are well know, supported and with big communities

● You are not obligated to use ALL the components of the stacks (and for a typical use case you may

not need too)

● You can choose one and integrate components from the other

● You can chose a web development framework and use components from each stack with it

● Either way you will be in good company,there is a huge number of developers using one or the other

(or both)

● Either way you will have great tooling

● Either way you will have great IDEs

A typical stack

A stack that I feel covers generic needs for the web apps I work with

● Web development framework

● Dependendy injection (Spring Di , Java EE CDI, Guice etc.)

● Transaction management

● ORM

● Application server (or servlet container)

IDEs

Running the applications

Again plenty of choices available (there are others that are not on this list)

● Application deployed on the server

● Server embeded in you application

Other topics

Testing (unit testing, functional testing, browser automation)

● Dependency management

● Deploy Automation

● Continuous integration

● ...

Java is not the only JVM language

The most common or well-known JVM languages are:

– Clojure, a Lisp dialect

– Groovy, a programming and scripting language

– Scala, an object-oriented and functional programming language

– JRuby, an implementation of Ruby

– Jython, an implementation of Python

http://en.wikipedia.org/wiki/List_of_JVM_languages

If you are curios, some other interesting frameworksAkka is a toolkit and runtime for building highly concurrent,distributed, and resilient message-driven applications on the JVM

Vert.x is a lightweight, high performance application platform for the JVM.Write your application components in Java, JavaScript, CoffeeScript, Ruby, Python or Groovy...

Grails is a powerful (Groovy based) web framework, for the Java platform aimed at multiplying developers’ productivity thanks to a Convention-over-Configuration, sensible defaults and opinionated APIs.

Play Framework makes it easy to build web applications with Java & Scala. Play is based on a lightweight, stateless, web-friendly architecture.Built on Akka, Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications

Who uses java ?

A lot of companies from small startups to enteprises use Java.

A lot of companies and startups use open source tools or frameworks.

There is a tendency to think that Java is not a fit for the new cool tech companies.

The truth is, companies like Linkedin, Twitter, Google, Netflix etc. use Java and the JVM and it works great for them.

Should I use Java?Java is open: Language, standard, libraries, frameworks, tools

Java has a vibrant open source community

Java is not just a platform, it's an ecosystem. You will find that a lot of solutions to a lot

of problems have been dealt with (there's a JAR for that :) )

There is continuous evolution and innovation with new features, new language on the JVM

etc.

I think you should try it and see for yourself why it is such a great tool to have in your

toolbox.

Should I use only Java?

● Java is great in a lot of ways

● If all you have is a hammer, everything looks like a nail

● A developer solves problems, with the tools that best fit the job at hand

● Learning new/other technologies should be an important topic to all

developers

Your first web application with java and open source technologies

Tomorow 17:30-18:00

QUESTIONS?

Thank You!

Recommended