A kind of third party database APP constructing system and construction methodTechnical field
The present invention designs a kind of third party database APP constructing system and construction method thereof.
Technical background
Rapid emergence due to electronic office and mobile office, some are the personnel in mobile status often, and the sales force who for example often goes on business, in nonlocal corporate operations personnel, the fragment time is more, utilizes mobile phone A PP to carry out the strong needs that mobile office becomes these personnel.
Mobile middleware is as the cross-platform scheme of a kind of effective solution Enterprise Mobileization, is that a kind of Neng Wei enterprise realizes the solution that fast existing PC project is converted into the App of smart mobile phone operation.But the problem below traditional mobile middleware exists in solution and PC project (third party's operation system).
1, existing software does not provide open interface.The fundamental purpose of mobile middleware is that solution is cross-platform, fast Development is disposed and the integrated problem of existing business platform, and the mobile middleware of market is based on traditional development mode, as third party's operation system does not provide interface very difficult integrated at present.Enterprise Mobile App relies on existing operation system conventionally, cannot be integrated with third party, and enterprise may face the difficulty of mobile information.
2 and existing software interface can not slitless connection.The interface that present existing software provides is such as the mode of WebService, and mobile middleware need to could offer App data after the open repacking of service end.
3, small-sized App does not have service end operation system, only has database.Little App does not often have the exploitation of service end, only needs database and customer end A pp, and current mobile middleware cannot solve, and must develop the background service of a set of database access.
Summary of the invention
The invention provides a kind of third party database APP constructing system and construction method thereof, can compatible multiple third party database, directly go to read third party database data, and realization is configured to mobile phone A PP by three party databases fast, and the process building is simple, do not need professional APP programming personnel, only need to understand that the personnel of general networking knowledge just can complete the work that APP builds, for enterprise's saving technique drops into.
The present invention realizes by following technological means:
A kind of third party database APP constructing system, comprise database read module, data conversion module, APP generation module, described database read module arrives data conversion module by data conversion storage after reading third party database, described data conversion module is converted into the data of described unloading the normal data of cell phone system identification, described normal data is xml/json data source form or metadata, described normal data is sorted in a plurality of different functional modules, and described functional module is the functional module that can show in APP.
Further, described database read module comprises data adapter unit and business plug-in unit loader, prestores one or more type of database in described data adapter unit, and described type of database is Oracle, MS SQL Server, MySQL; Business plug-in unit loader can install additional based on one or more in Web Service, WCF .net procedure set Dll, java jar bag and carry out the loading of third party database data-interface.
Further, described data conversion module comprises data transformation engine, and the data that described data transformation engine loads data loader are converted into metadata and data base querying file.
Finally, described APP generation module comprises MSC server and Integrated Development Environment, and APP is developed by Integrated Development Environment and is published to MSC server.
A method of rapid build APP based on aforementioned system, first by database read module and data source binding; Then reading out data, and the selected data that show; Then create mobile phone interface, and drag selected data to be displayed on the mobile phone interface creating; Finally generate and issue APP.
Further, described mobile phone interface comprises Android cell phone system interface and IOS cell phone system interface.
Finally, the process of described database read module and data source binding is for to carry out Data Matching by data adapter unit, by business plug-in unit loader loading third-party operation system DII, reflects or third party's operation system WebSerice interface access third party's operation system.
Third party database APP constructing system by above realization is can be directly compatible and read multitype database, and be APP by read third party database rapid conversion, remove from and build the special mobile middleware of third party database or the drawback of private access platform, and the personnel that only need to possess general networking knowledge can rapid build APP, avoid engaging that professional's is expensive.
Accompanying drawing explanation
Fig. 1 is for changing into third party database the system construction drawing of APP;
Fig. 2 is the process schematic diagram that third party database generates APP.
Embodiment
Below with reference to accompanying drawing, the concrete implementation procedure of the present invention is described in detail.
In the present embodiment, said third party database refers to the database of being developed by third-party vendor, for example conventional ERP system, goods entry, stock and sales Web system, the OA system of enterprise.
A kind of third party database APP constructing system, third party database rapid conversion can be become to APP, as shown in Figure 1, comprise database read module, data conversion module, APP generation module, described database read module arrives data conversion module by data conversion storage after reading third party database, the data that described data conversion module reads third party database are converted into the normal data of cell phone system identification, described normal data is xml/json data source form or metadata, described normal data is sorted in a plurality of different functional modules, described functional module is the functional module that can show in APP.
Specifically, as shown in Figure 2: described database read module comprises data adapter unit and business plug-in unit loader, in described data adapter unit, prestore one or more type of database, described type of database is one or more in Oracle, MS SQL Server, MySQL; Business plug-in unit loader can install additional based on one or more in Web Service, WCF .net procedure set Dll, java jar bag and carry out the loading of third party database data-interface.Described data conversion module comprises data transformation engine, and the data that described data transformation engine loads data loader are converted into metadata and data base querying file.The database that data adapter unit is accessed according to predefine, the required accessing database access component of Auto-matching, data transformation engine is converted to xml/json data source form or metadata by data; And generating database inquiry file, described data base querying file can be checked by MSC the visual design device; Described xml/json data source form or metadata through data transformation engine conversion uploads to after MSC server, can generate APP by APP maker, and its process is: by APP designer, by selection, undertaken on selected Android or i Phone, selecting to show.
The method of setting up APP is, by database read module and data source binding; Reading out data, and the selected data that need to show in APP; Thereby select Mobile phone interface to create mobile phone interface, described mobile phone interface comprises Android system mobile phone interface and IOS system mobile phone interface, drag selected data to be displayed on the mobile phone interface creating in mobile phone interface storehouse; Generate and issue APP.The process of described database read module and data source binding is for to carry out Data Matching by data adapter unit, by business plug-in unit loader loading third-party operation system DII, reflects or third party's operation system WebSerice interface access third party's operation system.
During use, from the design editing interface of system, set up accessing database and connect, use ADO.Net direct-connected, after successful connection, comprising type of database, after interior link information is encrypted, be saved in project profile.
From database, obtain database structure information, database table, view and storing process are added to data base administration Views tree; A newly-built inquiry or the right button of clicking the mouse on object are opened object, described object can be table, view or storing process, in design editing interface workspace, set up a SQL query editing machine, SQL is the abbreviation of Structured Query Language, both Structured Query Language (SQL) can be revised query statement and parameter in SQL query editing machine.Click query analysis button, verify and return to SQL statement execution result, return and comprise query argument, field and execution result value; Preserve SQL query file; In Design view, add data source, data source record data derive from database or third party's business interface, if specified database, data source can be specified above built SQL query file also, and the result field in inquiry file, parameter are loaded in internal memory.Design view control property window can be selected the field of newly-built data source.Preserve Design view code, the SQL query fileinfo that code packages is quoted containing data source.
During release product, select issue type: the local IIS Express of default publications Web server, and automatically configure IIS Express for can remote access, the MSS service that comprises data-switching, database adaptation, third party's business loading service, data link information, SQL query file is published under IIS Express website.MSS is the abbreviation of Mobile Smart Service, i.e. intelligent movable service end.Compiling generates App, and the App of generation comprises js code, view layout's file, is connected to IIS ExpressWeb server address.
Install after App starts and read js code from bag, view layout's file, structure App interface also shows, construction process is according to the data source information in view file, the SQL query filename of data source configuration and parameter value are submitted to MSS service, MSS service loads data link information, according to data link information type of database, create corresponding data adapter unit, again SQL query file and parameter value combination are passed to data adapter unit, database adapter is packaged as XML or Json rreturn value after carrying out SQL statement, turn back to MSS service, MSS service turns back to App data source execution result, App data source is notified the control that is associated with data source field after receiving data, control fetches data and is presented to App interface according to own required field from data source.
Below realize third party database and generate fast APP and run to intelligent terminal, the staff of mobile office can pass through the database data of APP visited company, works accordingly.By the present invention, third party database is generated to modularization, the simplification of the work change of APP, the personnel that do not possess specialty programming knowledge can be competent at, effectively saved time and the cost of making APP.