Learning REST Basics

One of the sessions that I presented at the recent DevPartner Conference was on the subject of building RESTful web services using ServiceStack. The basic concepts of REST are often difficult to grasp when you’re first getting started, but while browsing this morning I came across a web site that I thought was a great REST resource, and in particular included a video that I thought did a really nice job of explaining the basic concepts of REST.

The site is http://www.restapitutorial.com/ and the video can be found at http://www.restapitutorial.com/lessons/whatisrest.html

Posted on May 23, 2015 at 1:48 pm by · Permalink · Leave a comment
In: Recomended Websites · Tagged with: 

Synergy .NET Platform Targeting Options

One of the many options that is available to developers each time they create a new project in Visual Studio is how to configure the platform targeting options in the project properties dialogs Build panel. In the latest versions of Synergy there’s probably not much to worry about because the default values probably do exactly what you want most of the time, but the default values were not the same in some older versions of Synergy .NET, so it’s a good idea to have a good understanding of what your options are, and what the implication of choosing each option is.

In Synergy 10.3.1a we’re talking about two options; the Platform target drop-down and the Prefer 32-bit checkbox.

Project Build Options

The Platform target drop-down allows you to select from three different ways that the assembly that is created by your project (the .DLL or .EXE file) can be created; essentially you are choosing which .NET CLR (and Framework) will be used to execute your code. The options are:

Any CPU (default) Assembly can be executed by either the 64-bit or 32-bit CLR, with 64-bit preferred.
x86 Assembly can ONLY be executed by the 32-bit CLR on an Intel x86 CPU.
x64 Assembly can ONLY be executed by the 64-bit CLR on an Intel x64 CPU.

It is important to understand that we’re not talking about which Synergy runtime components will be used, we’re talking about which .NET CLR will be used, and the matching Synergy runtime components must be present on the system in order for the assemblies to be used.

The Prefer 32-bit checkbox (which was added in Synergy 10.3.1a and is only available when the platform target is set to Any CPU) provides the ability for you to determine that even though your assembly will support both 32-bit and 64-bit environments, you would prefer that it executes as 32-bit if a 32-bit environment is available.

The chart below summarizes which environment (32-bit or 64-bit) will be selected for all possible combinations of platform targeting settings and deployment platform.

Framework Selection Grid

A red n/a entry in the table indicates that an assembly would not be available for use in that particular environment.

So what’s the take-away from all of this? Well it’s pretty simple; Stick to the defaults unless you have a good reason to do so. The current default is Any CPU, Prefer 32-bit which means that on Intel x86 and x64 systems your apps will run as 32-bit. This in turn means that you only need to install the 32-bit version of Synergy on runtime only systems unless you also need to run services such as license sever, xfServer, xfServerPlus or SQL OpenNET on the same system. Development systems should ALWAYS have 32-bit and 64-bit Synergy installed.

Posted on May 21, 2015 at 10:25 am by · Permalink · Leave a comment
In: Software Development · Tagged with: , ,

DevPartner 2015 – WOW!

That was the week that was the DevPartner 2015 conference in Philadelphia. Ok, so I’m biased but I really have to say this was one of the best conference weeks I’ve had the pleasure to be part of for many years. There were some really great sessions: The HBS customer demonstration rocked! They came to a conference a couple of years ago, did a tutorial on xfServerPlus and with this new found knowledge (and some PSG guidance) created a cool web bolt-on to their existing Synergy app.

We saw some fresh new faces from Synergex: Marty blasted through the Workbench and visual Studio development environments we provide and showed some really great tools and techniques. Phil gave us a 101 introduction to many of the “must know” features and capabilities of Synergy SDBMS – and of course was able to address mine and Jeff’s performance issues – you had to be there:). Roger demonstrated his wizardry to enlighten everyone as to the issues you need to consider when transferring your data within local and wide area networks – I was the bad router!

Bill Mooney set the whole tone of the conference with a great opening presentation showing just how committed Synergex are to empowering our customers with the best software development capabilities available.

My first day’s session followed and gave me the opportunity to demonstrate how you actually can bring all our great tools together to create true single-source, cross-platform applications which run on platforms as diverse as OpenVMS, UNIX and Microsoft Windows and onto a Sony watch running Google Wear!

Steve Ives went 3D holographic with videos from his recent trip to the Microsoft Build conference that showed just how amazing the Microsoft platform is becoming – and we aim to continue to be a first class player in that arena.

So many of our products are reaching a level of maturity that blows the competition away. Gary Hoffman from TechAnalysts presented a session showing how to use CodeGen and Symphony in the real world and showed just what you can achieve today in Synergy.

Jeff Greene (Senior .NET engineer @ Synergex) and I presented a rather informal (read written the night before) presentation showing the performance and analysis tools in Visual Studio 2015 that you can use to identify problem area and memory leaks in your application. Within minutes Brad from Automated System forwarded me an email he’d just sent to his team:

“At the Synergex conference just this morning, they just showed fantastic new diagnostics tools in Visual Studio 2015.  I just put the Team on the trail of potential memory issues with these new tools in a Virtual PC environment so we don’t alter our current developer stations. This could both reduce the memory footprint and improve performance.” – You can’t beat such instant feedback!

The tutorial time gives attendees the opportunity to play with the latest tools on a pre-configured virtual machine – plug in and code! And we continued the hands-on theme with Friday’s post conference workshop – where we built the DevPartner 2015 App from the ground up!

nexus_working

Thanks to everyone for coming and making the conference such a great success. It’s our 30th conference next year so keep your eyes and ears open for dates and details – it will be a conference not to miss!

Build your own CLR

Open source code is all the rage these days, everyone is doing it, even Synergex.  For some years now CodeGen and Symphony Framework have been open source.  They are both available on www.codeplex.com.  What this gives you is the ability to see inside the classes and programs to see, if you are interested, exactly how they are doing what they do. Even Microsoft are joining the open source band wagon – the .NET Framework is open source and the CLR is following!  Where PSG lead, others will follow (LOL – I think that means laugh out loud, so my kids tell me).

Does this mean you are going to grab all the code, build your own CLR and tweak it to make the blue windows green? No, not at all.  What it does mean is that people can now see what’s happening inside the ocne “black box” and move this code to other platforms.  And this obviously helps us Synergy .NET developers.  We can already take advantage of other platforms because of the availability of the .NET framework and CLR components on non-windows platforms.  It’s how we can deploy your next application to that fancy new Android or iOS phone.  It’s how you can take your good received code you wrote 10 years ago, bundle it up into a tablet application with signature capture and have real time “proof of delivery” built into your systems.

Aside from the conference topics there was an interesting question on the Synergy-l list last night.  The request was to display multiple coloured boxes on the screen.  Sounds simple – and using Synergy.Net inside Visual Studio it was!  20 minute later….

boxes

 

 

 

 

 

 

All the UI elements (colour, values, images) come from a data bound repository based structure so you could load the contents directly from your ISAM files.  The actual colours and images are selected through switches inside the XAML code based on the values of your synergy data.  I don’t think I’ll be demonstrating this simple example at the DevPartner 2015 conference, but there will be lots of great examples to see, and of course tutorials to step you through how it’s done.  It’s the last day of DevWeek tomorrow which means I’ll be driving my car around the M25 car park trying to get out of central London for hours.  So I’ll make this my last blog from the conference.  As always the conference has been enlightening.

 

Colour my World

Apparently UI design is more than just picking colours for you controls – who would have guessed it.  Now if the Senior Director of Design @ Infragistics is telling you this then I guess it’s time to listen.  I’m all for a good UI design – but in our world sometimes it’s just too easy to take the “take what we have and make do” approach.  If you have a cell-based or even a UI Toolkit screen cluttered with fields, drop-downs, lists etc. then surely that’s what the users want to see in your shiny new app right?  Well maybe, but then you struggle with new prospects because your UI looks, well, wrong.  The functionality of the application beats the competition hands-down, but often it’s not good enough to even get your foot in the door.  And for all you in-house developers who don’t have a system to “sell” – don’t look away now as your users are just as important to keep happy as the next sales prospect.  Imagine if you had to write that cool new app using “notepad” – no intellisence, drag and drop didn’t exist, only one edit buffer available, the list is endless – but in a nutshell you’d leave and go program somewhere where they provided the best tools for you to do your job.  And so it is the same for your users – give them the tools to perform at their best.

And then we come back to the age old problem – ten-key.  You just can’t beat data entry on a cell based system.  While this is generally accepted as true, there are ways to improve the process.  Reduce or in many cases eliminate the chrome around the application (I think the cool term today is “flatten”).  Does every other field have to be a comb-box – why not let the user enter the “known only to them” code and provide the newbies with a clickable button to “find” the one they want – you’ll soon find them entering the code!  Choose a colour scheme that matches the environment. If you application is for office based people then make the screen light and bright – it’s easier on the eyes in a bright open office.  Or maybe your application is being used in a dark control room – no windows or natural sunlight, so make the application darker and milder to reflect this.  Align your controls, prompts and buttons to a gird like structure.  Don’t overdo the font types and sizes.  And of course there is the 1.617 rule!

It’s interesting that many of the sessions this year are more about making your apps look right and not actually making you aps.

 

Posted on March 25, 2015 at 3:28 pm by · Permalink · Leave a comment
In: Uncategorized

Secure the Bridge

Today is actually the first “real” day of the DevWeek conference.  As a member of the DevPartner team at Synergex I tend to look at more than just the agenda content when I attend conferences like this – the venue has to be right.  DevWeek this year is being held in a church!  it’s a fully-fledged conference venue, but it’s still a church.

The opening keynote was a dual affair.  The first half was about trees (not the green leafy variety) followed by a presentation about how “estimates are a complete waste of time, effort and resources” – something I can certainly agree with!  If you consider that all estimations are based on guess work, why waste time guessing how long something may take just to get it wrong.  There are other more accurate ways to plan out a project – the biggest challenge is convincing the customer.

Not everything presented at this conference is directly related to coding – and it’s the same at DevPartner 2015. This year we are bringing in people from outside of Synergex to present a different perspective to developing software outside of just “typing Synergy code”.  This will include experts in the field of UI design considerations – so your Synergy applications can sparkle.

One area I’m working on at the moment is security.  The new Symphony Bridge is a web-service architecture that allows direct access to your code and data from any client.  Unlike a traditional Web Service the Symphony Bridge does not expose all your methods and data structures, which is a security concern for old legacy implementations.  It exposes a single point of entry that accepts a single input stream – there are no external indications as to what that entry point is or the format of the input data.  This helps to protect the service from those hackers out there that just want to get into and behind your service.

The security 101 session today was both informative and reassuring that Bridge is doing as much as it can to protect your back end server systems from attack.  I’ll demonstrate some of the built in security features during the “Serving up Success” session.

Posted on March 24, 2015 at 2:16 pm by · Permalink · Leave a comment
In: Events, Software Development

Conference Time

Day one and a 9:30 start, which is quite early for a Monday morning – and I have just hustled my way through the London underground commuter traffic!  Front row seat for the Xamarin multi-targeting apps workshop, and the presenter is a fellow “Evangelist” so things are looking good.

My goal for today is to squeeze as much knowledge from James, the Developer Evangelist from Xamarin, to ensure everything we are doing at Synergex is going to take us down the multi-targeting utopia highway.

DevWeek in London is an annual conference I try to attend because over the years it’s given me many thought provoking ideas that have made their way into Synergy, Symphony and the applications I write and assist on.  I’m especially looking forward to this year because everything is no longer just about C#, it’s now about multi-platform targeted development – you know, just like what we have been doing with Synergy for 30 years!!

Today it’s a pre-conference Xamarin workshop showing how to provide true native applications on android, iOS and Windows without compromising the UI or having to duplicate your application code across multiple development projects.  The trick is Portable Class Libraries (PCL’s) – once you have these you can plug them into your chosen UI project (Android, Windows, iOS).  Of course Synergy allows for the creation of these PCL’s so out-of-the-box your development team have the tools to “go mobile”.

Many years ago Synergex developed the UI Toolkit – and I know many people reading this will still have applications running using it.  It provided a single source for UI design that targeted multiple platforms.  You could write your UI pieces into a script file which would be “compiled” on the target platforms and the same Synergy code would run and display according to the host environment – OpenVMS and UNIX was “green screen”, Microsoft Windows was just that, native Microsoft Windows.

Today’s multi-targeting tools come from Xamarin and are built into Microsoft Visual Studio and Utilise the Microsoft .Net Framework – just like Synergy.  It provides developers with the ability to write-once-deploy-many across all the latest must-have devices including iOS, Android and Windows Phone and Store.  And did I mention Google Wear?

As a Synergy developer you are perfectly placed to take full advantage of these opportunities.  As well as being able to build new applications from Synergy templates, built into Visual Studio for Android and iOS, you can also plug in your Synergy Portable Class Libraries directly into Windows Phone and Store applications.  You could even be sending push notifications to the latest Google Watch technology on your wrist, if that’s what your application needs.

We will be showing you just how easy it is to create great cross-device apps using Synergy and the latest Xamarin tools at this year’s DevPartner 2015 conference.

And if you want to get right up to speed on all things Synergy don’t forget to sign-up for the pre and post conference workshops.  These workshops will take you from zero to hero when it comes to building great Synergy applications using all the latest tools and techniques, and understanding what all the buzz words and jargon mean.

Posted on March 23, 2015 at 2:26 pm by · Permalink · Leave a comment
In: Development Tools, Events, Software Development

Symphony Bridge

For more than 30 years Synergex has enabled developers to take advantage of many different computer operating systems, hardware environments and networking topologies.  Today there are a number of different options to enable connectivity between client applications and services and the Synergy application logic and data.

If it’s a simple case of data on one machine and Synergy application on another then xfServer is the technology of choice.  One quick change to your environment variables and off you go – data being served on a plate.

If you want to move the execution of Synergy logic onto the server where the data is to improve performance while doing complex data searching and analysis, or need to access the application logic from non-Synergy environments like C#/ASP.NET/Java, then xfServerPlus is the perfect fit.  It takes a little more configuring, but is proven and reliable.

Both of these “server” technologies required a certain configuration of your network and are only recommended for use on your internal LAN.  So getting data and logic accessible to clients on the wrong side of your firewall, in a standard and secure way, requires the use of other tools or software.  The general approach is to create a web service to expose all the methods you would like the client to be able to consume.   Once you’ve written this web service you then need to run the Synergy application logic and data access.  You can call back into your traditional ELB’s via xfServerPlus or you could write the server in Synergy.Net and use xfServer to access the data – but stop!  If you do this you run the risk of running out of channels, different processes crashing your common data and other issues. 

Welcome to the Symphony Bridge Server and the Symphony Harmony namespace.  Symphony Bridge provides a RESTful web service layer that allows you to execute your native Synergy.Net application logic and data access from any Synergy supported client consumer.  The Symphony Harmony namespace provides the ability to access your applications database files using SQL syntax and to make remote procedure calls to execute Synergy application logic, without the need to build a web server of your own, because it uses the Symphony Bridge.

