Flex should choose spark or MX, have what good tangled

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Fish (spark), my desire also, bear's paw (MX), also my desire also, the two can not have both, rounded fish (spark) and paw (MX) also.

In the technology itself is very bitter, why do you do. Simplicity is the wind me, is my attitude. I speak for himself.

------------------------------------------------- gorgeous split line -------------------------------------------------

The following article from:

Teenager children, you see this post must be calm, because it may make you very painful, perhaps can make you very excited. I not only want to say with the Spark component, but also said the best way to disable the Spark component. Anyway, Spark really let me have not calm, but now I calm down, I will write in the last. 

The official Adobe Flex4 (now the name Flash Builder) after the release, has recommended the use of Spark components, but I want to say is that Flex developers should be used with caution in Spark assembly. The reason Adobe official recommended Spark component is very simple, because Spark is more lightweight than MX component of old, and the component separated from the skin and (component separated from the skin and the facts here refers to the content and services, components and skin file separate) -- to the Spark component is lightweight and performance is higher than MX I will continue to write, in the later. 

Adobe programmers had a "very good original intention", a great idea, is pure components will be separated from the skin, it is similar to the W3C CSS standard similar to Web Webpage leap. So -- in fact almost Flex4 and Adobe graphic design tools CS5 similar time, while the CS5 package contains a called Flash Catalyst software tool, this tool is a designer tool. 

Why to pull Flash Catalyst this tool? This tool is I write this post reason -- it is the ultimate cause of major promotion engineers Spark assembly Adobe failed, Assembly and is finally let Spark component in Adobe company developed only part of the corresponding MX version, And eventually stop updating Flash Catalyst, All the Flex4 to open the and so on -- and in the connective these reason lies in the previous paragraph "the good intention" just Adobe engineers wishful thinking, Why to say their wishful thinking, But in the back to write(- -, Calm, calm). 

Flex programmers may have heard of Flash Catalyst this tool, But never used this tool (unless you can do PhotoShop, Illustrator, FireWorks <the following may use PS, AI, FW, > and other graphic design referred to them;, And FLEX application development) -- yes, It is the Adobe developed to the graphic design software tools to generate Flex skin tool, It's the best compatible tool is AI CS5 (Adobe Illustrator CS5), There is a word called "software relay", From PS to Flash Catalyst is one-way software relay, Because once the PS file into the Flash Catalyst, If you want to modify, Cannot again from the Flash Catalyst to return to the PS., But AI CS5 can be two-way software relay, Once in the Flash found in Catalyst plane is the need to be amended, Still can return to the AI to modify the, But it must be more than CS5 version. 

Then I'm here first answer, why Adobe engineers wishful thinking. Okay, I admit that I am very much, let us recall the "good intentions" in paragraph three about it, really is very good -- but I want to say is in the process of developing Flex, this great mind can not realize, even can achieve, small and medium companies realize no, only in a very large IT companies, talent and is a very good project managers under the condition of. There are two main reasons: 


CSS is a non compiled for Web, Short flow, And Webpage art is studied in DIV+CSS, Even without learned, Personal webmaster can according to standard document description of the project through the CSS to achieve the layout, style settings; and Spark skin file is compiled to Flex, Long process (PS, AI derived from FXG, Further into the Flash Catalyst FXP, And then imported to the Flex), Long process as a middle contract number, And most of the plane or the animation art has not learned Flex, So in the middle of the contract, They don't know the appearance and components of the AS logical class are what mean, MXML skin file in the meta tag and attribute ID is what mean. Some people have a very long article to describe these intermediate contract, There are special books with a whole chapter to introduce the contract data, OK, I organized, Is the people character data is shortened to hundreds of words., In this post , So the artists have made the skin file, For Flex programmers, Looks very beautiful, But it is a useless thing; then the Flex program at, You know PS, AI, Flash Catalyst such as art and the development of software? This difficult task is implemented in the project manager., Must be by the project manager to write a complete standard document to constraint (from the project organizational structure to each software agreement) the work flow., And this know design software, And to understand the procedures of the project manager? OK, You are a big company such as project manager, Each time the skin changes, The project is to re compile and publish, Don't you think egg pain? At least I feel than the CSS for the WEB speaking, It is very egg pain (although from the function, FXG relative to the unlimited CSS.). In addition you may want to say, your skin file FXG once created can share to other projects can be used directly, teenager, Flex CSS style can be shared to other projects directly, and the Flex is to support dynamic loading CSS style file, does not need to be recompiled. Art can be online at any time to update the CSS style files, without the need to open the project, by the technical staff to recompile, then released to the Internet. 
Teenager you do not want to say that if you are not in such a large company, is in the small company, don't you? I am my own a person doing all the work flow, from graphic design, layout, to the state transition, and then to the business logic processing, I was mighty proud of me, I'm a man to get all. You are awesome, you are absolutely teenager, in the eyes of love. Because you do a few programmers can do, yes, the boss is to think so, because the boss is so ask you to do, because Flex has always belonged to the front-end program, in the bosses' eyes, as long as the front, then both the business logic interface design, layout includes front, it must are the Flex front end staff to complete the drop, there won't be devoted to you configure an Flex art drop. You a person's entire process, do you think you need to work to make it so long? Why not simplify the process? Have seen a lot of people in some QQ group asked, Spark component of XX style attributes why not use YY style, why not, why prompted the lack of ZZ skin and so on. The reason is very simple, the style attribute in Spark castrated many, no MX version, Spark gives you enough freedom, let your skin type to layout, add state, plus effect, and transition; MX is simple, short, and simple workflow, to set the style through CSS, state the effect of transition, with FLEX, programmers can be implemented directly in the component class, layout container or layout component classes to implement layout. So the more single project, should choose the more powerful MX component. 


