Thoughts on a uniform development platform for multiple applications

Source: Internet
Author: User

After several years of work, we found that there was a problem that had plagued us all the time: as projects become more and more complete and functions become richer, a single application could no longer support the needs of developers. Therefore, we need to split up several independent applications based on the business to meet the needs of multiple development teams. However, this also causes some problems. The maintenance of the common basic code for multiple applications becomes more and more complex, resulting in various problems. There are also many ways to solve this problem, such as placing public code in a separate place, which brings difficulties in automatic deployment. Here, I propose a solution, that is, the concept of a uniform multi-application development platform. The following uses the rails application as an example.

The standard rails application structure is as follows:

Gemfile
Gemfile. Lock
Readme. rdoc
Rakefile
App
Bin
Config
Config.ru
DB
Lib
Log
Public
Test
TMP
Vendor

Obviously, this organizational structure only supports one application. If you place multiple relatively independent functions in this application, two problems may occur: 1. due to the large amount of code, the development environment will become very slow, seriously affecting the efficiency. 2. Because it is still an application, it is difficult to decouple modules.

The multi-application unified development platform I imagined is organized in this way.

Application

| ------ App1

| ------ App2

Biz

| ------ Biz1

| ------ Biz2

Core

| ----- User_mgmt

| ------ Sso_mgmt

| ------ Permission_mgmt

Doc

Bin


The implementation of this organizational structure based on the rails engine technology is not very complicated. Core contains all the public code, such as user management and permission management.

Below biz is a module that implements specific business logic. Each module is a rails engine application. Applications are applications organized by various modules. For example, if app1 requires biz1 and user_mgmt, you only need to reference the biz1 and user_mgmt modules in app1 through the configuration file. In this way, the application starts quickly. The application difference is divided into modules to facilitate modular applications.


The following describes how to organize the structure into an application template. Just like a rails application, you can quickly develop projects with this structure by using commands and parameters. A GitHub project has been created.

Address:

Please wait.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.