West Wind Internet and Client Tools
West Wind Internet and Client Tools 6.0
Gravatar is a globally recognized avatar based on your email address. West Wind Internet and Client Tools 6.0
  Rick Strahl
  All
  May 22, 2016 @ 10:42pm

Hi all,

I've released West Wind Internet and Client Tools version 6.0. This release pulls in all the changes from the recent Web Connection release and brings the Client Tools on par with Web Connection 6.0's general purpose functionality.

This is a major version release, which means this is not a free update from previous versions.

If you registered after June 1st of 2015, you are eligible for a free ugprade. Contact me directly for free upgrades.

What's new

Version 6.0 has a lot of new features, but it's not a huge update. However, it's been over 5 years since version 5.50 was released which was the last major upgrade, so this release gets the nod as the next major update as well as pulling into sync with Web Connection's libraries.

There is a new wwEncryption class which provides a few simple method for two-way symetrical encryption and one-way hash encryption of string and binary values. These functions are ideal for password and sensitive data encryption using .NET libraries for providing reliable and OS updated encryption components.

A new Markdown class provides support for parsing the popular Markdown format to HTML. Markdown is an ideal format for editing HTML in applications for storage and later rendering into HTML. It's an easy to use format that's easy to understand even for novices and is equally useful to speed typist who can focus on plain text input. The Markdown support includes two MarkdownParser classes and a simple function that can be call from anywhere with a simple like this:

Markdown("Hello **Markdown**, World!")

Another very cool improvement is in wwDotnetBridge: You can now call any .NET method asynchronously and get called back when the call completes. If you call some operation that takes a while you can offload the process automatically to a background thread. When the operation completes, it can call back into a method of an object that you pass in as a parameter. This works with native .NET code, but also works with FoxPro COM objects that you might launch from .NET and provide multi-threading for your FoxPro client code.

CLEAR
loBridge = CreateObject("wwDotNetBridge","V4")

loTests = loBridge.CreateInstance("Westwind.WebConnection.TypePassingTests")

*** IMPORTANT: The callback object must remain in scope
***            Either use a public var, or attach to an object that
***            stays in scope for the duration of the callback
PUBLIC loCallback
loCallback = CREATEOBJECT("MyCallbacks")

*** These methods return immediately - then fire events on loCallback when done
loBridge.InvokeMethodAsync(loCallback,loTests,"SlowHelloWorld","Rick")
loBridge.InvokeMethodAsync(loCallback,loTests,"SlowHelloWorld","Markus")

RETURN

*** Implement a subclass of AsyncCallbackEvents
*** Implement the OnCompleted() and OnError() methods
*** These methods are called on completion
*** Minimize state changes here and make them quick
*** the code in these method fires in the middle of
*** other FoxPro code.
DEFINE CLASS MyCallbacks as AsyncCallbackEvents

FUNCTION OnCompleted(lvResult,lcMethod)
? "Success: " + lcMethod,lvResult
ENDFUNC

FUNCTION OnError(lcMessage,loException,lcMethod)
? "Error: " + lcMethod,lcMessage
ENDFUNC

ENDDEFINE

Another useful one is support for calling .NET's FormatValue() and FormatString() functions from FoxPro which provide you with the ability to tap into rich number and date formatting that is locale specific. Unlike FoxPro .NET renders number and date formats depending on the locale the application is running under and the formatting system provides sophisticated formatting options for numbers and dates.

? FormatValue(DATETIME(),"MMM dd, yyyy")
* Jun 02, 2016

? FormatValue(DATETIME(),"MMMM dd, 'yy")
* January 02, '16

? FormatValue(DATETIME(),"MMM dd, yyyy HH:mm:ss")
* Jun 02, 2016  20:34:10

? FormatValue(DATETIME(),"MMM dd, yyyy hh:mm tt")
* Jun 02, 2016  08:30 PM

? FormatValue(123.33,"C0")
* $123

? FormatValue(123.33,"C4")
* $123.3300

? FormatValue(123.33,"N4")
* 123.3300

FormatString() provides a simple way to do string templating using C style string formatting, plus the abillity to use format expressions:

? formatstring("Give me a number {0:c4} and a string {1} and a date {2:MMM dd, yyyy}",;
               1.1,"Rick",DATETIME())
* Give me a number $1.1000 and a string Rick and a date May 02, 2016

Beyond that there are lots of small utility improvements that you can review in the documentation in the What's New topic.

Speaking of documentation - the online and CHM documentation has also been updated to new layout format, with fast search capability. It's much easier to find what you're looking for now in the online documentation. Check it out:

http://www.west-wind.com/webconnection/wwClient_docs

What breaks?

This release only supports Visual FoxPro 9.0. As I've done in Web Connection maintaining and testing code both in VFP 8 and 9 has become too big of a burden. Most components still work under VFP 8.0 but it's not officially supported any longer.

wwDotnetBridge now also defaults to .NET 4.0 when you load a .NET component without explicitly specifying the .NET version. .NET 4.x has been installed on Windows 7 and newer and is now the most widely installed version of .NET and it provides many performance and administrative advantages to use it, so it makes sense switch the default especially since Windows 10 no longer installs .NET 2.0 by default.

Lots of new Stuff - Go Play

If you've been using the West Wind Client Tools and haven't looked at all the recent additions and improvements, take a look and browse around the new online documentation and the What's new topic to see if there isn't some functionality that you can put to use today in your own applications.

Aloha,

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: West Wind Internet and Client Tools 6.0
  Matt Slay
  Rick Strahl
  Jul 7, 2016 @ 06:13pm

Thanks Rick for keeping Client Tools up-to-date with the latest updates from Web Connection.

I just completed conversion of my 3 main VFP business apps from 5.72 to 6.0 and all went very well.

Long live Client Tools!!

© 1996-2024