Excel import and export of business evolution scenarios and modular design scenarios

Source: Internet
Author: User

1: Preface

The netizens who have read my article all know that the preface is usually I use to soy sauce a bit of leisure.

Since I wrote the above article, the leader has talked to me, afraid I have what not to open.

So the previous article (the next), at present, I do not come out, which day I two times in a different place, then share.

Say recently outside IT market soaring also what, people are flying where, heard all over the military have entered a state of emergency.

Back to the point, today, take some time, write technical article, and everyone to share the recent years in the framework design of some of the technical achievements.

2: Project Background

In the system of information for operators (mobile, Unicom, Telecom, Tower), the relevant practitioners are accustomed to excel office thinking.

As a result of this type of system, Excel's import and export functionality is almost a must-have feature on every page that has a list to display.

Therefore, it is necessary to abstract and component the Excel import and export, so that it takes up the position of a bull B in the entire development framework.

And all this evolution and evolution begins with this increasingly perverted demand:

3: Evolution from the way the template is specified

Phase one: Carefully designed Excel templates by developers

We all know that to put a batch of data into the system, the most basic approach is to contract the import template, and then for the well-designed template to encode.

And the customer is in the format to fill in the data, such as no accident into the system.

So after that:

For development: The simplest way to develop is to make sure that each field does not require special handling and database pairs, and that you do not have to write too much extra code.

For customers: It takes time to fill in the data in the format you specify.

Stage Two: The format of the Excel template is specified by the customer

Following the progress of the research, the customer will personally specify the template column and format.

So after that:

For development: You need to develop in the format you specify, or even some columns may be missing, to do some extra query or code processing.

For customers: You can simply copy data from other Office Excel to the template, make simple changes to import.

Phase III: Export of Excel data from a system that requires direct import to the system

The customer is more and more cow B, think the template this thing is too complex, since the other system can be exported, directly to get past.

So after that:

For the development: because of a system exported Excel data, disorderly Seven miscellaneous eight, with the API read out the data, inconsistent with the rules, to do n multi-compatible processing, the workload turned n turn.

For customers: From other systems to export Excel data, directly into the system, the real mud of the worry.

Stage four: The list of Excel data exported in the system is required, and the system can be imported directly after modifying the data.

Customer has gone beyond the ox A and C, brother through seven or eight tables, with N case and GroupBy and N-layer nesting only to get out of the report data, you have to return to the basic table?

So after that:

For development: 45 degrees elevation calls you ye.

For customers: I just need to change some fields to go back on the line.

4: Looking at the complexity of the template Evolution stage one: single-table Import

Well, to put it simply, use CYQ. Data Framework (long time No in the article introduced, after several years of low-key development, have the opportunity to write the text) in the mdatatable of the batch function, a line of code is finished.

Stage: Multiple table Import

Trouble started, two tables on it, but you come to 2,3,4,5,6,7 table, an import to correlate so many tables, but also understand the business, but also to split a pair of n relationship, a import to the whole days.

If the customer said to change the template, the heart instantaneous more than a few grass mud horse through ...

Stage Three: Excel with multiple levels of headers required for export and import

Trouble again, the merged unit head, the trough also has the same name column head, must write dead to specify the nth row the column header is a table name, N+n row's column header is b table's name?

If the template added field, changed position, heart inexplicable and a few grass mud horse over ....

Stage Four: Header and data hidden in the middle, requiring automatic ignoring of the upper and lower left garbage data

The above more than 10 lines of the template, is a lot of useless data, the left and bottom of the template is some of the instructions to fill out (and these, is the data of other systems, and we do the system has a hair relationship ah, but the customer is so cow b)

So, but also to increase the processing, from the first few lines of reading data, column head across several lines, the right nth row is not valid, the heart of the brake between a few grass mud horse stepped on ...

Stage Five: Multiple sheet Import

Template Add a classification column can be done, the customer killed also do not, do not want a classification of a sheet, and then all imported.

So, you have to do this by automatically converting the sheet name to the category name.

There is a sheet multiple table of a pair of n relationship, to be split into n sheet to let you handle the import, in the heart has been countless grass mud horse stepped over ...

5: Summary:

In the normal stage of demand, in theory, users should be guided to avoid some unreasonable design, but the reality is sometimes led by customers to walk ...

Therefore, in the face of such a complex scenario and the requirements of the Metamorphosis, if you do not design a set of intelligent components, the development costs and developers will undoubtedly fall into the infinite sorrow.

Fortunately, I was.

In the next article, we will share with you the modular design of Excel

Http://www.cnblogs.com/cyq1162/p/4510710.html

Excel import and export of business evolution scenarios and modular design schemes (RPM)

Related Article

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.