Application of mate flex framework in actual projects (I) Application of mate flex framework in actual projects (ii) Application of mate flex framework in actual projects (III) Analysis on the Application of mate flex framework in actual projects (I)
It takes a long time to build a project. It also uses a lot of frameworks:Cairngorm,PuremvcAnd so on.
However, the mate framework I want to talk about this time has been searched on the Internet. Although there are some Chinese documents about mate, it is basically between introduction and publicity, there is almost no role of mate in practical application. Then I will introduce the role of mate in practical projects based on my experience in using mate framework.
What is mate flex framework:
Mate is a tag-based event-driven flex framework created by asfusion.
Its features:
1.Cairngorm is also based on event handler, but it is also different from cairngorm because it has no controversial frontcontroler and frequent use of Singleton mode.
2. It is more different from puremvc. Mate is a fully flex-based framework, and is not as independent as puremvc.
3. It is based on tags, so its syntax is bound to be easier to read, but it also limits its function, because mate can only be applied in mxml, it is a project developed by Flex, and cannot be applied to a project completely written by.
This is a typical mate syntax structure:
"{Quoteevent. Get}" DEBUG = "true">
<Remoteobjectinvoker Destination = "ColdFusion"
Source = "stockquoteexample. quoteservice"
Method = "getquote"
Arguments = "{event. symbol }"
DEBUG = "true">
<Resulthandlers>
<Methodinvoker generator = "{quotemanager }"
Method = "storequote" arguments = "{resultobject}"/>
</Resulthandlers>
</Remoteobjectinvoker>
</Eventhandlers>
Driver of mate:
Event maps, injectors, and extensions.
Advantages of mate flex framework:1. It can be applied to half of the Flex projects you have developed (you only need to apply its eventmap method) without damaging the original structure. While
CairngormIf puremvc is to be applied to half of projects that have already been developed, it is very difficult to apply them first. Even if it is forcibly applied, it will undoubtedly destroy the structure of the original project.2. Because it is based on the label method, it is more readable and the learning difficulty is far smaller
Cairngorm,
Puremvc. A flex beginner will surely master mate in a short time (download, run, and debug the mate sample example to get started.3. Since mate can only be used in flex, it is suitable for flex project development by small and medium teams. 4. Its unique extensions mechanism can extract and re-apply specific functions.
Disadvantages of mate:1. Because it is based on the label format, it can only be used in flex, so it limits its application scope. 2. I personally think it is not suitable for large flex framework projects. Because of its advantages, eventmap will become its disadvantage in the case of large projects (I will explain this in the next article)