Android: not single entry point

        .....you can call upon that scroller to do the work, rather than develop your own. Your application doesn't incorporate the code of the other application or link to it. Rather, it simply starts up that piece of the other application when the need arises.

        For this to work, the system must be able to start an application process when any part of it is needed, and instantiate the Java objects for that part. Therefore, unlike applications on most other systems, Android applications don't have a single entry point for everything in the application (no main() function, for example).

 

    上面这段话是android dev guide文档中的一段,具体url是:http://androidappdocs.appspot.com/guide/topics/fundamentals.html

 

    关于这段有如下几个疑问:

                   1, 关于“ For this to work”中this的理解。 结合上文,我们知道,“this”是指“ it simply starts up that piece of the other application when the need arises”。 也就是说, appR为了用到appA中的scroller, android就只start appA中的scroller了?

 

                   2, 顺着问题1, 往下看,看到“the system must be able to start an application process when any part of it is needed”。 这里的“an application process”并不是“an application”, 也就是说为了appA中的scroller,系统启动一个进程,而这个进行中只有关于scroller的信息, 而不是把整个appA都启动。 这种情况下(进程中只有scroller的信息,而没有启动整个appA), 用户再启动appA,系统再怎么处理scroller?appA跟appR共用一个croller存储空间,这好像不大现实。 操作系统是怎么处理这个问题的?

 

                   3, 这样不只是有一个entry point的设计,是怎么来节省手机资源的?

你可能感兴趣的:(html,android,UP)