5 ms·
How is this different from nativescript ?
by foobar_ 6y ago
How is this different from nativescript ?
- victornomad 6y agoThere is a bunch of differences 1. The scripts you write calls directly to Java methods, so is much easier to access Android API calls 2. PHONK is not only a framework, is a development environment that lives in your phone, so no needs to install npm or any other tool in your computer. You can write scripts directly on the phone, or using a remote Web Editor that is hosted by the device itself 3. The PHONK API is tailored for quick prototyping, making and exploration. I invite you to have a look to the built-int examples and see how easy is to access sensor data, communicate with Bluetooth Low Energy, add maps or create interactive sound to name a few things!
- foobar_ 6y ago> quick prototyping, making and exploration Thats definitely the cool part. With a debugger I can definitely see some good use cases for this.
- victornomad 6y agoPHONK supports live execution. You can select the code you want to run and press Control or CMD + Shift + X and it will execute, which is pretty handy. Is not a debugger but it helps quite a lot to debug :) What debugging workflow do you think would be important?
- foobar_ 6y agoIt is lovely to mess with. What are the apps that are not possible with this ? Is the API coverage full ? Can I make an app with it packaging PHONK + script ?
- victornomad 6y agoPHONK has some "shortcuts" to make prototyping and experimentation fast, such normalized UI positioning instead of complex but powerful layout systems. so for example you can write the following to include a button ui.addButton('Click me', 0.1, 0.1, 0.8, 0.2) That's quite fast to do, but on the other side it makes it a bit cumbersome if your UI is complex and you need to support lots of screen sizes. The good thing is that PHONK is quite easy to extend and virtually you could expose any Android API to the Javascript engine. Packaging a PHONK script is possible but I haven't had much time yet to write a guide. I you want, you can follow this issue and upvote it if you think is worth it to have a guide! https://github.com/victordiaz/phonk/issues/9 https://github.com/victordiaz/phonk/issues/9
- foobar_ 6y agoIts definitely worth it, heck make it a script so that I don't have to think about it. Also IOS ?
- victornomad 6y agoSadly IOS is not supported, PHONK depends a lot on Android and Java. I would be very happy to see this or something similar in IOS though!
- jcun4128 6y agoDid I understand that right, if you have PHONK on your phone, you can write code that affects the phone? Can you brick your own phone accidentally? Or at least cause it to need to be restarted? I guess that's true for anything that can write/run code on itself.
- victornomad 6y agoSince everything is scripted and you only write user "apps", it is pretty safe in Android. Apps in Android have very good sandboxing and is virtually impossible to break anything :) Sometimes if you write some code that makes PHONK unhappy, the app will freeze / crash but that's all :)
- jcun4128 6y agoI see, thanks for the info
- victornomad 6y agoyou welcome :)