Recent Posts

RSS Feeds

Taming The Tiger


Just finished with the new stuff in J2SE talk by Mark Reinhold. It was interesting after he rebooted his Linux laptop for the 2nd time :-) I did not get to finish my notes because I'm getting ready for my talk at 2:45...

here are my notes

Tiger is big & fierce – cool graphics of tiger

 

Themes:

1)    Quality

2)    Ease of development

3)    Performance

4)    Integration

One huge JSR (umbrella)

Quality – Compatibility with older versions, must be backwards compatible

Doing lots of tests to make sure that the compatibility is there. Features are important but compatibility is key.

Reliability, Avalibility, Performance are also important

 

Best Practices – for quality

1)    Regression Tests

2)    Unit Tests – Tiger is the first time they have taken unit-testing thing seriously. The people are now required to check-in unit tests with new features.

3)    Code Reviews – Code reviews attach reviewers name to the code and the reviewer is called if something is broken.

4)    Pre-Integration testing

 

Grow the dev-base: Ease of Development – the following stuff is supposed to be addressing these issues.

1)    Annotations

2)    Generic Types

3)    Enhanced for loops

4)    Enumerated types

5)    Auto-boxing

6)    Formatting & Scanning

7)    Concurrency Utilities

J2EE 1.5 will have many of these things esp. annotations/meta-data.

 

Annotations

Example of the AbstractButtonBeanInfo. The swing team built a doclet (like xdoclet) that generates the BeanInfo classes. Rienhold says (this is a hack, java doc was never meant to used for this).

Instead what we’d like is to have an Annotation that winds up in the .class file. The idea is to have the info in the annotation in the class file so that a ‘post-processor’

Annotations and be in class, vm at runtime, or only in the source. So your tools could use this info in reflection api’s. Very cool idea, probably old info but I love the idea of having this info avalible at runtime. We could do away with deployment descriptors all together J

 

Generic Types

Can build types that you don’t have to cast. Its OK but a bit c++ ish. Looks almost just like C++ generic types. Vile, but that is just my opinion. An example of moving an existing class to generic types. Next he covered some of the util classes that have changed given the new stuff.  The generics stuff took the approach that no JVM changes will be made.  All the changes are about compile time checking.

 

Enhanced for loops

Simple building of for loops. Seems good for VB people.

 

Enumerated Types

Encodes the type safe enum pattern into the compile using the ‘enum’ key word. Makes it easy to put enum’s into switch statements. The only new keyword. Its basically a sub class of class but is distinguished at runtime.

 

Autoboxing

Inter x = 3;

int y = x;

map.put(1, 42)

 

basically this is auto conversion from Integer to int.

 

Formatting & Scanning

Lets you put %i type stuff into your string processing.  You get to get rid of MessageFormat stuff (and other formatter classes)

Instead you use the Scanner class to get input and look fo rnextDouble type stuff, then you can use %.2f%n to print 0.06 instead of 0.0599999996. Scanner is meant to be the thing that awk programmers would understand.

Permalink     No Comments



Post a Comment:
  • HTML Syntax: Allowed