Everyone seems to be assigning moral characteristics to Jacob and his friend. Another way to view them is as opposing forces of reality, no more moral than lightening which is what does and does what it is. Maybe Jacob and X represent Eros and Logos, the opposing forces of combination and separation. Freud called them the life and death instincts.
Jacob can be seen as Eros in the fact that he helped bring everyone together to the island, or more symbolically in his weaving. His friend, though it isn't obvious may turn out to be Logos; I also believe him to be the smoke monster which may fit in nicely with this definition.
They aren't good or bad, just entities embodying these all encompassing forces. His friend naturally gravitates towards the goal of killing him. Jacob seems to naturally want to bring things together, the ship (Black Rock right?) the Losties, and this latter point may be what ends up saving him my altering time to prevent himself from dying.
In all honesty I'm not sure how much evidence there is for this point of view but I thought it was an interesting way to look at them.