28
Developing with open source tools and frameworks Java case study

Bledar Gjocaj - Java open source

Embed Size (px)

Citation preview

Page 1: Bledar Gjocaj - Java open source

Developing with open source tools and frameworksJava case study

Page 2: Bledar Gjocaj - Java open source

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.

Page 3: Bledar Gjocaj - Java open source

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 ...

Page 4: Bledar Gjocaj - Java open source

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

Page 5: Bledar Gjocaj - Java open source

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

Page 6: Bledar Gjocaj - Java open source

Java and open source

There's a JAR for that

Page 7: Bledar Gjocaj - Java open source

Using Java for your next web project● Pick a framework

● Pick an IDE

● Get tools to help you

● Start coding

Page 8: Bledar Gjocaj - Java open source

●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.

Page 9: Bledar Gjocaj - Java open source

●Picking a framework

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

Page 10: Bledar Gjocaj - Java open source

●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)

Page 11: Bledar Gjocaj - Java open source

●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

Page 12: Bledar Gjocaj - Java open source

●Picking a stack

Page 13: Bledar Gjocaj - Java open source

●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

Page 14: Bledar Gjocaj - Java open source

●Spring framework

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

Page 15: Bledar Gjocaj - Java open source

●Java EE 7

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

Page 16: Bledar Gjocaj - Java open source

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

Page 17: Bledar Gjocaj - Java open source

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)

Page 18: Bledar Gjocaj - Java open source

IDEs

Page 19: Bledar Gjocaj - Java open source

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

Page 20: Bledar Gjocaj - Java open source

Other topics

Testing (unit testing, functional testing, browser automation)

● Dependency management

● Deploy Automation

● Continuous integration

● ...

Page 21: Bledar Gjocaj - Java open source

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

Page 22: Bledar Gjocaj - Java open source

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

Page 23: Bledar Gjocaj - Java open source

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.

Page 24: Bledar Gjocaj - Java open source

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.

Page 25: Bledar Gjocaj - Java open source

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

Page 26: Bledar Gjocaj - Java open source

Your first web application with java and open source technologies

Tomorow 17:30-18:00

Page 27: Bledar Gjocaj - Java open source

QUESTIONS?

Page 28: Bledar Gjocaj - Java open source

Thank You!