Welcome to the Dart White Paper repository. We have created this section to publish White Papers about our technology, ideas for IT solutions implementing TCP and UDP based communications, tips for using our products, and opinions about current and coming technologies. Along with these articles, readers will have the opportunity to respond with their own ideas and we will publish those comments along with the articles. If you have a comment on any article, please submit it to comments@dart.com.

4.x Product Redesign
Revised January 2011

The latest version of the PowerTCP/PowerSNMP product lines get a new redesign that leverages the power of the latest .NET frameworks to bring our customers the most advanced Internet Communications components available.  These new updates are not incremental improvements to the product.  They are ground-up redesigns that leverage both Dart's extensive communications component experience as well as feedback from hundred of customers.  With version 4.x, developers get the benefits of:

  • Model View Controller (MVC) Design Patterns
  • Enhancements for Framework 2.0+ Features
  • Compact Framework Support for selected Products
  • Integrated SSL Security

Background (pre .NET)

The Visual Basic environment brought us the capability to use components (VBX’s and OCX’s), but typically only executed on the UI thread. While multi-threaded support was being added at the OS level, developers needed C++ to create multi-threaded applications.

PowerTCP started using background worker threads when Visual Basic started supporting 32-bit applications. In this mode, PowerTCP executed communication tasks on embedded worker threads to not interfer with the UI. However, data had to be marshaled back to the UI thread before events could be raised.

.NET 1.x

The convenient use of worker threads, delegates and events was greatly improved under .NET 1:

  • Background threads could be conveniently started
  • Events could be raised on worker threads
  • In fact, the multi-threaded environment became so powerful that users needed to become aware of concepts like thread safety and synchronization, which was never of concern before.

PowerTCP evolved also, providing an interface that included blocking methods (which block the executing thread until completion), pseudo-blocking methods (which block the UI thread until completion, but processes UI events while doing so), and asynchronous methods (which execute on background threads). Our task was to provide as complete an interface as possible without making it complex or difficult to use.

.NET 2.0+

The .NET environment evolved again, and developers have kept pace. We find that our customers are developing more applications for ASP.NET, more console applications, and more Windows Services. These environments don’t have a UI thread, so pseudo-blocking and asynchronous methods are not relevant for these applications. We also see trends pointing towards greater levels of customer control. For these reasons we set out to design PowerTCP 4, with the following design emphases:

Model View Controller Support

Traditional asynchronous support provided a way to start and complete background threads, but this involved stringing together a series of operations, each called when the previous completed. This results in more difficult-to-maintain, event-driven code. We looked for a better mechanism, one that was self-documenting and thus easier to maintain, used fewer resources, and was more flexible to use. The result is an architecture and set of interfaces that make it simple to initiate operations while retaining the readability of blocking, synchronous code.  The following code snippit illustrates the new design using our new Telnet control:

........private void Form1_Load(object sender, EventArgs e)
        {
            // start the Worker method on a worker thread
            telnet1.Start(Worker, null);
        }

        void Worker(Telnet telnet, object state)
        {
            // this executes on a worker thread, maintaining UI thread responsiveness
            telnet.Connect("myServer");
            telnet.Login("username", "password", "$");
            telnet.Write(Encoding.Default.GetBytes("ls -l\r\n"));
            // marshal the listing back to the UI thread
            telnet.Marshal(telnet.Read(new buffer[10000]));
            telnet.Close();
        }
 
        private void telnet1_Data(object sender, DataEventArgs e)
        {
            // now on the UI thread, we can put the listing into the textBox
            textBox1.Text = e.Data.ToString();
        }

Note the convenient Start() method that lets the user to string together multiple blocking methods to provide the following benefits:

  • The code is less event-driven.  Methods are called in-line, producing self-documenting code that is easier to write and maintain.
  • Marshal() methods conveniently marshal selected data to the UI thread for display in any UI control
  • The PowerTCP interface has been greatly simplified and made more efficient
    • Single-purpose asynchronous methods are obsolete.  Simple Start() methods allows users to conveniently execute on a worker thread.
    • No pseudo-blocking functionality is necessary, eliminating problems associated with unexpected reentrancy. No DoEvents() required.
    • Where a Windows Forms app uses Start() and events (for marshaling), ASP.NET, services and console apps simply use the the common blocking method calls directly. So it is much easier to port communications code between environments.
    • A single worker thread can be used to string together any combination of blocking methods, allowing the user to execute any combination of methods without using multiple worker threads in a serial fashion, which is required by less advanced asynchronous designs. This approach minimizes the overhead created by thread context switching.
  • Bottom line?
    • Your application is responsive because worker threads efficiently sleep while waiting for socket data.
    • Your code is most maintainable because the blocking calls are self documenting, and it's easy to port between application types.
    • Communications programming is now simpler, helping you finish on-time and under budget.

Improved Support for .NET 2.0+ Features

The .NET 2.0 Framework provided generics, improved support for X509 certificates, and other features that PowerTCP 4 takes advantage of. Now that most of our customers have migrated from .NET 1.x, we are steadily upgrading each PowerTCP product without sacrificing backward compatibility. Of course, for customers still working with Framework 1.x or in mixed environments, our current products will still be licensed for use in the .NET 1.x environment to support legacy applications.

Support for .NET Compact Framework

With this re-design, Dart is rapidly extending support to the Compact Framework.  Mobile platform development is a rapidly growing field, and with PowerTCP 4 Dart will be offering its leading components for use in this environment.

Integrated Security

Secure Socket Layer (SSL) security is being integrated into the core libraries, so that SSL encryption will be included in each new product. 

Current Status

As of June 2012, PowerSNMP for .NETPowerTCP Telnet for .NETPowerTCP Emulation for .NETPowerTCP Sockets for .NETPowerTCP SSH and SFTP for .NET and PowerTCP FTP for .NET have been upgraded.

Release Plans

Throughout 2012, new products and product updates will be rolled out.  Subscription holders will receive PowerTCP 4 versions of any products released within the period of their subscriptions.