Posts

Showing posts from 2007
Faster smaller collections and maps Includes primitive keyed maps

Concurrency Testing

TheServerSide

ASM vs BCEL

Byte code manipulation

Distributed Scalability

Terracotta - Transparent network attached memory - horizontally scaling (distributing) a single (vertical) VM's memory Terracotta as a messaging bus, 2/3 less implementation than MySQL and Active MQ Oracle Coherence Usage in E-Commerce

Jetty XmlConfiguration

Mort Bay Consulting Jetty XmlConfiguration. O'Reill OnJava.com article Kudos to the Jetty team for taking the XML configuration one step farther: ... all Jetty-specific calls ... are element or attribute values, not names. This means the XML configuration can be used with any classes, even non-Jetty classes. Depending on how your app is written, you could configure it all through Jetty's XML config. See the references below for more details. Jetty configuration example Other Jetty configuration examples Jetty configure.dtd Jetty XmlConfiguration Jetty Java Xref try { final XmlConfiguration xconfig = new XmlConfiguration(<configUrl>); xconfig.configure(<object ref>); } catch (IOException ioe) { ... } catch (SAXException saxe) { ... } catch (Exception e) { ... } <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.1//EN" "http://jetty.m

Mixins

Raptor

Generics

Josh Bloch Generics JavaOne 2006 Builder pattern / Static Factories klass.cast(...) Sparse Array Serialization Proxy Use private and final unless reason not Generics Considered Harmful Generics vs. Autocasting Explicitly provide type by passing in class, see bottom of page method generics public abstract void getAndParse(T paramAnotherClass); public void addFriend(String name, Class type, T animal);  

Concept links

TDD - wikipedia OO terms - wikipedia Cohesion Inversion-of-Control, Dependency Injection, Service Locator - Fowler Service Locator not a pattern J2EE ServiceLocator best practice Open Closed Principle Liskov Substitution Principle

Singleton: Initialize-On-Demand Holder Class idiom

Memory model article and Initialize-On-Demand Holder Class idiom Listing 2. The Initialize-On-Demand Holder Class idiom private static class LazySomethingHolder { public static Something something = new Something(); } ... public static Something getInstance() { return LazySomethingHolder.something; } This idiom derives its thread safety from the fact that operations that are part of class initialization, such as static initializers, are guaranteed to be visible to all threads that use that class, and its lazy initialization from the fact that the inner class is not loaded until some thread references one of its fields or methods.

Generic Methods

From Hibernate 3.2.0.GA AbstractEntityManagerImpl.java @SuppressWarnings("unchecked") public <A> A find(Class<A> entityClass, Object primaryKey) { ... try { return (A) getSession().get( entityClass, (Serializable) primaryKey ); } catch ... } @SuppressWarnings("unchecked") public <A> A merge(A entity) { ... try { return (A) getSession().merge( entity ); } catch ... }

Mocks Aren't Stubs by Martin Fowler

Mockist (behavior verification) vs Classicist TDD (state verification)

The Distance Between Simple And Complex

Calculating a systems complexity StAX E4X

Eliminate RDBMS

See Phat Data Very large data sets can't be efficiently managed in an RDBMS. Alternative is distributed Indexed File Systems MapReduce Hadoop MemCache phat_data Hadoop and HBase presentation hadoop and hbase website

Microsoft Project - Java MPXJ

Java file manipulation of MS Project files

Favor Package-by-feature

Package-by-feature
Google Map Reduce GFS - Global File System Hadoop

Structure101

Structure101 enables visualization of software structure - architectural design and layering as well as packaging and class dependencies. It makes it easy to understand, monitor, and enforce. IDE plug-ins highlight and display layering/dependency violations as errors. Structure101 addresses the need to manage an applications architecture to keep it easier to understand and less fragile, all of which increases maintainability. I have successfully used Structure101 at two different companies and on two large scale enterprise projects. It was easy to setup and use and made identifying poor design and implementation a breeze. I was able to quickly analyze the full code bases and identify tangled and complex code. With Structure101 I could drill right down to the specific areas of the code that violated best practices so that they could be analyzed and corrected.

Why extends is evil - Holub

JavaWorld

Why getter and setter methods are evil - Holub

JavaWorld