-
Notifications
You must be signed in to change notification settings - Fork 471
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
Download component definition for re-use #6
Comments
Our internal model is called pdom (https://github.com/Pagedraw/pagedraw/blob/master/src/pdom.coffee) The compiler was designed to treat all different frameworks as backends (https://github.com/Pagedraw/pagedraw/blob/master/src/core.coffee#L2361)— the engine can happily export pdom to React, Angular, Vue, or whatever else. We actually built pretty full Angular support, but decided at the last minute that we shouldn't launch it. You can get it by toggling the |
I saw that there was a serialize function for pdom, could it be deserialized as well ? |
If I recall correctly, you should ignore that serialize function. pdom is usually just json, so it doesn't need serialization / deserialization. There's some minor exceptions
For the things I could imagine wanting to do with pdom, you can just treat it as a json |
I realize this product has just been open sourced and a community has not yet formed. Anyway i'm throwing this idea out there because i think it could be interesting.
When exporting to React, Angular or another framework, first some internal representation is created from which the export can occur. Let's call this internal representation Pagedraw Model (PM). The PM could be least common denominator which the frameworks support. Maybe this idea is somewhat similar to https://github.com/andlabs/libui but then for the web.
When the PM can be extracted/downloaded. It can also be uploaded by users for other users to get the component for their framework of choice. Right now there are collections of components for particular frameworks such as for react. But they don't offer a good search function (only textual with browser search function). When there are a lot of components in the collections searching becomes more difficult. The PM could help with this. By having a definition it could be queried like "show me all the models with a single text input and a button". Making such a search would not be easy, but searching for the type of things can be done. Hoogle comes to mind when searching for types (not that i suggest that this can be used 1on1 for a component search).
It's not difficult to imagine a repository or marketplace from here if you will. I hope someone finds this idea useful. I don't have the time, means and resources to work on it at the moment. But i would like to discuss it a bit more.
The text was updated successfully, but these errors were encountered: