团队如何使用Flex Builder Pro开发大型应用程序?
我们为 Flash 平台开发应用程序,该平台具有大量运行时加载的资源(图形、数据、音频、代码库等)。这些资源在项目文件夹中按逻辑组织。 程序员和设计人员从版本控制中获取最新信息,检查他们的代码或设计工作,在应用程序的完整本地副本中进行测试,然后在完成后签入。 组织对于这个工作流程和我们的沟通非常重要。
使用 Flash 或 FlashDevelop,我可以轻松处理任何文件夹和文件组织。 我可以轻松编译单个包或类来创建运行时可加载 swf。 在 Flex Builder Pro 中,我的选择似乎是为我需要编译的每个 swf 创建一个项目,或者创建一个引用模块的项目,也可以将其设置为项目。 这两种技术似乎都不适合团队,甚至不如我们当前的工作流程。 注意:我有大约 10 年的 Flash 经验,但只有几个月的 Flex Builder Pro 使用经验。 很可能我只是还没有发现更好的工作流程。
您能否分享一些关于您和您的团队如何使用 Flex Builder Pro 开发具有大量运行时库和其他资产的大型应用程序的技巧?
We develop applications for the Flash platform, which have LOTS of run-time loaded assets (graphics, data, audio, code-libraries, etc.) Those assets are logically organized within project folders. Programmers and designers get the latest from version control, check-out their code or design work, test within a full local copy of the application, then check-in when they are done. The organization is important to this workflow and our communication.
Using Flash or FlashDevelop, I can easily work with any organization of folders and files. I can easily compile a single package or class to create a run-time loadable swf. In Flex Builder Pro, it seems my options are to create a project for each swf that I need to compile or create a project which references modules, which can also be setup as projects. Neither technique seems ideal for a team or even as good as our current workflow. Note: I've got about 10 years experience with Flash, but only a couple months experience using Flex Builder Pro. It is quite likely that I simply haven't discovered a better workflow.
Would you please share a few tips on how you and your team use Flex Builder Pro to develop large applications, which have lots of runtime libraries and other assets?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一般来说,您是正确的:使用 FlexBuilder 的想法是您将创建一个需要构建的项目(.swf、.swc 等)。
文件存储库(正如您提到的那样)绝对是大规模开发的必备条件。
添加构建工具,例如 Ant (我个人最喜欢的)和 Maven(流行度和能力很快增长)到您的工具箱允许您进行更高级的构建(甚至单元测试)。 这些类型的工具将允许在单个操作中构建具有多个方面和依赖项的大型应用程序。 这是大规模应用程序和开发环境所必需的。 对于具有许多子项目的大型项目,我通常会拥有一个“主”项目,它只不过是一个调用子项目构建脚本并将所有内容放在一起的构建脚本。 Maven 在这方面尤其擅长。 有一些 Eclipse 插件可以帮助您使用这两种工具。
不同的情况需要不同的方式来一起使用项目。 作为依赖项直接链接到库项目可能会有所帮助。 这样您的项目就能够调试链接的代码并根据需要进行修改。 或者,如果库项目不太常修改,则可以将其资产放入依赖项目的 /libs 文件夹中,从而无需在开发过程中打开 .swc 生成项目。
将您的项目保持为每个项目一个资产的情况对于保持项目的组织性大有帮助。 一般来说,我为每个客户都有一个文件夹,并为每个项目都有一个文件夹。 如果该项目需要分解为子项目,那么所有这些子项目都将位于该项目文件夹中(无论彼此之间的关系如何)。
有时,为单个项目创建多个资产当然是有帮助的。 这可以是针对不同情况的多个 .swf,也可以是用于分发到不同地方或客户端或十几个其他情况的不同 .zip。 “资产”项目有时就是一个很好的例子。 有时我有一个“项目”,它只是我的资产集合。 我通常不会从 FlexBuilder 中访问该项目,并且它通常没有 .project 和其他 Eclipse 文件。
Generally, you are correct: Using FlexBuilder the idea is that you will create a project that has a single thing to be built (.swf, .swc, etc).
A file repository (as you mentioned you use) is definitely a MUST HAVE for large-scale development.
Adding build tools such as Ant (my personal favorite) and Maven (growing in popularity and ability pretty quickly) to your toolbox allow you to do more advanced building (and even unit-testing). These types of tools will allow the building of a large application with many aspects and dependencies in a single action. This is a must for large-scale applications and development environments. For larger projects with a lot of sub-projects I will often have a single "master" project that is little more than a build script that calls sub-project build scripts and puts everything together. Maven is particularly good at that. There are Eclipse plug-ins that help out with both of those tools.
Different situations require different ways to use the projects together. It may be helpful to directly link to a Library project as a dependency. That way your projects are able to debug the linked code and modify it as needed. Or if library projects are less commonly modified then their assets could be dropped into the /libs folder of the dependant project eliminating the need to have the .swc generating project open while development goes on.
Keeping your projects to a one-asset-per-project situation goes a long way to keeping it organized. Generally I have a folder for each client and in there a folder for each project. If that project needs to be broken down into sub-projects then ALL of those sub-projects will be located in that project folder (no matter what the relationship is to each other).
Sometimes it is of course helpful to have a number of assets be created for a single project. This could be multiple .swfs for different situations, different .zips for distribution to different places or clients or a dozen other situations. "Asset" projects are sometimes a good example of this. Sometimes I have a "project" that is just my collection of assets. I don't normally access this project from within FlexBuilder and it doesn't normally have the .project and other Eclipse files.
我还结合使用图书馆项目和常规项目。 我在一个大型项目中遇到的一个问题是编译时间。 以下是一些编译链接:
设置正确的 eclipse.ini 并使用 -incremental 编译器选项确实帮助了我。
I also use combination of library projects and regular projects. One issue I ran into with a large project is compilation time. Here are some links for the compilation:
Setting the right eclipse.ini and using the -incremental compiler option really helped me out.
除非您开发一款 Hello World 应用程序,否则您应该拥有多个 Flex Builder 项目。 主要的类具有最少的类,并且可能包含显示应用程序的第一个屏幕所需的共享库。
字体和 CSS 进入单独的 proj 并编译成单独的 swf。 在运行时通过 StyleManager 加载它们。 仅此一点就可以加快应用程序的编译速度。
其余代码必须分成单独的项目(Flex 库项目或仅具有模块的项目)。 了解库与主项目链接的差异(RSL、合并到代码和外部)。
我们使用 Ant 来构建每个项目和整个应用程序。 我们的开源 Fx2Ant 实用程序可在几秒钟内为您的 Flex Builder 项目生成 ANT 脚本。
例如,这是我去年正在进行的项目:http://www.mbusa.com。 它由超过 15 个 Flex Builder 项目组成。
Unless you develop a Hello World application, you should have more than one Flex Builder projects. The main one has the bare minimum of classes, and possibly shared libraries that are required to display the first screen of your app.
Fonts and CSS go to a separate proj and are compiled into a separate swf. Load them during the runtime via StyleManager. This alone will speed up the compilation of your app.
The rest of the code has to be split into a separate projects (either Flex Library projects or just the projects having modules). Read about differences in linking of the libraries with the main proj (RSL vs Merged into Code vs. External).
We use Ant for building each of the projects and the entire app. Our open sourced Fx2Ant utility generates ANT scripts for your Flex Builder projects in seconds.
For example, here's the project I was working on last year: http://www.mbusa.com. It consists of more than 15 Flex Builder projects.