Thursday, October 26, 2006

Aspect, oh Aspect...

Not all is peachy at aspectj land.

If you are using hibernate, you are in for a nasty circular dependency surprise once you inject an object/service/dao to your domain object which has a hibernate session factory injected via spring. The session factory object tries to load your entity/domain, which will be intercepted with aspectj and try to configure using your spring configuration, which will again call on session factory....

The solution is including an unsaved-value="null" into your primary class (use xdoclet to make your life easy).

Am currently using load time weaving using the AJDT tool. And its a bit slow on bookah wookah. A much nicer/lightweight approach is to mock your objects for unit testing and use ajc on the final jar build.

Is it domain dependency injection worth the trouble? It depends, but it truly helps make your model more object oriented. Makes mapping meatspace problems easier. You could treat your domain object just like a real object.


devnox
- binding aspects to the jar output...

Tuesday, October 24, 2006

Allergic to annotations?

If you are like me, still allergic to annotations, but would like to inject stuff to your domain objects to keep them from becoming anemic, you cant rely on the spring docs (ATM) to give you a more simple explanation on using AspectJ for domain injection. The problem is magnified if your only use of aspects is for domain injection and nothing else (K.I.S.S. philosophy).

There is another way. You still need to download the usual AspectJ installer and the eclipse AJDT. Then create an aspectj project with a class like the code below.


package com.mobileindie.spring.utils;

import org.springframework.beans.factory.aspectj.AbstractBeanConfigurerAspect;
import org.springframework.beans.factory.wiring.ClassNameBeanWiringInfoResolver;

public aspect DomainObjectConfiguration extends AbstractBeanConfigurerAspect {

public DomainObjectConfiguration() {
setBeanWiringInfoResolver(new ClassNameBeanWiringInfoResolver());
}

// the creation of a new bean (any object in the domain model)
protected pointcut beanCreation(Object beanInstance) :
initialization(com.mobileindie.domains..new(..)) &&
this(beanInstance);

}


Take note of the initialization line, this is where you define which objects you would like to inject your dependencies whenever a new instance is called. This also assumes wire by prototype mode. But the beans are configured just like a normal bean in your spring application context xml.

devnox
- ano nga ba ang aspect kung meron kang aspect?

Apple - MacBook Pro

Core 2 Duo based MacBook Pro just out!

The time has come to drool again. Imagine the boost in productivity with that machine. A core 2 duo compiling my java apps! If the current crop macbook can cut my compile time in half, imagine the speed on this sweet bugger.

Back to G4 reality.

macnox
- dreaming ang drooling...

The Aspects Blog: Tips for using Eclipse effectively

Aha!

I had been using eclipse for quite a while and didn't know that there is such an option such as Fast Views, which really helps reclaim much needed screen state on my 1024x768 resolution challenged bookah wookah.

Just right click on the title bar of the view and select the Fast View. It minimizes your view to a single icon on the bottom (default). But you can place it either on the left or right portion depending on your preference.

dev nox
- hopping around...

Sunday, October 22, 2006

Alapaap

Alapaap

iPhoto Diet 3.1 - VersionTracker

Woot! Just what I need!

Need to swap the larger drive soon tho. With barely 1 gig free disk space, things are slowin. Can't give up both my music and photo collection either. Wonder if those shops are oven on tuesday...

Saturday, October 14, 2006

XStream

POJO to XML? Check. XML to POJO? Check.

Yummy clean XML generation... Whats not to love?

Spread the love...

devnox
-- still buried in the xslt regime.

Friday, October 13, 2006

Self portrait fun!

At the risk of exposing my vanity, and the limits of my creativity, my self portrait version 1...

Resized original image.
avatar_medium

Post processed, bronzed, 50 year old shed-my-boy-next-door-image look.
avatar_usm

I have to admit, I will still look dashing 20 years from now. Hehehehe...

samoht.com: SpringViz

SpringViz + GraphViz = Springy-fied Diagram Titilations

Spread the love...


devnox
-- buried deep in the xslt regime...

Thursday, October 12, 2006

Hands-on with the Treo 680 - Engadget

And the new Treo 680 is out!

Oh well, still no wifi or confirmation of WiFi support. No 3G either.

In the Philippines, more and more people are getting hooked on using their 3G handsets as wireless conduit for internet access. Not surprising tho, since Smart 10pesos per 30mins 3G/GPRS is spot on (Globe, take a hint). At that rate, you would think twice subscribing to WiFi access like Airborne etc. I mean, you can get a prepaid smart sim and have prepaid internet access anywhere that there is a Smart signal. Speed is a bit sluggish if you are not on 3G (dial-up speed), since 3G doesn't cover the whole archipelago yet. When you are on 3G however and using a data cable, speed is somewhere between a dial-up and a low grade broadband connection. But you sure can't beat the convenience and the decent connection rate. +1 for Smart.

Globe is still stuck on the per kb pricing. Whilst handy and practical for instant messaging and quick email checking on your handset, quite unpractical if you plan to use it together with your lappy-tappy for in-the-middle-of-nowhere internet access.

