Phone800.366.3472 SupportGet Support DocumentationDocumentation Resource CenterResource Center
search
close
Open Menu

Synergex Blog


The Final Chapter

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

Avatar

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!


The .NET Rollercoaster

By Richard Morris, Posted on November 24, 2010 at 1:28 pm

Avatar

Sometimes my job feels like I’m on a rollercoaster with some great highs and some scary lows, and the adrenaline rushes between the two. Version 9.5, complete with the Visual Studio integration with Synergy, was officially released yesterday. I’m sure I was not the first one, but I was straight to the resource centre at www.synergex.com to download and install 9.5. The installation went without issue and we were ready to begin to build our CRM application.

The first task was to rebuild our existing Synergy routines using the Synergy 9.5 DBL compiler. This new version has tightened things up even more and the compiler found another subscripting error which was duly fixed! Things were looking great – the rollercoaster car was slowly making its assent.

The next step was to build our Visual Studio projects and run the new CRM application. The builds completed and the car was teetering on the brink. But what goes up must come down. With that stomach in the mouth feeling the car came spiralling down from the dizzy heights. Our CRM didn’t run quite as we’d hoped. Now don’t get me wrong. I’m extremely impressed with the release of 9.5 and the integration with Visual Studio. Just the ability to build code written when Bill Gates was a lad in this environment is testimony to the strength of Synergy. But this is a brand new release and I’m pushing it to the limit. This is no “Hello World” development!

Now the customer wants a new CRM, and I’m determined to complete the job using Synergy. And so a new plan was hatched. Why can’t we use Synergy/DE and Workbench to build the program to host our new UI? We can use the .NET API to achieve this, and we know all the existing routines work because they have been executing the code for years. So straight away we have half of the application in Synergy, written and working. Given that the problems we were having with the Visual Studio side of 9.5 centred on arrayed fields, changes that have been made to the way error trapping works, and the debugger, why not build our WPF UI using Synergy. And this side of the Visual Studio integration worked for us all day without issue. Building simple class files to expose our Synergy data as .NET types was a breeze with the code snippets available. Some of this code could, I guess, be code generated, but to be honest generating code can strangle the flair of the developer. Plus we only wanted to expose selected fields and manipulate the format of the data to suit our needs.

We soon had our data classes built and the application was returning data ready to expose to our new WPF UI. And this is our task for tomorrow. The car is well and truly back on track and heading for the exciting twisty section of the ride. And I’m still only programming in Synergy. There is not a single line of C# or VB.NET!

So, should you wait before you try 9.5? Certainly not! Download it, install it, and start to build not only your code but your dreams of that new slick looking application – and all in Synergy. I’ll post the results of all our hard work at the end of the week. Please keep all hands and feet within the car and hold on tight to the hand rail. You’re going to love the ride!


.NET is a blast

By Richard Morris, Posted on November 23, 2010 at 3:19 pm

Avatar

One great aspect about my job is not only helping people utilise Synergy to the full, but to see the results of their hard work. And there is no better place to do this than “at the coal face”. Today’s coal face is, of course, on the shop floor at White Knight laundry. I was given a guided tour after lunch to see just how the Synergy system tracks items through the process.

The washing machines are huge, several feet taller than me. I shudder to think just how many pairs of socks you can wash within one of them, and they have several, all lined up together. It’s no wonder they have to tag every single item. Once items are cleaned they are dried in large driers and then the cool automation happens. Sheets are taken out of the dryers and each is laid out in turn at one end of a machine. If you are quick enough and sprint around to the other side of these large machines out pop a beautifully pressed and folded sheet. The shirt press is a blast, literally. It’s a two stage operation. Firstly the collar and cuffs are placed onto a machine and pressed. Then the shirt is placed over a frame, then it’s whisked off and steam blasted through it, and out comes a perfectly pressed shirt fit for a king.

And so to our CRM development. Our first task was to build the White Knight core routines into a native .NET assembly, which is the equivalent of an executable library. This task was achieved within a couple of hours. After all, it’s the same Synergy Language just a new compiler. The current system runs under Synergy version 8.3 and this code, I would say, hasn’t changed much since version 5.9 days. It’s testament to the power of Synergy to be able to take this code and build it under a brand spanking new development environment called Visual Studio 2010! To successfully build the new assembly required a few code changes. The compiler caught parameter mismatch declarations and some over subscripting. All the modifications we made improved the stability of the code.

We are now ready to begin to integrate our tried and tested logic with our new WPF UI. But there is a little more work to do first. Our data is a little shy and we need to gently coax it from the dark depths of our SDBMS files. Remember, some of this data was written away to the file a long time ago and those little single alpha character chaps that store our Y or N values work just fine in Synergy land, but for WPF we need to coerce these values to native types. So we are writing some very simple classes that take our Synergy records and expose only the fields our UI will be interested in as native .NET types.

Now we are building the WPF interface and binding to our new Synergy classes, exposing our existing Synergy data…


Taking .NET to the cleaners

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

Avatar

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…..


Dig into Synergy/DE 9.5 – Using CodeExchange

By William Hawkins, Posted on November 19, 2010 at 12:46 pm

Avatar

Like many of you, I’ve been waiting with bated breath for the release of Synergy/DE 9.5, and the general availability of Synergy .NET. The development team has been working on this project for a few years (I’m sure it seems like longer for them). But it wasn’t until the beta release earlier this year, that it became something with which you could actually start to write code that really did something useful. Those of you who were at the SPC a few weeks ago had an opportunity to use Synergy/DE 9.5 to develop a WPF application that used Synergy for all the (non-XAML) code in Visual Studio 2010.

As part of the beta testing effort, I’ve been using and updating code that has been submitted to the CodeExchange, and I thought I’d share what I did. Hopefully you can leverage the modifications that were done to the CodeExchange items to help with a possible migration to the .NET environment.

In order to make my life easier, I created a folder C:\Development\CodeExchange and deposited all of the CodeExchange submissions that were created by Synergy PSG, into subfolders.

Phase 1 Test the code in traditional Synergy 9.5.

As I knew I’d be doing a lot of test builds, I wanted to use the project build system built into Workbench (in Synergy/DE 9.3). So I created an empty workspace, and added all the Workbench projects that were in the subfolders. For those projects that didn’t have a Workbench projects, I created one, and for the few projects that didn’t have a mainline program, I created one of those too. Most of the time spent in this phase was in setting the Workbench build environment. As you would expect, the code didn’t require much (if any) modification.

Phase 2 Test the code in Synergy .NET 9.5.

When taking the CodeExchange submissions and building them in Visual Studio, it turned out to relatively easy. In order not to “pollute” the standard CodeExchange folders with Visual Studio “stuff”, I decided to create a separate folder for Visual Studio project. This was C:\Development\CodeExchangeVS, and under this folder is a subfolder for each submission – just like the Workbench folders. Inside these subfolders are a Visual Studio solution and a Synergy project. The Synergy project contains references to the code in the Workbench folders, so that I can use the same code in both places. If you just add a source code file to a Visual Studio project, what you’re really doing is copying the file to the project folder, but all Add Reference does is point the project to the appropriate source file. Now that I have a Visual Studio project, it’s just a matter of hitting the F6 button to build my application. If only it were that simple…..

When building the CodeExchange code in Visual Studio, the code falls into a number of different categories;

1) Requires no/minimal changes

2) Uses features (functions/subroutines) that are not supported

3) Needs recoding

4) Uses features (APIs) that are not supported

Again, most of the code fell into the first category, as it had already compiled using the traditional Synergy compiler. One thing that fell into the “minimal changes” category was the introduction of a logical to point to an include folder (usually the same folder as the source). As Visual Studio was using sources from a different folder, we could no longer rely upon the include file being in the “current folder”. For the purposes of CodeExchange sources, wherever a logical is required to access an include file, the source will use INC:

Also, there was very little code that required recoding – this was almost exclusively required by the use of %DLL_CALL(), which needed to be changed to %DLL_NETCALL(). The coding change was relatively straightforward. (See example below.)

.ifdef DBLNET

begin

argArray = new object[2]

argArray[1] = (object)^addr(spec)

argArray[2] = (object)^addr(WIN32_FIND_DATA)

srch_hdl = %dll_netcall(dll, DLL_TYPE_WINAPI, ‘FindFirstFileA’, argArray)

end

.else ;DBLNET

srch_hdl = %dll_call(dll, DLL_TYPE_WINAPI, “FindFirstFileA”, ^addr(spec), ^addr(WIN32_FIND_DATA))

.endc ;DBLNET

The bulk of the changes needed were mostly to deal with unsupported or not yet implemented features. I first started this project in Feb/Mar 2010, and as time progressed, the number of issues grew significantly smaller as the Synergy development team implemented features omitted from the early betas. At the time of writing, the unsupported features that got caught by the compiler are the use of HTTP_SERVER, %SS_FATAL() and W_CAPTION(). Another problem feature is the use of UI Toolkit. While there is a version of UI Toolkit that you can use when you build using Visual Studio, it’s not a complete implementation. The UI Toolkit provided with Synergy .NET is primarily aimed at allowing UI Toolkit code to be used with xfNetLink .NET and/or .NET interop projects – which are projects that do not use UI Toolkit for the User Interface. If you actually run the application and call a UI-related Toolkit routine, a runtime error will be thrown. For all the projects that used UI Toolkit, I added a try-catch around the entire application, so that I can catch any errors thrown by UI Toolkit. From a CodeExchange perspective, use of UI Toolkit is the main item that falls into the fourth category. The RCB API is another example of an unsupported feature in Synergy .NET.

One difference between traditional Synergy and Synergy .NET, is that there is no “stop message” dialog. “Hurrah!” I hear a lot of you say. Me too. However, with the CodeExchange submissions, most of the test programs are console applications, and now that there’s no stop message, when they complete, the application goes away too. This doesn’t give you much time to read the screen. So I wrote myself a little StopMessage routine, and added it to every application that needed it. As it turns out, this change was by far the largest change that I had to do.

Along the way, we’ve also enhanced some of the submissions; for example, the StringUtil submission is now more functionally rich, and we also added some new submissions (e.g., isamBenchmarks, GetDirFiles, memProc, POP3mail and SelectExample). There is also a new submission CodeExchangeVS which contains all the submissions below, plus the Workbench workspace with all the Workbench projects and all the Visual Studio solutions.

Here are the CodeExchange submissions that are included in the CodeExchangeVS download;

addSourceControl, ASCIIEncoding, axlsort, Base64, Base64_convert, BatchFileConversion, COPY_HANDLE, creditCard, DateTime, DTKproto, dtk_i_enable_set, dtk_list_multi_select, FileLocks, FindNPchars, FixData, GetDirFiles, GetWindowSize, HTTPexample, HTTPqueryString, iConvert, IsamBenchmarks, isHoliday, ismKey, ismSts, lct_lmf, LicensingToolkitExample, ll_accept, memProc, PartialMatch, POP3mail, Registry, RemoteServer, rfa_hex, rpschk, rpssql, rpsxdl, rpsxml, SelectExample, SMTPmail, SocketExamples, StringUtil, synckodbc, SynPsg.Rps, UpsTrack, url_encode, uspsWebService, WinDir, xfnl_synergy, xfplini, xfpllog, xfspism2xml.

Also, one final change. At the request of Synergy/DE Developer Support, each submission includes all the code required to rebuild the application. Previously, some CodeExchange submissions required you to download other CodeExchange submissions.

If you’re using any of the CodeExchange items above, I would recommend that you download the updated version. Synergex PSG is constantly looking for new opportunities to enhance the CodeExchange code submissions, so if you have any suggestions for new items, please let us know.

A Synergy/DE 9.5 RC (release candidate) is available now, and the general release should be available soon.


Burned again!

By William Mooney, Posted on August 30, 2010 at 2:20 pm

Avatar

I’ve just been burned again by a third-party application that doesn’t integrate with Office 2010. To the bane of our IT department, I’m constantly upgrading to the latest and greatest version of everything—the latest being Office 2010. [Note to our ISVs:  I’m like that customer who makes you cringe when he/she calls… ;)] And while I really, really, really love Office 2010, it just doesn’t integrate well with the applications I use, almost negating all of its benefits. My first productivity loss came when my emails to customers weren’t automatically going into our CRM app.  I am not the only one who is just blown away that this major player in CRM does not support Office 2010—and is not expected to until later this year! Next came our VOIP telephone system, which, when integrated with Office 2007, practically eliminated the need for a telephone handset. Office 2010 has brought me back to the hand set, and I just learned it will be at least another 6 months before our phone system supports Office 2010!  So much for keeping current.  I was so excited to use a 64-bit program, but what’s the point if the apps I use don’t work with it?

Perhaps I am overly sensitive to this issue because it has always been so important to us to support new versions of third-party products before our customers need them. I recall several years ago when Roger Andrews, our Synergy/DE Architect, was urging us to prepare for native 64-bit support. I thought at the time that we were way too early in the game. But, as it turned out, we were just in time. We work diligently to keep up with current hardware and operating systems so our customers can plan and anticipate the needs of their users. The proliferation of 64-bit systems has actually caught many of our customers by surprise. While 64-bit systems have been out for several years, the O/S support hasn’t always been there. That’s not the case today. Today, customers (like me!) are expecting 64-bit hardware, 64-bit operating systems, and 64-bit applications. They view anything less as inferior. Many of our customers are now catching up. This brings me back to my Office 2010 dilemma. While I’m benefitting from the substantial application enhancements and incredible performance enhancements of a native 64-bit program, I am losing several productivity tools that don’t yet support Office 2010. Almost defeats the purpose of upgrading.

I’m sure that there have been cases where we have not been ahead of the game, but I’m appreciative of the effort we make to anticipate the requirements of our users, often before they even request them. My personal experience has really brought home the point that the best, shiniest product in the world doesn’t matter too much if the software you want to use doesn’t run on or with it. Lesson learned: keep your software up to date so your users don’t get burned like I did!

P.S. I still can’t believe Adobe has not released a 64-bit version of Flash on Windows — argghhhhh


Mr Numpty’s hair stood on end. It must be the static!

By Richard Morris, Posted on August 26, 2010 at 8:09 am

Avatar

One fine day (well, it was raining – it is the UK after all), not too long ago (yesterday), there was a man called Mr Numpty (names changed to protect the innocent).  Mr Numpty was a seasoned Synergy developer and wrote Toolkit applications in his sleep (amazing what Workbench can do for you these days).

This one day, Mr Numpty was browsing the spc.synergex.com web site for the early bird registration form when suddenly his big red support phone rang.  It has a unique ring tone and a strange light appears in the sky, which can be easily seen on the lovely grey storm clouds forming outside his window.  Mr Numpty says to himself “this must be very important” and reaches for his cloak.  Picking up the phone, a rather bemused voice, which he recognises immediately as his uncle, ‘Uncle Joe’, says;

“Numpty my man, things they be strange. My list is looking great, but my data’s in a rage.”

“Is it the new product browser?” asks Mr Numpty.

Uncle Joe replied;

“It is indeed, that’s the one.  ‘Been using it all day, ‘cos it’s so much fun.  The windows are great, and the tabs are a hit.  But when I print, the results are not that great!”

“OK Uncle Joe I’ll take a look” replied Mr Numpty.  He looked through the code but could not see any errors.  He ran the program, and clicked on the tab.  Uncle Joe was right.  The list looked great with all the right data.  Printing from here worked also and the results were fine.  Confused, Mr Numpty pondered and scratched his head.  He scratched so hard his hair stood on its end. From the corner of his eye he caught sight of himself in the mirror.  Wow he thought. My head looks funny. I must be fully charged with static!

Ping!  Suddenly he remembered a dim and distant UI Toolkit training course, and the voice of a PSG consultant began to haunt him… “Remember the golden rule: The list processor first updates the current non-window data area, processes the request, then returns the current non-window data!”  So something must be corrupting my non-window data, but only sometimes. 

Taking a closer look at his list routine he noticed his problem.  The data being passed to the list processor was defined as ‘stack’.  This means that each time the routine is called the data area is created, and the contents undefined.  Calling the routine for the first time creates the list, which is correctly loaded from the load method.  By clicking on other tabs means we leave the list routine.  Clicking back on the tab containing the list causes the list record area, defined as stack data, to be created with the contents undefined.  When this is then passed to the list processor the non-window data will be updated with this undefined data.  Visually, everything will look fine, but the data used by the program will be corrupted.

Taking inspiration from his static hair style, Mr Numpty changes the record declaration to ‘static’ and his program now fully works.  He updates Uncle Joe’s computer.

“Numpty my man, it all looks swell.  Now can we filter and sort the columns as well?”

Mr Numpty thought for a moment, “I’m not sure how to do that, but it sounds like a great idea.  Now where was I?”  Mr Numpty continues to complete the spc.synergex.com early bird application form, wondering if this year’s conference will give him the knowledge to give his uncle the features he wants.


Airline Baggage Roulette

By Steve Ives, Posted on August 8, 2010 at 7:07 am

Steve Ives

Well it's another day in United Airlines "friendly skies" for me. I'm setting out on a week-long treck around the East Coast and Mid-West to visit several Synergy/DE customers with one of our sales account managers, Nigel David. It takes a LOT to make me smile when leaving home at 4.am on a Sunday morning, but today that's exactly what hapenned.

I walked in to the airport terminal at Sacramento "International" Airport, and I couldn't help noticing that one of the baggage carousels had been somewhat "jazzed up" (see photo). I just had to smile … I don't often check bags but it seems like every time I do there is some kind of issue. Now, at least, it seems like this airport has decided to be honest about the state of things … checking a bag with the airlines is somewhat like a game of roulette! OK, maybe the odds of getting a checked bag back on time may be a little better than one would expect in a casino … but not much!


Giving people what they want

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

Avatar

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.


Gearing up for another great SPC

By William Mooney, Posted on August 4, 2010 at 1:47 pm

Avatar

It’s been a while since I posted a blog, but the SPC always seems to propel me back into the blogosphere! SPC 2010 is unbelievably just around the corner, and we are once again gearing up for a conference that is not-to-be-missed.

A few years ago, a customer asked me to help him justify the conference to his team and upper management. I quickly jotted down the top reasons to attend the SPC and ended up sending the list to all of our customers. As the reasons haven’t changed much since then, I won’t bore you by repeating them all but think the main ones deserve a recap.

Here goes…

  • Continuing education. Imagine going to your heart doctor for a check up and learning that he or she has not been to an industry-related conference for several years. How has he/she kept up with all of the advances in the technology? Reading journals and surfing the net? Wouldn’t you prefer he/she had a more well-rounded education including hands-on instruction, networking with peers, and one-on-ones with industry experts? Likewise with your software—make sure your “application doctors” are getting the best education possible.
  • Break away from your day-to-day routine. One of our customers said about the SPC, “The SPC gives me a chance to escape the hustle and bustle of business and think strategically—I use it like a software development retreat.”  I have to agree. More often than not I solve problems or come up with new ideas when I’m away from the office on a business trip or seminar. And, your employees who attend will come back motivated and inspired by your confidence in sending them. I know this first-hand from the responses I get from my employees when I send them to conferences.
  • Learn about the future of Synergy/DE. Version 9.5 will offer native support for Microsoft’s .NET Framework, enabling you to interoperate with applications written in other .NET languages, such as C# or VB .NET; to take advantage of all .NET Framework classes; and to develop Synergy code in Visual Studio. At the SPC, you will learn the ins and outs of the new technology, and get the opportunity to try it out for yourself with hands-on exercises. (Note: The focus isn’t on getting to .NET. The focus is on modernizing your application – and .NET just happens to be the best way to do it. I’ll be blogging more about this shortly!)
  • Experience the latest functionality hands-on. It’s one thing to hear about all the new features we’ve added to our products over the years—it’s another to actually try them out with the knowledgeable PSG consultants standing by for questions. The popular Code Phantom is back, offering even bigger, better, and more enjoyable challenges to help you experience the latest functionality first-hand.
  • You want to make sure you are fully taking advantage of Synergy/DE 9.3. Synergy/DE 9.3 delivers a number of important features that enable you to improve security, performance, and productivity. The SPC will cover these features in detail so you can be sure you are making the most of them in your own applications.
  • Networking. SPC attendees often describe the networking opportunities as the most valuable aspect of the conference. Where else will you be among so many other Synergy/DE developers, who may be working on or may have completed projects just like those you are considering or may be struggling with? One of our customers who traveled from Europe told me he justified the entire conference just by one conversation he had with another customer at the welcome reception. The rest of the conference was just icing on the cake. And because this year’s conference is in Sacramento, the Synergex staff members who are developing and supporting your Synergy/DE products will be there to answer your questions.
  • Your business depends on it. I could go through several analogies ranging from maintaining your health, home, investment portfolios, etc., but the bottom line is that your business depends on your Synergy/DE solutions. With that in mind, how could you not take advantage of this once-a-year opportunity to make sure you are taking advantage of all that is available to you—that you are working most efficiently, and that your products are as functional and powerful as the technology allows them to be?

You can find details about the conference at conference.synergex.com. I look forward to seeing you there.


Blunt Pencil?

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

Avatar

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!


XP: The O’Hare of Computer Network Traffic

By synergexadmin, Posted on July 30, 2010 at 4:57 pm

Avatar

Not long ago, I found myself with a lot of time to kill while sitting in an airport and waiting out a flight delay. The culprit, I was told, was a weather system circling over Chicago. At first this seemed odd, since the plane I was awaiting had neither originated in nor connected through O’Hare.

Chicago’s O’Hare Airport is one of the worst places you can find yourself when trying to make a connection. Whenever I see O’Hare on a flight itinerary, I immediately offer up the prayer: “ORD, have mercy.”

I’d intentionally avoided Chicago in my travel arrangements, so I was a little perturbed that O’Hare was still causing me a headache. I began musing on the ripple effect that it plays on the nation’s air traffic network, and a sudden thought occurred to me: “O’Hare does to the air travel network what XP does to data networks.”

I knew I was being unfair to Chicago, but hey: I was irritated. In reality, O’Hare is a well-oiled machine when compared to what Windows XP can do to a network. But thinking of the nation’s air traffic as a computer network really got my Analogy Engine started. I could see every plane as a network packet carrying bits and bytes of information. I saw traffic control towers as network controllers, and airports as individual computers (or hubs, as the case may be). I saw it all in a whole new light…and then wondered, “What would happen if an airport really handled network traffic in a manner similar to XP?”  It was a chilling thought.

For all of its apparent problems, O’Hare still has a significant networking advantage over the default operations of XP (and Windows 2000 and Server 2003): Selective Acknowledgements. The concept at the heart of SACKS allows the controllers at O’Hare to bring planes in for landings without regard for the order in which they were supposed to arrive.

If you’ve ever found yourself trying to diagnose why an XP user is complaining that “the Internet is slow” – even while everyone else on the network seems to be enjoying good speeds – then you’ve already seen what can happen when SACKS aren’t enabled for TCP communications. In fact, in this day and age, SACKS are so vital that it’s amazing Microsoft has never put out a fix on Windows Update – even as an optional one – that enables Selective Acknowledgements. Instead, they leave it up to systems administrators to manually edit the registry of each user’s machine – if, that is, they’re even aware of the problem or its solution.

I should warn you now that because I’m not interested in being the unwitting cause of a registry foul-up that destroys someone’s computer, I’m not going to tell you what those registry tweaks are. There are plenty of articles that will walk you through the process of enabling Selective Acknowledgement on Windows XP, as well as tips on setting the TCPWindowSize to further enhance performance. If you’re just reading this in hope of finding a quick fix to your XP networking woes, you might want to move along now.

On the other hand, if you’d like to learn a little more about SACKS and why it’s so important, then stick around and read on…

Understanding the importance of Selective Acknowledgments is perhaps easier if you understand what happens when they’re not enabled. Imagine that you’re Xavier Purdydumm (XP to your friends), and you’re the “receiving” traffic controller at Nitwit Sacksless Airport (airport code: NTSX)…

You arrive at work before a single plane has entered your airspace. You then review a list of scheduled arrivals for the day. You note the number of planes you expect today, and the order in which they will land. It looks like a light traffic day – you’re only expecting 25 planes before your shift ends.

You’re now ready, so you send out a notification that traffic operations can now commence. And look here! The first plane is on approach. So far, so good.

Plane One lands without incident, as do planes Two and Three. But oh-oh, now there’s a problem: Plane Five just landed…but where’s Plane Four?

You immediately send out a plane of your own. It’s instructions are to fly to Plane Four’s origination point, and to let its traffic controller know that Plane Four never arrived. In the meantime, Plane Six comes in, lands, and heads to the gate.

Still no plane FOUR. However, regulations are regulations so now you send out yet another plane to again request that plane FOUR be sent over. And aha! A new plane arrives. It’s….

…Plane Seven.

You repeat the process again and again, once for each time a new plane arrives. Finally, after you’ve sent off your 15th plane to request the location of the missing aircraft, plane Four suddenly lands. Turns out that plane Four got diverted when it ran into a storm system over Lake Cisco – the same storm system, as it turns out, that you just sent your last 15 planes flying into.

Well, that’s not your concern. You’re here to count planes coming in. And speaking of which, here comes another. It touches down, rolls past you and you see that it’s plane Five. You shake off a sense of déjà and cross it off your list.

You also cross plane Six off of your list – almost (but not quite) certain you’ve seen it before, too – when something odd happens: plane Four lands and taxis by.

Now how could that have happened? You’ve already crossed it off of your list, but there it is (again), plain as day. Deciding you must have made a mistake, you erase the check marks next to planes Five and Six, since there’s no way they could have landed if plane Four hadn’t landed yet.

And just to prove it: Here come planes Five, Six, and…Four?. Again??!?

By now, you’re completely confused, and the fact that one of your underlings keeps reporting that there are already planes sitting at Gates 4 through 6 is really getting on your nerves. He should clearly see that those planes haven’t been checked of your list, so why is he bugging you? You tell him to take care of it, as you’re very busy counting planes at the moment, so he tells them all to get lost. Taking a bit of initiative, he also shoos away the planes waiting to park at gates 7 through 18, too.

This process repeats itself again and again – a total of five times – before the count continues normally with planes Seven, Eight, Nine, Ten, and so forth. By the time plane Twenty Five successfully touches down and unloads at the gate, you feel that somehow your easy traffic day became a nightmare.

And it was a nightmare – but not just for poor Xavier Purdydumm. It was a grueling day for the traffic controller at the airport from which all twenty-five planes departed, as well as for everyone else using the air traffic network – including the folks that never even passed through NTSX.

Let’s take a quick look at the network traffic as shown in the above scenario, versus how it might have looked if Xavier had been able to work with Selective Acknowledgements:

ProtocolPackets ReceivedTotal
No SACKS1-2-3-5-6-7-8-9-10-11-12-13-14-15-16-17-18-4-
5-6-4-5-6-4-5-6-4-5-6-4-5-6-7-8-9-10-11-12-13-14-15-16-17-18-
19-20-21-22-23-24-25
51
SACKS1-2-3-5-6-7-8-9-10-11-12-13-14-15-16-17-18-4-
19-20-4-21-22-4-23-24-4-25-4
29

 

You’ll notice that the first 18 packets are identical, but after that things start to go awry. With only 25 packets in the total communication, a disruption on the 4th packet caused the network to carry 75% more traffic than would have been necessary had SACKS been enabled. Why?

Under TCP, it’s the duty of the receiver to notify the sender when a packet arrives out-of-order. Unfortunately, SACKS-less communications require that all traffic must arrive in order. And just to make matters worse, the originator of the traffic has its own set of rules to follow – the default of which being to only resend a packet if it has been requested in triplicate.

Now, in the example above, one might say that it was the storm over Lake Cisco that caused the issue, but it’s hard to blame the latency caused by the weather. Sure, it certainly caused the disappearance of the original “plane Four.” It also slowed down the traffic both to and from Nitwit Airport, thus allowing fifteen requests to be sent from NTSX before the originator ever received the first three and re-sent plane Four.

But note that the storm caused an equal number of duplicates to be dispatched, whether the protocol had SACKS enabled or not, so as a “factor” the weather pretty much washes out; everyone has to deal with it.

So while the weather causes things to slow down a bit (latency), the root problem is that SACKS-less communications require the sender to resend packets that have already been received in addition to the lost packet.. It’s bad enough in the tiny scenario shown above…but consider the impact if there had been 1,000 packets sent with multiple packet losses.

As I mentioned before, there’s a fix that allows you to turn on Selective Acknowledgements, but it’s not easy to implement – particularly if you’re a developer with multiple software installations at customer sites. The only way around the problem (and remember that it affects Windows 2000 and Server 2003 as well) is to modify the registry. You may find resistance from your customers when you tell that they’re going to need launch RegEdit and start adding DWORD values on every XP workstation they own.

For those of you who are wondering why SACKS-less networking is even in use on XP, remember that “Selective Acknowledgement” is a networking paradigm that came about long after the NT operating system had been created. Back then, when NT launched, there was no such thing as a “high-speed” internet. Networking technology was designed primarily to deal with LANs, which generally meant low-latency communications and fewer lost packets.

Years later, Windows 2000, Windows XP and Server 2003 were introduced. Everyone would probably agree that they were huge steps forward, but unfortunately they all borrowed heavily from NT networking services. That meant that they also adopted a SACKS-less networking default – even as internet speeds, overall network traffic and latency potentials were skyrocketing.

So the next time the skies are full over Chicago, the clouds are massing above Lake Michigan and you figure you’re either going to be late for dinner or late for your connection, remember Xavier Purdydumm…and thank the ORD for Selective Acknowledgements and the fact that O’Hare, at least, has made an effort to keep up with the times.


Starting Services on Linux

By Steve Ives, Posted on July 24, 2010 at 3:14 pm

Steve Ives

For a while now I’ve been wondering about what the correct way is to start boot time services such as the Synergy License Manager, xfServer and xfServerPlus on Linux systems. A few years ago I managed to “cobble something together” that seemed to work OK, but I had a suspicion that I only had part of the solution. For example, while I could make my services start at boot time, I’m not sure that they were getting stopped in a “graceful” way during system shutdown. I also wondered why my “services” didn’t show up in the graphical service management tools.

My cobbled together solution involved placing some appropriately coded scripts into the /etc/rc.d/init.d folder, then creating symbolic links to those files in the appropriate folders for the run levels that I wanted my services started in, for example /etc/rc.d/rc5.d.

This week, while working on a project on a Linux system, I decided to do some additional research and see if I couldn’t fill in the blanks and get things working properly.

My previous solution, as I mentioned, involved placing an appropriately coded script in the /etc/rc.d/init.d folder. Turns out that part of my previous solution was correct. For the purposes of demonstration, I’ll use the Synergy License Manager as an example; my script to start, stop, restart and determine the status of License Manager looked like this:

#

# synlm – Start and stop Synergy License Manager

#

. /home/synergy/931b/setsde

case "$1" in

   

start)

        echo -n "Starting Synergy License Manager"

       

synd

       

;;

   

stop)

       

echo -n "Stopping Synergy License Manager"

       

synd –q

       

;;

   

restart)

       

$0 stop

       

$0 start

       

;;

   

status)

       

if ps ax | grep -v grep | grep -v rsynd | grep synd > /dev/null

       

then

           

echo "License Manager is running (pid is `pidof synd`)"

       

else

           

echo "License Manager is NOT running"

        fi

       

;;

   

*)

       

echo $"Usage: synlm {start|stop|restart|status}"

       

exit 1

esac

exit 0

If you have ever done any work with UNIX shell scripts then this code should be pretty self explanatory. The script accepts a single parameter of start, stop, restart or status, and takes appropriate action. The script conforms to the requirements of the old UNIX System V init subsystem, and if placed in an appropriate location will be called by init as the system runlevel changes. As mentioned earlier, I had found that if I wanted the “service” to start, for example when the system went to runlevel5, I could create a symbolic link to the script in the /etc/rc.d/rc5.d folder, like this:

ln –s /etc/rc.d/init.d/synlm /etc/rc.d/rc5.d/S98synlm

Init seems to process files in a run level folder alphabetically, and the existing scripts in the folder all seemed to start with S followed by a two digit number. So I chose the S98 prefix to ensure that License Manager would be started late in the system boot sequence.

This approach seemed to work pretty well, but it was kind of a pain having to create all those symbolic links … after all, on most UNIX and LINUX systems, run levels 2, 3, 4 and 5 are all multi-user states, and probably required License Manager to be started.

Then, almost by accident, I stumbled across a command called chkconfig. Apparently this command is used to register services (or more accurately init scripts) to be executed at various run levels. PERFECT … I thought! I tried it out:

# chkconfig –-level 2345 synlm on

service synlm does not support chkconfig

Oh! … back to Google… Turns out I was something really critical in my script, and believe it or not, what I was missing was a bunch of comments! After doing a little more research I added these lines towards the top of the script:

# chkconfig: 2345 98 20

# description: Synergy/DE License Manager

# processname: synd

Low and behold, this was the missing piece of the puzzle! Comments … you gotta love UNIX! So now all I have to do to start License Manager at boot time, and stop it at system shutdown is use the chkconfig command to “register” the service.

And there’s more … With License Manager registered as a proper service, you can also use the service command to manipulate it. For example, to manually stop the service you can use the command:

# service synlm stop

And of course you can also use similar commands to start, restart, or find the status of the service. Basically, whatever operations are supported by the init script that you provide.

Oh, by the way, because License Manager is now running as a proper service it also shows up in the graphical management tools, and can be manipulated by those tools … very cool!

Of course License Manager is just one of several Synergy services that you could use this same technique with. There’s also xfServer, xfServerPlus and the SQL OpenNet server.


Visual Studio 2008 SP1 Hangs After Office Upgrade

By Steve Ives, Posted on July 22, 2010 at 5:55 pm

Steve Ives

Just incase you run into the same issue…

This week I had to revert back to using Visual Studio 2008 while working on a customer project, and I pretty quickly found that I had a problem. I was working on an ASP.NET web project, and found that each time I opened a web page for editing, Visual Studio would appear to hang. Clicking anywhere on the Visual Studio window resulted in the ubiquitous Windows “beep” sound.

On researching the problem in the “Universal Documentation System” (Google) I quickly found that I was not alone in my frustrations … in fact it seems like this is a common issue right now.

Turns out that the problem is related to the fact that I recently updated from Office 2007 to Office 2010. I guess Visual Studio 2008 uses some components from Office 2007 when editing HTML and ASPX pages, and I guess that component got screwed up by the Office 2010 upgrade. If you encounter this problem you will likely find that when Visual Studio 2008 hangs it has started a SETUP.EXE process, but that process never seems to complete. Apparently it’s attempting to do a repair of the “Microsoft Visual Studio Web Authoring Component”, but for some reason can’t.

The solution seems to be to manually run the setup program and select “Repair”. On my system the setup program was C:Program Files (x86)Common Filesmicrosoft sharedOFFICE12Office Setup ControllerSetup.exe. My system runs a 64-bit O/S … if you’re using a 32-bit O/S you’ll presumably just need to drop the (x86) part.

The repair took about two or three minutes, and low and behold I have my Visual Studio 2008 installation working just fine again!


Linux ls Color Coding

By Steve Ives, Posted on July 20, 2010 at 4:32 pm

Steve Ives

It’s always driven me CRAZY the way that RedHat, Fedora, and presumably other Linux systems apply color coding to various types of files and directories in the output of the ls command. It wouldn’t be so bad, but it seems like the default colors for various file types and protection modes are just totally unreadable … for example black on dark green doesn’t show up that well!.

Well, today I finally got around to figuring out how to fix it … my preference being to just turn the feature off. Turns out it was pretty easy to do, open a terminal, su to root, and edit /etc/DIR_COLORS. Towards the top of the file there is a command that was set to COLOR tty, and to disable the colorization all I had to do was change it to COLOR none. Problem solved!

Of course if you look further down in the file you’ll see that there are all kinds of settings for the color palettes to be used for various file types, file protection modes, etc. You could spend time “refining” the colors that are used … but personally I’m happier with the feature just GONE!


Don't miss a post!

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

Recent Posts Categories Tag Cloud Archives