Jump to content

5-min using RTL_2.3


Recommended Posts

I recently recreated a SmartEmployee demo app that can be rated as a moderately easy single page application, using the outcoming RTL (aka RTL 2.3). I've recompiled with both versions:

 

SmartEmployee ver RTL2.2.2 

 

SmartEmployee ver RTL2.3 

 

I've got a big main.js file size (496,208 bytes) using RTL_2.3. When the obfuscation/minification is enabled, you get around 180KB! The same project, now using the old RTL_2.2.2, I've got 169,280 bytes to 63,378 bytes=obf/minified.

 

Another thing, the page load time has reduced greatly, around 15% using alpha RTL_2.3.

 

If you don't know, the visual designer expects the controls/visual components to be derived from TW3CustomControl, which brings in a more heavy infrastructure. If you loop through out this base class and its children and grandchildren objects and so on, the new RTL aka RTL2.3, we'll have a much more heavy infrastructure (see) if you compare to the previous RTL2.2.2 (see)

 

 

Here is the new inheritance chain:

 

RTL 2.3 = ALPHA RELEASE 
+-------------------------------------------------------+
¦                        RTL 2.3                        ¦
¦-------------------------------------------------------¦
¦ TObject                                               ¦
¦ |___TW3OwnedObject                                    ¦
¦     |___TW3OwnedErrorObject                           ¦
¦         |____TW3CustomComponent                       ¦
¦              |____TW3Component                        ¦
¦                   |____TW3TagObj                      ¦
¦                        |____TW3TagContainer           ¦
¦                             |____TW3MovableControl    ¦
¦                                  |___TW3CustomControl ¦
+-------------------------------------------------------+


RLT 2.2.2
+------------------------------------+
¦             RTL 2.2.2              ¦
¦------------------------------------¦
¦ TObject                            ¦
¦ |___TW3TagObj                      ¦
¦     |___TW3Component               ¦
¦         |____TW3MovableControl     ¦
¦              |____TW3CustomControl ¦
+------------------------------------+
This new structure chain is more flexible than the previous RTL_2.2.2 (SMS ver 2.2.2.4543), but the issue is the big overhead - the final bundle file size has increased considerably! (around 480KB) or 147% bigger when comparing to the previous 2.2.2. I think this overhead can be reduced effectively using plugins to enable / disable some features, not necessary in the app.

 

Actually, I didn't test the new TW3CustomComponent from System.Widget as base class, to create non visual component. Using TW3CustomComponent or TW3Component as the base class for non-visual components is very welcomed. 

 

Another thing:

 

a. when you starting the app, you've got this ugly console message:

Round-trip for Application.ReadySync, mainform not yet in ready-state main.js:58

Round-trip for Application.ReadySync, mainform not yet in ready-state main.js:58

Setting up mainform, exiting application.ReadySync

 

b. the annoying page flicker, when you load a project, I'm getting a fast "black background" while load the main form.

 

c. It inject some javascript files (watchers/observers) in the <head>. I don't know, I think this is considered as a bad practice by google.

 

 

References:

 

Smart Changes

 

Smart Pascal: Information to alpha testers

 

Sneak peek at the new Smart RTL - Part 1

 

Sneak peek at the new Smart RTL – Part 2

Link to post
Share on other sites
  • Moderators

Concerning, I agree

 

I'm a big fan of the closure compiler, works very well for me

 

Lately I got another reference which might help : Prepack.io 

Haven't tried it yet

 

it will also be possible to produce a hack around Google's AMP specs (sort of)

 

still, if large js files become a problem, bypassing the visual rtl completely by using html elements makes for really, really small executables

 

Any idea why the pageload time has decreased ?

Link to post
Share on other sites

> I recently recreated a SmartEmployee demo app that can be rated as a moderately easy

> single page application, using the outcoming RTL (aka RTL 2.3). I've recompiled with both versions

 

How much is new RTL compatible with old one, were you able to just recompile without changes? Also have you tried on some large projects?

Link to post
Share on other sites
  • 2 weeks later...
I don't know, it looks like part of this post is getting a great reaction. Look at this blog articleSorry about the fact "who shared my RTL" - I don't know anything about this one, but anyway

 

it seems like there is a better future for SMS. I will open a bottle of Champaign. I'm serious.

 

I particularly like the "sprints" part. Nice article, but we do not need stories about SMS potential and implementation wishes, but real working features. We do not need to know what SMS "can do", but what SMS "does". 

 

Some ideas sounds like FUD to me, like Smart Desktop/Raspberry PIIt seems to be running too many races at once a bad idea. I'd prefer focusing on a single target, for instance, mobile apps with a decent UI (not the current RAD approach, which is difficult to work with on real projects with a lot of screens) would be a good start.

 

It is possible that I actually did say something inaccurate or offensive in this 5-minute-overview post. If I inadvertently said something offensive - my apologies. I do express my opinions. 

Link to post
Share on other sites

"I'd prefer focusing on a single target, for instance, mobile apps with a decent UI"

 

I second that vote! Most of what I have always wanted to do with SMS was mobile applications, But I have never been able to write one full app yet.  I still keep holding on and hoping that one day SMS will be able to do mobile apps, as easily as it was intended to do.

Link to post
Share on other sites

On the other hand we have been working with the new RTL and the desktop. We are currently building our first application and we see a bright future for SMS. Currently it is hard going, we are puzzling our way through trying to get the various aspects working.

 

Ideally we will be wanting to "port" 20 years of Delphi software to SMS. Most of the Delphi code are exercises for maths and language teaching. This means each little module is self contained which makes life much easier when dealing with SMS.

 

At the present time we are not 100% sure we can do it but we learn more as we build our first applications.

 

We intend to use the desktop as the platform that will house all our other software which will make a dynamic and exciting workspace for our students. I just wish we could fund the SMS team to work on development 100% of the time

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...