Thursday, October 30, 2008

Developing an enterpricy solution for less

Enhetstester som kjøres automatisk og jevnlig utover utviklingsperioden
Testene fungerer som dokumentasjon, og viser hva som er lov/ikke lov, best practices og gjør det lettere å komme igang med noen annens kode
Et mål kan være å få koden enklere for at den skal bli mer oversiktlig, og lettere å begynne å jobbe mot.

Dele opp operasjonene i komponenter som gjør minst mulig. De har en startposisjon hvor de henter noe fra disk og legger resultatet tilbake når prosessen er ferdig.
Dette sikrer at kompleksiteten holdes lav, og at man kan skalere de komponentene som bruker mest ressurser.
Lett å holde track på hvor langt en gjennomkjøring har kommet.
Unngår å ha en lang kjede med dyre operasjoner som kan feile halvveis

Hold deg til enkle standarder som finnes på markedet.
RSS, XML, JSON, REST, "Ruby on Rails", komprimert XML
Pass på grensesnittene (Interface), særlig ut mot kunden. Disse må endres så sjelden som mulig.
Skill grensesnittene fra implementasjon

Ny funksjonalitet som "Endring av kundedata" kan godt implementeres med "Ruby on Rails"
Prøv å holde kompleksiteten lav. Trenger virkelig kunden alt det han spør om?
Enkle applikasjoner som ikke har avhengigheter til hverandre.
REST tankegang for å manipulere dataene, helt ut til Webgrensesnittet kan være en stor fordel

Ha Load balancer og throttlers mot integrasjonspunkter og interfacene mot kunden.
Dvs at dere har kontroll på antall forespørsler som kommer inn og som går ut mot kunden.
Det er en fordel å kunne skru av og på traffikken for å hindre at systemet henger seg, og lett kunne switche aktive systemer og endepunkter

SIMPLICITY IS THE KEY

Wednesday, October 29, 2008

The state of Applets - Java SE 6 Update 10



I've had my hopes up high since Sun promised to leverage Java Applets. Java SE 6 update 10, "Consumer Edition" was recently released. I dusted off the would-be-could-be shelf and took Applets for a spin ten years later to see if it delivers.

Competing framework Flash delivers what Java developers should have been able to do 10 years ago. But I've invested too much know-how in Java and Swing. So, what are my expectations?

Monday, October 27, 2008

MicroXP just made Windows sexy for development

There are times you have an application or job task which requires windows, and you need a Windows box with the least amount of hassle and small footprint.

Behold MicroXP; a stripped down version of WindowsXP. Match weight: 100MB distro, <500MB HDD, <50MB RAM, ~10min almost inputless installation and <20 second bootup time!!!



Just to test it out for development in parallels, downloaded Java 6 JDK, Maven and tested out the Smacking up Groovy demo in less than 10 seconds which creates a full Java/Groovy development environment with no hassle. And it worked!

Conclusion: Damn sweet footprint! You can propably get your chores done, and still be smiling. Bill Gates won't love us, but since when has he appreciated Java anyways?

PS. I have been using OS X for over a year, and allthough MicroXP is sweet and sexy, I'm still content with having moved away.

Friday, October 24, 2008

Embedding a Groovy Console in Spring context

In search of the perfect way of adding a console to my Java application, for debugging and test purposes, I stumbled upon the article Embedding a Groovy Console in a Java Server Application by Bruce Fancher. It has a code demo of which runs two flavors of Groovy Consoles from the Spring context of his application. This vantage point gives one access to all the services available to spring, and sits smack in the middle of the most important parts of your application where you can access services and databases. Check out the supplied demo, which still runs nicely with Ant + Tomcat.

Saturday, October 11, 2008

Smacking up a Groovy demo in less than 10 seconds

Write mvn groovy:console , and you will get a console where you can execute Java/Groovy code by typing ctrl+enter/+enter.

If I were to learn a new language, or Java from scratch again in the University, This way of packaging would make a HUGE difference!


What next?


The sweet spot for using Groovy is

  • Familiarity to Java developers. Paste in your favorite Java code, and it will compile

  • Java classes are imported and used as normal

  • Strings, Files and many other standard classes have been extended with often-used functionality

  • Handling stuff on the file system - copying, deleting aso

  • Parsing XML in a nice DSL

  • Simple SQL/JDBC

  • Binding together a Java application


Resources