Flash, as a beautiful animation product, is everyone's favorite. It can bring us better visual effects. But how can we make it very effective for Java programmers ,. net programmers accept and conduct related development. Macromedia released in March 2004, based on its proprietary macromediaflash platform, it covers support for RIA (rich Internet applications) development and deployment of a series of technical combinations. Is a front-end technology similar to JSP and ASP. This blog briefly introduces some theoretical knowledge about flex.
I. What is it, what is it for use, advantages and disadvantages?
Flex is a powerful, open-source application framework that allows you to build traditional browsers, mobile and desktop applications using the same programming patterns, tools, and code libraries. It provides the flex SDK's Flex class library (ActionScript class), an Internet application (RIA) built in the flex compiler, debugger, mxml and actionscript programming languages, and other utilities ). It acts as the client function of the user interface (UI) or a Web application.
Advantages:
A. the flex application can Access Flash Player-based devices, such as GPS, cameras, local databases, and graphics acceleration;
B. Flex can run on various mobile devices, such as Android and ISO, as well as on computer browsers and clients;
C. Flex applications can be used together with servers and mainstream framework technologies, such as spring, hibernate, PHP, and ,.. net. The transmission mode is rest, soap, JSON, JMS, and AMF;
D. Flex ensures a rich user experience. Through intuitive human-computer interaction, applications and information are displayed visually richer.
E. A flex application is a single page. The application state transitions from one State to another without having to get a new page from the server or refresh the browser ......
Disadvantage: a flex application is a single-threaded application, but it provides an asynchronous programming model to compensate. Therefore, there are few weaknesses.
Ii. Composition:
Flex consists of two parts: mxml (used for interface display, similar to HTML, JSP. ASP and so on), and The ActionScript class (used for dynamic display of the interface, similar to JavaScript that we are familiar ).
Mxml:It is used to display the interface. Here, we can see that common controls are not found much on other pages. VB, C #, HTML, JSP, and so on are actually similar, we need to know these controls in use:
ActionScript:As the name implies, This is the action tag of mxml. By compiling ActionScript, we can make our pages dynamic, which is equivalent to the relationship between JS and JSP. Action writing is also object-oriented, which is very similar to JS and Java. Here we will take a look at the combination of the two:
Combined with mxml:
A. ActionScript is encoded in the mxml file tag <mx: script/>;
B. Use the 'include 'label;
C, the 'source' attribute of <mx: SCRIPT> is introduced into mxml and then called in the main program mxml.
3. Data Binding is also important for every dynamic page. Let's take a look at how to bind and display data in mxml!
4. event mechanism: Flex also handles event mechanisms, such as clicking an event, double-clicking an event, moving it up, and removing it. They all inherit the eventdispatcher event and can process some actions by listening to the event. In fact, any dynamic interface is changed through this method.
5. Interaction with other languages:
A. Use httpservice to send URL and HTTP requests and return an HTTP response.
B. WebService is called by other systems or other systems. A popular method.
C. remoteobject, which can encapsulate objects for transmission and then integrated development with blazeds and spring. This is a common method for flex and Java development.
The above is a simple flex theoretical study. Here we recommend a flex Learning Website for you to systematically learn: http://www.985school.com/flex/flex-directory-structe.html. In fact, learning any new things is a process. Don't be afraid. Don't think about it as a big fat man, break through each other and step by step to victory. This is the journey to be steadfast ......