Back on topic, the new Treo (or even the current Treo line) is a match for Smart's data rates. On the other hand, they should have at least included a WiFi (or at least a Wifi option) and 3G chip in there.

Oh well...

Google Maps for Treo

Shiny!

Although, the Philippines is limited to satellite view. No street level info yet.

Location, location, location...


treonox
- the future is mobile...

Tuesday, October 10, 2006

Finally...

After what seems like eternity, 2 days to be exact. I finally saw the login screen.

Thats after migrating from the old acegi 0.8x to acegi 1.x. Same concepts, different naming conventions, some bean reconfigurations. After which, I thought, why not update the spring libraries as well (circa 2005 libraries)? and why not upgrade to Hibernate3 as well? I think I accelerated the growth of my white hairs a bit. And thats coming from bed loving flu a week back.

All in all the Hibernate2 to Hibernate3 sucks the most.

Oh well...

Wednesday, October 04, 2006

Necessities

Need to swap my 80G external hdisk to the 40G that comes with bookah. With only 2G space left, its noticeably affecting performance once the swap kicks in. That would mean a day of downtime tho, re-installing the day to day apps.

And oh, am down with the flu. Should have taken the flu shot together with the kids.

Spring 2.0!

Just noticed this now. Woot! Spring me baby!

I ditched liferay for the current project. Its nice, but unbearably slow on bookah (iBook G4), even with resin's JVM mem config cranked to the maximum. String beans is better and fits resin and glassfish like a glove. Will probably just portalize (JSR 168) the app on the next iteration. For now liferay doesn't cut it for my G4 powerpc portable dev machine, and I have no means to upgrade to a dual core macbook yet.

Friday, September 29, 2006

Post typhoon / typhoon post


Rojan
Originally uploaded by nocs.
No electricity,
nothing to do.
A camera in hand,
what do you do?

Capture the expressions around the candle of course!

This is the real purpose of my DSLR, capturing time thru the lens. Am difinitely my daughters number one fan! Next task is to print this 8x10 and find a good frame. :D

Tamron 17-50mm f/2.8 XR Di II Lens Review

My dream lens for the 350D. The Canon 17-55mm f/2.8 IS would be great if not for its "L" like price. I like the kit lens, but its a pain to use it when the sun is out, and I hate flash.

Santa, oh Santa...

Hmmmmmnnn...


shutternox
- bitten by the photography bug

Monday, September 25, 2006

Macro fun!

Janro and I, chased a butterfly outside last saturday. 350D in hand was surprised what the kit lens and a bit of post processing can do. :D

Original Image: Colors "accurately" reproduced.
butterfly_macro_original

Processed image, using the "velvia film" effect by using the channel mixer in photoshop.
butterfly_macro_velvia


Next experiment is to shoot with RAW and try the picture styles in DPP.


shutternox
- "yung tira ko, kit lens lang yan..." (tm)

Monday, September 18, 2006

Warm lights experiment

Family

WB set to shade/ISO at 800.

Am still focus challenged tho. And greatly needs to improve estimating DOF to get the shots I want.

And I hate flash. Larger apertures would be nice. Except of course the hobby is at the bottom of the priority list. For the meantime, the kit lens would have to do. I just have to work within its limits.

Sunday, September 17, 2006

Microfinance/M-Commerce thoughts

Been reading focus notes of a recent world bank publication listing Financial Institutions that use E-Payments to serve the poor. Particularly interested on using mobile phones as a means to carry out basic banking transactions.

Was surprised that for the Philippines we only have one entry (Rural Banks Assocations of the Philippines via Globe G-Cash?), and it was only offering one service: Payments.

Anyway, it also mentioned some reasons why potential users are cautious in using m-commerce. Nothing new here, I have mentioned this a couple times in this blog.

- Mobile banking applications are not yet inter-operable.
- Mobile phone payments may not conform to international security standards. And if I may add SMS as a basis for m-commerce transactions just doesn't cut it. Message delivery reliability issues still haunts this platform.
- For banks, a "mobile phone only" channel has not yet proved profitable. Chicken and Egg scenario here.
- Mobile phone banking may not be able to reach the most remote and poor areas. I don't see this as much of a hindrance in the Philippine setting. Rather (as I repeatedly mentioned on this blog) the lack of infrastructure for cash-to-electronic/electronic-to-cash convertions.
- Mobile phone banking may not be easy to use for illeterate and older users. True. Its a fact also that these young at heart would rather stick to tried and tested finance channels.
- Regulation surrounding mobile phone banking is not yet clear. There is no clear cut regulation yet in the Philippines. Am still confused with the whole cellco performing basic banking functions stand (Is it a bank or not?)

And only G-Cash was identified. Where is Smart Money?

Anyway am looking at this from an angle of an industry obeserver. I still lack the depth of a true blooded microfinance expert. Been itching to pursue a graduate study on microfinance, if only it wasn't that expensive!