Generating Web Builder Projects
Web Builder creates Web applications and objects (Java beans and a .NET class library) that provide Web and application developers programmatic access to host data and functionality. Programmers use these generated Web applications to test models of host applications, to prototype a Web application that accesses host data, and to generate sample code for incorporating host data into their Web or client/server applications.
Using the Host Integrator Model
Using Web Builder, you can work with models that are deployed on any Host Integrator server or domain that is accessible from the network, on a local Host Integrator server, or with an .xml model file that has been exported from the Design Tool
Project Types
Using a Host Integrator model, you can build either a ready-to-use Web application project, or use objects that provide developers with the building blocks necessary to create their own custom applications.
There are two current project types; applications and objects. The different project types provide:
- An HTML 5 Web application that is optimized, not only for the desktop, but for mobile devices. You can access 3270 or 5250 terminal sessions from the Windows Start menu; you do not have to open the Verastream Design Tool. Simply click 3270 (5250) Terminal Session. The HTML 5 Web application provides increased terminal funtionality including Hotspots, improved Aid key usage, and increased screen display space.
- A choice of Java bean or a .NET class library to provide programmatic access to information residing on the host.
- Host functionality exposed using tables and procedures that can span multiple host screens and applications.
- The level of abstraction necessary to create new applications that are independent of the existing host application work flow.
A third project option is legacy Java and .NET Web applications.
Web Application Projects
Web Builder projects provide a wide range of customization for the presentation and flow of the Web application you create. Web applications are complete and ready-to-use or you can modify them using Web/HTML development and design tools. Web application projects can:
- Expose both procedures and screen funtionality in one Web-based presentation
- Gather procedure inputs via input forms and display outputs as tables
- Rejuvenate both modeled and unmodeled screens
- Modeled screens can be displayed as HTML-based forms or as a simulated host screen
- Unmodeled screens are displayed as simulated host screens
- Generate a project capable of automatically rejuvenating entire host applications by only specifying connection information (no entities) in the model
When you build a Web application project you can choose to include all screens, as well as all procedures, to provide navigation through the host application.
Objects
Web Builder wraps the model functionality into a reusable service that application developers can access through the object. These objects include:
- .NET (C#) Class Library Routines that can be used by .NET programmers to access host data through the Host Integrator model.
- Java beans Components that can be incorporated into Java-based applications.
User-Defined Project Types
Web Builder uses project types to define and generate project files. By creating your own user-defined project types, you can build consistent-looking projects from the same customized project type.
On the Options menu, click User-Defined Project Types to view any user-defined project types. To create a new project type, click New on the User-Defined Project Types dialog box.
Steps to build a Web project
To generate a project:
-
In Web Builder, click Project > New (or click New) to open the New Project dialog box.
-
Click the tab (Application, Object, or Legacy) corresponding to the type of project you want to generate.
-
Select the Host Integrator model or session name you want to use to generate the project. Models or session names are available as options after you have deployed them in the Verastream Host Integrator Design Tool.
-
A project name is automatically generated. You can change the name of the project. The name you enter here is used to generate folder and file names. Web Builder may alter this name to accommodate your operating system. For example, an underscore is used if spaces are not allowed, and numbers are appended to projects with the same name.
- Set properties and build the project:
- To use default settings, click Build on the New Project dialog box to generate the project.
- To set specific properties for this project, click Properties and change the settings in the Project Properties dialog box. Click Build to generate the project.
As Web Builder generates the project, the Build Project window displays information about the success or failure of the project generation process.
Rebuilding a project
The build process generates the project files. If you change the project settings and properties, the project is automatically rebuilt to incorporate those changes. Anytime you rebuild a project, the project files are overwritten from the starting point of the rebuild process.
During the testing of a project, you may rebuild a project many times. After you put the project into production, rebuilding a project may overwrite files you have modified. If you have modified the generated code, select to rebuild the project from the compiling project step. This compiles and deploys the project without overwriting your changes. However, if the model changed, you need to completely rebuild the project to pick up the changes in the model.
To rebuild a project:
- In Web Builder, select the project to rebuild and on the Project menu, click Rebuild to open the Rebuild Project dialog box.
- Select one of the processing steps as the starting point for the build. The processing steps vary depending on the type of project you are rebuilding.
- Click Build.
During the rebuild process, Web Builder detects any modified files and creates a backup folder in the project folder. Depending on the type and scope of your modifications, you can select to:
-
Keep your changes
Select this option if you have made complex modifications; use the file in the backups folder to manually update your modified file with any features that may have been overwritten.
-
Discard your changes
Select this option to use the original file generated by Web Builder; use the file saved in the backups folder to copy your modifications into the original file.
-
Apply to all modified files
To avoid multiple prompts for keeping or discarding changes as the build proceeds, select this option.
To rebuild a project from the command line
You can rebuild a project without opening Web Builder by using the command line option. Before proceeding, verify that JAVA_HOME is set to a Java 7 or higher JDK. You can point JAVA_HOME to the JDK that is installed with Host Integrator which is located here <install-location>\java\jdk1.8.x.
Open a command line prompt in the project directory of the Web application you want to rebuild. For example:
C:\Users\<user>\Documents\RocketSoftware\Verastream\HostIntegrator\projects\<project>
where <user>
is the name of the person who generated the application and <project>
is the name of the project you want to rebuild.
At the command prompt, type:
<install-location>\HostIntegrator\ant\bin\ant.bat -lib
"<install-location>\HostIntegrator\lib\webbuilder\coreplugins;<install-location>\HostIntegrator\
lib\webbuilder" -Dparent.dir=. -Dautorun=false
where <install-location>
is the directory where the product is installed.
Creating new project types
Instead of using the project types available from Web Builder, you can create your own project type that will be available to use with subsequent new projects. When you create a new project type, you can customize the way Web Builder generates a project.
-
Open Web Builder, click Options, and then User-defined Project Types.
-
On the User-defined Project Types dialog box, click New.
-
From the Copy this project type list, select the project type that will be the template for your new project type.
-
Enter the name and description for the project type.
-
Click Build.
To modify the project type:
After creating a new project type, you can modify the files that are used to build the project. The resources folder contains files that you can modify for each project.
-
In the User-Defined Project Types dialog box, select the project type you want to modify, click Explore. The
<Documents>\RocketSoftware\Verastream\HostIntegrator\userpluginprojects
folder is now accessible. -
Make changes to the files in the subfolders in the Resources folder:
- UI — To change the icons
- tasks — To change xsl
- project — To recreate build.xml, an ANT build file
-
In the User-Defined Project Types dialog box, select your new project type and click Rebuild to incorporate the changes into the new project type.
Keyboard mapping for Web applications
You can map your keyboard so specific workstation keyboard keys will function as terminal keys for a host application. Keyboard mapping is available for Java or .NET Web applications.
You can implement keyboard mapping after a project is built, or incorporate it into a User-Defined Project Type, which can be used to build subsequent Web applications using the same keyboard map