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

Comments

Projects
None yet
2 participants
@timowest
Member

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Apr 9, 2014

Member

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

Member

timowest commented Apr 9, 2014

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

@Shredder121

This comment has been minimized.

Show comment
Hide comment
@Shredder121

Shredder121 Apr 9, 2014

Member

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

Member

Shredder121 commented Apr 9, 2014

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

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Apr 9, 2014

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 12, 2015

Member

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?

Member

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

This comment has been minimized.

Show comment
Hide comment
@Shredder121

Shredder121 Feb 12, 2015

Member
  • 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?

Member

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Feb 12, 2015

Member

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

Yes, that's the reason.

Member

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

This comment has been minimized.

Show comment
Hide comment
@Shredder121

Shredder121 Feb 12, 2015

Member

Then that sound good as well.

Member

Shredder121 commented Feb 12, 2015

Then that sound good as well.

@timowest timowest referenced this issue Mar 14, 2015

Merged

Changes to Expression instance creation #1261

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