So Flash Catalyst finally stop updating, Because of large and small companies do not have too much market available; while FLEX4 SDK gave the open source Apache, Teenager children, See no, But SDK Adobe send, Instead of the FLEX integrated development environment, So you are the official home page Apache can only be downloaded to the FLEX 4.8 and 4.9 SDK drops, Can not download to complete installation of the FLEX version drops, But now in updating the Spark component is Apache, Yes Spark is finished, 1.5 test, Lan Tanzi, Now it is waiting for someone to pick up. 

Don't forget to three questions before I leave, just answer a oh. Then answered "Spark component is lightweight and performance is higher than MX," teenager, Adobe to promote the Spark components they will of course say so, of course, that is not wrong, the module performance was castrated function can be slightly high some, but I want to tell you is, don't how much, pernicious -- because the Spark components and no corresponding MX higher than now. The reason is the following two points: 


First, The Spark component is implemented based on the thought of combination, While the MX component is inherited component based on AS3;, Subsequent to the inheritance of code execution efficiency than the combined code based on the implementation of high efficiency; FLEX4 MX is already optimized assembly, MX components compared to the old version of the, The more precise the new name relative to the Spark skin, It is a component of the Halo skin; an older version of MX is not the skin of this concept, The old version of the halo is that it leads the namespace contains halo, It is a style of significance, Instead of a FLEX4 skin significance. 
Then, do not take something different than. You take the Group component and the Canvas ratio, Group of course more lightweight, high performance; then I get MovieClip or Sprite and your Group is not more lightweight high performance? I Canvas have scroll bars and style and many other functions, you Group have? You must have at least Skinnable than with Group plus Scroller later than. Or I'll take MC or SP extended analogy you die, didn't take with you you have to cheap Shape. 


In fact, the above two reasons can be concluded, whether it is Spark or Halo, they are all based on the heavyweight class mx:UIComponent, which is the key -- some people say UIComponent inherited class and the realization of the interface altogether more than 5 lines of code, it is also said to be a thousand lines of code, I didn't count a teenager, I'm not so boring, boring people not me -- I'll give them a fold, it is only 5000 lines of code. Such a heavyweight class, if the MX property is low, Spark also high where? I also want to say is the amount of code and performance has no direct relationship, if if you think reduce code can improve the performance, then you have extended from the UIComponent class custom properties and methods, they need to use add only, without full can abandon what spark, MX what drop, sub object directly with Sprite and Shape such extension of the class, it is the high performance. But in the rapid application development desktop, should choose the more powerful MX. 

Whether you choose an MX or Spark only one objective, that is as fast as possible, rather than their own to create a complete UI component library. So choose to Diao wire work China small and medium-sized companies in the clear. You may take a long time to read this article, perhaps 1 hours to finish, but very good, at least you don't have to spend a month's time to study and research Spark. 

But sometimes we do need some high performance thing, how to do? I also left a calm said in the first paragraph of this article, thanks to the great FlashPlayer11 & AIR3, thanks to the new Stage3D features in them, thanks to Starling Stage3D API to simplify the previous 2D API, thanks Feathers components through Starling provides to enterprise development in mobile devices and components the desktop device truly lightweight, high performance. With Starling I calm. 


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Carry at January 01, 2014 - 9:23 AM