1. Technical Field
The present disclosure relates to a method and a system of providing an active web user interface and, particularly, to a method and a system of providing an active web user interface in an embedded system.
2. Description of Related Art
Web user interfaces are used in embedded systems. The web user interface is laid on a web browser which is by far the most common host environment for JavaScript. But the web user interface cannot directly communicate with an application program in the embedded system. A plug-in is proposed to solve the problem. The plug-in consists of a computer program that interacts with a host application (a web browser or an email client, for example) to provide a certain, usually very specific, function “on demand”. Thus, the web user interface communicates with the application program through the plug-in. However, when the plug-in communicates with the application program, the web user interface cannot work due to the web user interface requiring synchronous communication with the plug-in. The web user interface cannot work until the plug-in ends communicating with the application program.
Many aspects of the embodiments can be better understood with references to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the embodiments. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
In general, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, for example, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as an EPROM. It will be appreciated that modules may comprise connected logic units, such as gates and flip-flops, and may comprise programmable units, such as programmable gate arrays or processors. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of computer-readable medium or other computer storage device.
Referring to
The web server 30 is responsible for accepting HTTP requests from clients (user agents such as web browsers), and serving them HTTP responses along with optional data content, which usually are web pages such as HTML documents and linked objects (images, etc.). The CGI module 40 is a standard protocol for interfacing external application software with an information server, commonly a web server. The CGI module 40 is stored in the web server 30. The application program module 50 is located in the embedded system.
The web user interface control module 10 is capable of inquiring of the web server 30 about a message from the application program module 50 by Asynchronous JavaScript and XML (AJAX). AJAX is a group of interrelated web development techniques used on the client-side to create interactive web applications or rich Internet applications. With Ajax, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page. The web server 30 asks the application program module 50 to confirm the message via the CGI module 40. The web server 30 obtains a result from the external application program module 50, and returns the result to the web user interface control module 10. The plug-in module 20 provides a service about the message through starting the application program module 50 about the message after the web user interface control module 10 receives the message from the web server 30.
Referring to
S01: the web user interface control module 10 actively questions the web server 30 for a message from the application program module 50 through Asynchronous JavaScript and XML (AJAX). The message may be a new mail message.
S02: the web server 30 asks the application program module 50 to confirm receipt of the message via the CGI module 40. The web server 30 obtains a result from the application program module 50, and returns the result to the web user interface control module 10. The web user interface control module 10 normally works when the web server 30 returns the result to the web user interface control module 10 by AJAX.
S03: the web user interface control module 10 receives the message from the web server 30 and calls the plug-in module 20 to provide a service about the message.
S04: the plug-in module 20 starts the service of the application program module 50 about the message to satisfy the user's need, for example, opening the new mail.
It is to be understood, however, that even though numerous characteristics and advantages of the disclosure have been set forth in the foregoing description, together with details of the structure and function of the invention, the disclosure is illustrative only, and changes may be made in detail, especially in matters of shape, size, and arrangement of parts within the principles of the invention to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.
It is also to be understood that the above description and the claims drawn to a method may include some indication in reference to certain steps. However, the indication used is only to be viewed for identification purposes and not as a suggestion as to an order for the steps.
Number | Date | Country | Kind |
---|---|---|---|
200910301347.9 | Apr 2009 | CN | national |