Skip to content

UserGuide_RichClient

nishi_74322014 edited this page Nov 3, 2026 · 1 revision

Open Touryo UserGuide (Rich Client Edition)

This is a English page.
Click here for Japanese version of this file.

Updated in July 2026

Introduction

Target audience

  • SEs and developers who develop applications with Open Touryo

Overview

This document summarizes how to use the functions for rich clients.

Trademarks

Company names and product names in this document are trademarks or registered trademarks of their respective companies.

Legend in the figures: red frame = must be implemented, red frame (dashed) = requires attention when implementing, blue text = can be implemented freely.

Table of contents

1. P layer base classes for Windows Forms

2. Asynchronous calls

3. Asynchronous events

4. C/S 2-tier applications

5. Web deploy component

6. General-purpose DTO for Silverlight integration

1. P layer base classes for Windows Forms

1.1 Preparing the "screen code parent class 2" (for leaders)

The "screen code parent class 2", which is the P layer base class for Windows Forms, can implement the following common P layer processing.

Table 1.1 Common P layer processing that can be implemented in the "screen code parent class 2"

No. Processing Method Section
1 Initial processing (page load processing) UOC_CMNFormInit (custom authentication, authority check, blockade check, page title setting, access log output, etc.) Section 1.1.1
2 Pre- and post-processing of P layer event processing: start processing UOC_PreAction (measuring processing time, outputting access logs, etc.) Section 1.1.2
3 End processing UOC_AfterAction (measuring processing time, outputting access logs, etc.) Section 1.1.2
4 Exception handling UOC_ABEND (message editing, common message display, access log and error log output, etc.) Section 1.1.3

Basically, one "screen code parent class 2" is created per system. The sample is in ~\root\programs\C#\Samples\WS_sample\WSClient_sample (you can refer to the "MyBaseControllerWin" class).

#region using
// System~
using System;
~
using Touryo.Infrastructure.Business.Util;
#endregion
namespace Touryo.Infrastructure.Business.RichClient.Presentation
{
  /// <summary>Screen code parent class 2 (Windows application)</summary>
  /// <remarks>Can be used freely (by overriding).</remarks>
  public class MyBaseControllerWin : BaseControllerWin
  {
    // ↑Removed abstract because the VS designer does not work with it.
    /// <summary>User information</summary>
    /// <remarks>Used from the screen code parent class 2 and the screen code class.</remarks>
    protected static MyUserInfo UserInfo = new MyUserInfo("-", Environment.MachineName);
    
    /// <summary>Flag for whether log output is possible</summary>
    /// <remarks>
    /// Log output may not be possible in an automatic deployment
    /// environment, so use this in that case.
    /// </remarks>
    protected static bool CanOutPutLog = true;
    
