Uploaded image for project: 'Spring Social'
  1. Spring Social
  2. SOCIAL-343

Leverage Spring Data for UsersConnectionRepository

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Connection Persistence
    • None

    Description

      As of Spring Social 1.0.2.RELEASE, a central part of Spring Social is the interface org.springframework.social.connect.UsersConnectionRepository. It is used to retrieve social provider-related data of users. The only implementation available to this interface right now is JdbcUsersConnectionRepository.

      Also, there is the related ConnectionRepository which is used to persist provider-related data of users. Its only implementation right now is JdbcConnectionRepository.

      Spring Data makes it easy to set up and maintain repositories: a little configuration and some application-specific interfaces are enough to provide repositories that are transaction-aware and boilerplate-free, among other goodies.

      If Spring Social leveraged Spring Data somehow, I guess that Spring Social's repository-related needs could benefit from Spring Data.

      As for myself, my current application both uses Spring Data repositories and Spring Social's "own" repositories. Having to use both makes it harder for me to reason about the behavior of my underlying database technology: Both use the same javax.sql.DataSource object to access the database. Additionally, modifications to requirements involving the database (e.g. "make any database operation transactional", "handle database exceptions gracefully") requires to analyze both Spring Data-related repositories and Spring Social-related repositories.

      tl;dr: Providing Spring Data-based implementations of Spring Social-related repositories may result in a better application design.

      Attachments

        Activity

          People

            habuma Craig Walls
            abdull Gerrit Hübbers
            Archiver:
            tmarshall Trevor Marshall

            Dates

              Created:
              Updated:
              Archived: