Summary of the invention
The object of the present invention is to provide a kind of operating system, with the extensibility of prior art and the technical matters of poor operability in the solution prior art based on browser.
Second purpose of the present invention is to provide a kind of operation edit methods based on browser, with the extensibility of prior art and the technical matters of poor operability in the solution prior art.
A kind of operation edit methods based on browser may further comprise the steps:
(1) job platform provides an operation edition interface to client; Interactive engine and page rendering unit are set in the said operation edition interface at least, and said interactive engine comprises that the file edit cell of the UI component framework that is used to provide the corresponding identification user operation of various browsers and job platform carries out the Message Processing Framework of unified interface interacting message;
(2) user side carries out the operation editing operation to the user interaction area that comprises menu and editing area of operation edition interface;
(3) interactive engine obtains the type information of this user side browser; Catch the event action of user to the operation editor through the corresponding UI component framework of the type browser again, said event message is sent according to the message format of establishing definition earlier in the Message Processing Framework in advance in the back;
(4) after job platform receives said message, come content is carried out corresponding editing operation and preserved, and the page rendering unit of operation edition interface required the instruction that refreshes according to message;
(5) after the page rendering unit receives refreshing instruction, read document content, show by original form at the editing area of browser.
Preferably, also comprise:
In step (1), also comprise: an operation edit cell is set on the said operation edition interface, and said operation edit cell is used for coming Edit Document according to the information order that receives;
In step (4), also comprise: after said operation edit cell receives said message, parse corresponding command, operation edited according to this order, and to the document information after the editing operation upload onto the server the end in store.
Preferably, above-mentioned embodiment can also realize through following steps:
In step (1), also comprise: a document data administrative unit is set on server end;
In step (4), also comprise: after the document data administrative unit of job platform receives said message, parse corresponding command, operation is edited, and the document information after the editing operation is stored according to this order.
This method also comprises:
The answer unit of server end is shown by the page rendering module after from the data of storage in advance, obtaining the new document information that comprises stem, problem, option, shows the answer district according to different topic types simultaneously, supplies user's answer;
The interactive engine of user side obtains the type information of this user side browser; Catch the event action of user to the operation answer through the corresponding UI component framework of the type browser again, said event message is sent according to the message format of establishing definition earlier in the Message Processing Framework in advance in the back;
The said answer operation of server for saving.
This method also comprises:
Exercise question stem, problem and option, answer content, model answer, the thinking of solving a problem are obtained from server in the work correction unit of server end; After obtaining operation and item content; Show item content by the page rendering module, show according to different topic types simultaneously and correct the zone;
The interactive engine of user side obtains the type information of this user side browser; Catch the event action of user to work correction through the corresponding UI component framework of the type browser again, said event message is sent according to the message format of establishing definition earlier in the Message Processing Framework in advance in the back;
Server for saving is said corrects operation.
This method also comprises:
Exercise question is reviewed the unit and is obtained exercise question stem, problem and option, answer content, model answer, the thinking of solving a problem, corrects content from server, obtain operation and item content after, show item content by the page rendering module, supply user's review.
This method further comprises:
AddEventHandler () is set in said engine, and addEventHandler () at first detects the current browsing device and whether has the DOM2 level method, if exist, then uses this pattern; Whether be IE browser, if then use the incident binding pattern of IE if detecting then; Be to use the incident binding pattern of DOM0 level method at last, be used for the browser of compatible legacy version, thereby accomplish the event processing mechanism of the needed compatible browser of interactive engine.
This method also comprises:
The UI component framework provides a UIBaseComponent; UIBaseComponent is the base class of all UI assemblies; In this base class the inside, defined the general message of UI assembly, status code, error code at interior interface, each UIBaseComponent assembly is all corresponding one by one with the DOM element; For different browsers; The event message that the DOM element excites has different titles and different events attribute, and UIBaseComponent class internal condition browser type is the different events message maps event class FDEvent with consistent title and attribute;
The UI component framework provides UIControl and UIContainer two sub-category; The UIControl class is the base class of various concrete UI elements; Its subclass comprises button, text box, combobox, and UIContainer is the base class of UI Container elements, and its subclass comprises menu container, Tab container.
This method also comprises:
Said Message Processing Framework provides the task of intercepting of EventUtil:EventUtil unified management message; Comprise basic DOM message; For different browsers, there is very big-difference in the interrelational form of incident and event response function, during interactive engine uses that EventUtil provides unified event response function binding method; The type of EventUtil internal condition browser is bound the event response function with all kinds of browser events corresponding correlation models.
This method also comprises:
Said Message Processing Framework provides KeyEventHandler; It provides unified operation mechanism for all KeyEvents; The type of KeyEventHandler internal condition browser is handled conversion to the KeyEvent of all kinds of browsers and event argument respectively, and unified operation-interface externally is provided.
A kind of operation editing system based on browser comprises the client and server end, wherein:
Be arranged on the operation edition interface of client; Interactive engine, operation edit cell and page rendering unit are set in the said operation edition interface at least; Said interactive engine comprises that the file edit cell of the UI component framework that is used to provide the corresponding identification user operation of various browsers and job platform carries out the Message Processing Framework of unified interface interacting message; Wherein, The UI component framework is used to obtain the type information of this user side browser, catches the event action of user to the operation editor, and it is mutual that said Message Processing Framework is used for establishing in advance according to Message Processing Framework the said event message of message format and operation edit cell of definition earlier;
Operation edit cell: be used for the user interaction area that comprises menu and editing area of operation edition interface is carried out the operation editing operation, and the page rendering unit of operation edition interface required the instruction that refreshes;
The page rendering unit after being used to receive refreshing instruction, reads document content, shows by original form at the editing area of browser;
Server end: be used to preserve the operation behind the editor.
Preferably, said server end further comprises:
Document data administrative unit: be used to manage the document behind the editor;
The answer unit after being used for obtaining the new document information that comprises stem, problem, option from the data of storage in advance, sends message and shows for the page rendering module, shows the answer district according to different topic types simultaneously, supplies user's answer;
The work correction unit of server end; Be used for obtaining exercise question stem, problem and option, answer content, model answer, the thinking of solving a problem from server; After obtaining operation and item content, show item content, show according to different topic types simultaneously and correct the zone by the page rendering module;
Exercise question is reviewed the unit, is used for obtaining exercise question stem, problem and option, answer content, model answer, the thinking of solving a problem, correcting content from server, obtain operation and item content after, show item content by the page rendering module, supply user's review.
Compared with prior art, the present invention has the following advantages:
The invention solves the compatibility issue of browser, operate, have extremely strong extendability and operability through editing operating and exercise question that the mistake browser is accepted the user with the mode of What You See Is What You Get.
Editting function is supported text editing, graphics edition, equation editing, picture editting, and abundant format editor and design function is provided.Content of edit comprises stem, problem and option, model answer, answer district, corrects the district, the thinking of solving a problem district; Through subregion editor's exercise question; Can be supported in each relevant flow process of operation and show different item contents, thereby support to set a question, volume is declared in answer, objective item automatically, exercise question is corrected, reviewed to exercise question.Based on the use-pattern of browser, make things convenient for the user to arrange operation, submit job and review operation.The user can free editing operating and exercise question, has effectively saved the application cost of digitizing operation.The digitizing operation supports objective item to declare volume automatically, and can do deep statistical study to user's answer result, thereby effectively improves the efficient and the effect of learning aid.
Embodiment
Along with popularizing of network, increasing application and service is transferred to browser environment.RIA (Rich Internet Applications based on browser; Rich internet is used) use through introducing " client engine "; Strengthen the interaction capabilities and the expressive ability of browser, widened the scope of the application and service that possibly provide under the browser environment greatly.
Yet; Because it is for exhibition information that the HTML programming language initial design under the browser environment is come out; Although the development technique of browser environment develops into now; Added multinomial technology such as script successively and supported dynamic and mutual demand, but these technology can only remedy the deficiency of html language in limited range, realize that the RIA application still faces lot of challenges at browser environment.In addition, the development of browser itself never forms a unified codes and standards.User on each platform can have IE, FireFox, Chrome and Safari etc. by employable browser now, when exploitation RIA uses, must handle the personalization features of each browser, could guarantee compatible and cross-platform.
The present invention is in " user interaction unit " introducing " interactive engine "; Make full use of up-to-date HTML technology and Javascript technology; Efficiently solve the compatibling problem of browser, for realizing that interactive function is abundant, the sufficient RIA of expressive ability uses a solution is provided.
Because various browsers has different instruction standards and operational design flow process, for this reason, design an interactive engine, the instruction standard and the operational design flow process of all types browser all there are a unified interface and PERCOM peripheral communication.Such as; For browser, only be the instruction of catching user's operation generally, can resolve to unified interface during with those instruction interactions and go out; When receiving a certain interface message, can resolve to this browser corresponding command and go out, realize the compatibling problem of browser by the way.
See also Fig. 1, a kind of operation editing system based on browser comprises client 2 and server end 3, wherein:
Be arranged on the operation edition interface 1 of client; Interactive engine 11, operation edit cell 12 and page rendering unit 13 are set in the operation edition interface 1 at least; Interactive engine 11 comprises that the file edit cell of the UI component framework that is used to provide the corresponding identification user operation of various browsers and job platform carries out the Message Processing Framework of unified interface interacting message; Wherein, The UI component framework is used to obtain the type information of this user side browser, catches the event action of user to the operation editor, and it is mutual that said Message Processing Framework is used for establishing in advance according to Message Processing Framework the said event message of message format and operation edit cell of definition earlier;
Operation edit cell 12: be used for the user interaction area that comprises menu and editing area of operation edition interface is carried out the operation editing operation, and the page rendering unit of operation edition interface required the instruction that refreshes;
Page rendering unit 13 after being used to receive refreshing instruction, reads document content, shows by original form at the editing area of browser;
Server end 3: be used to preserve the operation behind the editor.
Operation edit cell 12 can be placed on server end 3, also can be arranged on client 2.
Server end further comprises:
Document data administrative unit 21: be used to manage the document behind the editor;
Answer unit 22 after being used for obtaining the new document information that comprises stem, problem, option from the data of storage in advance, sends message and shows for the page rendering module, shows the answer district according to different topic types simultaneously, supplies user's answer;
The work correction unit 23 of server end; Be used for obtaining exercise question stem, problem and option, answer content, model answer, the thinking of solving a problem from server; After obtaining operation and item content, show item content, show according to different topic types simultaneously and correct the zone by the page rendering module;
Exercise question is reviewed unit 24, is used for obtaining exercise question stem, problem and option, answer content, model answer, the thinking of solving a problem, correcting content from server, obtain operation and item content after, show item content by the page rendering module, supply user's review.
A kind of operation edit methods based on browser may further comprise the steps:
(1) job platform provides an operation edition interface to client; Interactive engine and page rendering unit are set in the said operation edition interface at least, and said interactive engine comprises that the file edit cell of the UI component framework that is used to provide the corresponding identification user operation of various browsers and job platform carries out the Message Processing Framework of unified interface interacting message;
(2) user side carries out the operation editing operation to the user interaction area that comprises menu and editing area of operation edition interface;
(3) interactive engine obtains the type information of this user side browser; Catch the event action of user to the operation editor through the corresponding UI component framework of the type browser again, said event message is sent according to the message format of establishing definition earlier in the Message Processing Framework in advance in the back;
(4) after job platform receives said message, come content is carried out corresponding editing operation and preserved, and the page rendering unit of operation edition interface required the instruction that refreshes according to message;
(5) after the page rendering unit receives refreshing instruction, read document content, show by original form at the editing area of browser.The page rendering unit is preserved the video data information of original editing area in advance, such as, which data presentation is in which zone; What show with font; Font size what etc. information, after receiving refreshing instruction, send out, promptly can directly read document content; Display attribute information according to preserving in advance shows, and can refresh after a time and preserve current new display attribute information.
One operation edit cell is set on the operation edition interface, and said operation edit cell is used for coming Edit Document according to the information order that receives; In step (4), also comprise: the operation edit cell parses corresponding command after receiving said message, according to this order operation is edited, and to the document information after the editing operation upload onto the server the end in store.The operation edit cell is preserved the corresponding concrete editing operation of each order in advance, when receiving concrete command operation, parses concrete editing operation.The operation edit cell uploads onto the server concrete documents editing operation information to hold and preserves.
Equally, the operation edit cell also can be arranged on the server, such as; Be arranged on the inside of document data administrative unit; Like this exist, after the document data administrative unit of job platform receives said message, parse corresponding command; According to this order operation is edited, and the document information after the editing operation is stored.
Said method also comprises:
The answer unit of server end is shown by the page rendering module after from the data of storage in advance, obtaining the new document information that comprises stem, problem, option, shows the answer district according to different topic types simultaneously, supplies user's answer;
The interactive engine of user side obtains the type information of this user side browser; Catch the event action of user to the operation answer through the corresponding UI component framework of the type browser again, said event message is sent according to the message format of establishing definition earlier in the Message Processing Framework in advance in the back;
The said answer operation of server for saving.
Said method also comprises:
Exercise question stem, problem and option, answer content, model answer, the thinking of solving a problem are obtained from server in the work correction unit of server end; After obtaining operation and item content; Show item content by the page rendering module, show according to different topic types simultaneously and correct the zone;
The interactive engine of user side obtains the type information of this user side browser; Catch the event action of user to work correction through the corresponding UI component framework of the type browser again, said event message is sent according to the message format of establishing definition earlier in the Message Processing Framework in advance in the back;
Server for saving is said corrects operation.
Said method also comprises:
Exercise question is reviewed the unit and is obtained exercise question stem, problem and option, answer content, model answer, the thinking of solving a problem, corrects content from server, obtain operation and item content after, show item content by the page rendering module, supply user's review.
Below further introduce interactive engine (noting keeping the consistance of same component Name in the article)
" interactive engine " is made up of UI component framework and Message Processing Framework.The UI component framework organically combines basic Web interactive elements and Dynamic Java script script, and an interactive interface not second to desktop programs is provided.Message Processing Framework has encapsulated the DOM message of HTML, and abundant user self-defined message is provided simultaneously, handles with accordant interface, has guaranteed the compatibility to each browser, and has effectively promoted the mutual effect of browser environment.
The UI component framework has at first been realized a UIBaseComponent.UIBaseComponent is the base class of all UI assemblies, in this base class the inside, has defined interfaces such as the general message of UI assembly, status code, error code.
Each UIBaseComponent assembly is all corresponding one by one with the DOM element.For different browsers, the event message that the DOM element excites has different titles and different events attribute.UIBaseComponent class internal condition browser type; Is the different events message maps event class FDEvent with consistent title and attribute; The event response that meets W3C standard interface function is provided simultaneously, thus the compatibility of the browser that well solves.
" interactive engine " realized UIControl and UIContainer two sub-category respectively on the basis of UIBaseComponent.The UIControl class is the base class of various concrete UI elements, and its subclass comprises button, text box, combobox etc.UIContainer is the base class of UI Container elements, and its subclass comprises menu container, Tab container etc.
Message Processing Framework comprises several main classes such as EventUtil, MessageCenter, FDEvent, KeyEventHandler.The task of intercepting of EventUtil unified management message comprises basic DOM message and a large amount of user self-defined messages.For different browsers, there is very big-difference in the interrelational form of incident and event response function.During " interactive engine " uses that EventUtil provides unified event response function binding method; The type of EventUtil internal condition browser; Bind the event response function with all kinds of browser events corresponding correlation models, thereby the event response function that has guaranteed " interactive engine " all there is consistent behavior in all kinds of browsers the inside.
EventUtil has realized an addEventHandler () method, and addEventHandler () at first detects the current browsing device and whether has the DOM2 level method, if exist, then uses this pattern; Whether be IE browser, if then use the incident binding pattern of IE if detecting then; Be to use the incident binding pattern of DOM0 level method at last, be used for the browser of compatible legacy version.Through processing respectively to these three kinds of concrete conditions, addEventHandler () guaranteed can both be correct under the browser environment of present main flow mapping incident and event response function.According to same thinking, EventUtil has realized a removeEventHandler () method in addition again, thereby has accomplished the event processing mechanism of " interactive engine " needed compatible browser.
MessageCenter is as the acceptance of message and distribute the center, has isolated the generation of message and the processing code of message, the complexity of the code that reduces greatly, the code testability and the robustness of raising.MessageCenter is that basic DOM message, UIComponet message, user self-defined message provides consistent event processing mechanism, thereby is that the interaction capabilities of expanding browser provides a good solution with the otherness that shields browser.
FDEvent is abstract to the DOM event message of each browser and user self-defined message, and has realized meeting the interface of W3C standard.When generating message, the different events classes of messages of each browser is packaged into unified FDEvent, thereby guarantees that follow-up message transmission and message processing procedure only need be by unified interface operations, and need not to consider the otherness of browser.
Between the browser and IE browser of compatible DOM, the property of there are differences just on the attribute of the transmission of Event object and object.The object accesses mode that at first is both is different.The browser of compatible DOM can import an Event object in the button.onrelease into, and the access mode of the Event object of IE browser is confirmed according to the binding mode of event response function.EventUtil provides the interface of a getEvent, returns the unified FDEvent of interface, supplies flow to use.Next is that both are different to the processing of incident target; The object of the Event of IE is preserved the target of incident with the srcElement attribute; EventUtil gives the eventTarget attribute of FDEvent the target assignment of incident in inside, thereby has shielded the otherness of browser.
KeyEventHandler provides unified operation mechanism for all KeyEvents.Each browser is complicated more to the processing otherness of KeyEvent, comprises that all there are implementation separately in the type of KeyEvent, the parameter of KeyEvent.The type of KeyEventHandler internal condition browser is handled conversion to the KeyEvent of all kinds of browsers and event argument respectively, and unified operation-interface externally is provided.The unified interface that " interactive engine " provides through KeyEventHandler just can be in the keyboard operation of process user in an identical manner of each browser.
In the keypress of keyboard incident, the event object of FireFox, Chrome and Safari all has a charCode attribute, is storing the ASCII character of that key representative of pressing, and IE and Opera then are the ASCII characters of in the keyCode attribute, preserving character.KeyEventHandler obtains correct character ASCII character through detecting browser type, is kept in the FDEvent object, offers follow-up incident response procedure visit.
The UIControl class directly responds user's input, comprises all keyboards and mouse action.For interface content and the action of isolating browser, the realizing of UIControl class with the MVC pattern.Wherein, the Model-View-Control of CtrlState-CtrlRender-CtrlCenter difference correspondence and MVC pattern.CtrlState comprises the State and abundant self-defined State of basic DOM, and self-defining State has effectively expanded the interactivity of UIControl.CtrlRender makes full use of up-to-date HTML technology and CSS technology, has realized abundant bandwagon effect.CtrlCenter safeguards the state of UIControl as processing enter, and bears the communication task with message center.
The UIContainer class realizes the container assemblies on the interface, such as menu bar, Tab hurdle as the base class of UI container.Container assemblies comprises one group of daughter element with consistent behavior, and the behavior of unified management daughter element and message.
The preferred embodiment of the present invention disclosed herein just is used for helping to set forth the present invention.Preferred embodiment does not have all details of detailed descriptionthe, does not limit this invention yet and is merely described embodiment.Obviously, according to the content of this instructions, can do a lot of modifications and variation.These embodiment are chosen and specifically described to this instructions, is in order to explain principle of the present invention and practical application better, thereby makes one of ordinary skill in the art can utilize the present invention well.The present invention only receives the restriction of claims and four corner and equivalent.