Teach you to respond quickly to changing needs in your project

Source: Internet
Author: User
Keywords Product development requirements change project requirements
Tags activity aliyun based bind business business logic change code

For the people who do the project, the most impressive estimate http://www.aliyun.com/zixun/aggregation/7522.html "> is the change of demand", the word makes the coder tense. Pray for no change, but always things and wishes, whether in the process, or after the end. There is always this kind of change, optimization waiting for you to support.

So how to deal with the need for such changes? The author has the following personal views to share with you and discuss, I hope to help you.

First, the beginning of the project phase

In the beginning of the project, do not rush to write your code, do not get the need for a start to think about the time schedule problem. When you get the needs of the more important thing is to digest good needs, from the middle of the future can be found in the direction of development.

Digestion needs are mainly as follows:

1, the overall understanding of the project background, the project survival environment is what?

2, carefully understand the overall interaction process, mining your code framework to how to design?

3. After digesting 2 points above, start selecting your main frame or main library, and start planning your library structure without proper framework.

4. Consider the project deployment problem. How to plan your file distribution and directory structure for future maintenance.

5, the assessment of time to reserve the risk (may occur) time, you can refer to the three point estimation method to evaluate.

Three point estimation formula: Te= (TO+4TM+TP)/6

To: Based on the best of the activity, the duration of the activity

Tm: Most likely activity duration based on activity

Tp: Activity-based worst-case scenario, duration of activity

Te: expected duration of activity

Ii. phase of the project

This phase is estimated to be the most headache stage, sometimes based on various factors. Often hear is "xx, here need to adjust", "xx, this process because of XX original needs adjustment" and so on similar situation. However, no sage, this situation regardless of the early consideration of how perfect, in the implementation process is unavoidable. The only thing we can do is to support changing needs with minimal cost.

Here are some of the following experiences to share:

1, the bottom of the common interface design to function single, do not limit the way to call, aspects of business layer two times encapsulation.

2, in the business layer to plan a good public interface.

3, do a good job of the bottom of the interface two development, convenient in the business layer of flexible use.

4, decoupling code, each module independent, as far as possible to reduce the cross reference

5, do the UI and logic separation, reduce the dependency on the UI

6, often review your design code. See if there is any discomfort, and adjust immediately.

7, determine the key path (spend the most time the path, that is, the final completion of the project time), priority to ensure the development of critical path;

Third, after the project on-line optimization stage

This is a long combat process unless your project "Game over". And some of the changes are going to surprise you, so how do you support it quickly? Most of the above depends on whether the design of the two links is reasonable.

Recommendations are as follows:

1, with the project start-up phase, the first to get the demand, carefully read the demand, do not rush to start.

2, to understand the difference between the interaction, to see what the new interaction and the specific changes before, here need to confirm the information is: A to complete refactoring, b whether it is just parameter adjustment, c only need to mask the current interface calls.

3, if involves the interaction big adjustment, needs to reconstruct. Here you need to rethink refactoring and don't rush to rewrite your code directly.

Four, two examples

1, interface design

Design the overall structure

Thinking about a single interface invocation and implementation

Interface profiling: Multiple invocation implementations and two-time encapsulation interface Reservations

Event Registration Handle code example

interface method implementation code example

Take the Pageloader interface for example:

The underlying interface is loadpage ()

1, hash load request processing: Loadhash ()-> loadpage ()

2, the way to deal with the binding node: Bind ()-> call ()-> loadpage ()

3, with the event delegate to bind the way the node processing: all ()-> call ()-> loadpage ()

4, a rapid response to the interaction process adjustment of the optimization requirements

Requirements: Process optimization, the product of the two processes have only one page implementation, optimized to break the process into 2 pages to complete.

Status quo: The original 2 pages are used by the same module code to achieve.

Analysis Process:

1, the initial impression, need to split the code module, the original business logic needs to be readjusted. This will take a lot of time to deal with.

2, re-examine the new interactive process and the original process of the difference. Make a comparison between the new and old page files and try to find common ground and differences with the original page.

3, through the comparison between the two, found that a split into (A1, A2) is only the form element of the step-by-step processing, the other is the same, although the form is split, but the logical implementation is not adjusted.

Achieve:

Page a–> A1 + A2

1, the A1 and A2 of the form name, event-triggered node selector set to the same.

2. New custom Attribute data-step= "1" in A1 form, similar in A2 (data-step= "2")

3, OK, the page structure adjusted after the start of the adjustment JS business logic;

A to bind different callbacks to nodes according to Data-step

b A form that caches Data-step 1 is submitted as a whole after the data-step= "2" page is merged.

Very simple is not that the time spent here allocated about: thinking (6h or so) + implementation (1h or so)

V. Summary:

Cloud breeze clear to treat the needs that you face, shift thinking;

If necessary, some hypothetical scene calls can be made;

Refer to other people's realization way, absorbing others ' realization thought.

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.