Comments (3)
So the "replacement" for Virtus is dry-struct: https://github.com/dry-rb/dry-struct , which is a core dependency of ROM https://github.com/rom-rb/rom . I've never been able to get ROM to work, and I have some level of concern about the scope of ROM being way bigger than the scope of Valkyrie.
Regarding dry-struct - I think we can make it work, but there's one big difference: dry-structs are immutable. They have no setters. The way you handle this is to have an abstraction for doing immutable actions on an existing struct - in ROM this is basically what a "repository" is, from my understanding. I'm not against that, but it makes me wonder if we're losing anything from the OO side of things.
In any case, I'd be totally open to an experiment where we rip out Virtus and make all the tests pass via dry-struct, to see what kind of interface changes we'd need and how complex our controllers would become.
from valkyrie.
The other alternative is just using our own POROs which are powered by http://trailblazer.to/gems/disposable/api.html for enabling dry-types coercion.
from valkyrie.
One way to do this is in #59 .
from valkyrie.
Related Issues (20)
- Add language to README about branch naming
- Update references of hard-coded legacy master branch name to main branch name
- Valkyrie StorageAdapter Files should have a `#close` method
- Valkyrie StorageAdapter Files shouldn't open a file handle on instantiation
- If enable_extension fails in the first DB migration, it should provide a better error about what to do.
- Storage adapters should have #id_for HOT 2
- Transition Lando to docker-compose for development environment
- Update the gemspec to require MFA for RubyGems releases
- Identify a new Product Owner HOT 5
- Fedora StorageAdapter finds root node for `nil` identifer
- Validate Fedora 6.3 RC1
- Postgres query service should use find_each in #find_all and #find_all_of_model for efficiency HOT 1
- Release v3.0.2 HOT 2
- Support mapping a pre-existing Fedora 6 repository to models.
- Dry::Types::Params::* missing from Valkyrie::Types HOT 1
- Document versioning for StorageAdapters
- Fedora storage adapter expects io to have #length
- Blank values for type Valkyrie::ID cause URI-to-ID lookups to return the Fedora base path as an ID HOT 2
- Valkyrie::StorageAdapter documentation correction? HOT 1
- Valkyrie::StorageAdapter::File - insert a higher abstraction to support cloud providers? HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valkyrie.