Re:Don't make me think, or why I switched to Rails from Java...
by matyasrichter on Friday February 04, 2022 @01:12PM
(#30210680)
This comment is ridiculous. You've shifted this from "too many options for everything" to "any options at all". Also, how are these things framework specific? The API vs templates argument also applies for Rails. Choosing an authentication method also applies to Rails. Choosing rendered emails via SMTP vs Sendgrid - also applies to Rails. And so on. You can't mix business requirements with "tooling choices".
[ Parent
| on HN ]
Re:Don't make me think, or why I switched to Rails from Java...
by benbristow on Friday February 04, 2022 @01:33PM
(#30210963)
Rails has a templating system for generating emails (standard HTML/ERB files). If you're running an ASP.NET Web API (not MVC) the best way of doing that I've found is via RazorLight which you have to set up manually - https://github.com/toddams/RazorLight
For authentication, with Rails the standard is pretty much Devise or Omniauth (or both) - does everything for you. I've never found anything for ASP like Devise which gives you an entire registration/login system with all the required views/models/migrations in a couple commands.
Re:Don't make me think, or why I switched to Rails from Java...
by merb on Friday February 04, 2022 @07:37PM
(#30215688)
> I've never found anything for ASP like Devise which gives you an entire registration/login system with all the required views/models/migrations in a couple commands.
??????????????????????????????????????????? You know that this is built-in, right?
https://docs.microsoft.com/aspnet/core/security/authenticati... https://docs.microsoft.com/aspnet/core/security/authenticati...
also the same choices apply to rails.
Re:Don't make me think, or why I switched to Rails from Java...
by benbristow on Friday February 04, 2022 @08:19PM
(#30216015)
I mentioned Identity in my first comment. I've never found it as simple as Devise though - especially in an API only setting.
With Devise there's a third-party Gem you can use called devise_token_auth which deals with everything automatically.