There is a service that allows applications to be developed only by using the GUI, but I don't know why. (It may be related to parsing.)

Asked 2 years ago, Updated 2 years ago, 96 views

appinventor just wear the parts you like on the web
You can easily create an Android app.

http://www.atmarkit.co.jp/ait/articles/1103/15/news087.html

I was surprised that it was easy, but
I am having trouble understanding the flow to work as an Android app (create an apk file).

Set operation and block logic in GUI
↓
It's a browser-based service.
Based on the logic, convert (translate?) to a java script in javascript.
↓
It is not known what process the GUI part will follow, but it will be converted into an xml file and the location of the button etc. will be stored.
↓
apk file generation

I have a vague image that

What I don't really understand is why the logic I created on my browser is running on the Android app.

As mentioned above, I think they are translating in some way.
In addition to translating, I think I have to generate it as a java file.

That part has not caught up with my current level of understanding, so it has become a black box.

I was calling the source code and googling, but I was not sure, so I asked you a question.
https://github.com/mit-cml/appinventor-sources

It's an interesting question, but it doesn't seem interesting, so it's going to be a wheel development, but
I want to be able to do the same thing myself.

I would appreciate it if you could let me know what you need to do that.

It's a poor knowledge, but

  • Syntax analyzer
  • Compile

I think that is the key to it.

Also, I'm a little off topic, but
rubymotion is the ruby grammar that allows iOS and Android mobile apps to develop?
is available.

This is similar to what I asked this time, and I'm concerned about it.

I think that the logic written in ruby's grammar is translated in some way and converted to java or objective-c, but I didn't know what the conversion method was.

We will add the missing items each time.
Thank you for your cooperation.

android java ruby objective-c xcode

2022-09-30 19:48

2 Answers

First of all, Javascript on your browser provides an editor for UI layout and block placement, as well as conversion to XML and the YAIL language described below.In addition to a simple Java script, this script also contains a conversion of programs written in Java using a tool called GWT.

When exporting a project, it is a solid XML zip, but when debugging or building, it is another language called YAIL (Young Android Intermediate Language).This is AppInventor's proprietary Scheme-style programming language that converts both UI and block into this language and works with YAIL interpreters powered by Android devices.This interpreter is implemented in Kawa, a Scheme implementation on Java.

When you download the apk file, you send the YAIL code and resources to the build server and combine them with the YAIL interpreter to make it apk.Implementation of the build process is around here.

So I'm not generating Java source code or byte code myself.

Compiling for Android generally means generating Java byte codes, but considering how to create Android apps in languages other than Java,

  • Implement interpreter in Java
  • Convert to Java source code
  • Implementing compilers to Java byte code (such as Kawa)
  • You can compile into Java byte code via another language (YAIL via Kawa)
  • Generate native code instead of byte code (e.g., Rubymotion)
    But if you use LLVM, you don't have to write machine words directly.

There are quite a few patterns.There is a big difference in what you can do, performance, and difficulty.

By the way, this is about how to output it.The process of reading the program from which you want to convert should be considered separately, but whether it appears there is a process such as parsing.

See also


2022-09-30 19:48

For RubyMotion, it outputs a direct binary (more precisely, LLVM byte code) without converting to Java or Objective C.In other words, it acts as a Ruby compiler.


2022-09-30 19:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.