Understanding Vue ---- progressive framework

On the "progressive" understanding of these three words: Vue progressive - to use Vue core library, and then again gradually increase according to the function you need to add the appropriate plug-ins.

The understanding Source: https://www.zhihu.com/question/51907207

In my opinion, the meaning of progressive stands for: Minimum proposition.

Each frame inevitable there will be some of their own characteristics, so the user will have certain requirements, these requirements is to advocate, Zhang Youqiang main weak, the extent of his strength will affect the way business development.

For example Angular, he is a strong advocate of both versions, if you use it, you must accept my things:

- You must use its module mechanism

- You must use his dependency injection

- it must be defined in the form of special components (this frame will each view, difficult to avoid)

So Angular is relatively strong with exclusive, if your application is not starting from scratch, but to continue to consider whether inherited with other things, these ideas will bring some problems.

For example, React, he also has a certain degree of assertion, his claim mainly functional programming concepts, for example, you need to know what are the side effects, what is pure function, how to isolate the secondary role. He seemed to have no invasive Angular so strong, mainly because it is soft invasion.

Of course you can only React view layer, but with so few people, why, because you use it, other things will feel very uncomfortable, so you want the introduction of Flux, Redux, among a Mobx, so you in addition to Redux, but also the saga, so you want to tangle business development process each thing has no side effects, even you may be able to even this can not be:

the getData = const () => {
// if there is, is created in the cache and returns a
// if present, will take from the cache
}

Because you have to tangle he has external dependencies, also without arguments, twice the result is not the same, so impure,

Why I did not agree with the use of project React in the background, the reasons here, I am against the whole tendency is functional business applications, many people see a lot of useful React assembly, will tend to put him into and then, you know how to map their business onto the set of functional concept of it?

Functional programming without side effects, write the code is not bug, this is the truth is not wrong, but there are two issues to consider:

1.JS itself, there are too many features and functional proposition does not fit

2. Business entity relationships inside the system, how to organize the business logic, decades of accumulated experience in numerous scenes based on design patterns, there are too many things that can imitate, but no one gives you so much summed up how heavy your business functions mapped to the experience-concept, this place is very comprehensive level test, really everyone has the ability to do this mapping it?

Functional programming bug-free is simply that business logic should have lived with this idea completely do a good job, do you look at yourself in the background of the company employees who are familiar with what they are? This stuff is based on the traditional oo design patterns, what they think you take your components to your library will know everything, but it may have been taught functional programming a set of things, and no one to tell them in business scenarios, how to plan the business model, organization code, but also the requirements of rapid development, how can you get up?

So I feel bad that the couple, it's just their component library, but had to put the business logic of the tearing also for conversion, this time things are not one or two years of brainwashing, the degree of development than simply wash business.

No good component library, when everyone pain points in the view layer, with component-based technology React, and the pain is not so original business logic and made up also of pain, according to the original design patterns we teach things, can continue Zhaomaohuahu developed, after learning a new set of ideas, I do not know how to write code, how to write all doubt that he is wrong, terrible.

 

The reason I would rather not support React Angular support of it here, at least not soft Angular advocated this business logic, can work well with OO design patterns set of things. I faced many business scenarios, are very heavy front-end stuff, not just the management console this big with a lot of such things inside the business logic than the proportion of view, how to organize these things, a few are currently a mainstream technology stack are not solutions rely on business architects to settle.
 

现在我要说说为什么我这么支持Vue了,没什么,可能有些方面是不如React,不如Angular,但它是渐进的,没有强主张,你可以在原有大系统的上面,把一两个组件改用它实现,当jQuery用;也可以整个用它全家桶开发,当Angular用;还可以用它的视图,搭配你自己设计的整个下层用。你可以在底层数据逻辑的地方用OO和设计模式的那套理念,也可以函数式,都可以,它只是个轻量视图而已,只做了自己该做的事,没有做不该做的事,仅此而已。

渐进式的含义,我的理解是:没有多做职责之外的事。




 

Guess you like

Origin www.cnblogs.com/humiao-0626/p/11713660.html