How do I evaluate if an Orchestration is the appropriate design pattern for a given problem?

Say that you’re doing a code review, and you find yourself faced with an orchestration pattern:

class OrchestrationClass {
  private Configuration _configuration;
  private DataStore1 _dataStore1;
  private EfficientComputationService _service;
  private ResultPrettifier _formatter;

  public DoSomething () {
     with (data = _dataStore1.LoadForConfiguration(_configuration)) {
        return _formatter.PrettyPrint(_service.Process(data));
     }
  }
}

Under which circumstances is this considered to be a valid pattern/anti-pattern (and how is the anti-pattern to be cleanedup/refactored)?


For context:

This recently came up in a code review, and several people mentioned the pattern/anti-pattern. Searches of the standard patterns literature, related Google search and scan through blog posts / wikis have all led to indirect mentions. Which leads me to believe that this pattern / anti-pattern hasn’t yet had a formal treatment (or, if it has, it’s not yet online). Hence – the question is here, where someone more experienced or widely read might be able to answer (or provide a reference)

4

If by orchestration you mean take 2+ parts and use them to do 1 larger task… this is called programming where I live. Maybe “abstraction” if you’re feeling frisky.

I mean seriously, this is basic object oriented programming. It isn’t special, and doesn’t need a fancy name.

2

I usually talk about Orchestration in the context of RESTful services. That is, we provide RESTful services that give direct access to various resources. But there are some teams out there that, for one reason or another, just aren’t in a position to handle that. So we provide an orchestration layer on top, where we tie together the resource calls that we’d expect them to do.

(That idea is a little controversial, because as expected, when I’ve been on a team that did that, due to politics the orchestration layer just devoured and hid the REST layer completely.)

Except as a general idea, I haven’t heard orchestration as such doesn’t come up in application design, though. In a sense it’s a consequence of modular, shallow-call-stack design. At some point you have to pull the low-level pieces together.

To me that’s a question of whether you throw in a layer of abstraction between the main() or API layer and the logic layer. Do the orchestration at the very top? (i.e. in your main() method, or in the webapp handler classes) Or if you throw in a layer of abstraction between main() and the workers?

I usually do, because I like to pretend that the application logic is decoupled from the API implementation. But I don’t know if there’s a formal name for that, or rules around it.

Your code just looks like an example of the “Single Level of Abstraction” concept (note that I intentionally don’t use the word “pattern” here), which is a good practice under normal circumstances. The idea of this concept is to have same level of abstraction for all statements inside a method.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật