-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Support Non Orient Based Repositories - Potentially Extract Repository Framework into Separate Project #9
Comments
guice-persist-orient targets orient only so its not the best idea to add jpa support into it directly. Repositories mechanism is indeed pretty generic and I could extract it into separate library (all extensions support staff). If this is a good plan for you I will need a week or two for extraction. You will be able to develop your staff using snpashots from jitpack (see project readme snapshots section for example) in parallel. |
@xvik If you have the ability to separate out repositories and delegation, we would be very appreciate!!! After looking through all the code, I was thinking of the following:
I think that "capability" could stand completely on its own without any Repository or DB stuff. I think Then, there's the Generic Repository framework, which I think could continue to leverage https://github.com/xvik/guice-ext-annotations (as well as the @DeleGate) but provide support for @repository or @RepositoryMethod, etc. I guess why I see this nice separation is we could also use: @ProvidedBy(DynamicSingletonProvider.class)
@Delegate(ClassThatWillServeAsDelegate.class)
public interface RestEndpointBase<T> {
<T> get();
void post(T newObject);
void put(T update);
void delete(T objectToDelete);
} If Thoughts? |
I agree that @DeleGate is db agnostic, but it cant be moved to guice-ext-annotations. Any repository method call is expensive for the first time: there are a lot of analysis and reflection. Thats why after first call composed descriptor object is cached: we do all possible analysys to make future calls as lightweight as possible. After all, core will be a base for orient and jpa moduels (specific extensions), will contain delegate and could also be used to do any db agnistic things like delegates. Now the bad part: its a huge change and, what is worse, its breaking change for guice-persist-orient (at least annotation packages will change).
Most likely, it would be ready near the end of september (will try to do earlier, but cant promise - dont have a lot of time right now). |
Ok, so we really like how this project uses Guice AOP and https://github.com/xvik/guice-ext-annotations to create "Repositories" for data. Specifically, we like how the
@Delegate
can be used to define our DAOs using interfaces and then assign their method execution to base implementation classes.We have been looking for such a capability and have come across:
Warp-persist: https://code.google.com/p/warp-persist/
Guice-repository: https://code.google.com/p/guice-repository/
Unfortunately, both of these projects are still hosted on Google Code and appear quite outdated.
In addition to using Orient, we are also using Postgres with Hibernate/JPA. We'd really like to use your "repository" Pattern implementation, but there are a few things:
Any interest in extracting out the entire repository framework into its own project?
I've started such an implementation using your code as inspiration but you've already developed and architected so many excellent pieces it seems somewhat silly to do so much.
The text was updated successfully, but these errors were encountered: