Android的演播室:用不同的包装为每一位客户的核心应用 [英] Android Studio: Core app with different wrapper for every customer

查看:135
本文介绍了Android的演播室:用不同的包装为每一位客户的核心应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个应用程序,它是被提供给许多不同的潜在客户。我们的想法是创建具有所有功能和活动的核心应用程序,但它并不是独立的。

I'm developing an app which is to be offered to many different potential customers. The idea is to create a core app which has all the functionality and activities, but which does not stand alone.

另外一个项目将是一个包装项目,将有一个配置JSON字符串,最终的apk将有造型。没有的功能。

Another project will be the a wrapper project which will have a config JSON string and the styling that the final apk will have. No functionality.

核心应用程序将在应用程序包装的依赖。

The core app will be a dependency in the wrapper app.

这是它在Eclipse由别人开发的描述也正是设计现有的应用程序。我应该Android Studio中再次构建它和现代化的最新趋势的用户界面。

This is an existing app which is developed in Eclipse by someone else and is designed exactly as described. I'm supposed to build it again in Android Studio and modernize the UI with the latest trends.

我的问题是:我应该在核心应用是什么?它应该是一个'库'?一个模块?一个正常的应用项目,也许?如果它是一个正常的应用程序,它有可能将其连接到封装应用程序,它也是一个应用程序的项目只是没有活动?

My question is: What should the core app be? Should it be a 'library'? a module? a normal app project maybe? if it's a normal app, would it be possible to attach it to the wrapper app which is also an app project just without activities?

推荐答案

我所建的这两种类型的应用程序 - 应用包含的份额,需要一个核心库,但有不同的用户界面实现和应用程序,拥有所有的核心功能内置,然后单独的应用程序,修改外观和感觉的核心应用程序。在这两种情况下,所有的活动都是在核心应用程序,没有一个是在包装或辅助应用程序。

I have built both types of apps - apps that share and require a core library, but have different UI implementations and apps that have all the core functionality built-in, and then separate apps that modify the "look and feel" of the core app. In both cases, all activities are in the "core" app and none are in the "wrapper" or helper apps.

最大的问题是这里的核心应用中的依赖。你想保持与市场的核心应用程序作为主打产品,而其他的应用程序实际上只是主题为核心的应用程序?或者是你想保持与市场的一套应用程序,没有真正有核心或旗舰应用程序?

The biggest issue here is the "dependency" on the core app. Do you want to maintain and market the "core app" as a flagship product, while the other "apps" are really just "themes" for the core app? Or are you wanting to maintain and market a suite of apps, without really having a core or flagship app?

如果您创建的核心是应用程序作为一个库,你要记住,有图书馆项目有一些限制。例如,如果它使用R.java资源,因为 R.java 文件是在编译时建的,你不能用一个CASE语句情况语句不能在随后的'R.java 相关性来构建。 (您可以转换成如果-else` pretty容易不过,在大多数情况下)。你可能会发现转换有你无法避免的限制和引起的缺陷,但通常重新设计实现将绕过任何此类问题。换句话说,你让必须努力完成它,但你应该能够做到这一点。

If you create the core "app" as a library, you have to remember that there are a few restrictions on library projects. For example, you cannot use a "CASE" statement if it uses "R.java" resources because the R.java file is built at compile time, and case statements cannot be constructed on subsequent 'R.javadependencies. (You can convert toif-else` pretty easily though, in most cases.) You may find that the conversion has restrictions that you cannot avoid and that cause flaws, but usually re-designing the implementation will circumvent any such problems. In other words, you make have to work hard to get it done, but you should be able to do it.

编辑:

如果您创建一个项目库,那么您对库中的任何更改将在包装中得到反映你的应用程式建立他们的下一次。这是伟大的,因为它可以很容易地更新所有应用程序 - 但它太可怕了回归测试。换句话说,任何更新到库后,您可能需要测试每一个应用程序(这是无聊的),因为有可能是他们中的任何一个例外。然而,严格遵守设计和编码可以帮助减少或消除此。我刚刚发现,实际测试每个应用程序即将避免问题的​​唯一办法,除非包装应用程序是非常简单和明确的,这是非常罕见的。

If you create a project library, then any changes you make to the library will be reflected in the "wrapper" apps the next time you build them. This is great because it makes it easy to update "all apps" - but it's terrible for regression testing. In other words, after any update to the library, you may need to test every app (which is boring) because there may be exceptions in any one of them. However, a strict adherence to design and coding can help reduce or eliminate this. I've just found that actually testing each app is about the only way to avoid problems unless the "wrapper" apps are very simple and well defined, which is very rare.

这篇关于Android的演播室:用不同的包装为每一位客户的核心应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