I’m working on a project where we upgraded from 4D v16 R3 to v17.0 HF1 today. 
Development on this project uses 4D Server Team Developer over a WAN for most 
of the developers — I’m one of them. I’m using an iMac Pro and my internet 
connection is pretty good — cable modem with 150Mbps down and 15Mbps up. 

We have been using the new network layer and it has proven very reliable in our 
development environment with v16 R3. I could connect to 4D Server and stay 
connected all day long without any disconnects. Maybe 1 disconnect problem a 
month if that. So nothing to complain about really. 

After spending many months all day long using v16 R3, today I immediately 
noticed things were faster with v17.0 HF1. So nice to install a new version of 
4D and immediately feel a performance boost. Time will tell if there are any 
new issues with v17, but so far it’s all good news.  Connected all day without 
any issues. 

I am LOVING the object dot notation and using collections and the new Dynamic 
Forms feature. Collections work like arrays with JSON. So instead of needing to 
do OB GET ARRAY, manipulate the array, and then OB SET ARRAY you can work on it 
“inline” with dot notation and collections. 

Let’s say you want to create an object with this structure:

{
        "markerHeader": 0,
        "markerBody": 72,
        "method": "label_SetObjectFontSize",
        "labelWidthInches": 3,
        "labelHeightInches": 1,
        "minimumFontSize": 7,
        "objectsToAdjustFontSize": [],
        "pages": [
                null,
                {
                        "objects": {}
                }
        ]
}

Here is some v17 code that will create it:

$object_o:=New object(\
        "markerHeader";0;\
        "markerBody";72;\
        "method";"label_SetObjectFontSize";\
        "labelWidthInches";3;\
        "labelHeightInches";1;\
        "minimumFontSize";7;\
        "objectsToAdjustFontSize";New collection;\
        "pages";New collection(\
                Null;\
                New object(\
                        "objects";New object)))

Yes, that is a single line of code!

Say you want to add an object to the “objects” object. A rectangle definition 
for use on a form. Here’s some code to do that using dot notation:

$borderRectangle_o:=New object(\
        "type";"rectangle";\
        "fill";"transparent";\
        "strokeWidth";0;\
        "left";0;\
        "top";0;\
        "width”;216;\
        "height”;72)

$object_o.pages[1].objects.borderRectangle:=$borderRectangle_o

Refreshingly convenient considering all of the work you would have to go 
through without dot notation to accomplish the same thing. No OB GET ARRAY and 
OB SET ARRAY needed. 

Just wanted to pass this info on to other developers thinking about doing the 
v17 upgrade. First day 4D Server Team Developer v17 experience over a WAN was 
very good. 

Tim

*****************************************
Tim Nevels
Innovative Solutions
785-749-3444
[email protected]
*****************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to