-
Notifications
You must be signed in to change notification settings - Fork 71
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
RFC: WebComponents integration/conversion? #963
Comments
Imho every single framework made an attempt at this, with the result of having dozens of different, incompatible implementations. It's good to have a standard that is supported by every browser now.
I don't think webcomponents can completely replace prado's webcontrols with serverside properties, validation, etc.. In prado terms, some new javascript will implement a new html tag for each component (eg: I can see 2 possible approaches:
The first approach is probably easier to play and test. The second approach would be nicer in the long term. |
The |
It would be relatively easy to start baking in some WebComponent support into PRADO. I think that may be a good idea. I'm not sure what exactly that code needs to do. Basic support would add the Prado client side WebComponents into page HTML custom controls. Given the dynamic nature of html, we should include all PRADO WebComponents rather than just the ones on the page. eg. #777 TTimeDelta may be better with a WebComponent than just a Prado WebControl. But that makes me think: maybe the Prado TTemplate parser should include looking not just for I'm considering that if the TTimeDelta didn't use a This identifies three aspects to be more inclusive of WebComponents: I am JS environment agnostic. In integrating WebComponents, I think looking at existing frameworks is a good idea. I suggest that during the evaluation process, we look at Lit as maybe an example to draw good ideas from for WebComponents. see this: They have a WebComponent already doing the "time-ago" as an example https://lit.dev/tutorials/async-directive |
I see a big security issue here. Creating a control in js, inject some serialized state and then let php unserialize() it leads to remote code execution (https://owasp.org/www-community/vulnerabilities/PHP_Object_Injection). The page viestate is being validated using HMAC exactly to avoid js messing with php object state |
I wasn't thinking of doing a full serialization/unserialization. The class name, properties, and only string values may be enough? strings only? You have a very good point though. |
As long as values coming from clientside are sanitized, it's safe. After all, the same applies to all the values coming from POST/ajax calls. |
here is the use case I was thinking: a new |
in researching the HTML5 tags (like
dialog
, which should get a proper Prado support and tag), I came across WebComponents. It is relatively new and its custom HTML tags are similar to Prado tags. It almost seems like PRADO was doing WebComponents before WebComponents.That said, this new technology (WebComponents) is nearly universally supported now. It is browser based technology, so no custom frameworks and [should] work with all the modern JS frameworks like React, etc.
What are peoples' thoughts on integrating or converting PRADO to WebComponents?
The text was updated successfully, but these errors were encountered: