p/kitty
An opinionated Product Hunt client for iOS
Ben Tossell
Jasonette Agent — Turn JavaScript apps into cross-platform native mobile apps
Featured
15

Jasonette agent is a new layer for Jasonette which takes the framework to another level. You can think of it as microservices, but embedded on the frontend app.

Replies
ethan
Hey community, I’ve been working on a project called Jasonette (https://www.jasonette.com) and have been sharing my progress here for every important milestone. It’s great to have a place to share the progress. This time it’s a whole rethinking of the project itself and I think it may excite a lot of people who didn’t think much about Jasonette before. # Quick intro to Jasonette: Jasonette lets you build cross platform native apps using nothing but a JSON markup. No compiling, no build processes. Simply load a JSON over HTTP and it gets interpreted into native APIs on the fly. # About Jasonette Agent: Jasonette agent is a new layer for Jasonette which takes the framework to another level. You can think of it as microservices, but embedded on the frontend app. When people talk about microservices, it’s an architecture where each containerized server has its own designated job and it communicates with the caller to carry out tasks. Jasonette agent is a similar scheme but which takes place solely on the device inside an app. Here’s how it works: 1. The core app is 100% native. You build the app by writing a JSON markup. 2. The native core app can spawn multiple JavaScript execution containers called “agents”. 3. Then the core app can utilize the agents just like microservices. You use JSON-RPC to communicate, since everything on Jasonette is operated with a JSON markup. Basically if you already have a JS app, you can instantly plug it into Jasonette as an “agent” with a single line and build a native app. Also now you can build a cross platform native app for any imaginable feature using just JavaScript. In fact, the main motivation for building agents was because I had something really exciting I was trying to build but couldn’t find an elegant way to do so. With agents this became a reality and I plan on sharing that other app on PH soon too. Also you’ll start to see a lot of other cool add-ons that build on this architecture in the coming weeks. If you’re interested, follow the project at @jasonclient, or me at @gliechtenstein
Girish Lakshminarayana
Absolutely brilliant. Will definitely use this. Thanks for making this :-)
Chris Frantz
This whole series of products is a blast to play with. I haven’t made anything I’d want to share yet but I love every new release. 🙏
ethan
@frantzlight thanks! feel free to share if you build something cool, i'll share everything on the @jasonclient feed and also on the newsletter
Sushant Joshi

It's a cool f/w to keep an eye on, definitely excited to track it's progress.

Pros:

It looks really cool.

Cons:

It's not yet mature enough.

Ingo Radatz
Awesome. JSON / JavaScript eat into native OSs. Reminds me of Pythonista.
Ingo Radatz
Do i miss something? Why isn’t a JS function string right in the JSON the 4th option to setup an agent?
Ingo Radatz
@gliechtenstein Hmm. Yes and No. That the JS have to be wrapped by HTML ruins syntax highlighting in the IDE and test automation. My organizational approach is to have a file for every JSON property with JS content. The final JSON is build by a script from files and folders with the exact same structure and names (but without file extensions, of course). This keeps source control and editing organized and simple.
ethan
@llabball I actually wanted to support pure inline JS, but this turned out to be more cumbersome than I thought. I do plan on supporting this in the future (Hopefully someone may just send a pull request if they want) but decided not to go overboard trying to support this because we have another option which using the URL (instead of inlining JS code). There are a couple of benefits to this: 1. This is much cleaner since you don't mix JS with JavaScript code (Inlining may be convenient for small snippets of code but for any serious piece of code it's very convoluted because JSON doesn't support multiline, so you end up packing the entire JS code in a single line, and also have to make sure you have semicolons everywhere so it doesn't break". 2. This is much more unit-test friendly since you can write a JS and do all unit test on that JS file, and then script src it in an HTML file, which you can reference using the URL option. Basically the rule is if it works in a browser, it works as an agent. So TLDR, if you want unit testable, modular code, I suggest you: 1. Write JS code and do all the unit testing on the JS file 2. Embed it into an HTML file (script src) 3. Plug in the HTML file into Jasonette with the URL option. This is in fact how I've been developing my own apps using agents and it's been great. Hope this helps.
Josh Huff
As a non technical founder Jasonette has been a life saver! I was able to build a MVP using Jasonette in under a week.
ethan
@revhuff great to hear Josh! Hope agents makes it even easier and let you do even more :)
Andy Bloom
Very cool work!
Nikos Korompos
Impressive! It could be very useful for teams developing MVPs and could reduce many overheads combined with Firebase!