[英]Should I put my flex project within my rails project?
I have a project with a RESTful Rails back-end and a Flex front-end, first time for me with this combo and I debating whether to put the flex source somewhere inside the Rails folder hierarchy or making it a separate project. 我有一个带有RESTful Rails后端和Flex前端的项目,这是我第一次使用此组合,并且我在讨论是否将flex源放在Rails文件夹层次结构中还是将其作为单独的项目。 If I do so which folder would be most suitable /lib? 如果这样做,哪个文件夹最适合/ lib?
Also be doing one click deployment with Vlad which can also compile the flex app and dump it in the public folder. 还可以使用Vlad进行一键式部署,这也可以编译flex应用并将其转储到公用文件夹中。
Or does anyone have any good reasons why the flex project shouldn't reside within the Rails folder hierarchy? 还是有人有充分的理由为什么不应将flex项目驻留在Rails文件夹层次结构中?
Cheers 干杯
From personal experience, it's fine in the Rails folder structure. 从个人经验来看,Rails文件夹结构很好。 We have a "/flexsrc" folder a the rails project level in git, and when we build, the swf and related files are dumped to the /public area. 我们在git中的rails项目级别有一个“ / flexsrc”文件夹,并且在构建时,swf和相关文件将转储到/ public区域。 It's been this way for a while, and there's no apparent drawback. 已经有一段时间了,并且没有明显的缺点。
I think it would be more of a hassle to have two source depots. 我认为拥有两个源仓库会更麻烦。
(disclaimer, I've only used Flex with PHP and Java, I'm not terribly familiar with Rails so I can only really address the last part of the question). (免责声明,我只将Flex与PHP和Java一起使用,我对Rails并不十分熟悉,因此我只能真正解决问题的最后一部分)。
My general experience is that it is best to keep both Flex and its hosting server components in the same source tree and svn project. 我的一般经验是,最好将Flex及其托管服务器组件都放在同一源代码树和svn项目中。 Unless you have reason to believe that you are going to need a different server at some point, I can't really imagine any reason why you wouldn't want to: 除非您有理由相信在某个时候需要另一台服务器,否则我真的无法想象您为什么不想这样做的任何原因:
This is the way I do it: 这是我的方法:
AppRepo
FlexAppFolder/
RailsAppFolder/
I like the Glenn's approach, but as ChrisInCambo said he's using a RESTful Rails back-end, which means that Rails has a bunch of services to expose and which means that the services could be consumed from different clients (front-ends), maybe not now, but in a future. 我喜欢Glenn的方法,但正如ChrisInCambo所说的那样,他使用的是RESTful Rails后端,这意味着Rails有很多要公开的服务,这意味着可以从不同的客户端(前端)使用这些服务,也许不是现在,但将来。
Another approach could be 另一种方法可能是
RailsAppRepo
FlexAppRepo
and if you're using git you can do: 如果您使用的是git,则可以执行以下操作:
git submodule add backend git://your_backend_repo
or an svn external 或svn外部
Any ideas? 有任何想法吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.