利用导入的 Web 服务部署 Flex 项目
我确信对此有一个简单的解释,但我还没有找到答案,所以我想我应该把这个消息告诉我的同事,因为我确信你们中的一些人已经跑过之前进入过这个。
在我的(简单)开发环境中,我正在使用一些 WCF Web 服务,将其导入到我的 FB3 项目中并针对 ASP.NET 开发 Web 服务器的本地实例。 一切都很好,没有问题——但我现在想知道的是,将该项目部署到测试、登台和生产环境的正确方法是什么? 如果我导入的代理全部指向 http://localhost:1234/service.svc ( WSDL 是从中导入的),而我部署的只是一个已编译的 SWF,Flex Builder 是否希望我在每次想要移动我的应用程序时“管理 Web 服务 > 删除”、“> 添加”、重新编译和发布编译Flex项目从开发到测试,再到登台,最终投入生产? 有没有更简单的工作流程?
提前致谢——希望我的问题很清楚。
干杯, 克里斯
I'm sure there's a simple explanation for this, but I haven't had much luck at finding the answer yet, so I figured I'd put the word out to my colleagues, as I'm sure some of you've run into this one before.
In my (simple) dev environment, I'm working with a handful of WCF Web Services, imported into my FB3 project and targeting a local instance of the ASP.NET development Web server. All good, no problems -- but what I'd like to know now is, What's the right way to deploy this project to test, staging and production environments? If my imported proxies all point, say, to http://localhost:1234/service.svc (from which their WSDLs were imported), and all I'm deploying is a compiled SWF, does Flex Builder expect me to "Manage Web Services > Delete", "> Add", recompile and release ever time I want to move my compiled Flex project from development to test, and to staging, and ultimately into production? Is there a simpler workflow for this?
Thanks in advance -- hope my question was clear.
Cheers,
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您的路径名会根据环境而变化,那么您可能需要为每个环境重新编译,因为这些将在 swf 中进行编译。
从开发和生产环境迁移时,我通常使用 ANT 脚本来处理编译/部署过程。 这使我能够在编译期间动态更改任何路径名。 这些构建文件可以集成到 Flex Builder 中,一旦您完成所有设置,此过程就变得非常简单,并且可以通过单击或按计划完成。
If you have path names which will change depending on the enviroment then you will likely need to recompile for each environment since these will be compiled in the swf.
I typically use ANT scripts to handle my compile/deployment process when moving from development and production environments. This gives me the ability to dynamically change any path names during the compile. These build files can be integrated into Flex Builder making this process very easy once you have everything set up, and can be done with one click or scheduled.
谢谢布雷特。 无论如何,我一直想深入研究自动化构建过程,所以现在可能是最好的时机。 :)
Thanks Brett. I've been meaning to dig into automating my build processes anyway, so now's probably as good a time as any. :)
您不需要为每个环境构建一个 SWF。 以下是我常用的一种技术:
需要一些工作来编排您的应用程序,以便某些部分在执行步骤 1-5 之前不会初始化。 不过,我认为显式处理大量初始化而不是在组件的构造函数或各种初始化或创建完成事件中是一种很好的做法。 当用户注销并且其他用户登录时,您可能需要重新初始化; 如果您已经将应用程序设置为可以控制初始化,那么重新初始化将不是问题。
You do not need to build a SWF for each environment. Here's a technique I use commonly:
It takes a little work to orchestrate your app such that certain parts won't initialize until steps 1-5 take place. However I think it's good practice to handle a lot of this initialization explicitly rather than in constructors or various initialize or creationComplete events for components. You may need to reinitialize things when a user logs out and a different user logs in; if you already have your app set up to that initialization is something you can control then reinitialization will not be a problem.