Flex learning-how to learn flex well

Source: Internet
Author: User

What I often ask about Flex is "How can I learn it well ?", To understand the answer to this question, you only need to understand the figure below.

* Focus of the learning of ActionScript

From the bottom layer, the bottom corner of ActionScript 3 is the foundation of everything. It is the only programming language used for flash/flex programming, therefore, the first thing anyone wants to learn about Flex is to first understand the language of ActionScript, including:

Its basic syntax and structure (array, hash, loop, if else ...)
Displaylist (displayobject, displayobjectcontainer) and Event System (bubbling, propagating ...)
Sound, video, netconnection, and graphics class
After understanding the essence of as3, you can enter the flex framework.

* Flex Framework highlights

Basically, the flex framework is a framework written in ActionScript. Therefore, we can regard it as the best example of as3. It is quite good to look at the framework source to learn ActionScript, but the process will be quite long.

The entire system of the Flex framework is very broad and profound. Generally, it is impossible for ordinary people to finish learning it completely. They only need to be familiar with the most commonly used parts. The three parts listed in the figure (component, managers, style/skin) is what I personally think is the top priority for all beginners.

* What Should component learn?

Component is the basis of the entire flex framework. almost 80% of the elements are inherited by uicomponent. For example, the most fundamental element is a uicomponent. Therefore, familiar with component has become the most fundamental and important basic skills for learning flex framework.

Flex has over 20 built-in UIS, such as buttons, DataGrid, and hbox. These components can be divided into three categories:

Controls: button, datechooser, Slider...
Containers: box, dividedbox, panel...
List: DataGrid, tree, tilelist...
Step 1 for beginnersAt least learn how to use these components and understand the properties, events, styles, effects ..., Know how to check its API files in the manual and when to use the components.

FurtherTo learn how to modify these components, such as inheriting a button and adding different functions, or writing different skin border to change its appearance.

Further, Is to begin to study the life cycle of the component, understand when each component is initialized, the key commands inside the component with their individual functions, and then try to establish their own custom component.

This level seems easy, but it is actually the most difficult, because the flex component framework is very large in writing, although in disorder and order, it is necessary to see the hidden architecture in chaos and then grasp the entire string to mention, it is more likely that someone will follow the correct guidance.

* What is manager?

The second at the top of the figure is Manager.

There are a lot of managers in flex, responsible for a variety of different jobs (nonsense ...), Several important items include:

Systemmanager:
It is the root of every flex program. It is the first to be downloaded and started. It carries out a series of APP boot processes.
Stylemanager:
It applies the CSS style and skin generation of the entire app. If you want to use dynamic CSS, you can use it.
Dragmanager:
The biggest selling point of Flex is drag and drop (drag and drop). This manager is the hero behind it. Beginners should learn at least how to deal with the five events of drag behavior, and how to drag and drop between different components; advanced players should thoroughly study how the manager is written, reading its source in detail will have an unexpected infinite pleasure (if you do not have this feeling after reading it, er, it means you should read it several more times. If you still do not have it, please contact me privately

Modulemanager:
When using Flex to develop large applications, programs are often cut into many small modules. This manager is responsible for loading and managing all the modules (including its Class Partition ), beginners may not be able to use it, but experienced gamers must be familiar with it.
Cursormanager:
This is not a lot of time to use, but it will be used occasionally when you change the cursor. Beginners should at least know how to replace the system cursor with the specified pattern.
 
* Style/skin highlights

CSS style and skinning are one of the biggest selling points of flex and the most troublesome and time-consuming part in the development process.

Beginners should thoroughly understand how to use CSS style to show the appearance of a flex app, change colors and materials, and use external assets to modify the interface.

Level-1 players should understand the skinning system, including programmatic skinning and graphical skin. What are the differences between them? Time to use? How to customize (Fig Note 1 )?

More advanced players should be familiar with the operating mode of the entire styling system, and how to dynamically load CSS to change the entire interface at runtime.

In short, if the flex app is well written, it is not obvious to outsiders. However, if the UI of an app is not beautiful, it is a one-to-two-eye view.

(Of course, there is a situation in which we deliberately beautify the interface results with our own bid and complaints, but that is rare, and not every company will get this field, so we will not discuss it first)

* Next step after completing basic skills

In my standards, when a developer has a moderate degree of knowledge about each piece of internal development, even if it completes flex education, it can move to the next stage.

That is, getting familiar with the production method of application, which includes

I understand at least one of the above development frameworks, such as cairngorm. To be honest, I don't like this framework very well (because it is too complicated, it is only suitable for ultra-complex moon landing projects or Mars exploration ), however, it has a well-designed structure and is recognized as the Holy Grail in the industry. It is equivalent to the common language of experts. Therefore, you must at least first understand what it is doing, in the future, we will be able to communicate professionally (as the saying goes, know the rules so you know what you are breaking refers to this situation)
Next, let's look at some simple techniques, such as riawave, model-glue: Flex, puremvc... And so on. Basically, the design methods of these frameworks are similar, and each of them has different application scenarios. You can pick one that you like and modify it on your own.
Understand basic concepts, such as value object, Dao, MVC, and so on. They will appear in most programming frameworks and it is easier to learn about them earlier.
The next step is to start the actual coding and write an app of small and medium size, whether it is a pure CRUD (zrng note 2) program, or a message board, phone book, or inventory management, the concept of programming is enhanced by multiple writes, and a large amount of peer code review is used to find the improvements.
* Conclusion

The conclusion is as follows: to get started with Flex is super simple, as long as it is not an idiot, it should be an hour, but it will take a long time to become a dedicated professional developer, it is easy to lose or even give up without going in the correct direction.

In other words, it is not as easy as you can imagine to become a professional developer in the workplace (in fact, I think every technology field is the same as the industry ), this is how I have helped many companies with recruiting over the past six months.

 

Address: http://blog.csdn.net/hartkevin/archive/2010/03/19/5391222.aspx

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.