We’ll be presenting the new Symphony capabilities at DevPartner 2015 and you’ll get your chance to try them out by working through one of the self-paced tutorials.  You can also sign up for the post-conference workshop to utilise these new capabilities to build a complete client-server application end-to-end.

Reasons to Be Cheerful

Back in 1979 Ian Dury and the Blockheads wrote a song about all the things that made them cheerful.  Titled “Reasons to be cheerful, part 3” it’s a quick fire list of things in his life that not only made him cheerful, but what he believed made everyone feel cheerful.  As 2014 draws to a close we have our own reasons to the cheerful – the release of Synergy version 10.3.1.

Reasons to be cheerful – One, two, three.

Android Development

Now you are able to take you Synergy code, build it in Visual Studio and deploy to any Android device – that’s your phone or tablet.  Using XAML to define your UI can even enable you to write once and deploy to many different device options including iOS – which is being released in beta mode with 10.3.1.

Improved Developer Experience

Both Workbench and Visual Studio Integration continue to exceed expectations when we talk “developer experience”.  Even better IntelliSence and seamless access to .NET capabilities like LinQ.  Build powerful Portable Class Libraries (PCLs) that can be used to deploy your Synergy logic and data access code on multiple target platforms.

Targeted Runtimes

In Visual Studio you can now install the latest Synergy Language Integration and target an older runtime version, for example install SDI 10.3.1 and target runtime 10.1.1.  This keeps you using the latest tools without the need to immediately update your target platform.

Programmatically Track File Changes

Using the new ChangeTracking class you can now access file snapshots and change tracking information directly from Synergy.

Connection Recovery

xfServer between Windows client and server can now be configured to recover from a network interruption and auto-reconnect.  This development continues to strengthen the robust quality of xfServer.

 Device Licensing

Controlling who’s using your applications is important and Synergex recognises this with the ability to utilise device licensing for your Android and iOS (future release of Synergy) apps as well as your Windows store and desktop programs.

To complement the release of Synergy 10.3.1 the Symphony team has developed a new server component called Symphony Bridge.  Symphony Bridge allows you to communicate via HTTP and HTTPS to a server that is exposing your application logic and data.  Bridge utilises Symphony Harmony which is an SQL command interpreter layer that accepts SQL based commands (selection, store procedure execution, etc.) and performs the required tasks on the remote server.  There will be more about Harmony and Bridge in a future blog post.

For now, let’s sing along with Ian and have “Reasons to be cheerful” with the release of 10.3.

New Code Exchange Items

Just a quick post to let you know about a couple of new items that will be added to the Code Exchange in the next day or so. I’m working with one of our customers in Montreal, Canada this week. We’re in the process of moving their extensive suite of Synergy applications from a cluster of OpenVMS Integrity servers to a Windows environment. We migrated most of the code during a previous visit, and now we’re in the process of working through some of the more challenging issues such as how we replace things like background processing runs and various other things that get scheduled on OpenVMS batch queues or run as detached jobs. Most of these will ultimately be implemented as either scheduled tasks or Windows Services, so we started to develop some tools to help us achieve that, and we thought we’d share :)

The first is a new submission named ScheduledTask. It’s essentially a class that can be used to submit Traditional Synergy applications (dbr’s) for execution as Windows Scheduled Tasks. These tasks can be scheduled then kicked off manually as required, or scheduled to run every few minutes, hours, days, months, etc. You also get to control the user account that is used to schedule the tasks, as well as run the tasks. The zip file also contains two sample programs, one that can be run as a scheduled task, and another that creates a scheduled task to run the program.

The second submission is called Clipboard, and you can probably guess it contains a simple class that gives you the ability to programmatically interact with the Windows Clipboard; you can write code to put text onto the clipboard, or retrieve text from the clipboard. Again the submission includes a small sample program to get you up and running.

Hopefully someone else will find a use for some of this code.

Posted on September 23, 2014 at 7:59 pm by · Permalink · Leave a comment
In: Code Exchange, Software Development · Tagged with: