Skip to content
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

Limit the public API of Querydsl #706

Closed
timowest opened this issue Apr 9, 2014 · 7 comments
Closed

Limit the public API of Querydsl #706

timowest opened this issue Apr 9, 2014 · 7 comments
Milestone

Comments

@timowest
Copy link
Member

@timowest timowest commented Apr 9, 2014

The public API of Querydsl should be more limited then it is currently and internal functionality should be better hidden.

The public runtime API could be something like

  • query classes: JPAQuery, SQLQuery etc
  • projections: Projections.*
  • dynamic expression creation: BooleanBuilder, PathBuilder, Expressions.*
  • query factory classes

The following classes should be better hidden

  • projection types: QBean, QTuple, ConstructorExpression
  • specialized operation types: SimpleOperation etc (at least construction)
  • specialized path types: SimplePath etc (at least construction)
@timowest timowest added the postponed label Apr 9, 2014
@timowest
Copy link
Member Author

@timowest timowest commented Apr 9, 2014

Since these changes will not be backwards compatible they will be applied for the 4.0.0 release

@Shredder121
Copy link
Member

@Shredder121 Shredder121 commented Apr 9, 2014

Since I am also busy with ConstructorExpression (and out of curiosity), what were you thinking of hiding?

@timowest
Copy link
Member Author

@timowest timowest commented Apr 9, 2014

Mostly the constructor and factory methods.

e.g.
Projections.tuple(...) vs new QTuple(...)
Expressions.path(...) vs new SimplePath(...)

The goal is to limit the amount of classes a user needs to remember to be able to get the full Querydsl experience.

@timowest timowest added this to the 4.0.0 milestone Apr 13, 2014
@timowest timowest modified the milestone: 4.0.0 Jul 14, 2014
@timowest timowest removed the postponed label Jan 15, 2015
@timowest timowest added the progress label Jan 28, 2015
@timowest
Copy link
Member Author

@timowest timowest commented Feb 12, 2015

Here is another change suggestion

  • Rename com.querydsl.core.types.expr to com.querydsl.core.types.dsl
  • Combine contents of com.querydsl.core.types.expr, path, query and template
  • Move com.querydsl.support.Expressions to com.querydsl.core.types.dsl
  • Make constructors of SimpleExpression subclasses in those packages protected
  • Remove static factory methods from the same classes

@Shredder121 What do you think?

@Shredder121
Copy link
Member

@Shredder121 Shredder121 commented Feb 12, 2015

  • Rename com.querydsl.core.types.expr to com.querydsl.core.types.dsl
  • Combine contents of com.querydsl.core.types.expr, path, query and template
  • Move com.querydsl.support.Expressions to com.querydsl.core.types.dsl

That sounds good.

  • Make constructors of SimpleExpression subclasses in those packages protected

Yes, that sounds good, as long as they are all still instantiable in some way.

  • Remove static factory methods from the same classes

What do you mean by this? Do you mean that all instantiation is done in Projections and Expressions?

@timowest
Copy link
Member Author

@timowest timowest commented Feb 12, 2015

What do you mean by this? Do you mean that all instantiation is done in Projections and Expressions?

Yes, that's the reason.

@Shredder121
Copy link
Member

@Shredder121 Shredder121 commented Feb 12, 2015

Then that sound good as well.

@timowest timowest mentioned this issue Mar 14, 2015
8 of 8 tasks complete
@timowest timowest closed this Apr 18, 2015
@timowest timowest removed the progress label Oct 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.