Comments (35)
I think you should open it up and get inputs from guys, draw up a roadmap sort of, and then allow guys get to work.
from jasonette-ios.
OK I will try to get it out as soon as possible :)
Just want to clarify that it won't be a fancy "drag and drop editor" right out of the box. I'm talking more on a foundational level.
There are a lot of things involved in this technology, such as json-to-html renderer, json templating, and maybe even server-side rendering. I will try to break them down to pieces and start releasing them one by one as library, each one will build on top of another via require.
When all these are combined, it will be easy to just require them and build a drag-and-drop editor.
Anyway, I will keep you posted. Stay tuned!
from jasonette-ios.
Just had a conversation on HN thread and thought this was interesting. Posting here for future reference https://news.ycombinator.com/item?id=12880704
The advantages of creating your own wysiwyg editor is that you can control exactly what functionality Jasonette supports and allow developers to create views across different platforms (right now Xcode is Mac only). But have you considered starting with Interface Builder and creating a tool to convert IB views to JSON? Interface Builder is home to a lot of developers who already understand how to use that tool, asking devs to work in a new half baked editor would probably be frustrating and add more complexity/moving parts which is your enemy as a new project/endeavor.
If you create a tool that just converts IB views to JSON you can demonstrate progress much faster and learn and experiment with what the requirements of the final editor are. It will be much easier to stand up and way less effort than maintaining your own editor codebase while the project is young. Your time is the most valuable thing you have so don't spend it creating a new editor which could be its own project in itself. You want to put it towards expanding missing functionality between JSON and native components. One day when you find success and if you really still need to limit the user you can move all the functions you made for converting Interface Builder views into your own custom editor.
I think first thing I would do is take a very complicated interface view from a native project and analyze the view hierarchy and report errors to the user like "Warning: Nested UITableViews are not supported in Jasonette", "UIButton delegate will be ignored", etc. Then once you create this sort of 'unit test' that the IB is well-formatted you can then go about exporting it to JSON.
There may be a world where you actually are able to use all of the functionality of IB and don't ever have to have your own editor.
from jasonette-ios.
@booc0mtaco Thinking about it, wouldn't it be better to be under the Jasonette organization? Maybe you could transfer it (you'd have to talk to @gliechtenstein) over? Also, make sure you're in the slack channel, its the usual place for discussions.
from jasonette-ios.
https://github.com/Jasonette/Jasonette-Web contributions super welcome
from jasonette-ios.
Also check out https://twitter.com/zain_hoda/status/971623062318788608 - I think his approach is even more in line with what this thread was discussing.
from jasonette-ios.
@gliechtenstein Exactly. With a good schema-based editor, you can also make inflexible values (those operating as enum
s) behave as such. And enforce the structure a bit. The plugin for Atom isn't so great based on my last use, but there might be others. Either way, a schema is a good idea, I think!
You could also lock the schema updates to each release. This would automatically provide validation for changes, and expose interface for new/updated features. Just a few ideas.
from jasonette-ios.
@gliechtenstein @frostymarvelous I'll try to carve out some time in the next few weeks to take a stab at it. Will let you know the results!
from jasonette-ios.
@lukeramsden probably so (noticed it was an org as I was referencing it in the README). For now, I'll leave this repo alone, jump into y'alls channel, and see what makes sense :) I can imagine several approaches to this, so IMO not sure if we want to commit to any particular one officially (pardon the pun!).
I've somehow managed to not use slack yet 😮 , but might as well start somewhere .
EDIT: a transfer should be possible, no? another thing to discuss later on
from jasonette-ios.
Yup I have a private pet project (just whipped it up on an afternoon) that takes a JSON markup and turns it into
That project was just written in html+jQuery+css and currently i'm looking into other options since using jQuery becomes messy quickly. So far I'm considering react.js and vue.js. I think there are pros and cons for each.
Please feel free to jump in and share your thoughts.
from jasonette-ios.
I agree with @elenduuche - get it up and out - bad code or not - we all had side projects.
Lets get the code awesome tegether.
Personally I like ractive.js and vue.js
from jasonette-ios.
Is the interface builder this one? https://developer.apple.com/xcode/interface-builder/
I looks awesome. I would never start there if I was not familiar to IB.
Please post here if you release your test project in a new repo.
from jasonette-ios.
@gliechtenstein I humbly suggest giving json-editor a look. I'm working on a different project and built a schema for a JSON input type, using the schemas this tool uses. I could help write up the schema for JASON, and you get all the functionality that's listed in this plugin for free. Of course, like all OSS work, it could be forked or changed to support your needs here. :) Thoughts?
check out the demo of json-editor! Something like this could be used with any of the other mentioned approaches (electron app, hosted web app, etc.)
from jasonette-ios.
@booc0mtaco this is a cool approach! Would this mean, with just a schema we could:
- have a form where people fill out what component they want to add
- style them
- handle nested components
- and turn them into a single JSON?
I'm especially curious about the nested part--that would be cool to create a complex layout just using the schema
from jasonette-ios.
@booc0mtaco a schema is definitely needed. The work would be appreciated!
This would allow people to be able to even validate their Json before publishing
It would tremendously help with porting Jasonette over to different platforms.
from jasonette-ios.
I agree that this would be great, the validation feature sounds great and is something we need. I can imagine this tying into documentation someday in the future.
It would be awesome if someone creates this. I personally won't have resources at the moment to work on this but you are super welcome to build it and share with us!
At least a primitive version would be great to get going.
from jasonette-ios.
@booc0mtaco looking forward to it!
from jasonette-ios.
FYI, on this one...
I've seen a lot of stuff that would cause flux in a schema editor. Is there some documentation that annotates all of the functionality so far? On issues opened recently, I've noticed a growing list of $
-based keys, so I'm thinking I'll wait a bit for the dust to settle before I dig into this.
Once we have a workable schema, it would be much easier to update it with feature additions :) And an editor that consumes it would automatically work with the updated schema file.
from jasonette-ios.
@booc0mtaco Here's the documentation https://jasonette.github.io/documentation/
To clarify, most of the API specs are in the documentation (with exception of some undocumented ones which are sometimes intentionally left out for various reasons) and while you're right that it will keep growing, I doubt that they will grow in a way that will break anything.
There have been some discussions on adding "advanced" attributes (example: #43) but these are "advanced" features and I doubt we will change much about existing APIs.
I still do think it would be useful to have some sort of schema, and I think the whole point of having a schema is to have a versionable way to maintain and document the APIs, so I think it's even more valuable even when we consider that the API will have more additions in the future.
Also, I already have lots of apps running on this exact API and they are working just fine. I designed the API based on my actual usage and not based on an esoteric philosophy about how things should work so I strongly doubt there will be situations in the future where we find out something doesn't work with the current grammar and will need to overhaul.
The last factor in this is I'm currently working an Android version based on the existing API. This means it would be foolish to try to overhaul the existing API when it's working just fine. We've covered pretty much all kinds of mobile UI use cases with the current API and I spent a couple of months just documenting and writing examples for the API, and the result is I am confident we don't need to change much (except for adding more advanced features, but will make sure these don't break anything)
Bottom line, at this point I don't think we need to worry much about the potential risk in the future API changes. Hope this makes sense. Let me know what you think :)
from jasonette-ios.
@gliechtenstein sounds great! I hadn't pored thru the existing API, so from my view, the issues were about new and exciting things appearing :-) Thanks for the clarity. (RE: "undocumented" API parts, an editor app wouldn't expose options to add those, but an enterprising dev could take the JSON it outputs, and go crazy if they wish).
All that being said, I think we might be good to go then. I may host something like http://jeremydorn.com/json-editor/ on my own site, just to see how people like it. If there's appetite, taking that and building a Electron App might be an option, or hosting something similar directly from a JASONETTE page might also be suitable. Thoughts?
from jasonette-ios.
@gliechtenstein @booc0mtaco I can help if a repo gets made :)
from jasonette-ios.
@booc0mtaco Sorry! i totally missed the last comment, my fault. I think this sounds great. And thanks for resurfacing this @lukeramsden
from jasonette-ios.
@gliechtenstein (☞゚ヮ゚)☞
from jasonette-ios.
New year; new ambitions! I'll get the ball rolling on this by the weekend crosses fingers. @lukeramsden keep an eye out for a new repo. I'll probably take the approach from my last comment, and host a github page to get MVP for this.
from jasonette-ios.
@booc0mtaco Looking forward to it!
from jasonette-ios.
@lukeramsden to keep myself honest 😄
from jasonette-ios.
It's very simple, I'm sure youll figure it out. I'm lukeramsden, @gliechtenstein is ethan
from jasonette-ios.
@booc0mtaco yeah please join slack! Looking forward to this :)
from jasonette-ios.
@gliechtenstein so I actually went ahead and started building this. Learning JSON schema was an interesting exercise, I'm very impressed with how full featured and well thought-out json-editor is (check out the readme!) though its not prefect, I've got an issue filed over what looks like a bug with recursive $ref's
Currently I've implemented bits & peices, including what looked like the trickiest parts of the schema. I'll try to slowly fill it out over the next few days, as I've found it very difficult to write by hand anything bigger than a trivial app using jasonette json in a text editor. I'm guessing most people are programmatically generating the json serverside?
Hopefully its useful for others, as for myself Its just a stop gap measure for me for now too, as my plan is to use jasonette's existing android code base to generate directly from a GUI generating in-memory json representation, writing out json to persistent storage as "check points" for version control purposes only. Though of course that will take a bit longer to get built...
from jasonette-ios.
I designed the API based on my actual usage and not based on an esoteric philosophy about how things should work
❤️
from jasonette-ios.
@maks this is great, I desperately want something like this to be built, and I even actually had started working on a schema myself but at the moment paused working on it because it took more time than I originally had planned and there were other more critical things for Jasonette I had to deal with. I don't think I can resume working on it anytime soon.
Anyway I'll just share what I have so far here, maybe you can take it and merge it into yours, or just use it as a reference, or whatever works best for you. https://github.com/gliechtenstein/jasonschema
I think it will be really cool if we can take a schema and generate a json-editor. I would love to discuss further and help in any way I can if you're up for building one, i'm on slack so just feel free to ping me anytime.
from jasonette-ios.
@gliechtenstein @maks have you had any progress on this? I was just wondering about this and would like to contribute.
Perhaps https://jsonschema.net/ could help with some of the grunt work?
from jasonette-ios.
Perhaps https://jsonschema.net/ could help with some of the grunt work?
Looks awesome...
from jasonette-ios.
That block builder looks awesome. Would love to help get that moving forward.
from jasonette-ios.
Does anyone know if Zain Hoda's block builder is usable or likely to become so? Or is there anything similar around now?
from jasonette-ios.
Related Issues (20)
- (low priority) shouldn't body.header not scroll with the sections? HOT 1
- href as action does not carry over parameters HOT 7
- href deep linking does not surpport options parameter HOT 1
- Add SMS action HOT 1
- Security Guidelines
- Android version not handling background style correctly
- Orientation change does not resize the web view for background web container HOT 1
- $href action - request for error callback HOT 2
- State not retained with $href in a webview with native transition HOT 2
- How can i add my own custom tags like head , body in jasonette? HOT 1
- POSTing body
- js alerts on webview are silently ignored HOT 1
- how to config default is load my homepage
- Development Moved to https://github.com/jasonelle/jasonelle HOT 2
- back button is not working HOT 1
- Extending • Swift-class component returns nil HOT 6
- NSInternalInconsistencyException with iOS13 HOT 1
- Showing image until web container is ready
- Bottom Tab Bar Issue
- Webcontainer back to start terminates app
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jasonette-ios.