Open proverbial-ninja opened 7 years ago
Cool idea basically!
I'm wondering whether not a web version, but only android version, do you think?
If view frames and styles were made as a local file in android or ios, it would be cool! But net info (delivered by through href) should be somewhere for server-side, I guess.
@kmarima It's early days for Jasonette so I encourage any types of integration.
I think there will be all kinds of cool tech that make total sense for Jasonette, but we won't know until we try!
IMHO silex with a modified json generator for jasonette could be the way to go.
@gliechtenstein I've stumbled across an example from what react-native has that is very close to what I have in mind with the builder app I started working on:
They use it as a read-only inspection tool, what i have in mind is that overlay also having a set of editing controls for all properties of the jasonette component that was touched, as well as showing the style applied to the component and the json tree its in, like the info displayed by the react-native inspector. This would allow in-place editing of the jasonette json tree in quite a visual way.
So perhaps rather than making the "builder" a module within the jasonette-android repo as I initially did, Jasonette-android could become a aar library that can then be included in other apps. This would be a different approach to the one you've so far taken with the JEM, as this would allow anyone to use jasonette along with any other "addon" libraries. This is the approach taken by many other libraries for java & android where you have a core library and then a number of optional libraries that you pull in via maven dependencies in your gradle config.
@maks There are two parts for this proposition:
First, as for "Turn Jasonette into an AAR library" => I am totally a fan of this idea, as long as it doesn't complicate the regular experience. I agree it would be really cool if there's an easy way to import Jasonette into any existing app.
I kind of attempted to do something like this here http://docs.jasonette.com/advanced/#integration but as you can see it's not really user friendly and it's only for iOS. It would be great if it's just a matter of including a pod Jasonette
to the Podfile
(for iOS) or compile 'com.jasonette:jasonette'
to the build.gradle
file (for Android)
So if you would like to try that I totally support that endeavor.
This is a bit tricky. As I discuss here http://docs.jasonette.com/advanced/#extension-vs-integration , each has its own pros and cons. I think an "extension" approach is much more powerful than just an integration into an existing project, because "extension" means you're extending Jasonette, so you can build your entire app using JSON, whereas "integration" means you'll end up writing native code for some parts of your app and use Jasonette for the rest, which is not as ideal as the "extension" approach.
Also, imagine this scenario: you want to quickly integrate google analytics, websockets, QR code, etc. modules altogether into your app. If we take the extension approach, everything is centered around Jasonette and all you need to do is:
If you were to do this in an "integration" approach, you would be importing Jasonette into your project, where you will have to implement all the google analytics, websockets, and QR code logic on your own, natively, and you won't be able to control them using JSON.
TLDR: Jasonette AAR sounds great! But I think extending Jasonette is more scalable and powerful than integrating Jasonette into existing projects. Hope this makes sense!
Yes you're right @gliechtenstein its good to deal with each part of this separately.
Great! I'll work on this. I want to make this easy too, so yes I want it to be as simple as adding a compile 'com.jasonette:jasonette'
on the Android side and sounds like there is very simliar thing with pods for iOS.
Yes, the extension approach is what I had in mind when I think "integration" :-) Definitely commonly useful functionality I want to see as aars or even standalone classes the way of you have them for JEM, I think both approaches make sense alongside each other. Actually with "integration" the main use case I see would be existing apps where I'd want to start using Jasonette in 1 or more Activities without committing to having to rewrite the whole existing codebase in Jasonette from scratch.
I think we are in agreement here on both counts, I'll get started building.
I've been thinking abi about json builder for jasonette.
The idea is basically using blockly custom blocks to generate the json.
Just throwing this out here in case anyone has a better idea or maybe working on it or something similar and maybe get some feedback before i start (in like 2 weeks)