Client side Javascript + DDD