h3. Factories

To obtain a framed graph use a @FramedGraphFactory@.

```java
FramedGraphFactory factory = new FramedGraphFactory();
FramedGraph framedGraph = factory.create(baseGraph);
```
TransactionalFramedGraph can be created from a TransactionalGraph
```java
FramedGraphFactory factory = new FramedGraphFactory();
TransactionalFramedGraph transactionalFramedGraph = factory.create(baseTransactionalGraph);
```

*A factory should be reused to create many graphs. Under the hood it may share resources between graphs where appropriate. This can make a big difference to performance and memory footprint.*

h3. Modules

@Modules@ are used to extend the capability of FramedGraph. They are registered in the constructor of the @FramedGraphFactory@.

In this example the framed graph will now support the @@GremlinGroovy@ annotation on frames.
```java
FramedGraphFactory factory = new FramedGraphFactory(new GremlinGroovyModule());
FramedGraph framedGraph = factory.create(baseGraph);
```
Any number of modules can be added to the factory, but a @FramedGraph@ will always support the [[Core Annotations]].