The evolution history of Java. What Java is good for? The rising of dynamic languages in JVM.
Size: 906.1 KB
Language: en
Added: May 16, 2013
Slides: 53 pages
Slide Content
The Evolution of Java
Fu Cheng
Author of Understanding the Java 7 Author of 40+ technical articles on
We talk about ...
Java is …
A Programming Language
Just like C/C++, Ruby, Python and many others
Java is ...
A Programming Platform
Language + Libraries + VM
Java is ...
Popular
Java is ...
http://en.wikipedia.org/wiki/History_of_programming_languages
Old - maybe not old enough
Java is ...
Object-Oriented
Nearly everything is a object
Java is ...
Easy to learn
Java is ...
(Maybe) too easy to learn
The Perils of JavaSchools
by Joel Spolsky
Java is not, generally, a hard enough
programming language that it can be
used to discriminate between great
programmers and mediocre programmers.
Java is …
JDK 1.0
199619971998 2004 20062000 2002 2011
JDK 1.1
J2SE 1.2
J2SE 1.3
J2SE 1.4
J2SE 5.0
Java SE 6
Java SE 7
http://en.wikipedia.org/wiki/Java_(programming_language)#Versions
Slowly evolving
Java has ...
Strong Platform Medium language
Weak core libraries
Popular Platform
•Desktop
–850M PCs, 2011
•Mobile
–Android
–Java ME
•Enterprise
–LinkedIn
–Ebay
–Paypal
–AOL
–Alibaba
–Netflix
http://w3techs.com/technologies/details/pl-java/all/all
JVM
•Shield applications from OS layer details
–Threading using java.lang.Thread
•Provide runtime support for applications
–Basic types and operators
–Object model
–Unicode support
–Dynamic linkage
–Garbage collection
–Memory model
–Access control
Java Language
•Static typed
•Strict & rigid syntax
It's hard to say language X is better than language Y.
Use the right tool.
Java is good for ...
Big Teams Long-term projects
The key is maintainability.
Code readability
Find good developers
High-profile projects
http://www.slideshare.net/vishnu/the-top-10-reasons-the-ruby-programming-language-sucks
The Top 10 Reasons The Ruby Programming Language Sucks
-Matz
See Ruby
Why Java Succeeded
Compile Once, Run Anywhere
Java Source Code
(.java)
Java Byte Code
(.class)Compile
Java Compiler
JVM
Win *Nix Mac
Java Language
Specification
JVM
Specification
Run
Class loader
•Java's true invention
•Load code from remote
and execute locally
•Core technique behind
Java Applet
•Java applet boosted
Java’s spreading in dot
com age
NASA World Wind applet
How Java Evolves
Java Community Process
OpenJDK
+
Java Community Process
Develop standard technical specifications for Java
technology
Java Specification Request (JSR) - Changes to make
http://jcp.org/en/procedures/overview
Member
Executive Committee
(EC)
- Individuals
- Companies
- Organizations
- Major stakeholders
- Representative cross-section of
the Java Community
JSRs
Game of big players
Eclipse Foundation
HP
IBM
Intel
Nokia
Oracle
Red Hat
SAP
Twitter
and more ...
submit approve
OpenJDK
•Open-source implemenation of Java SE
•Reference implementation of JCP JSRs
•Base of other Java SE implementations
•Oracle collaboration with Red Hat, IBM, Apple, and
SAP
What Happened Behind Java SE 7 JSR
JSR 336 Java
TM SE 7 Release Contents
Final Approval Ballot
http://jcp.org/en/jsr/results?id=5225
Those Voted 'Yes' Said ...
http://jcp.org/en/jsr/results?id=5225
Licensing Terms of TCK
•Technology Compatibility Kit (TCK) is used to test
compatibility of Java implementation.
•Oracle only wants to license the use of TCK in the OpenJDK
context
•Apache Software Foundation, Doug Lea and Tim Peierls
resigned from JCP EC in protest over this issue.
–Apache Harmony Project - retried already
Oracle ... has essentially turned the JCP
into a rubber-stamp organization for Java SE 7
Alex Handy
Evolution Areas of Java
Productivity Performance
Modularization
Productivity
Averaging over the lifetime of the project, a programmer
spends about 10-20% of his time writing code, and most
programmers write about 10-12 lines of code per day that
goes into the final product, regardless of their skill level.
http://automagical.rationalmind.net/2010/08/17/some-lesser-known-truths-about-programming/
http://www.codinghorror.com/blog/2005/08/are-all-programming-languages-the-same.html
Lines of Code
Java is improving
•Java SE 5
–Enhanced for loop
•Java SE 7
–try-with-resources
–Diamond operator
•Java SE 8
–List & Map literals
–Lambda expressions
Example of lambda expression
http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html
Performance
Java is NOT slow
Benchmark Result 1
http://blog.cfelde.com/2010/06/c-vs-java-performance/
Benchmark Result 2
http://readwrite.com/2011/06/06/cpp-go-java-scala-performance-benchmark
Most of the performance issues are caused by
programming errors
•Bad algorithms
•Careless memory usage
•I/O operations
•Threading issues, dead lock
Java is improving
•Performance was not good prior to Java 1.3
•Performance improved since HotSpot was
introduced in Java 1.3
•Each Java release has performance
improvements
JVM in OpenJDK = HotSpot + JRockit
Modularization
Why you need Swing library for an application server?
Project Jigsaw
Design and implement a
standard module system for the
Java SE platform, and to apply
that system to the platform itself
and to the JDK
http://openjdk.java.net/projects/jigsaw/
JVM Languages
Rise of Dynamic JVM Languages
And more ...
https://en.wikipedia.org/wiki/List_of_JVM_languages
the Da Vinci Machine Project
Extend the JVM with first-
class architectural
support for languages
other than Java,
especially dynamic
languages.
http://openjdk.java.net/projects/mlvm/
Meet 'invokedynamic'
•A new JVM instruction introduced in JSR 292
for Java SE 7
•Allow extremely fast dynamic invocation
through method handles
•Improve performance of dynamic JVM
languages
http://jcp.org/en/jsr/detail?id=292
Polyglot and poly-paradigm
programming
Use the right language to solve problems in different
components
http://polyglotprogramming.com/papers/PolyglotPolyParadigm.pdf
Core business logic
Admin tasks
Web development
Concurrent programming
What should Java developers do?
Learn more about Java platform
Learn more JVM internals, class loading, byte code spec, etc.
Keep an eye on Java language
Use new features and enhancements to increase productivity
Embrace dynamic JVM languages
Learn new dynamic JVM languages to make your life easier
Java may not be a good programming language
Java platform is a good platform to work on
It’s evolving slowly
AND
BUT