If it's okay with you I think I'd prefer to go without the factory. Like I mentioned above, we can switch the caldav server at runtime so long as all of our caldav servers have the same interfaces. In javascript, we don't need to be as explicit about the types and interfaces.