added an sample subclass of ResourceService, added more comments in ResourceService