JavaPolis 2006 - PowerPoint PPT Presentation

1 / 56
About This Presentation
Title:

JavaPolis 2006

Description:

Future of Java platform: New ideas. Superpackage syntax support. Compile dynamic languages directly to JVM bytecodes. Some language proposals ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 57
Provided by: And9168
Category:
Tags: javapolis | jug

less

Transcript and Presenter's Notes

Title: JavaPolis 2006


1
JavaPolis 2006
By Yury Kabrits Project Manager
2
Topics from JavaPolis 2006
  • Future of Java platform
  • New ideas/extensions for java language
  • Web 2.0, AJAX, JSF
  • SOA
  • Effective java, tips tricks
  • EJB3, Spring updates
  • Methodology Domain Driven Design

3
Future of Java platform
  • Open Source, Open JDKRichard Stallman, Founder,
    GNU Project
  • Java SE 6 features
  • Java SE 7 new ideas

4
Future of Java platform
5
Future of Java platform
6
Future of Java platform New ideas
New ideas for Java 7
  • Superpackage syntax support
  • Compile dynamic languages directly to JVM
    bytecodes
  • Some language proposals - Declaring JavaBean
    properties - Accessing JavaBean properties
    - Strings in switch statements - XML literals
    - Closures - Others

7
Future of Java platform New ideas
8
Future of Java platform New ideas
9
Future of Java platform New ideas
10
Future of Java platform New ideas
11
Future of Java platform New ideas
12
Future of Java platform New ideas
13
Future of Java platform New ideas
14
Future of Java platform New ideas
15
Future of Java platform New ideas
16
Future of Java platform New ideas
17
Future of Java platform New ideas
18
Future of Java platform New ideas
19
Future of Java platform New ideas
20
Future of Java platform New ideas
21
Future of Java platform New ideas
22
Future of Java platform New ideas
23
Future of Java platform New ideas
24
Future of Java platform New ideas
25
Future of Java platform New ideas
26
Future of Java platform New ideas
27
Future of Java platform New ideas - closures
28
Future of Java platform New ideas - closures
29
Future of Java platform New ideas - closures
30
Web 2.0, AJAX, JSF
  • Dojo
  • Dojo toolkit, Dojo JSF
  • DWR (Direct Web Remoting)
  • JSF frameworks
  • Oracle ADF, Backbase, Infragistics, etc.
  • Web 2.0 from Sun
  • Dynamic Faces, JMaki, Phobos (Server Side Java
    Script)
  • Adobe Flex 2.0 Red5

31
Web 2.0, AJAX, JSF Dojo Toolkit
  • Package/build system - Load what you need
  • dojo.event - Cross browser event handling
  • dojo.ally - Accessibility
  • dojo.18n - Internationalization
  • dojo.lfx Effects
  • dojo.gfx - SVG/VML abstraction
  • dojo.io - Common abstraction to Ajax IO
  • dojo.storage - Storage

32
Web 2.0, AJAX, JSF Dojo Toolkit
Dojo layers
33
Web 2.0, AJAX, JSF Dojo Toolkit
Dojo example1 packaging
dojo.require("package.") dojo.requireIf(conditio
n, "package.") dojo.requireAfterIf(condition,
"package.") dojo.kwCompoundRequire( browser
"foo.bar", "baz.", common "thud." )
34
Web 2.0, AJAX, JSF Dojo Toolkit
Dojo example2 animation
// wipe two elements out, one after // the other,
following a 300ms delay var anim1
dojo.lfx.wipeOut("foo", 300) var anim2
dojo.lfx.wipeOut("bar", 500) var composed
dojo.lfx.chain(anim1, anim2) composed.play(300)
35
Web 2.0, AJAX, JSF Dojo Toolkit
Dojo example3 using widgets
ltscriptgt dojo.require(dojo.widget.Editor2) lt/sc
riptgt lt!-- ... --gt lttextarea dojoTypeEditor2gt .
.. lt/textareagt
36
Web 2.0, AJAX, JSF Dojo Toolkit
Dojo lots of useful widgets
  • Rich Text Editor
  • ContentPane
  • SplitPanel
  • Tabs
  • Fisheye List
  • Sorting Table
  • Google/Yahoo
  • Maps
  • Tree
  • Dialog/Wizard

Custom widgets
src/ widget/ templates/
Foo.html Foo.css Foo.js
37
Web 2.0, AJAX, JSF Dojo Toolkit
Dojo event system
  • Dojo's event system is runtime AOP - before,
    after, and around advice
  • Any function can be notified when any other
    function fires
  • Comet idea push messages from server
    dojo.io.cometd

dojo.event.connect(obj1, func, obj2,
func) obj1.func() // now calls obj2.func()
38
Web 2.0, AJAX, JSF DWR
DWR Direct Web Remoting
39
Web 2.0, AJAX, JSF DWR
DWR 2.0
40
Web 2.0, AJAX, JSF DWR
Where does DWR fit?
  • For some Ajax magic with Struts 1.0
  • With new Spring/Webwork code
  • In a JSF app or with RIFE
  • By itself with dwr.util
  • As the service layer to a Scriptaculous / Dojo
    application
  • In the enterprise with GI and a SOA

41
Web 2.0, AJAX, JSF
AJAX options in Java many ways, no standard
  • Frameworks Direct Web Remoting (DWR)
    Java Server Faces Use all Java Google
    Web Toolkit
  • Use JavaScript toolkit on client with
    Servlets JSP

42
Web 2.0, AJAX, JSF
Dynamic Faces is an attempt to make a standard
  • Dynamic Faces Ajax with existing and future
    JSF Based on JSF 1.2 Extends the
    JSF lifecycle to work on AJAX requests.
    Easy integrated into existing JSF applications
    Considered by Sun as a step toward JSF 2.0
  • Usage Use ajaxZone tag to AJAXify regions
    of the page Use provided JavaScript
    library to AJAXify page elements and components

43
Web 2.0, AJAX, JSF
jMaki another attempt to make a standard API.
44
Web 2.0, AJAX, JSF
  • JSF 1.2 makes Ajax integration easier for
    component developers - JSF 1.2 Reference
    Implementation available now - Requires either
    a Java EE 5 server (with JSP 2.1) or Facelets
    (open source JSP replacement)
  • JSF 2.0 will provide a single mechanism for Ajax
    integration for component vendors it will
    incorporate features from - DynaFaces
    - Single, integrated API for Ajax component
    developers - Will include JavaScript
    bindings - Apache Shale - JBoss Seam -
    Facelets

45
Web 2.0, AJAX, JSF
Flex 2.0 another approach
46
Web 2.0, AJAX, JSF
47
Web 2.0, AJAX, JSF
48
SOA Service Oriented Architecture
  • Web Services ! SOA
  • Other available alternatives - JMS -
    Can be used to build high performance SOA
    - Relatively low level - Doesn't support
    a real notion of services - No state
    management facilities - Jini - Provides
    light-weight Java-based SOA framework - Can
    be a good fit for high performance SOA -
    Low level - ESB (Enterprise Service Bus) -
    Provides a good solution for service
    orchestration - Most implementations
    designed for solving complex integration - not
    optimized for high throughput applications
    - Mostly WebServices/XML driven

49
SOA
From Direct (RPC) to Indirect (ESB)
50
Effective java, tips tricks
Java Performance Myths
  • Main myth X is slow! - X could be
    synchronization, reflection, allocation, garbage
    collection, serialization, ... - Do Y to make
    it faster!
  • But things change, while the myths stand still!
    - Java's performance today surpasses C in many
    areas - Many outdated performance
    recommendations now make things worse!
  • Clean code is the best way to good performance!
    - Follows common usage patterns - Works
    well with modern JVMs - Easier to optimize if
    you really need to!

51
Effective java, tips tricks
Java Performance Myths Dynamic optimization
Dynamic compiler has more information available
to it that static compilers - Profiling data
gathered during interpretation used to make
optimization decisions - Knowledge of what
classes have been loaded - Optimize for how the
code was used in this run Can make speculative
optimizations - And back them out if the
underlying conditions change Aggressive inlining
- Effective inlining key to optimization
52
Effective java, tips tricks
Effective Concurrent Java (Brian Goetz)
  • Rules for writing thread-safe code
  • Encapsulate data
  • Encapsulate synchronization
  • Document thread-safety intent and implementation
  • Prefer immutable objects
  • Exploit effective immutability
  • Rules for structuring concurrent applications
    Executor
  • Think tasks, not threads
  • Build resource-management into your architecture
  • Decouple identification of work from execution
  • Rules for improving scalability
  • Find and eliminate the serialization

53
Methodology
Domain driven design (Eric Evans)
  • Why need to design?
  • Design should correlate with the business area
  • Otherwise small changes kill the program
  • The goal of modeling is to establish ubiquitous
    language. It's a requirement for a successful
    project.
  • Always there are several models
  • The only requirement it should fit to our needs
  • For most software projects, the primary focus
    should be on the domain and domain logic, not
    objects!

54
Resources
  • JavaPolis www.javapolis.com
  • BeJUG Parleys www.parleys.com
  • Dojo www.dojotoolkit.org
  • DWR https//dwr.dev.java.net/
  • Dynamic Faces http//jsf-extensions.dev.java.net/
  • jMaki http//ajax.dev.java.net/
  • Domain Driven Design http//domaindrivendesign.or
    g/

55
Some books
Effective Java by Joshua Bloch Java Concurrency
in Practice by Brian Goetz, Tim Peierls, Joshua
Bloch, and Joseph Bowbeer Domain-Driven Design
by Eric Evans
56
Thank you!
Yury Kabrits Project Manager kabrits_at_dataart.com
DataArt394030, ???????, ??. ???????????, 27
4732 599-845 7 812 333-4440www.dataart.ru
Write a Comment
User Comments (0)
About PowerShow.com