简体   繁体   English

我应该将flex项目放入rails项目吗?

[英]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: 除非您有理由相信在某个时候需要另一台服务器,否则我真的无法想象您为什么不想这样做的任何原因:

  • Keeping them in the same project makes it easier to automate builds (in Java definitely, and it sounds the same in Rails). 将它们保留在同一个项目中可以使构建自动化更加容易(肯定是在Java中,在Rails中听起来也是如此)。
  • If they are in the same tree, then it is easier for other developers to work on the same code without using SVN externals. 如果它们在同一棵树中,则其他开发人员无需使用SVN外部组件即可更轻松地处理相同的代码。
  • Placing them as separate projects can complicate compiler arguments for RemoteObjects and the like 将它们放置为单独的项目可能会使RemoteObjects等的编译器参数复杂化

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.

相关问题 我应该将Rails项目的常量放在environment.rb中吗? - Should I put constants for my Rails project in environment.rb? 我应该使用哪些 gem 组合来测试我的 rails 项目? - What gem combinations should I use for testing my rails project? 如何在Rails项目中引用文件? - How do I reference a file from within my Rails project? 我的cronjobs应该放在哪里? - Where should I put my cronjobs in rails? 如果已经在Rails项目中创建了数据库,我应该将种子数据放在哪里? - Where do I put seed data if I have already created my database in my Rails project? 试图将bootstrap-datepicker放在我的rails项目中 - trying to put the bootstrap-datepicker in my rails project 我应该将外部 API 调用代码放在我的 Rails 项目中的什么地方? - Where would I put external API call code in my rails project? 我试图在我的Ruby on Rails项目中放一个缩略图,如何将图像保存在MySQL中? - Im trying to put a thumbnail in my ruby on rails project, How would I save the image in mysql? 我的页面应该在Rails API项目中的什么位置? - Where should my page be located in a Rails API project? 我应该在Rails项目中以这种“ has_many:through”关系使用ENUM还是创建另一个数据透视表? - Should I use an ENUM or create another pivot table in this “has_many :through” relationship in my Rails project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM