Difference between revisions of "Programming"

From HSYCO
Jump to navigation Jump to search
 
(10 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
HSYCO offers an extremely powerful programming framework, allowing you to easily create complex programming logic that can be quickly integrated with the user interface functions, the field systems and HSYCO’s native features.
 
HSYCO offers an extremely powerful programming framework, allowing you to easily create complex programming logic that can be quickly integrated with the user interface functions, the field systems and HSYCO’s native features.
  
[[File:programming_architecture_model.png|border|800px|center]]
+
[[File:system_architecture_model.png|border|800px|center]]
  
 
At its core, HSYCO is an events based architecture, optimized to quickly process any status change from the low-level drivers or its internal services, and allows you to write custom code that is triggered by these events.
 
At its core, HSYCO is an events based architecture, optimized to quickly process any status change from the low-level drivers or its internal services, and allows you to write custom code that is triggered by these events.
Line 24: Line 24:
 
Anyways, EVENTS, JavaScript and Java are fully interoperable and integrated, with specific solutions to let you merge code components of the different languages into a seamless application.
 
Anyways, EVENTS, JavaScript and Java are fully interoperable and integrated, with specific solutions to let you merge code components of the different languages into a seamless application.
  
== Status Browser ==
+
== Using the Status Browser ==
  
{{status_browser}}
+
An HSYCO application, no matter whether it is written in EVENTS, JavaScript or Java, interacts with external systems through I/O data points, and with the user by dynamically setting user interface attributes.
 +
 
 +
It also uses variables to save and retrieve internal state information.
 +
 
 +
When testing an application it is extremely useful for the developer to be able to access this information.
 +
 
 +
The '''[[Status Browser]]''', in the '''[[Manager]]''' toolkit, allows you to show the real time status of data points, user interface attributes and variables.
  
 
== Events ==
 
== Events ==
Line 37: Line 43:
  
 
== JavaScript ==
 
== JavaScript ==
[[javascript programming| JavaScript]]
+
[[JavaScript Programming|JavaScript]]
  
 
[[JavaScript Callback Functions API]]
 
[[JavaScript Callback Functions API]]
Line 49: Line 55:
  
 
[[Java Command and Utility Methods API]]
 
[[Java Command and Utility Methods API]]
 +
 +
== Creating User Interfaces ==
 +
[[Working with User Objects]]
 +
 +
[[Working with Forms]]
 +
 +
[[Draw API]]

Latest revision as of 18:11, 12 March 2014

HSYCO offers an extremely powerful programming framework, allowing you to easily create complex programming logic that can be quickly integrated with the user interface functions, the field systems and HSYCO’s native features.

System architecture model.png

At its core, HSYCO is an events based architecture, optimized to quickly process any status change from the low-level drivers or its internal services, and allows you to write custom code that is triggered by these events.

You can write code in Java, JavaScript and a simple, proprietary language called EVENTS.

Java is precompiled, offers the best performance and powerful programming features of a fully standard Java language, but requires restarting HSYCO every time you make changes to the code.

On the other hand, EVENTS is a very simple declarative language, that associates one or more actions to a field event or combination of conditions.

Programming EVENTS is as simple as editing a text file, and all changes are immediately effective the moment you save the file. It is also a very effective way to quickly associate actions to events, faster than Java in many simple cases, and easier to read.

Finally, JavaScript is the middle ground, combining some of the best features of a powerful, standard programming language like Java, and the simplicity and efficiency of EVENTS. In fact you can write JavaScript code seamlessly mixed with EVENTS.

These diversified programming tools should not be considered to be confusing, but a flexible approach to address different problems with different solutions.

An experienced Java developer may decide to code all its custom logic in Java, because everything that can be done in JavaScript or EVENTS can also be implemented in Java, but will most likely appreciate the convenience of both EVENTS and JavaScript for some tasks.

But, if software development is not your business, you will definitely stay with EVENTS and possibly some JavaScript, and quite likely never need to use Java.

Anyways, EVENTS, JavaScript and Java are fully interoperable and integrated, with specific solutions to let you merge code components of the different languages into a seamless application.

Using the Status Browser

An HSYCO application, no matter whether it is written in EVENTS, JavaScript or Java, interacts with external systems through I/O data points, and with the user by dynamically setting user interface attributes.

It also uses variables to save and retrieve internal state information.

When testing an application it is extremely useful for the developer to be able to access this information.

The Status Browser, in the Manager toolkit, allows you to show the real time status of data points, user interface attributes and variables.

Events

Events

Event Keywords

Action Keywords

JavaScript

JavaScript

JavaScript Callback Functions API

JavaScript Command and Utility Functions API

Java

Java

Java Callback Methods API

Java Command and Utility Methods API

Creating User Interfaces

Working with User Objects

Working with Forms

Draw API