O
Ollie
Guest
It's basic HTML/JavaScript/CSS with the use of Ajax. There are no bells and whistles to it. 1. This mock-up had to be flexible, so all of it runs on a regular work station. 2. The Corticon server runs on the same system and contains a published service. 3. The front-end has only one HTML file, that includes all the JavaScript. The scripts are saved in separate files though. 4. A Javascript called "ajaxer.js" handles the xml request and response, completely built with standard ajax. You can find more details about ajax and how to use it on w3schools.com. (5. I searched for a SOAP client for ajax, but nothing was simple enough for a proof of concept and I haven't done much development in years.) 6. I exported a Corticon SOAP request and a response through the Corticon Studion test sheet. This gave me all that I needed to know about Corticon's SOAP message structures. this function enables you to save the SOAP messages as XML files. That way you know exactly what the structure looks like. There are tools that you can use too, such as SOAP-UI and I'm sure that Eclipse and NetBeans have features, but if all else fails or if you're used to vi and shell scripts, exporting files from the test sheet is a sure thing. 7. It's the easiest to pull the SOAP request apart and hard-code the SOAP-envelope, while using variables to keep things flexible. This is just for demo purposes, so we keep things as simple as we can. The SOAP xml files that are described in step 6 consist of several segments. Most important are the envelope and the payload. The envelope is mostly (all) the same with every request. Your javascript can have that part in a string-variable. The structure and payload depend on your decision service and the information you send to Corticon. Using the request file from step 6 you will know exactly how to structure your request SOAP. You also need to know what Corticon returns, so that you can write the javascript that will transform the response into web-content. (I built a demo that had fixed data in the request and it packed a punch, delivering us project requests and high visibility very quickly.) 8. My first PoC was with a simple temperature converter. I had built a small decision service for that. It takes a number of degrees and a scale (F or C) as input and outputs the degrees and opposite scale (C or F). 9. For the temperature converter I had a form on the web page to enter the number of degrees and pick the scale from a drop down. 32 F would then return 0 C and 25 C would return 77 F. 10. JavaScript takes the values entered into the form and wraps it into xml, puts that into a SOAP envelope and sends the request. 11. When the response comes back, all the relevant information is taken out and put into business objects. 12. The business model has its own javascript file. 13. The business model contains all the classes that represent the business objects, such as a class for temperature. 14. The user interface model also has its own file. It contains all the classes that create the user experience, such as dialogs and buttons. 15. CSS tops it all off with a nice design, enriched with images. (also in a separate file)
Continue reading...
Continue reading...