Sunday, February 8, 2015

App Inventor for Big Projects

We are starting to get enough code that finding a block you need to change is painful in App Inventor.   We looked at maybe switching to Android Studio but my boys think that does not look nearly as friendly as App Inventor and they are probably right.  

Teryn was doing the autopilot and Ethan doing the manual mode and bluetooth code and when it came time to combine them we had to create all the blocks from one project inside the other project by hand (still not finished).  This was/is sort of annoying.

Another issue was Teryn had a full screen of user interface for the autopilot and Ethan had a full screen of user interface for the manual mode and I thought we could just have two screen in App Inventor.  We want both the autopilot and manual mode to call the same routines for talking to the bluetooth relay so that you can do a manual check of the hardware before turning on autopilot and be sure the connection to the relay and low level routines are all ok.  But different screens in App Inventor can not share blocks!   This was unexpected and seemed like a big problem.  The solution was to have two screens worth of user interface in one screen but only setting one to "visible" at a time.  This has solved what seemed like a big enough problem to think about leaving App Inventor. 

There was a project to convert App Inventor to Java but it is no longer active.

There is a system to convert between App Inventor and a text language that seems interesting.


It would be nice if App Inventor had the ability to make a bunch of different workspaces and we could name these.  Then a pulldown menu that let you go to whichever one you wanted.  Then we could keep a large project organized by putting blocks for different parts in different workspaces.  To App Inventor this can be viewed as just one large collection of blocks, so I don't think it would be that hard for it to do.  With this we could easily handle the complexity of our project.   App Inventor is open source so theoretically I could add this or pay someone to add it.


I can use Java (though have not used Android Studio) and like it, so we might switch to Android Studio at some point but for now we are staying with App Inventor.  We are expecting a new android phone with a compass to get here Tuesday and will probably have the software ready by then.

Update Feb 14, 2015

As we used App Inventor more and more it got easier even as our code grew.   One trick for finding things is to do control and "f" then enter what you are trying to find and click "highlight all".  Then do control and "-" to zoom out.   Once you find it then control and "+" to zoom in.   The first couple weeks we did not even notice that you can do local variables, which do help to reduce the complexity.   Also, after you do "organize by category" a bunch of times you get a feel for where it places the different parts of the code.   We have all the main parts of the code working now and the size of the code is just not an issue any more.   We are very happy with App Inventor and will stick with it.


No comments:

Post a Comment