    /// <summary>Performance measurement</summary>
    private PerformanceRecorder perfRec;

Figure 1.1 Implementation template of the "screen code parent class 2"

※ Common UI implementations can also be added to the "MyBaseControllerWin" class, but note that the VS designer cannot be used because the "BaseControllerWin" class of the "screen code parent class 1" is specified as abstract.

1.1.1 Implementing "page load processing"

"Page load processing" must be implemented. Override the "UOC_CMNFormInit" method in the "screen code parent class 2" and implement custom authentication, authority check / blockade check, page title setting, access log output, etc.

/// <summary>UOC method for page load</summary>
/// <remarks>Must be implemented</remarks>
protected override void UOC_CMNFormInit()
{
 // Implement the processing to run at form initialization (first load)
 // TODO:
}

Figure 1.1.1 Implementation example of "page load processing"

1.1.2 Implementing "start and end processing of P layer event processing"

Override the "UOC_PreAction" and "UOC_AfterAction" methods in the "screen code parent class 2" and implement measuring processing time, access log output, etc.

#region UOC methods for start and end processing of the framework's target control events
/// <summary>Implements the start processing of the framework's target control events</summary>
/// <param name="fxEventArgs">Common argument of the event handler</param>
protected override void UOC_PreAction(FxEventArgs fxEventArgs)
{
 // Implement the start processing of the framework's target control events
 // TODO:
}
/// <summary>Implements the end processing of the framework's target control events</summary>
/// <param name="fxEventArgs">Common argument of the event handler</param>
protected override void UOC_AfterAction(FxEventArgs fxEventArgs)
{
 // Implement the end processing of the framework's target control events
 // TODO:
}
#endregion

Figure 1.1.2 Implementation example of "start and end processing of P layer event processing"

1.1.3 Implementing "exception handling"

Override the following three "UOC_ABEND" methods in the "screen code parent class 2".

Table 1.1.3 The three "UOC_ABEND" methods that can be implemented in the "screen code parent class 2"

No. Corresponding exception Method signature
1 Business exception UOC_ABEND(BusinessApplicationException baEx, RcFxEventArgs rcFxEventArgs)
2 System exception UOC_ABEND(BusinessSystemException bsEx, RcFxEventArgs rcFxEventArgs)
3 Other general exceptions UOC_ABEND(Exception ex, RcFxEventArgs rcFxEventArgs)
  • Exception handling of business exceptions: Not rethrown after processing. "Message editing" and "common message display" can be implemented.
// <summary>Implements the processing when a business exception occurs</summary>
/// <param name="baEx">BusinessApplicationException</param>
/// <param name="rcFxEventArgs">Common argument of the event handler</param>
protected override void UOC_ABEND(BusinessApplicationException baEx, RcFxEventArgs rcFxEventArgs)
{
 // Implement the processing when a business exception occurs
 // TODO:
}

Figure 1.1.3-1 Implementation example of "exception handling of business exceptions"

  • Exception handling of system exceptions: The "system exception" is rethrown after processing. "Error log output" can be implemented.
/// <summary>Implements the processing when a system exception occurs</summary>
/// <param name="bsEx">BusinessSystemException</param>
/// <param name="rcFxEventArgs">Common argument of the event handler</param>
protected override void UOC_ABEND(BusinessSystemException bsEx, RcFxEventArgs rcFxEventArgs)
{
 // Implement the processing when a system exception occurs
 // TODO:
}

Figure 1.1.3-2 Implementation example of "exception handling of system exceptions"

  • Exception handling of other general exceptions: Rethrown after processing. "Error log output" can be implemented.
/// <summary>Implements the processing when a general exception occurs</summary>
/// <param name="ex">Exception object</param>
/// <param name="rcFxEventArgs">Common argument of the event handler</param>
protected override void UOC_ABEND(Exception ex, RcFxEventArgs rcFxEventArgs)
{
 // Implement the processing when a general exception occurs
 // TODO:
}

Figure 1.1.3-3 Implementation example of "exception handling of other general exceptions"

1.1.4 Adding controls (events) supported by P layer event processing

The P layer event processing function of this framework supports the events (five) of the following controls [1].

Table 1.1.4 Control events supported by the P layer event processing function

No. Control Event
1 Button (including hidden buttons) Click event
2 PictureBox
3 ComboBox SelectedIndexChanged event
4 ListBox
5 RadioButton CheckedChanged event

To add events, implement extension processing of the P layer event processing function in the "screen code parent class 2" of the business framework (Business) namespace. However, since rich clients have many events, some ingenuity is also needed, such as raising a Click event with the DoClick method of a hidden button (HiddenButton) from a standard .NET event handler (this can also be used as a way to support multiple events, multicast events, etc.). First, call the "addControlEvent" method of "event addition processing" from the "page load processing" of the "screen code parent class 2".

Figure 1.1.4 Calling "event addition processing" from the "page load processing" of the "screen code parent class 2"

The processing implemented in the "addControlEvent" method uses the same processing method as chapter 7 of the Leaders edition: "Adding controls (events) supported by P layer event processing".

1.2 Developing the "screen code class" (for developers)

Add the Windows Form "screen code class" to the project and implement the processing.

// System~
using System;
~
using ProjectName.Infrastructure.Business.Util;
public partial class Form1 : MyBaseControllerWin
{
}

Figure 1.2 Implementation template of the "screen code class"

  • Implementing page load processing: Override the "UOC_FormInit" method in the "screen code class".
/// <summary>UOC method for page load (individual: first load)</summary>
/// <remarks>Must be implemented</remarks>
protected override void UOC_FormInit()
{
 // Implement the processing to run at form initialization (first load)
 // TODO:
}

Figure 1.2.1 Implementation example of "page load processing"

  • Implementing "event processing of controls":
    1. Place a control ([prefix]anyString) on the Windows Form (the prefix is defined in app.config as with the ASP.NET P layer). (Figure 1.2.2-1)
    2. Implement the UOC method UOC_[prefix]anyString_Click in the "screen code class". The signature of the event handler is protected string eventHandlerName(RcFxEventArgs rcFxEventArgs).
<!-- Control prefixes -->
<add key="FxPrefixOfButton" value="btn"/>
<add key="FxPrefixOfPictureBox" value="pbx"/>
<add key="FxPrefixOfComboBox" value="cbb"/>
<add key="FxPrefixOfListBox" value="lbx"/>
<add key="FxPrefixOfRadioButton" value="rbn"/>

Figure 1.2.2-1 Example of defining control prefixes

protected void UOC_btnButton_Click(RcFxEventArgs rcFxEventArgs)
{
 // TODO:
}

Figure 1.2.2-2 Implementation example of a control event in the "screen code class"

protected void UOC_testControl_btnButton_Click(RcFxEventArgs rcFxEventArgs)
{
 // TODO:
}

Figure 1.2.2-3 Implementation example of a control event on a "user control"

1.3 Custom control templates

Custom control templates are provided under [C#\Frameworks\Infrastructure\CustomControl\RichClient], and you can customize them to create custom controls for your project. The targets are TextBox and MaskedTextBox, and they include custom implementations of check and edit processing. The usage sample is [\C#\Samples\2CS_sample\CustCtrl_sample]. Simply changing the design-time properties of VS customizes the behavior of the check and edit processing.

Figure 1.3-1 Design-time properties of each custom control

Table 1.3 Design-time properties of each custom control

No. Property Description Remarks
1 CheckRegExp Regular expression check Common to TextBox / MaskedTextBox
2 CheckProhibitedChar Prohibited character check
3 CheckType Check type (IsIndispensabile required / IsHankaku half-width / IsZenkaku full-width / IsNumeric numeric / IsKatakana katakana / IsHanKatakana half-width katakana / IsHiragana hiragana / IsDate date)
4 EditPadding Padding edit TextBox only
5 EditDigitsAfterDP Edit to x digits after the decimal point
6 EditAddFigure Digit grouping edit (PadDir pad direction / PadChar pad character)
7 Mask_Editing Mask applied during editing MaskedTextBox only
8 Text2 Gets the value with the Mask applied / the value without the mask TextBox / MaskedTextBox
9 Text3 Gets the value with Mask_Editing applied MaskedTextBox only

The custom control templates have events (Enter: start editing + select all, Validating: single item check, Validated: end editing) and methods (Validate, GetDateTime, GetDecimal, GetDouble, GetFloat, GetInt16/32/64) embedded. Batch check processing can easily be implemented using the CmnCheckFunction.HasErrors method, and check error information is returned as List<CheckResult>.

/// <summary>Test of batch check</summary>
private void button1_Click(object sender, EventArgs e)
{
  string ret = "";
  List<CheckResult> lcr = new List<CheckResult>();
  if (CmnCheckFunction.HasErrors(this, lcr))
  {
    foreach (CheckResult cr in lcr)
    {
      ret += cr.CtrlName + "\r\n";
      foreach (string checkErrorInfo in cr.CheckErrorInfo)
      {
        ret += "・" + checkErrorInfo + "\r\n";
      }
      ret += "\r\n";
    }
  }
  MessageBox.Show(ret);
}

Figure 1.3-2 How to implement batch check processing

2. Asynchronous calls

Asynchronous calls can be used from rich client applications of both Windows Forms and WPF.

2.1 Preparing the "asynchronous call code parent class 2" (for leaders)

Table 2.1 Common processing that can be implemented in the "asynchronous call code parent class 2"

No. Processing Method Section
1 Pre- and post-processing of asynchronous call processing: start processing UOC_Pre (measuring processing time, outputting access logs, etc.) Section 2.1.1
2 End processing UOC_After (measuring processing time, outputting access logs, etc.) Section 2.1.1
3 Exception handling UOC_ABEND (access log and error log output, etc.) Section 2.1.2
4 Final processing UOC_Finally (end processing, etc.) Section 2.1.2

You can refer to the "MyBaseAsyncFunc" class as a sample.

#region using
// System~
using System;
~
using Touryo.Infrastructure.Business.Util;
#endregion
namespace Touryo.Infrastructure.Business.RichClient.Asynchronous
{
  /// <summary>
  /// Asynchronous code parent class 2
  /// </summary>
  public class MyBaseAsyncFunc : BaseAsyncFunc
  {
    /// <summary>Constructor</summary>
    /// <param name="_this">Element of WPF or WinForm</param>
    public MyBaseAsyncFunc(object _this) : base(_this) { }
    ・・・

Figure 2.1 Implementation template of the "asynchronous call code parent class 2"

  • Implementing start and end (Figure 2.1.1)
/// <summary>Start processing</summary>
protected override void UOC_Pre()
{
  // Implement the start processing
  // TODO:
}
/// <summary>End processing</summary>
protected override void UOC_After()
{
  // Implement the end processing
  // TODO:
}

Figure 2.1.1 Start and end processing of the "asynchronous call code parent class 2"

  • Implementing exception and final processing: The final processing (UOC_Finally method) is paired with the start processing (Start and StartByThreadPool methods) and performs "thread count management" and "screen lock management". The number of threads is defined in app.config.
/// <summary>Exception handling</summary>
protected override void UOC_ABEND(Exception ex)
{
  // Implement the exception handling
  // TODO:
}
/// <summary>Final processing</summary>
protected override void UOC_Finally()
{
  // Implement the end processing
  // TODO:
}

Figure 2.1.2-1 Exception and final processing of the "asynchronous call code parent class 2"

<add key="FxMaxThreadCount" value="3"/>

Figure 2.1.2-2 Example of defining the number of threads

※ This processing part is a critical section, but in the critical section inside the final processing (UOC_Finally) executed on the asynchronous thread, take care not to make synchronous calls via the main thread such as Control.Invoke or Dispatcher.Invoke (to prevent deadlocks).

2.2 How to implement asynchronous call processing (for developers)

Asynchronous call processing is implemented in the event handlers of a Windows Forms Form or a WPF Window.

/// <summary>Asynchronous execution</summary>
private void UOC_btnASync_Click(RcFxEventArgs rcFxEventArgs)
{
  MyBaseAsyncFunc af = new MyBaseAsyncFunc(this);
  
  // Main body of the asynchronous processing: anonymous function delegate
  af.AsyncFunc = delegate(object param)
  {
    ・・・Time-consuming processing (executed on a secondary thread)・・・
    // Progress report
    af.ExecChangeProgress("argument passed to the progress report");
    ・・・Time-consuming processing (executed on a secondary thread)・・・
    return "End";
  };
  
  // Progress report: anonymous function delegate
  af.ChangeProgress = delegate(object param)
  {
    ・・・Progress display processing (executed on the main thread)・・・
  };
  
  // Result setting: anonymous function delegate
  af.SetResult = delegate(object retVal)
  {
    if (retVal is Exception)
    {
      // When an exception occurs
      ・・・Exception information display processing (executed on the main thread)・・・
    }
    else
    {
      ・・・Result display processing (executed on the main thread)・・・
      // To control focus,
      this.BeginInvoke(new MethodInvoker(this.SetForcus));
    }
  };
  
  // Start the asynchronous processing.
  if (af.Start())
  {
    // The asynchronous processing was queued.
    // The number of threads can be checked with BaseAsyncFunc.ThreadCount.
  }
  else
  {
    // The asynchronous threads reached the maximum number.
    // The number of threads can be checked with BaseAsyncFunc.ThreadCount.
  }
}

Figure 2.2 Implementation example of asynchronous call processing

※ Delegates of C# anonymous functions (closures) are used, but they cannot be used in VB, so define normal methods and delegate them with the AddressOf operator. In VB, local variables cannot be used through lexical scope, so define the variables accessed from each processing as member variables.

3. Asynchronous events

Asynchronous events are a framework for implementing asynchronous event processing capable of inter-process communication using named pipe names, which can be used in Windows Forms, WPF and resident applications (connections of named pipe names are made on demand).

3.1 Initialization and termination of asynchronous events

Call the initialization method (first argument: the named pipe name of this side, second argument: string array of the named pipe names to connect to, third argument: wait time for connection (milliseconds)). For termination, call the termination method.

AsyncEventFx.Init("aaaa", new string[] { "bbbb", "cccc", "dddd", "eeee" }, 3000);

Figure 3.1-1 Initialization of asynchronous events

AsyncEventFx.Final();

Figure 3.1-2 Termination of asynchronous events

3.2 Registering and unregistering asynchronous events

Register with the AsyncEventFx.RegisterAsyncEvent method and unregister with the AsyncEventFx.UnRegisterAsyncEvent method. Set the following in the entry (AsyncEventEntry object).

  • Event class (AsyncEventEnum.EventClass): Select from Thread (thread function), ThreadPool (thread pool), WinForm (Control.BeginInvoke) and WPF (Dispatcher.BeginInvoke).
  • Function ID: The event name of the asynchronous event (0 to 36 characters).
  • Control: The control used for BeginInvoke when the event class is WinForm or WPF.
  • Event handler: The delegate that receives the asynchronous event and performs the processing.
// Registration entries

// Thread
this.AeeTh = new AsyncEventEntry(
 AsyncEventEnum.EventClass.Thread, "Thread", null,
 new ParameterizedThreadStart(this.ParameterizedThreadStartDgt));
AsyncEventFx.RegisterAsyncEvent(this.AeeTh);

// ---

// Thread pool
this.AeePl = new AsyncEventEntry(
 AsyncEventEnum.EventClass.ThreadPool, "ThreadPool", null,
 new WaitCallback(this.WaitCallbackDgt));
AsyncEventFx.RegisterAsyncEvent(this.AeePl);

// ---

// WinForm
this.AeeWin = new AsyncEventEntry(
 AsyncEventEnum.EventClass.WinForm, "WinForm", this,
 new AsyncEventFx.SetResultDelegate(this.SetResultDgt));
AsyncEventFx.RegisterAsyncEvent(this.AeeWin);

// ---

// WPF
this.AeeWPF = new AsyncEventEntry(
 AsyncEventEnum.EventClass.WPF, "WPF", this,
 new AsyncEventFx.SetResultDelegate(this.SetResultDgt));
AsyncEventFx.RegisterAsyncEvent(this.AeeWPF);

Figure 3.2-1 Registering asynchronous event entries

/// <summary>Delegate (thread)</summary>
private void ParameterizedThreadStartDgt(object obj) { }
/// <summary>Delegate (thread pool)</summary>
private void WaitCallbackDgt(object state) { }
/// <summary>Delegate (WinForm, WPF)</summary>
private void SetResultDgt(object result) { }

Figure 3.2-2 Signatures (delegate types) of event handlers of asynchronous events

3.3 Calling asynchronous events

Registered asynchronous events can be called with the call method (first and second arguments: event class + function ID of the destination, third and fourth arguments: event class + function ID of the source, fifth and sixth arguments: named pipe names, seventh and eighth arguments: data length of the transmitted data and the transmitted data (byte array)).

※ The header of the transmitted data is a binary representation of a C structure, so data can also be exchanged with C / C++.

/// <summary>Thread of bbbb</summary>
private void button1_Click(object sender, EventArgs e)
{
 byte[] bytes = BinarySerialize.ObjectToBytes(this.txtMSG.Text);
 AsyncEventFx.SendAsyncEvent(
 AsyncEventEnum.EventClass.Thread, "Thread",
 AsyncEventEnum.EventClass.Thread, "Thread",
 "aaaa", "bbbb", (uint)bytes.Length, bytes);
}
/// <summary>ThreadPool of cccc</summary>
private void button2_Click(object sender, EventArgs e)
{
 byte[] bytes = BinarySerialize.ObjectToBytes(this.txtMSG.Text);
 AsyncEventFx.SendAsyncEvent(
 AsyncEventEnum.EventClass.ThreadPool, "ThreadPool",
 AsyncEventEnum.EventClass.ThreadPool, "ThreadPool",
 "aaaa", "cccc", (uint)bytes.Length, bytes);
}
/// <summary>Control.BeginInvoke of dddd</summary>
private void button3_Click(object sender, EventArgs e)
{
 byte[] bytes = BinarySerialize.ObjectToBytes(this.txtMSG.Text);
 AsyncEventFx.SendAsyncEvent(
 AsyncEventEnum.EventClass.WinForm, "WinForm",
 AsyncEventEnum.EventClass.WinForm, "WinForm",
 "aaaa", "dddd", (uint)bytes.Length, bytes);
}
/// <summary>Dispatcher.BeginInvoke of eeee</summary>
private void button4_Click(object sender, EventArgs e)
{
 byte[] bytes = BinarySerialize.ObjectToBytes(this.txtMSG.Text);
 AsyncEventFx.SendAsyncEvent(
 AsyncEventEnum.EventClass.WPF, "WPF",
 AsyncEventEnum.EventClass.WPF, "WPF",
 "aaaa", "eeee", (uint)bytes.Length, bytes);
}

Figure 3.3 Calling asynchronous events

4. C/S 2-tier applications

The sample of the C/S 2-tier application is in ~\root\programs\C#\Samples\2CS_sample. In C/S 2-tier application development, the P layer framework (Windows Forms), the B layer framework (for C/S 2-tier) and the D layer framework can be used.

4.1 B layer framework for C/S 2-tier

  • Usage (inheritance): The "business code parent class 1" uses the class for C/S 2-tier, the "business code parent class 2" inherits it, and the "business code class" inherits that in turn.
namespace Touryo.Infrastructure.Business.Business
{
 /// <summary>
 /// Business code parent class 2
 /// </summary>
 public abstract class MyFcBaseLogic2CS : BaseLogic2CS
 {
namespace xxxx
{
 /// <summary>
 /// Overview of LayerB
 /// </summary>
 class LayerB : MyFcBaseLogic2CS
 {

Figure 4.1-1 Using (inheriting) the B layer framework for C/S 2-tier

  • Starting a transaction: Unlike the server side, the client side of C/S 2-tier does not commit or roll back each time but controls it manually. When the B layer is called, the MyFcBaseLogic2CS.UOC_ConnectionOpen method is called, so start the transaction here (it is not called if a DB connection has already been established).
// Create the B layer
LayerB myBusiness = new LayerB();
// Execute the business processing
TestReturnValue TestReturnValue =
 (TestReturnValue)myBusiness.DoBusinessLogic(
 (BaseParameterValue)testParameterValue, DbEnum.IsolationLevelEnum.ReadCommitted);

Figure 4.1-2 Specifying the transaction isolation level when calling the B layer

  • Ending a transaction: If DbEnum.IsolationLevelEnum.NoTransaction is specified, subsequent processing runs in autocommit transactions (Figure 4.1-3). For other isolation levels, commit and rollback are controlled manually (Figure 4.1-4). Use connection pooling [2] to reduce the DB connection / disconnection overhead.
// Close the connection
BaseLogic2CS.ConnectionClose();

Figure 4.1-3 Disconnecting the DB connection

// Commit
BaseLogic2CS.CommitAndClose();
// Rollback
BaseLogic2CS.RollbackAndClose();

Figure 4.1-4 Ending the transaction + disconnecting the DB connection

4.2 Required configuration

Some app.config parameters are required to use the B layer and D layer frameworks for C/S 2-tier (some parameters are unnecessary because some functions cannot be used compared with ASP.NET Web development). For the description of each parameter, see section 1.2 of the "Leaders edition".

<configuration>
 <appSettings>
 <!-- Parameters used by common components - start -->
 <!-- Path to the Log4Net configuration file -->
 <add key="FxLog4NetConfFile" value=".\Log\SampleLogConf.xml" />
 <!-- On / off of the performance log output function of the D layer -->
 <add key="FxSqlTraceLog" value="on" />
 <!-- On / off of the SQL statement cache function of the D layer -->
 <!-- Set to off by default in consideration of the development phase -->
 <add key="FxSqlCacheSwitch" value="off" />
 <!-- Specifies the encoding when loading SQL in the D layer (shift_jis, utf-8, etc.) -->
 <add key="FxSqlEncoding" value="shift_jis" />
 <!-- Specifies the CommandTimeout value of SQL in the D layer -->
 <add key="FxSqlCommandTimeout" value="30"/>
 <!-- Parameters used by common components - end -->
 <!-- Parameters used by the application - start -->
 <!-- Path to the SQL files -->
 <add key="SqlTextFilePath" value=".\Dao" />
 <!-- Parameters used by the application - end -->
 </appSettings>
 <connectionStrings>
 <!-- Connection string -->
 <add name="~" connectionString="~" />
 </connectionStrings>
 <system.web>
 ~
 </system.web>
</configuration>

Figure 4.2-1 Required configuration

5. Web deploy component

※ This component is discontinued because support for the ZIP library has ended (the source remains, so it can be modified and revived if necessary).

The Web deploy component is a tool that deploys executable modules to client terminals. Executable modules can be archived into multiple [ZIP files], and the information of the whole download set can be gathered in a [deployment manifest file]. Simply by specifying the URL of the [deployment manifest file] from the client, the whole set of executable modules can be deployed (downloading only differential ZIP files is also supported).

5.1 Creating a ZIP package

On the [Create Zip package] tab, enter [Folder] (to compress) and [File name] (compressed file name) and press the [Compress] button.

Figure 5.1 Creating a ZIP package

The key point is the state of the check box. When off (default), a folder with the same name as the ZIP file name is created directly under the installation directory and restored there (suitable for compressing per folder). When on, the structure is restored as is under the installation directory (suitable for placing multiple files and folders at once).

5.2 Creating a deployment manifest

On the [Deployment manifest] tab, specify the ZIP files, the [Installation directory] (environment variables can be used) and the [EXE name (path)] (comma-separated: launch check EXE, launch EXE [3]), and press the [Create manifest file] button.

Figure 5.2 Creating a deployment manifest

After creation, place the [deployment manifest file] and all the ZIP files in the same directory on the WWW server.

5.3 Web deploy

The [Deploy via HTTP] tab is the tab that deploys executable modules to client terminals.

Figure 5.3-1 Web deploy (run from the GUI)

This tool can also be run as a CUI, and you can check the help with the /HELP option.

Figure 5.3-2 Web deploy (running the CUI /HELP command)

For the URL of the WWW server, specify the URL of the [deployment manifest file], and enter the credential (authentication and qualification) information (user ID, password, domain name). When going through a proxy server, enter the URL and credential information of the proxy server (if no URL is specified, the IE settings are applied; specifying none means no proxy is used). The following config values can also be adjusted.

<!-- app.config -->
<!-- Multiplicity of asynchronous call processing (a setting of 2 or more is required) -->
<add key="FxMaxThreadCount" value="3"/>
<!-- Wait setting until the progress dialog closes (seconds) -->
<add key="PDWSleepSec" value="3"/>
  • MSGDefinition.xml: Adjusting the various display messages
  • Log4DeployZipPackWithHTTP.xml: Adjusting the log output settings (log4net)

Figure 5.3-4 Flowchart: flow up to starting the tool

Figure 5.3-5 Flowchart: flow up to updating and starting the application

6. General-purpose DTO for Silverlight integration

Discontinued. A JavaScript version may be made.

Footnotes

  1. The control events (five) supported by the P layer event processing function of rich clients.
  2. The connection pooling function of the data provider.
  3. Specify the launch check EXE and the launch EXE separated by a comma.
  4. Conventionally used in .NET when implementing data transfer processing.
  5. Row change status (DataRowState).

-End-

Clone this wiki locally