Open Menu

Synergex Blog


We’re Ready for for the 2013 DevPartner Conference … Are You?

By Steve Ives, Posted on June 5, 2013 at 9:36 pm

photo

What you’re looking at is fifty terabytes of external USB 3.0 hard drives (for the oldies amongst us that’s the equivalent of 10,000 RL01’s), and we’ll be giving them away during the DevPartner conferences in Bristol (UK) and Providence (RI) in the next three weeks.

Of course it’s not really about the hardware, anyone can get that! It’s really about what’s ON the hardware. Each of these disks contains a Windows 8 virtual machine that includes the latest version of Synergy/DE (10.1.1a, just released today) and Microsoft Visual Studio 2012 (Update 2).

But it’s not really about the products that are installed on the virtual machines either. It’s really about what you can learn from these “freebies”, and how you can use what you have learned to the benefit of your employer.

During this years DevPartner conferences the Synergex Professional Services Group will introduce seventeen all-new hands-on tutorials that will provide you with a quick-start to all of the latest features of Synergy/DE. And in addition we’ll be including updated versions of three of the most popular tutorials from previous conferences.

It’s not too late! If you haven’t already signed up for the 2013 DevPartner Conference then all you have to do is visit this link:

http://conference.synergex.com/registration.aspx

But talk to your boss before you visit the link, because if your company is already a member of the DevPartner program you might find that your conference registration is free!

We are all looking forward to seeing you again for another great conference.


Hosting WCF Services in an ASP.NET Web Application

By Steve Ives, Posted on July 1, 2011 at 3:39 pm

There are several ways that you can use Synergy/DE tools to expose WCF services, but regardless of which way you decide to create a service, the next decision you have to make is how to host it. By hosting a WCF service you expos the service and make it possible to use it from other applications. In this post I will introduce you to one way that WCF services may be hosted, via an ASP.NET web application and an IIS web server. In a later post I will show you how to host WCF services without this requirement for an IIS web server.

This is the third in a series of posts relating to the various ways in which Synergy developers can use of Windows Communication Foundation (WCF) when building their applications. The posts in the series are:

  1. Building Distributed Apps with Synergy/DE and WCF
  2. Exposing WCF Services using xfNetLink .NET
  3. Hosting WCF Services in an ASP.NET Web Application (this post)
  4. Exposing WCF Services using Synergy .NET Interop
  5. Self-Hosting WCF Services
  6. Exposing WCF services using Synergy .NET

 

A WCF service is simply a collection of one or more classes in an assembly, but the whole point of implementing a WCF service is to make those classes available to be used by other applications. And those applications will often be located on different networked systems from the service itself. So, in order for a WCF service to be useful, it needs to be “hosted” somewhere, and that somewhere needs to be available on a network.

There are three basic ways that WCF services can be hosted:

  1. Inside a Web application located on a Web server.
  2. Using Windows Process Activation Services (WAS). This mechanism was introduced in Windows Server 2008 and provides a mechanism for hosting WCF services without requiring a Web server.
  3. Services can be “self” hosted by some custom .NET application. For example, developers often host WCF services inside a Windows Service application.

In this post I will show you the basics of hosting a WCF service in an ASP.NET web application. In a future post I will go on to show how to self-host services.

Setting up basic hosting for a WCF service inside an ASP.NET Web application is very easy, but as Synergy .NET doesn’t have support for creating Web applications you’ll have to use another .NET language, either C# or VB.NET. However, don’t worry about that too much, because there won’t actually be any code in the Web application!

  • Start Visual Studio 2010 and create a new ASP.NET application:
    • From the menu, select File > New > Project.
    • Under Installed Templates, select Visual C# > Web > ASP.NET Empty Web Application.
    • Chose the name and location for your new Web application.
    • Click the OK button to create the new project.
  • Add a new WCF Service to the project:
    • From the menu, select Project > Add New Item.
    • Under Installed Templates, select Visual C# > Web > WCF Service.
    • Enter the name for your new service. The name will be part of the service endpoint URI that the client connects to, so pick something meaningful. For example, if your service allows orders to be placed then you might name the service something like OrderServices.svc.
    • Click the Add button to add the new service to the project.

You will notice that three files were added to the project:

image

In addition to the service (.svc) file that you named, you will see two C# source files. These files were added because Visual Studio provided all of the files that you would need in order to expose a new WCF service that would be manually coded in these files. But what we’re trying to do is host a WCF service that already exists in another .NET assembly.

  • Delete the two C# source files by right-clicking on each and selecting delete.

In order to expose a WCF service that exists in another assembly, the first thing we need to do is add a reference to that assembly, to make the classes it contains available within the new Web application.

  • From the menu select Project > Add Reference and then select Browse.
  • Locate and select the assembly containing your WCF service and add a reference to your project.
  • If the assembly you selected was created using xfNetLink .NET then you will also need to add a reference to the xfnlnet.dll assembly, as is usual when using xfNetLink .NET

You’ll need to know that namespace and class name of the WCF service in your assembly. If you can’t remember this that double-click on the assembly that you just referenced and then use Object Browser to drill into the assembly and figure out the names. All that remains is to “point” the service file at your WCF service class.

  • Double-click on the service (.svc) file to edit it. You should see something like this:

image

Edit the file as follows:

  • Change Language=”C#” to Language=”Synergy”.
  • Change Service=”…” to Service=”YourNamespace.YourWcfClass” (obviously replacing YourNamespace and YourWcfClass with the namespace and class name of your WCF service).
  • Remove the CodeBehind=”…” item … there is no code-behind, the code is all in the other assembly.
  • Save the file.

So you should now have something like this:

image

