Modular app


#1

hello, Im quite new to ionic. is it possible to create a modular app with ionic? I mean it the way, that I create some app, connect to server, download some package and in the package would be some runnable content


#2

Hmm… I’m sure it would be possible, but it wouldn’t be allowed by different mobile platforms… Both android and iOS require you to supply all content of the app, so they can check it. If you would have some dynamic content injection, they can’t check if your app complies to their policy’s, and therefor they will reject your application… What is your use-case? This doesn’t really concern ionic, it’s app development in general. If you provide your use-case we might be able to help think for a decent solution for your?


#3

I am supposed to make an cross-platform educational application for maths as my bachelors work. It should have some main context with ability to download excercises, or levels. If another student make a new level, they should be able to put it on server, and it should appear in my app. But I am not able to create some main level, and download just parameters to create new, because all levels would be completely different.

I found this in another thread:
Its really easy, i’ve done it in production for a large corporation. Thats also how Financial Times updates their webapp inside their native wrapper.

develop as usual
use grunt-manifest to automate creating an appcache manifest file
point index.html to remote host instead of local machine, place all assets on remote host
on first launch, the app will download the app remotely and as soon as you update one of the files on the remote server, it will be updated in the webapp. boom - store-independent, realtime native app updates.


#4

Yeah this is al true, but your app won’t run without network connection… What they indicate to build is just a native wrapper for your mobile website? I’m okay with this if you want to, and you are able to do this with ionic :wink:

But you are not really “downloading some package” but rather just referring the user to an external ionic-powered mobile web-app then :wink:


#5

I dont know, they dont really care how it works, they just want it to work.

it wouldnt work without internet? but he wrote this:
on first launch, the app will download the app remotely and as soon as you update one of the files on the remote server, it will be updated in the webapp. boom - store-independent, realtime native app updates.

i dont really know how to this, what and where is grunt-manifest?


#6

Hmmm… I’ve read through some articles based on your quotes. Here’s what I found:

What is grunt? Short version: grunt is a javascript task-runner. From grunt website:

The less work you have to do when performing repetitive tasks like minification, compilation, unit testing, linting, etc, the easier your job becomes. After you’ve configured it through a Gruntfile, a task runner can do most of that mundane work for you—and your team—with basically zero effort

How to use grunt? Check: http://gruntjs.com/getting-started

What is a grunt manifest? Grunt-manifest is a grunt pluging. You can check it out here: https://github.com/gunta/grunt-manifest

Grunt manifest generates an appcache.manifest file, you can see some appcache facts here: (referenced from grunt-manifest docs)
http://appcache.offline.technology/

Hope this helped :slight_smile:


#7

Thank you, im going to try it out this way


#8

okay, I’ve been trying all day long and I still got nothing, could anybody explain me how does this stuff work?