Extensions vs built-in Blocks

In 2015 Hal Abelson posted the following in the App Inventor Google Groups:

4 Aug 2015, 15:40:19
to MIT App Inventor Forum
The MIT App Inventor team is delighted to announce the availability of Extension Components for testing. We hope the Extension Components will prove to be a major enhancement to App Inventor: Extensions provide a way for anyone to build their own App Inventor components, which others can then use in creating apps.
App Inventor is free and open software, so people have always been able to build personal systems and install their own components. But until now, the only way to make those components available to others has been to create and maintain a personal App Inventor server that has those components built in.
Extension components, in contrast, can be loaded dynamically into any App Inventor system, so they can be shared and imported into projects as needed. For example, educators and educational software developers to provide extension components tailored to specific lessons and activities, so that students can have these available in building apps. Examples might be simulations or tools for large-scale data analysis, or image recognition. Those features might be unfeasible to implement with the built-in App Inventor blocks, either because of processing speed or programming complexity. But the same capability might be readily implemented using extension components that encapsulate the necessary processing.
Anyone can create extension components. This requires gaining some familiarity with the App Inventor source code (located on Github) and programming in Java. Once you create an extension component, you can share it with anyone for use in their App Inventor projects. Extension components can be housed anywhere on the Web. They need not be stored at MIT or any other special place, although MIT hosts a repository where people can make extension components available for sharing and public use.
Today, we’re releasing a test server for App Inventor that supports the Extension Components feature. You can find it at extension-test.appinventor.mit.edu. There’s also a document called App Inventor Extensions that explains how to create and use Extension Components. Once we've accumulated enough feedback, we'll make extension components a regular part of App Inventor.
With extensions, the range of App Inventor features can be expanded enormously. We hope that people will explore this tool to build new capabilities for App Inventor and their creations.
The implementation of App Inventor Extension Components is the work students who participated with the MIT App Inventor team in through Google Summer of Code: Ethan Hon, Justus Raju, and Mouhamadou Sall.

In 2015 that rocked the App Inventor world. Users could make their own extensions to an already powerful programming language.

Almost all extensions that were made did something that could not be done with the build in blocks. We could have sidemenus, read exif info from pictures, etc. Now we even have extensions that can let App Inventor apps run in the background. Something that once said could not be done.

The most extensive list of (all) extensions made for App Inventor can be found here.

The last couple of years I see more and more extensions that could be done with the build-in blocks. I see a lot of the same kind of extensions. I also see that (new) users ask for an extension for a problem instead of wondering about how it can be done with blocks. So somewhere along the line extensions became so popular that they are seen as the holy grail of using App Inventor.

Let's get back to my question.

What would be a good reason to use an extension for something that could also be done with the build-in blocks? I for instance can imagine that if i don't have to put 500-1000 blocks in my project i would rather use an extension that does the same thing. But for my most important projects i never use an extension.

I am not against extensions, but i make a calculated choice if i want to use them in my projects or not. I use extensions myself for things that can not be done in blocks and because i like to test the work of others.

For me there are a number of downsides to using extensions. What if the developer stops developing them or develops them, but doesn't support them so errors are not fixed. Some extension developers share their source code which is great, some don't and that is also fine. I even see extensions being stolen from other developers, sold illegally and presented as their own work.

I am wondering how you all see this? From the point of view as a user and/or an extension developer?

[mod edit - links from historic document removed to avoid confusion]

13 Likes

There are many extensions for something which can also be done with built-in blocks. As an extension developer, I think those extensions are useful because they are reducing the effort that we are putting into our apps.

1 Like

But wasn't the effort you have to put into your app not just part of the fun and of the learning process? So by using an extension you will learn less, just because you want to save time?

6 Likes

As @Patryk_F pointed out in another topic, you cannot upload app projects with extensions to the Gallery, this being due to security issues.

However, I believe this has a broader appeal. App Inventor is primarily here for educational purposes, to help young people get into coding, work on good logic, and to produce something they can be proud of. Educational establishments and their students make heavy use of the Gallery and most curricula go nowhere near extensions because they want their students to think, learn and work things out.

On the other side of the coin, app developers want to get things done, whether that be for altruistic or commercial purposes, and very often App Inventor just does not have the features or components in place for them to achieve their objectives, hence the requirements for extensions, to fill in the gaps.

I agree that over the last year or so there have been a rash of what may best be described as "test" extensions: in which partly or in full the extension blocks provided could be handled with the built-in blocks. Extension developers have got to start somewhere, and this is a good way for them to learn, and should be encouraged, as long as we see that this is a learning experience, and that these extensions are not really intended for general use.

There is a second category, where an extension developer has got their hands on a java library that can do something fancy, so they bang out an extension that does this fancy thing. Usually eye candy, and rarely of any great benefit. We find this in most programming languages, where the hard work of hand coding a method has been resolved by the production of a library.

