- cross-posted to:
- fediverse@lemmy.ml
- cross-posted to:
- fediverse@lemmy.ml
Seems like an interesting effort. A developer is building an alternative Java-based backend to Lemmy’s Rust-based one, with the goal of building in a handful of different features. The dev is looking at using this compatibility to migrate their instance over to the new platform, while allowing the community to use their apps of choice.
Browsing the code makes me angry at how bloated Java projects are:
package com.sublinks.sublinksapi.community.repositories; import com.sublinks.sublinksapi.community.dto.Community; import com.sublinks.sublinksapi.community.models.CommunitySearchCriteria; import com.sublinks.sublinksapi.post.dto.Post; import com.sublinks.sublinksapi.post.models.PostSearchCriteria; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import java.util.List; public interface CommunitySearchRepository { List<Community> allCommunitiesBySearchCriteria(CommunitySearchCriteria communitySearchCriteria); }
Every file is 8 directories deep, has 20 imports, and one SQL statement embedded in a string literal. 😭
Most IDEs will handle the imports for you and auto collapse them