通过Rails管理大型应用程序 [英] Managing Large Scale apps via Rails

查看:152
本文介绍了通过Rails管理大型应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经开发了一个应用程序在Rails 3(计划升级到rails 4)今年。
我们已经把这个卖给了2个客户,现在的问题将开始。



在核心,所有的应用程序或多或少相同,除了样式表,一些html和一些类。



现在我正在寻找一种方法来管理这些应用程序,例如我们有100个客户运行该产品。



因此,有以下问题:




  • 如何管理所有客户的更新?

  • 如何管理所有客户的修正(对于2个客户我只是樱桃选择,但对于100个客户你不能这样做,一些客户的代码是不同的东西

  • 如何管理新客户?

  • 可以使用样式表文件来分离代码从样式在drupal?

  • 随时可以添加任何其他问题。



    EDIT1:我们提供的是一个网站有一个核心,但每个客户可以改变任何东西到网站从核心到设计。



    EDIT2:
    RAILS CODE:我们有一个Rails管理界面,可通过设置自定义的代码:

     如果Settings.value_shown == true 
    User.do_something
    else
    User.do_something_else
    end

    CSS / SASS CODE:让我们说,我们创建一个干净的CSS,每个客户我们创建一个覆盖类,覆盖所有的标准代码。



    EDIT3:假设50个客户中的每一个都有3个分支机构/ DEV / QUALITY / PRODUCTION系统。我们为所有客户开发一个修复程序,如何将此修复程序部署到所有客户?

    解决方案

    将不同客户的代码放入不同的分支是第一个问题。您应该真正地定制每个客户代码沿其他轴。例如,您可以为每个客户创建单独的目录,或某种插件架构,其中客户的代码位于单独的项目中。或者你有一个大东西的所有代码,并添加一些每个客户的配置。



    但是$ N不同的客户的不同分支意味着$ N副本的代码,你必须手动修补它们。不要这样做。



    一个好的google关键字是软件产品线,因为这是你想要做的: - )


    We have developed an app in Rails 3 (planning to upgrade to rails 4) this year. We have sold this to 2 customers and now the problems will begin.

    In the core all the apps are more or less the same except for the stylesheets, some html and some classes.

    Now I am looking for a way to manage these applications for when we have for example 100 customers running the product.

    Therefore the following questions:

    • How do you manage updates for all customers?
    • How do you manage fixes for all customers (for 2 customers I just cherry-pick at the moment but for 100 customers you can't do that, some customers code is different so something like mass cherry-pick will not always work)
    • How do you manage new customers?
    • Is it possible to work with stylesheet files to separate the code from the style like in drupal?
    • Any more concerns can always be added.

    Kind regards.

    EDIT1: the thing we provide is a site which has a core but each customer can change anything to the site from the core to the design.

    EDIT2: RAILS CODE: we have a Rails admin interface let's say we make all the code customizable via settings:

    If Settings.value_shown == true
     User.do_something
    else
     User.do_something_else
    end
    

    CSS / SASS CODE: let's say we make 1 clean CSS and per customer we create an overwrite class that overwrites all the standard code.

    EDIT3: Let's say each of the 50 customers has 3 branches a DEV / QUALITY / PRODUCTION system. We develop a fix for all customers how to do you deploy this fix to all customers?

    解决方案

    Putting the code for different customers into different branches is the first problem. You should really customize the per-customer code along some other axis. For example you could make a separate directory per customer, or some sort of plugin architecture, where sepcial code for customers is in separate projects. Or you have all the code in one big thing, and add some per-customer configuration.

    But $N different branches for different customers mean $N copies of the code, and you'd have to patch them all manually. Don't do that.

    A good keyword to google for is "software product line", because that's what you're trying to do :-)

    这篇关于通过Rails管理大型应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