Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Falco.Markup optional / pluggable / replacable #117

Closed
pkese opened this issue Jan 5, 2024 · 3 comments
Closed

Make Falco.Markup optional / pluggable / replacable #117

pkese opened this issue Jan 5, 2024 · 3 comments

Comments

@pkese
Copy link

pkese commented Jan 5, 2024

I really like Falco, but prefer to use Feliz.ViewEngine style html rendering instead of Falco.Markup (I'm used to Feliz from frontend and I'd like to use it on backend as well to reduce surface area).

Would it be possible to split Falco.Markup out completely, so that if it isn't explicitly installed as a package, it doesn't pollute the namespace. Currently Falco.Markup is pulled in unconditionally:

open Falco.Markup

If it was optional, then one could supply their own response.ofHtml that would let them render their own document type (rather than just Falco.Markup).

ofHtmlString (renderHtml html)

@pimbrouwers
Copy link
Owner

Hey Peter,

Thanks for reaching out.

When the Markup module was broken out, my number 1 goal was to ensure backward compatibility with the API at the time (which remains today). With that in mind, this concept isn't possible. I tried, trust me.

But that said, it costs you virtually nothing (we're talking kilobytes in your final DLL or exe), and I'm not sure it's inclusion in the Response and Xss modules is "polluting the namespace".

I don't see it as a problem in any way to just include & use whatever view engine you'd like :)

@pkese
Copy link
Author

pkese commented Jan 5, 2024

Ok. I added extra rendering to response and it works fine. Sorry for the inconvenience.

BTW, thanks for the wonderful library, it's really clean and concise ... no new operators and at just the right level of abstraction. Brilliant!

@pkese pkese closed this as completed Jan 5, 2024
@pimbrouwers
Copy link
Owner

pimbrouwers commented Jan 6, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants