Flex构建的推荐项目结构

时间:2023-01-24 16:57:01

I'm starting a new project using Flex3 for a reasonably intricate UI getting its data from a collection of RESTful web services. I wondering what experiences others have had in structuring a moderately complex Flex project. The issues I'm thinking about include:

我正在使用Flex3开始一个新项目,用于从一组RESTful Web服务中获取其数据的相当复杂的UI。我想知道其他人在构建中等复杂的Flex项目时有什么经验。我正在考虑的问题包括:

  • I want to use our FlexBuilder licenses for visual editing of layouts and debugging code on Eclipse
  • 我想使用我们的FlexBuilder许可证在Eclipse上可视化编辑布局和调试代码

  • automated build script so that we can use a CI server
  • 自动构建脚本,以便我们可以使用CI服务器

  • testing strategies, particularly automatable unit tests
  • 测试策略,特别是可自动化的单元测试

  • cross-platform Linux and Windows development environments (yes, I know the Linux version of FlexBuilder doesn't do visual editing, but everything else should ideally run cross-platform)
  • 跨平台的Linux和Windows开发环境(是的,我知道FlexBuilder的Linux版本不进行可视化编辑,但其他一切理想情况下应该跨平台运行)

  • dependency management for at least the Java code (are there library dependency managers for Flex?)
  • 至少Java代码的依赖关系管理(Flex的库依赖关系管理器吗?)

I've just burned a day trying and failing to get a maven2/flex/jetty build setup working smoothly (based on Jeff Maury's tutorial). I'm not dead-against using Maven as we go forwards, but I'm sure there must be a less painful route. The main issue I had (other than maven documentation being patchy) is that maven's "single artifact per build" rule means that you have to jump through a lot of hoops with a complex build, and I'm not enough of a maven initiate not to trip over the hoops and fall on my face!

我刚刚烧了一天尝试并且未能使maven2 / flex / jetty构建设置顺利运行(基于Jeff Maury的教程)。在我们前进的过程中,我并没有使用Maven,但我确信必须有一条不那么痛苦的路线。我遇到的主要问题(除了maven文档是不完整的)是maven的“每个构建的单个工件”规则意味着你必须通过复杂的构建跳过很多箍,而且我不够maven发起而不是跳过篮球,落在我的脸上!

Would Ant and Ivy be a better option than maven2? What other choices are there?

Ant和Ivy会比maven2更好吗?还有哪些其他选择?

2 个解决方案

#1


2  

I don't know Flex development but I know CI so I'll comment on that aspect.

我不知道Flex开发,但我知道CI,所以我会对这方面发表评论。

I work on CruiseControl, so that's what I use (when not being paid to setup something else). And there are blog entries that describe setting up Flex projects under CC for both Windows and Linux. CC has been around for a long time so there is a large community of users and lots of 3rd party tools that work with it.

我在使用CruiseControl,这就是我使用的(当没有付钱设置其他东西时)。还有一些博客条目描述了在Windows下为Windows和Linux设置Flex项目。 CC已经存在了很长时间,因此有大量用户和许多第三方工具可以使用它。

But other people are likely to recommend Hudson and it would be hard to argue against them. Hudson is very easy to get up and running and has a nice web based UI. This project is very active, has lots of fans and lots of buzz and has matured very rapidly. I don't have anything bad to say about it. This blog entry describes running acceptance tests under Hudson.

但其他人可能会推荐哈德森,并且很难反对他们。 Hudson很容易启动和运行,并且有一个很好的基于Web的UI。这个项目非常活跃,有很多粉丝和很多嗡嗡声,并且已经非常迅速地成熟。我没有什么不好说的。此博客条目描述了Hudson下的运行验收测试。

I don't know enough about Maven to offer advice there but I'm working with Ivy at a client right now and I really like it. We've got a combination of Java and C++ code and we're able to get Ivy to do what we need.

我不太了解Maven在那里提供建议,但我现在正在客户与Ivy合作,我真的很喜欢它。我们有Java和C ++代码的组合,我们可以让Ivy做我们需要的东西。

#2


1  

Well we are using maven. With some help of a lot of different web sties I have an enterprise application being built using maven.

好吧,我们正在使用maven。在许多不同的web sties的帮助下,我有一个使用maven构建的企业应用程序。

This article via adobe has really help a lot.
http://www.adobe.com/devnet/flex/articles/fullstack_pt1.html
http://www.adobe.com/devnet/flex/articles/fullstack_pt2.html
http://www.adobe.com/devnet/flex/articles/fullstack_pt3.html

通过adobe这篇文章真的有很多帮助。 http://www.adobe.com/devnet/flex/articles/fullstack_pt1.html http://www.adobe.com/devnet/flex/articles/fullstack_pt2.html http://www.adobe.com/devnet/柔性/用品/ fullstack_pt3.html

You really need a common configuration project that will be shared between both flex and java, and possibly your c++ code. This article explains how to set that all up.

你真的需要一个通用的配置项目,它将在flex和java之间共享,也可能是你的c ++代码。本文将介绍如何设置这一切。

Down side, if you are not knowledgeable with maven there is a slight learning curve.

不利的一面,如果你对maven不了解,那就有一点点学习曲线。

#1


2  

I don't know Flex development but I know CI so I'll comment on that aspect.

我不知道Flex开发,但我知道CI,所以我会对这方面发表评论。

I work on CruiseControl, so that's what I use (when not being paid to setup something else). And there are blog entries that describe setting up Flex projects under CC for both Windows and Linux. CC has been around for a long time so there is a large community of users and lots of 3rd party tools that work with it.

我在使用CruiseControl,这就是我使用的(当没有付钱设置其他东西时)。还有一些博客条目描述了在Windows下为Windows和Linux设置Flex项目。 CC已经存在了很长时间,因此有大量用户和许多第三方工具可以使用它。

But other people are likely to recommend Hudson and it would be hard to argue against them. Hudson is very easy to get up and running and has a nice web based UI. This project is very active, has lots of fans and lots of buzz and has matured very rapidly. I don't have anything bad to say about it. This blog entry describes running acceptance tests under Hudson.

但其他人可能会推荐哈德森,并且很难反对他们。 Hudson很容易启动和运行,并且有一个很好的基于Web的UI。这个项目非常活跃,有很多粉丝和很多嗡嗡声,并且已经非常迅速地成熟。我没有什么不好说的。此博客条目描述了Hudson下的运行验收测试。

I don't know enough about Maven to offer advice there but I'm working with Ivy at a client right now and I really like it. We've got a combination of Java and C++ code and we're able to get Ivy to do what we need.

我不太了解Maven在那里提供建议,但我现在正在客户与Ivy合作,我真的很喜欢它。我们有Java和C ++代码的组合,我们可以让Ivy做我们需要的东西。

#2


1  

Well we are using maven. With some help of a lot of different web sties I have an enterprise application being built using maven.

好吧,我们正在使用maven。在许多不同的web sties的帮助下,我有一个使用maven构建的企业应用程序。

This article via adobe has really help a lot.
http://www.adobe.com/devnet/flex/articles/fullstack_pt1.html
http://www.adobe.com/devnet/flex/articles/fullstack_pt2.html
http://www.adobe.com/devnet/flex/articles/fullstack_pt3.html

通过adobe这篇文章真的有很多帮助。 http://www.adobe.com/devnet/flex/articles/fullstack_pt1.html http://www.adobe.com/devnet/flex/articles/fullstack_pt2.html http://www.adobe.com/devnet/柔性/用品/ fullstack_pt3.html

You really need a common configuration project that will be shared between both flex and java, and possibly your c++ code. This article explains how to set that all up.

你真的需要一个通用的配置项目,它将在flex和java之间共享,也可能是你的c ++代码。本文将介绍如何设置这一切。

Down side, if you are not knowledgeable with maven there is a slight learning curve.

不利的一面,如果你对maven不了解,那就有一点点学习曲线。