Now we get into the L337 area, die hard coders versus lazy/newbie extension users, but really we should look back to App inventor's reason for being. Even in my advancing years (!) I find the challenge of working something out good for the brain and for the soul. I look to see what App Inventor can do by itself as much as possible, not because extensions are "bad", but for the satisfaction of working things out.

There are some great extensions out there, many of which really should by now have become built-in components. Long may extension developers reign.

9 Likes

Well, test extensions are not good but if you see the mentality of most of the users (who use AI2 and its distros) want to do things as faster and easily as they can do.
Most of us want simplicity in life so we run behind (test) extensions which do the same thing doable with blocks.
Many can argue and say above is not true.
If so then just look at distributions of App Inventor.
Original Platform is at simplest form but it does not have some features which can make it compatible to Android Studio.
That's why many individuals and teams have created distros of App Inventor.Why? Because they understand metality of users and economics too.
They also do same thing which is possible to do in AI2 with extensions (even more than those platforms).
However, I don't want to say that those disros are doing wrong.
Extensions are the magical potions which give AI2 users more powers.
I am thankful to AI2 Team for such a great feature.

6 Likes

The best point.

:heavy_check_mark:

3 Likes

Just add progaurd if the extension is paid, or free and not open source. :grin:

2 Likes

True, I try to make everything from the beginning until it's very necessary to use.

More

I use the library only for UI related extensions much.

2 Likes

Given that App Inventor is foremost an educational tool, extensions that replace something easily achieved with existing Blocks are detrimental. To become a good App developer requires becoming a good thinker. We are getting more and more cries for help on the Forum from people who have absolutely no idea what they are doing as they have not taken the time to learn. Imagine those same people driving cars or developing software for aircraft........

5 Likes

That isn't what is happening though - it's basically a free-for-all and I think these folly
extensions can diminish the reputation of the truly worthwhile extensions crafted with knowledge, skill and updated in a timely manner.

I do understand that if you want to create extensions, you have to start somewhere. That somewhere though is not just writing a "simple small extension", it's at first gaining knowledge of App Inventor, Android and the protocols of writing and maintaining software. If you are not a competent User of App Inventor, now is not the time for you to be coding an extension that might at some time fail thousands of Apps.

4 Likes

It's worth mentioning that Taifun, with the patience of a saint, spends a lot of time monitoring new extensions and the coding of them.

11 Likes

Few developers make extensive extensions. Recently, there is a fashion for the so-called test extensions. One or two blocks based on a library found on the Internet. The only plus is that the extension developer himself learns to program on such extensions. All mathematical extensions are very simple, after a few attempts even I can do them without having any experience with Java. I also think that users of app inventor should learn programming logic, math, etc., using blocks. It goes really interesting without extensions. And if something can't be done in blocks, then extension is necessary.

9 Likes

I don't know what to say about this but it is very much possible to create a BODMAS calculator in App Inventor without any form of extension but it can take around a thousand blocks and takes a lot of time to solve whereas the same thing can be done with some extensions using just 1 block and takes not even a second. So, which option is better according to you? Using extension to get a fast result OR coding using built-in blocks to get the same answer but a little a slower result.

2 Likes

It depends if you want to learn to program in app inventor, or you just want to make applications.

3 Likes

It can be difficult to way-up and it mostly depends on the track record of the extension developer and whether or not you are going to distribute your App. If the extension isn't updated when Android is updated, it might not work and that obviously would be detrimental to the App and to your reputation. If on the other hand, the App was just for your own use and you just need to slap it together as quickly as possible, the risk is probably worth it. However, you then do not learn the nuts and bolts of App Inventor and we find, when the App isn't quit right, people do not know how to fix their own App because of this.

If you are a young person considering the possibility of a career in software development, extensions should only be used if necessary on the grounds that what needs to be done cannot be with App Inventor code alone.

Lastly, there are certain extensions that provide functionality that really should be built-in to App Inventor, most notably file handling. Hopefully that will be fixed in a near future release.

4 Likes

coeect in that case you can use extension but whereas when it will just need 10 blocks instead of a extension in that case we need a extension

1 Like

.... I have seen Projects use thousands of Blocks because best practice has not been applied. That does not mean an extension is necessary, it means the developer needs to learn more about coding in App Inventor.

5 Likes

I really like the discussion here. I also would like to see users first get the hang of the basic components of App Inventor. But something seems changed. I see users who want to make the most difficult/complex app using extensions while not knowing the basics of programming of App Inventor or other builders. Using Firebase before knowing TinyDB. Using dynamic components extension before knowing how to work with layout, cardview, etc. So taking a big step instead of a few smaller ones before proceeding to another level. Taking just an aia from someone else and then complaining they do not understand why it doesn't work for them.

11 Likes

.... or implying the work is theirs and "it was working, don't understand why it doesn't work now". So you take a look at the aia for them. Low and behold, it could never have worked.

9 Likes

Possibly fighting a losing battle :wink:

I did a quick survey of the last 60 posts, 25 of which were about extensions. That is a 41% hit rate. I thought it would be more....

2 Likes