herbsjs / herbs

A domain-first framework. Code your domain and your infrastructure will follow
https://herbsjs.org/
MIT License
426 stars 14 forks source link

New herb, complement a herb or use some market lib to transforms and conversions? #12

Open endersoncosta opened 2 years ago

endersoncosta commented 2 years ago

Hello everyone, seen that we need to construct some conversors, like camelcase conversor, or any other conversor like this Anchorme.js, that converts string to an html with an anchor link, for example.

What is your perception about this theme?

Talking with @jhomarolo he do a suggestion to use the suma to realize the conversions, since some conversions like camelcase for example can be validated and used to another purpose and validations.

But in my opinion, we can create a new herb if we need, for me, the suma is something to improve de precision of our entities, and this conversor can be more generalist and do not have an accuracy too big, with the intention of improve versatility of the system.

And we can continue creating generic codes or using any js libs to do this conversions and transformations...

italojs commented 2 years ago

Already exists so much libs that do it, I'm not sure build a new lib to do that is a good ideia

jhomarolo commented 2 years ago

Already exists so much libs that do it, I'm not sure build a new lib to do that is a good idea

I agree with you, but the proposal is to build herbs with minimal dependencies. And the idea is just to remove the conventions that already exists in other herbs libs and reduce code duplicity

dalssoft commented 2 years ago

I think it would be ok to have a new herb/lib just for that.

Since many herbs and glues allow custom naming convention, I think it could be useful.

Just to make it clear: the propose of such lib would be to have string transformations (camelcase, for example). is that right?

jhomarolo commented 2 years ago

I think it would be ok to have a new herb/lib just for that.

Since many herbs and glues allow custom naming convention, I think it could be useful.

Just to make it clear: the propose of such lib would be to have string transformations (camelcase, for example). is that right?

For now, I think the main proposal is work with transformations, not only pure string, but if necessary work with subtypes like json, XML, hexadecimals etc

dalssoft commented 2 years ago

not only pure string, but if necessary work with subtypes like json, XML, hexadecimals etc

it's still not clear for me what the use cases here beyond string transformation (camelcase, for example) for naming conventions. we also have to ask ourselves if this scope is big enough for a new lib

italojs commented 2 years ago

I dont agree to create a new glue to do transformations, it's not a big resource/feature, it's could to be implemented inside some existent lib ooooor we could to use an existent open source lib