rectify icon indicating copy to clipboard operation
rectify copied to clipboard

Use Reform instead of Virtus

Open dawidlenkiewicz opened this issue 9 years ago • 4 comments

Hi @andypike !

First of all, great job with Rectify. It looks like a really nice foundation for big Rails projects and basically is a big step in right direction. But using Virtus for form objects is a blocker for me right now - it is not maintained anymore. Did you consider moving to Reform?

dawidlenkiewicz avatar Oct 24 '16 14:10 dawidlenkiewicz

Thanks for the question @dawidlenkiewicz! I've been asked about this a couple of times and I wanted to wait for a little while to see what happens with Virtus to see of someone picks it up. It looks like that isn't going to happen so I think it would make sense to remove it as a dependency.

From here I need to look into the options, we could move to a different backing gem (so save us some work) or create our own. I'd prefer to use something that is already mature but it will depend how easy it is to integrate as I have a few projects using Rectify and I'd like to maintain the public API if possible.

Sound like you like the idea of Reform, are there other gems that you would consider that we can add to the mix and experiment around with?

Thanks again, would be interested in your thoughts.

Andy

andypike avatar Oct 24 '16 14:10 andypike

Unfortunately, I haven't really used anything besides Virtus and Reform. I agree with you that it would be better to go with some existing and mature solution and it looks like Reform could be that thing. I'm not sure how easy it is to switch it and maintain the public API, but Reform has now an option to use dry-validation, which could be another big win.

dawidlenkiewicz avatar Oct 25 '16 11:10 dawidlenkiewicz

Since Virtus was apparently abandoned in favor of dry-struct and dry-types, maybe move it to those solutions?

I'll try to investigate.

art-solopov avatar May 01 '17 13:05 art-solopov

I did an attempt to port Rectify to dry-struct and... I'm not quite sure I'm not trying to fit a square peg into a round hole TBH. The API is quite different from Virtus'.

art-solopov avatar May 02 '17 09:05 art-solopov