If your service is based on an assembly created using xfNetLink .NET then you have one final configuration step to perform. You need to tell xfNetLink .NET how to connect to xfServerPlus. You can do this by using the Synergy xfNetLink .NET Configuration Utility (look in the Windows Start Menu) to edit the new web applications Web.config file. If your xfServerPlus service is not on the same machine as your new web application then you must specify a host name or IP address, and if xfServerPlus is not using the default port (2356) then you must also specify a port number. When you’re done, the Web.config file should contain a section like this:

image

That’s it, you’re done. You should now have a working WCF service!

  • To see if the service has really been hosted, right-click on the service (.svc) file and select View In Browser.

You should see the service home page, which will look something like this:

image

If you see this page then your service is up and running. By the way, the URI in your browsers address window is the URI that you would use to add a “Service Reference” to the service in a client application … but we’ll get on to that in a later post.

Of course, all we have actually done here is set up a web application to host a WCF service, but we’re using Visual Studio’s built in development web server (Cassini) to actually host the service. If you were doing this for real then you’d need to deploy your new web application onto a “real” IIS web server.

We’re not done with the subject of hosting WCF services; in fact we’ve only really scratched the surface. One step at a time!

In my next post in this series I will show you how to Expose a WCF services using Synergy .NET Interop.


Exposing WCF Services using xfNetLink .NET

By Steve Ives, Posted on at 1:40 pm

Following a recent enhancement to the product in Synergy 9.5.1, developers can now use xfNetLink .NET to create and expose Windows Communication Foundation (WCF) services. In this post I will describe how to do so.

This is the second in a series of posts relating to the various ways in which Synergy developers can use of Windows Communication Foundation (WCF) when building their applications. The posts in the series are:

  1. Building Distributed Apps with Synergy/DE and WCF
  2. Exposing WCF Services using xfNetLink .NET (this post)
  3. Hosting WCF Services in an ASP.NET Web Application
  4. Exposing WCF Services using Synergy .NET Interop
  5. Self-Hosting WCF Services
  6. Exposing WCF services using Synergy .NET

 

The basic approach is pretty easy; in fact it’s very easy. In 9.5.1 we added a new -w command line switch to the gencs utility, and when you use the new switch you wind up with a WCF service. I told you it was easy!

So, what changes when you use the gencs –w switch? Well, the first thing that changes are the procedural classes that are generated, the ones that correspond to your interfaces and methods in your method catalog, change in the following ways:

  1. Three new namespaces (System.Runtime.Serialization, System.ServiceModel and System.Collections.Generic) are imported.
  2. The class is decorated with the ServiceContract attribute. This identifies the class as providing methods which can be exposed via WCF.
  3. Methods in the class are decorated with the OperationContract attribute. This identifies the individual methods as being part of the service contract exposed by the class, making the methods callable via WCF.
  4. If any methods have collection parameters, the data type of those parameters is changed from System.Collections.ArrayList to System.Collections.Generic.List. Changing the collection data type is not strictly necessary in order to use WCF, but results in a more strongly prototyped environment which is easier to use, and offers more benefits to developers in terms of increased IntelliSense, etc.

The next thing that changes are any data classes, the ones that correspond to the repository structures that are exposed by the parameters of your methods, that are generated. These data classes change in the following ways:

  1. Two new namespaces are imported. These namespaces are System.Runtime.Serialization and System.ServiceModel.
  2. Each data class (which corresponds to one of your repository structures) that is generated is decorated with the DataContract attribute. This identifies the data class as a class which can be used in conjunction with a WCF service, and which can be serialized for transmission over the wire.
  3. Each public property (which corresponds to a field in the structure) is decorated with the DataMemeber attribute. This attribute identifies each property within the class as one which will be serialized, and as a result will be visible to client applications which use the WCF service.

By the way, if you use a Workbench “.NET Component Project” to create your xfNetLink .NET assemblies then there isn’t currently an option in the component information dialog to cause the new –w switch to be used. So, for the time being, what you can do is add the switch to the Workbench “Generate C# Classes” tool command line. To do this you would go into project properties for the component project, go to the Tools tab, select the “Generate C# Classes” tool, then add the –w at the end of the command line, like this:

image

We’ll be adding a new checkbox to the component information dialog in 9.5.3 later this year.

By the way, by using the gencs –w switch you make it possible to use the resulting classes as a WCF service, but you don’t have to do so … you can continue to use the classes as a regular xfNetLink .NET assembly also. Why would you want to do that? Well, I sometimes use gencs –w just to turn my collection parameters into generic lists!

I have submitted a working example to the Synergy/DE CodeExchange, contained within the zip file called ClientServerExamples.zip. Within the example, the following folders are relevant to exposing and consuming a WCF Service using xfNetLink .NET:

Folder / Project

Description

xfServerPlus

Contains the Workbench development environment for xfServerPlus and the exposed Synergy methods. If you wish to actually execute the examples then you must follow the setup instructions in the readme.txt file.

xfNetLink_wcf

Contains the Workbench project used to create the xfNetLink .NET client assembly with the WCF attributes.

3_xfpl_xfnl_wcf_service

Contains the Visual Studio 2010 solution containing an ASP.NET web application used to host the WCF service, as well as three example client applications, written in Synergy .NET, C# and VB.

So, the gencs –w command line switch you make it possible to use the resulting classes to directly expose a WCF service, but there is still the matter of how to “host” the service in order to make it accessible to remote client applications, and that’s what I will begin to address in my next posting.


Building Distributed Apps with Synergy/DE and WCF

By Steve Ives, Posted on June 22, 2011 at 1:22 pm

At the recent SPC’s in Chicago and Oxford several of the sessions that I presented were focused on networking, and in particular on the various tools and technologies that are available to Synergy developers to allow them to build and deploy distributed software applications. In particular I spent quite a bit of time talking about a technology called Windows Communication Foundation.

This is the first in a series of posts relating to the various ways in which Synergy developers can use of Windows Communication Foundation (WCF) when building their applications. The posts in the series are:

  1. Building Distributed Apps with Synergy/DE and WCF (this post)
  2. Exposing WCF Services using xfNetLink .NET
  3. Hosting WCF Services in an ASP.NET Web Application
  4. Exposing WCF Services using Synergy .NET Interop
  5. Self-Hosting WCF Services
  6. Exposing WCF services using Synergy .NET

What is WCF

WCF is a part of the .NET framework that provides a powerful and flexible way to implement network communication between the various parts of a distributed software application. For many years Synergy developers have been able to build distributed applications using xfServerPlus and xfNetLink. Many have done so, and have deployed a wide variety of applications based on these technologies. When developing a new .NET client application developers would use xfNetLink .NET to gain access to their Synergy business logic and data.

This approach has served us well over the years, will continue to do so, and is still the most appropriate solution in some scenarios. But in some other scenarios using WCF might now be more appropriate, and could help developers to broaden the capabilities of their applications in several key areas, some of which are:

WAN Communication

Because the communication between xfServerPlus and xfNetLink uses a custom protocol which operates on a “non-standard” port, it may not be appropriate for use over wide area networks and the Internet. The primary problem here is that there is a high chance that this communication would be blocked by firewalls, some of which may be outside of your control. WCF supports multiple network transport protocols, the most basic of which is HTTP. This means that it is designed with the Internet in mind, and is very suitable for implementing applications which communicate over the Internet.

Multiple Endpoints

Another advantage of WCF is that the same WCF service can be exposed via multiple “endpoints”, and each of these endpoints can be configured to use different communication protocols and mechanisms. For example a single service could be exposed via one endpoint which uses HTTP and SOAP which would be suitable for a wide variety of client applications to be able to access from anywhere (including via the Internet), while at the same time being exposed by a second endpoint which uses low-level TCP/IP communications and binary messaging protocols suitable for use by applications running on the same local network as the service, at much higher performance. A single client application could even be configured to dynamically switch between these endpoints based on the current location of the user.

More Client Options

When using xfServerPlus and xfNetLink, client applications must be written in a programming language which is able to use one of the supported xfNetLink clients (COM, Java or .NET), but because WCF services can be interacted with via “standard” protocols such as HTTP and SOAP there are many more client application possibilities, because almost all development environments and programming languages are able to use these basic protocols.

Asynchronous Support

WCF also provides the ability to easily support asynchronous communication between clients and servers. When a client application calls an xfServerPlus method the client must wait for the execution of the method to complete, and for any resulting data to be returned, before performing any other processing. Using WCF it’s easy to support asynchronous method support, where the client application can call a method and then continue with other processing, later receiving an event when the remote method has completed its operation and when any resulting data is ready for use. This approach can make client applications appear to be much more dynamic and responsive.

Bi-Directional Communication

In many distributed software applications interaction between the client and the server is initiated by some event in the client application which requires some subsequent processing in the server application. But in some situations it is necessary for the server application to be able to, at will, initiate some processing in the client application. Unfortunately xfServerPlus and xfNetLink don’t really address this use case, but it can be addressed with WCF, because WCF service endpoints can be “self-hosted” within any type of .NET application. This means that as well as a client application having the ability to interact with a WCF service on some server somewhere, the client can also expose a WCF service, which the server application (or in fact any other application) could interact with.

WCF is an extensive subject area, and in this BLOG I’m not even going to attempt to teach you about the specifics of using WCF. Instead I’m simply going to try to make you aware of some of the reasons that you might want to explore the subject further, and make sure that you know about the various ways that you can get started.

There are several ways that Synergy developers can utilize WCF in their applications, and I’ll briefly describe each of these mechanisms below.

WCF via xfNetLink .NET

In xfNetLink .NET 9.5.1 a new feature was introduced which gives developers a lot of additional flexibility in the way that they build their applications, or rather the way that they communicate between the various parts of the application. This new feature is enabled through a new command line parameter to the gencs utility (-w). When you use this new option, two things change.

When you use gencs –w, the first thing that changes is that various attributes are added to the wrapper classes that are created by gencs. These attributes in turn allow those generated classes (and the assembly that they are compiled into) to be directly exposed as a WCF service. Previously, if a Synergy developer wanted to expose a WCF service which in turn exposed their Synergy business logic and data, they have to manually “wrap” their xfNetLink .NET procedural and data classes in other classes which in turn exposed a web or WCF service.

The second change when using gencs -w is that any collections which are exposed by the application API are transformed from un-typed “ArrayList” collections, to more useful and flexible “Generic List” collections. This change will require a small amount of re-coding in any existing client applications, but results in a significantly enhanced development experience.

This mechanism is likely to be of interest to developers who already have an existing solution using xfNetLink .NET and xfServerPlus, and want to take advantage of some of the additional capabilities of WCF, or to developers who wish to expose a new WCF service where the server application exposes code running on a UNIX, Linux or OpenVMS server.

WCF via Synergy .NET Interop

Another way that Synergy developers can expose WCF services is via Synergy .NET’s “Interop” project. The primary purpose of an Interop project is to allow developers with existing xfServerPlus applications to migrate their existing Synergy methods to a native .NET environment. By adding their method source code to an interop project they are able to execute those methods directly in the .NET environment, instead of using xfNetLink .NET and xfServerPlus to execute the methods with traditional Synergy on a remote server.

The Interop project works by generating Synergy .NET “wrapper classes” for your traditional Synergy methods (subroutines and functions) and data structures (records). The external interface of these wrapper classes is very similar to that of the C# wrapper classes produced by xfNetLink .NET’s gencs utility. The primary goal of the Interop project is to allow developers to migrate existing applications from a mixed .NET / traditional Synergy environment to a 100% .NET environment, with only minor changes to the code of existing client applications.

When you create an Interop project in Visual Studio, one of the options that you have (via the project properties dialogs) is to “Generate WCF contracts”, and as discussed earlier in this article, the effect of this is to add various attributes to the generated wrapper classes so that they can be directly exposed as a WCF service.

So again, for Synergy developers, this approach can provide a quick-and-easy way to expose a WCF service based on existing code. Again, this approach is likely to be primarily of interest to those who already have xfServerPlus based applications running on the Windows platform.

WCF via Synergy .NET

Both of the previous approaches were primarily focused on those who already use xfServerPlus, and both provide an easy way to get started with WCF. However in both of the previous scenarios, the external interface of your WCF service is directly defined by the interface to your underlying traditional Synergy methods (subroutines and functions), and the WCF data contracts that are exposed are defined by the repository structures exposed by the parameters of those methods. So, while the WCF capabilities provided by xfNetLink .NET and by the Synergy .NET Interop project are easy to use, you don’t get full control over the exposed interface and data. If you want that finer level of control, or if you’re just getting started with server application development and don’t have existing xfServerPlus methods, there is a better way to go.

The third way that Synergy developers can leverage WCF is by using Synergy .NET to create an all-new WCF service with native .NET code. This task was possible in 9.5.1 when Synergy .NET was first introduced, but has been made much easier through the introduction of a new “WCF Service Library” project template in 9.5.1a.

Creating a new WCF service via a WCF Service Library is the way to go for developers who want to write an all-new service application, or who don’t mind a little extra effort to re-work some existing code in order to factor out some of the “wrapper” layers involved with the previous two approaches. As a result you will have full control of the resulting WCF service, and the contracts that it exposes.

Wrapping Up – For Now

So, as you can see, Synergy/DE is now providing you will all kinds of new and exciting things that you can do in your Synergy applications, and I firmly believe that WCF is one of the most important, and powerful. In the near future I will be writing several additional BLOG posts which will explain these three ways of exposing WCF services in more detail, and I’ll also try to provide more detail about WCF generally. So for now, be thinking about how your existing distributed applications are built, and what things you might wish to improve about them. Or be thinking about that all-new distributed application that you’ve wanted to get started on. If you’re thinking of enhancing or implementing a distributed application, then using WCF is almost certainly the way to go.


Lights, Camera, Action!

By Richard Morris, Posted on June 16, 2011 at 3:04 am

Now, thinking that once the Synergex Success Partner Conference (http://spc.synergex.com) is over, and we are all sat basking in the glory of the survey results (thanks to everyone who filled them in – the cheques are in the post!), sipping alcohol-free Pina Colada’s, you couldn’t be further from the truth.

Once the conference is over, that’s when the real work begins.  One of the first tasks if to begin the planning for next year’s conference – honestly.  It takes a full twelve months to plan, organise and deliver the SPC.  Reading the conference surveys helps us to first decide where to hold the conference.  Sometimes suggestions like “Somewhere sunny, but don’t tell the boss!” are not the most helpful.  Based on the feedback we receive we can also begin to sketch out a proposed agenda.  The agenda is also heavily influenced by future  developments which introduce new features and capabilities within the language – and there are some cool features in the pipeline so keep an eye on future blogs.

But before we can start next year’s planning, we need to complete the final tasks of this year’s conference, and that’s getting all the available information to everyone who attended.
The session slides have been posted on the Synergex web site.  All code samples are on the Synergex Code Exchange, and based on feedback from the Chicago conference I’ve created  videos for each of my conference presentations. So, light the lights check the sound levels and get the clapper board ready…

If you want to re-visit the User Interface opportunities presentation you can see a 20 minute video at

http://www.synergyde.com/services/education/product_video.aspx?video=ui_opportunities.

This video shows the evolution of a simple Synergy cell based program from the OpenVMS/UNIX cell based environment through the UI Toolkit, Windows and WPF, to a Native Synergy.NET desktop application.  The same Synergy logic is then utilised in a Silverlight Browser based client and finally a Windows Phone 7 app!

Giving your User Interface a “New Lick of Paint” is possible with Synergy and WPF.  There are two presentations on this subject, and really need to be viewed in order.  The first is “What, Why and How of MVVM” (http://www.synergyde.com/services/education/product_video.aspx?video=what_why_and_how_of_mvvm).  This video takes you through the basics of the Model, View, ViewModel design pattern and how to implement it within your existing Synergy applications.

The second video is called “Building Targeted UI’s” (http://www.synergyde.com/services/education/product_video.aspx?video=building_targeted_uis).  This builds on the first MVVM video and demonstrates what you can begin to achieve with your new Synergy based WPF applications.

My final SPC 2011 session was titled “Cool Framework Features”.  During the presentation I demonstrated some simple ways to enhance your existing applications with .NET
framework features, and there are two videos to show you how.  The “Cool Framework Features – PDF” (http://www.synergyde.com/services/education/product_video.aspx?video=cool_framework_features__pdf) video shows you how to fully automate the production of PDF documents using a printer driver called Win2PDF, the Synergy Windows Printing API, and the Synergy .NET API to set Windows Registry settings.

A second video from this session is called “Cool Framework Feature – XML” (http://www.synergyde.com/services/education/product_video.aspx?video=cool_framework_features__xml).  This video shows how to implement the .NET Validating XML parser into your Synergy applications to load, parse and
validate an XML document given a XML schema.

Take a look at the videos and let me know what you think.  If there are any subjects you’d like to see covered either at the SPC or even in video format please let me know.


Shameless plug

By William Hawkins, Posted on March 28, 2011 at 4:38 pm

I’ve just come back from the UK, where Richard Morris and myself attended DevWeek 2011.   The DevWeek conference was hosted at the Barbican center in London, and covered a multitude of various Microsoft / Windows technologies. As it wasn’t hosted by Microsoft, there were no significant goodies/toys given away, but we did gain a lot of great info on developing state-of-the-art user interfaces, and lose a few pounds climbing 4 flights of stairs between sessions.
After the conference, Richard and I visited a couple of customers and had planned to spend a couple of days performing analysis work for a prospective PSG project.  However, a few hours into this analysis task, we got a cry for help from another UK customer that Richard had been working with.
This customer was in the process of moving their application from OpenVMS to Windows.  They had already moved the executables to Windows and were using xfServer to access the data on OpenVMS.  Over the weekend that followed DevWeek, Richard had helped them do a test migration of the data from OpenVMS RMS files to Windows SDBMS isam files, and it all appeared to be working fine.  However, during their testing, a few files were showing spurious data in a few fields – hence the cry for help.
It turns out that the bad data was actually caused by integer fields, that everybody had assumed were decimal fields.  Now, when you unload data files, most people just use the standard isload/fconvert (or Convert on OpenVMS) to generate a sequential file, which works great for Synergy alpha and decimal fields, but when you have integer (aka binary) fields, regular sequential files no longer “cut the mustard”.  One of the issues you have to deal with is this.  If you have an integer field that contains the value 13, (aka a Carriage Return character) in a sequential file, the operating system assumes that it’s an end-of-record character and treats the record as truncated.  So now the next part of the same record is now treated as a new truncated record, and you have two “bad” records in the file, instead of one “good” one.
The way to resolve this class of issue is to use a “counted” file.  This is a special form of sequential file where the length of the record is included with each record, so when re-loading data, the application knows how many characters there are in the record, and it will ignore any “spurious” control characters in the middle of the record.   Job done, you would think, but no.  Being OpenVMS it wasn’t as simple as that, as we also had to use the OpenVMS Convert utility to change the sequential file into a stream file, so we can preserve the file as a counted file after it was FTP’d to Windows.

With Synergy version 9, the language supports several new data types (e.g. boolean, enum) which are really integer fields, so if you start to store these new data types in your Synergy DBMS files, you need to start using counted files, instead of regular sequential files when loading/unloading data.  Fortunately, (in this case) both OpenVMS and Windows are little endian systems, so there was no issue about changing endian type, but this is something that you may need to consider, should you consider moving integer data between systems.
Now, to come back to the topic I started with of “attending conferences” (and to issue a shamless plug), if you come to the 2011 SPC in Chicago or Oxford, you’ll be able to hear all about managing binary data in Synergy DBMS files.

Hope to see you there.


The Final Chapter

By Richard Morris, Posted on December 17, 2010 at 6:00 am

Using Synergy in all aspects of a new WPF based development is really quite exciting.  But when you start to bring in code that was written many years ago you really begin to see the power of a truly cross platform capable development environment.

The task I started while working with White Knight was to create a simple application that managed the communications with their customer base – basically a very simple CRM system.  The brief was to have a great looking windows desktop application and write it in Synergy – oh, and use all their existing library routines, data layout include files and database files.

And the solution, if you’ve followed my earlier blogs, was to utilise the new 9.5 release of Synergy.  With Synergy 9.5 we have the Visual Studio Integration which, in a nut shell, is Synergy language inside the powerful Visual Studio development environment.  Using this environment we can craft our user interface utilising WPF controls and Synergy language to bind to our data classes.  So, that’s the UI sorted.

Using the Synergy .NET API I can continue to use my existing Synergy language routines to load my new WPF UI Library, and manage the data communication between my program and the UI controls using WPF’s powerful data binding techniques.  So that’s the existing program logic and data access sorted.

And the results:

A fully functional UI, all written in Synergy and XAML (the WPF portion of the UI) managing our SDBMS data and Synergy business and validation logic. 

So what about your application?  If it’s in need of a bit of a user interface upgrade, download the latest 9.5 release of Synergy and let your imagination run wild.  You’ll be surprised just how much you can do in a short space of time. 

As we head towards the end of 2010 we’ve already started our plans for SPC2011 – watch this space for details!  I’m really excited about the prospect of presenting these great new capabilities that Synergy offers.  I can’t believe how quickly this year has gone by.  I hope you all have a great holiday season and here’s to a bright WPF New Year!


Taking .NET to the cleaners

By Richard Morris, Posted on November 22, 2010 at 2:23 pm

Ding dong, “Laundry service”! Now you could be mistaken for thinking that I’m staying in a rather nice hotel, being called upon by the maid for my dirty laundry. Not so, I’m afraid, I’ll be taking my dirty ‘smalls’ home with me. But for one of our customers, this is their calling card. The customer is White Knight, based near London and their business is laundry, run by Synergy.

It’s true. People and many of them are well known celebrities, have their laundry collected every Monday and returned within a few days, cleaned dried and perfectly ironed. Some ten thousand “items” pass through the machines at this site and this is a small site. Their other sites handle in excess of two hundred thousand articles every week.

To manage this workload across all sites is a suite of Synergy programs running on a Linux machine. Traditional character based systems handle all aspects of the process from collection, cleaning through to delivery of the right items to the correct customers.

But things don’t always go right. So when the customers call in and say “you’ve washed the spots off my favourite pair of shorts” it all needs to be recorded and processed. This calls for a CRM (Customer Relations Management) system. And here is where I enter the story. White Knight has invited me down to assist them to begin to write a fully functional CRM system in Synergy. They want a Microsoft Windows desktop application with all the bells and whistles with access to new and existing Synergy data and logic. Easy!

So today we hatched a plan. Graham from White Knight was fully prepared for my visit with a functional specification, data layouts and design utilising xfServerPlus. “But for a desktop application?” I asked. “Why are we not using WPF (Windows Presentation Foundation) and .NET?” Because I’m not strong with C#, I know enough to do my web site!” Graham replied. Well, given the imminent release of Synergy v9.5 and the integration of Synergy Language within Microsoft Visual Studio 2010 it would be a perfect candidate. We’ve created our Visual Studio projects and begun to define our WPF User Interface in XAML. Our existing Synergy routines are being imported into a new class library project and we are crafting Synergy classes to facilitate the communication between our application elements. For those of you at SPC 2010 you’ll recognise this as the Model-View-ViewModel pattern!

And how did we do? Well I’ll update my blog over the next few days of how well we do, writing our first Synergy for .Net application…..


Giving people what they want

By William Hawkins, Posted on August 6, 2010 at 12:53 pm

I just spent the past few days in Seattle attending Visual Studio Live! 2010. If you’re a regular follower of the Synergex PSG blog, you may have the impression that we swan around the world doing nothing but attending conferences. While I'd like that to be true, it's really in an effort to provide our customers with consultants that are more knowledgeable in non-Synergy technologies, Synergex has expanded both the number of people that we send to conferences and the number of conferences that we attend.  For example, this week I was accompanied by Jerry Fawcett and Steven Lane—both from our support team. And, in my defense, this is only the third conference that I’ve been to (as an attendee) in a decade and a half.

Anyway, I digress. The VS Live! conference was hosted on the Microsoft campus in Redmond, but the speakers were mostly non-Microsoft peeps. There was a keynote presentation on two of the days from Microsoft peeps, both of which were delivered in a very professional manner, but (with a few notable exceptions) I was disappointed by the presentations. The presenters obviously knew the topic matter, but had not coordinated session content very well, or made sure that the infrastructure was setup (doing a demo on Cloud/Azure technology requires a properly configured internet connection) or even made sure that the presentation slides were in the order in which they wanted to present them. Even little things like closing unnecessary toolbars/windows in Visual Studio, or using an appropriate font to show code, impacts the perceived quality of a presentation.

For years, Bill Mooney has been telling PSG that he considers the SPC presentations amongst the best he seen. I always just put that down to his enthusiasm, but after this week I can see what he’s getting at. I know I’m far from the world’s best presenter, but after this week I’m starting to appreciate the level of professionalism with which we’ve been providing Synergy customers at our conferences over the years.

Last week, the PSG team met to go over the SPC 2010 conference content, and we all gave an overview of our planned sessions. Most of us were still in the planning stage of content development, but I had mostly completed my allotted sessions. So I thought I was pretty much done. But, as they say, no good deed goes unpunished, and I managed to get myself allocated a new 3 hour tutorial session to prepare.

The SPC this year promises to be another great conference with lots of hands on (and a reappearance of the CodePhantom), and I hope you will come see us in Sacramento.


Blunt Pencil?

By Richard Morris, Posted on August 2, 2010 at 10:22 am

I guess all jobs have their perks. This week visiting the office in California, in July, is certainly one of mine. OK, so being stuck in an air conditioned office all week is not exactly lapping up the sunshine, but today is Saturday and I’ve been loaned a bike!  Now, when I say bike, let me explain. It’s kind of like a laid back Harley Davidson Fat Boy with thick tires, wide handle bars and a thick padded seat. That’s where the resemblance with a Harley ends I’m afraid. There is no chrome laden chassis, or thumping V-twin engine, just two pedals, powered by my spindly and pale English legs! It’s certainly no wheelie machine either. Actually it’s quite a cool ride, just totally out of place against all the racing style cycles I found myself among while cycling along the great American River towards Folsom Dam. But I mind not. Those spandex and lycra clad enthusiasts take it far too seriously! I was simply out for a great ride through some stunning scenery.  

So, MP3 player blasting in my ears I boldly set off on my adventure. I made sure it was only the guys on the ultrafast slick racing bikes that overtook me, but the trouble was, everyone seemed to be on a slick racing bike, honest! I still can’t explain how the walkers got past me though. I’m sure they were taking short cuts!

Undaunted, I pedelled on. Some of the downhill sections of the cycle track may well have been enjoyed at slightly more than the 15 mph speed limit – no, not me officer! Some of the rather tight corners were taken pedal down (similar concept as knee down, just at a more sedate pace). Big smiles all round.

And then the inspiration came to me! My MP3 player has a very varied collection of tunes from many different decades and genres. I regularly add new CD’s to see if I like what I hear. One new song had a lyric from which my inspiration was born. “Like a pencil, old and blunt, I’m writing in a bolder font”. I thought, "ya, how true!".  There is nothing worse than trying to be artistic with an old blunt pencil that smudges as you scribe. So, is this what I’m trying to do with Toolkit? Recent posts on Synergy-L continue to highlight the challenges we all have with fonts and colours, trying to make our applications look cool, modern and saleable.

So maybe it’s time to sharpen our pencils, utilise the new capabilities in Synergy 9, and begin to incorporate new slick UI’s into our existing applications. This is my focus for SPC2010 in October. I’ll present the tools and techniques we can all use to implement new, modern interfaces within our existing and proven Synergy applications.

My adventure is over now and I’m back in the office. Now, where is my pencil sharpener?  It’s time to give ChronoTrack a new lick of paint.

Not convinced? Then why not rise to this challenge…  Send me all the code and data required to build and run a sample element of your application and, in return, as long as you’re at the conference, I’ll demonstrate your same code running with a modern UI. And did I mention that it doesn’t have to be a toolkit application?

Glossary of terms. Wheelie: The act of raising the front wheel of your bike, in a controlled manner, while propelling your bike forward at high speed. In my case: always unintentional and usually with painful and expensive results! Knee down: The art of skimming your knee close to the tarmac while engaging a perfectly executed cornering manoeuvre. In my case: falling off!


Another TechEd Sticky Note

By synergexadmin, Posted on June 10, 2010 at 11:58 pm

The other night, I discovered the way to beat the heat while here in New Orleans. It’s a fruity little concoction known as the Hurricane, and while it doesn’t actually affect the climate around you, it sure makes feeling hot and sticky a lot more enjoyable. I’m also pretty sure how it got its namesake: in the morning, you find yourself trying to reconstruct the previous 12 hours of your life by putting together the pieces and fragments of your memory.

TechEd 2010 draws to a close this evening, and though it’s been increasingly difficult to find sessions that seem pertinent to we Synergexians, it’s still been a worthwhile experience.
I’ve learned a lot just by watching presenters step through the build of a Silverlight UI using Microsoft Expression, or show off the latest features of Visual Studio 2010 and how it can be used to quickly create a web app, or walk through the use of new simplified Windows Communication Foundation 4 features.I’ve even filled in the holes in my schedule with sessions on interesting (to me) topics, such as IPv6, trends in cybercrime, and hacker techniques.

Which all brings me to the point of this little blog entry: It seems to me that the value of conferences lies not in the number of sessions that directly apply to you, but in the quantity and quality of the little tidbits you pick up each day. It’s in the discussions you have with other developers and like-minded individuals – whether they take place while sitting down over a cup of coffee, or simply during a quick ride in the elevator. It’s in the creative ideas that spring up when you see a clever implementation and wonder if you can apply the same techniques to an unrelated solution of your own. It’s in the tips, tricks and techniques that you pick up, which will not only save you hours, days, and even weeks of effort in the year ahead, but which can also be shared with the rest of your team to make them more productive as well.

Just a sales pitch for SPC2010? Perhaps…but that wasn't the intent. After all, this is my blog, and with it I get to share helpful experiences from my time “out in the field.” If writing about it all means I’ll get to see more of you when we set up shop in October at the Citizen Hotel, then so much the better. But in the end, my little revelation about the value of coming to TechEd – even with so much focus on technologies that I can’t use – is helping me to sit back and enjoy this final day of the conference, secure in the knowledge that I’m going to be learning something interesting at every turn. And isn’t that what attending the conference is all about?

That, and the Hurricanes, of course…


How Did I Get Here?

By Richard Morris, Posted on March 22, 2010 at 9:41 pm

Well, that was the DevWeek that was.  As I mentioned in my last blog, it’s been my first time here, and it’s been a very informative and interesting conference.  Will I attend next year?  I’d like to think so.  But that decision is not mine to be made.  As many of you reading this know, it’s “Manny” who makes the decisions.

So how does he (or she for that matter – I too had a lady boss once) go about making such a decision?  Is it a case of “If I mention it enough, I’ll get to go?”  I’m not sure that one works, and it’s certainly not going to be too reliable!  I could try the tact of “if I request to go to everything I must get to go to something”, but information overload just takes up too much of your managers time.  My boss certainly doesn’t search the web and peruse the small ad’s looking for events to send me on, far from it!  He’s got much better things to do, like figuring out just how he can squeeze my two new, 23 inch, flat panel, high resolution, wide screen monitors that I’ve just ordered, into this month’s budget.

But I need to ensure I keep up to date with modern technologies and techniques.  Reading web articles, blogs and industry publications helps, and one of the biggest benefits of my job is working with such a diverse user base – you all have different and unique requirements, but can apply very similar solutions using Synergy and all its related capabilities.

So, my boss relies on me to investigate and review all the available options.  I must admit, although Synergex has a single office in California, it certainly has a global attitude to training and employee development – I’ve been to conference and training events in the US, and across Europe.

The factors which influence my decisions as to which conference or training event to attend come directly from the requirements from our user base, and the direction in which Synergy/DE is going.  There is little point it being an expert in a technology that is of little or no use to our users.

I learnt a lot this week, both by attending some really good sessions, and also by talking to presenters and other attendees.  My background is significantly different from many (ok all!) of the people I spoke to.  They live, breath and sleep Microsoft and .NET.  I don’t, but need to understand how best we can encapsulate these new technologies within Synergy/DE applications.

Now, what are your justifications for attending this year’s SPC in October?  Firstly, as soon as the agenda is published, review it and ask yourself “what in the agenda will help me to advance my application?” I bet you can find at least ten things.  If your application runs on Windows and you plan on sprucing up your UI, there are a number of sessions that will walk you through the process of implementing the latest super slick WPF interface.  And remember, all source code will be made available on Code Exchange.  Not running on Windows?  It’s lucky you have Synergy/DE then!  Many of this year’s sessions focus on non-Windows environments, and the latest OO capabilities within the language.  Beginning to implement simple OO practices within your application will greatly improve the quality of your code, and the speed at which you can develop it.  And it’s not difficult to get started using synergy OO concepts, and it can integrate seamlessly with your existing procedural code!

How many of you UNIX and OpenVMS developers have a PC on your desk, and use a telnet terminal emulator to edit and build your code?  You’ve seen Workbench, know just how powerful a development environment it is, so why not swap the emulator for Workbench? We’re developing a session that will show you just how easy it is to edit then remote build your source code from within Workbench.

Arm yourself with the facts.  Talk to “Manny”, and book your ticket to this year’s SPC!

One of the justifications I have for attending these conferences is that I can impart my new found knowledge and understating, through the SPC, to our customers – you!


Now that’s what I call service!

By Richard Morris, Posted on February 23, 2010 at 6:11 pm

Web services have been around for quite a while now.  If you attended the Success Partner Conference back in 2006, in London or Boston, you’ll have completed a hands-on tutorial that walked you through the steps required to consume web services with Synergy code.

During the conference, we wrote Synergy code to consume a number of different web services, from a number of different hosting sites.  The first service we utilised returned an array of valid country names. We then used the returned information to populate a UI Toolkit combo drop-down input control to allow the user to select the required country.  Other services we used allowed us to validate address details and credit card numbers.  The final web service we worked with, that I know several customers have since made use of, gave us the ability to interface with a Simple Message Service (SMS) API and send text messages to a mobile phone number.  Not all web services are free, and if I remember correctly, I believe the cost for sending an SMS was about $0.008!

So, when I saw the request from Rodney Latham on the Synergy-l list server, requesting if anyone had code to determine if a given date was a public holiday, I thought “there must be a web service to determine that”.  After a quick search on the Internet I found one at a site called www.holidaywebservice.com. After a few minutes of navigating the site, and looking at the WSDL (Web Service Description Language), it was obvious that I could write a few lines of Synergy code to consume the web service to determine if a date was a public holiday.  Another great feature of the web service was that it was free!

I knew that Rodney’s Synergy software ran on the OpenVMS operating system, so any fancy MS Windows coding was to be avoided – it had to be pure Synergy.  As long as the machine could access the internet we could execute the web service.

I could have written a regular Synergy subroutine or function, but instead I chose to implement executing the web service within a static method, as part of a SynPSG.DateFunctions class.  By defining the method as static, you don’t need to instantiate an instance of it.  This makes the coding very simple.  Add a reference in your code, using the “import” statement, to the SynPSG namespace and you’re ready.  To determine if the date is a holiday, simply execute the static method, for example;

import SynPSG

proc

    if (SynPSG.DateFunctions.IsHoliday(20100105,

&     SynPSG.CountryCode.EnglandAndWales)

    begin

    ;;we have a holiday, let’s party!

    end

The first argument to the IsHoliday() method accepts a reversed eight digit date and the second is an enumeration which allows you to select the required country code.  The enumeration is defined within the SynPSG namespace;

public enum CountryCode

    Ireland

    EnglandAndWales

    Scotland

    UnitedStates

endenum

Simple, free and the code is available on the Synergex Code Exchange – log into the resource centre and search the Code Exchange directory for IsHoliday.


Using Workbench to Build Applications on Remote Servers

By William Hawkins, Posted on February 18, 2010 at 4:21 pm

I recently went to a customer site, to help them integrate Workbench into their OpenVMS development environment.  As a source code editor, the “integration” is relatively simple, you just need to have NFS/CIFS/SAMBA installed, and use it to make your OpenVMS (or UNIX) drives look like they’re actually Windows drives.  However, when you want to compile or link your application, you either need to go back to your telnet window and build it there, or you can download the RemoteBuild utility from the SynergyDE CodeExchange.  There are two versions for OpenVMS out there right now, both provided by Chris Blundell from United Natural Foods Inc.

Synergex PSG decided that we wanted to provide a remote build facility that could talk to multiple environments using information from a single Workbench project.  We wanted to minimize any potential firewall issues (for companies that have internal firewalls), and we also wanted to build on the SynPSG.System classes (distributed with ChronoTrack – our SPC 2009 demonstration application) for the network communication.  For those of you unfamiliar with the SynPSG.System classes, they are a partial implementation of the Microsoft System classes written in Synergy, (so they work on all supported platforms,) but when we have Synergy for .Net available, we'll be able to use the native .NET framework System class without modifying code. (ok, we'll have to change the import statements, but that should be all.)

So PSG has posted our flavor of a remote building application into CodeExchange – it's called remoteServer.   There is a client component to install into Workbench, and a server component (written in Synergy) that runs on each development server.  If you have both SAMBA (or equivalent) and remoteServer installed and configured, you are able to compile your application on the remote system, and in the unlikely event of a compile error (I know, you never have any coding errors) you will be able to double click on the error on the output window, and go straight to that line of code in the source file on your remote server.

If you work in a multi-platform development environment, I would encourage you to go download any of the remote build offerings in CodeExchange, and start using the power of Workbench to help improve the productivity of your developers.


Live from TechED, Updated!

By Richard Morris, Posted on November 13, 2009 at 11:37 pm

The end of TechED is nigh, and to be honest I'm sort of happy.  It's been an intense week of presentations, workshops and in depth discussions with fellow developers, Microsoft techies and the guys at all the UI control vendors.  I know what our customers mean now after they have attended our SPC: info overload followed closely by brain fade!

As the vendors begin to pack up, Tod and myself unselfishly offered to burden ourselves by offering to help lessen the vendors packing toils by relieving them of any spare goodie-bag items they may have.  It's tough at times!  As we toil, we notice 6998 TechHeads filing off to catch a train that carries at maximum a few hundred people.  They must have all missed the multi-threading, delayed processing and smooth streaming sessions.  We on the other hand thread our way, via a routed URL, through the streets of Berlin, testing our interop skills with the locals.

On a more technical level this week has shown just how determined Microsoft are to be market leaders, and with the tools on show this week it's difficult to see why they shouldn't be.  And the best news of all?  Synergex, with our current capabilities to integrate with .NET and our emerging integration with Visual Studio, we'll be able to take full advantage of these latest technologies.  The future is looking good if you develop with Synergy.


Don't miss a post!

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Recent Posts Tag Cloud Archives