XDC 2019: Web Framework 2.0

At XDC 2019 Greg O’Lone of Xojo showed us the current status of Web Framework 2.0.

The design goals for the web framework:

Update the server technologies.

Improve responsiveness

Modernize the framework

New and Updated Controls

Improved Browser Support

HTTP 1.1 compliant server.

Minified frameworks and Client Rendering (more done on the browser now)

jQuery – feature rich JavaScript library

Boostrap and FuelUX controls

Browsers:

Support as many of the current browsers as possible.  Current framework parses headers to determine what to support but most browsers lie.  Going to ask the browser what it supports.  The controls themselves will determine what they can do.  Things like TouchEvents and File API support might change.

Adding Browser History triggers.  Can tell the session that something happened.  For example if user was filling out form partially and hit back button.  When they come back to the site the HashTagChanged event fires can allow you to get that information back

Visual Session Controls.

Server Connection Monitor.  New dialog to show user that it’s having problems communicating.

Layout Modes:  Fixed, put a control on a layout and it just stays there.  Fluid layout lets controls flow around in the container.  Auto(layout) – not in version 1.

Big list of already supported controls.  New ones:  MessageDialog, PagePanel, Breadcrumb, Rich Text Editor.

Big functionality updates:  File Uploader (splitting engine from the interface).  Listbox has pagination, dynamic data sources, sortable columns, built-in filtering, custom column types.  Canvas has layers, events, and Drag and Drop on browser side.  Toolbar is Bootstrap (but will have icons) and it will act more like the desktop toolbar.  TextFields gets browser side text formatting and validation.  MenuItems are theme compliant, disabled items, hierarchical, separators, and headers.

Styles:  Existing editor is painful.  All projects will get the global Bootstrap theme.  Drop-in theme replacement.  Themes can be previewed in the IDE!!!  Selective control-level customization more like what we get on the desktop.  Property-level style access which means will be able to change styles via code!

Project transition is a one way operation.  Using API 2.0 but will still use the deprecated API.  Some things like ListBox.AddRow will automatically converted to new API.  CGI projects are going away and the only option will be standalone.

Xojo Cloud will be using only 64-bit standalone apps.  You’ll get Load balancing and multiple domain names.  Must be using the newer server configurations.

WebSDK 2.0:  jQuery, Bootstrap and FuelUX will be included.  Browser feature detection and we’ll be able to query to see if a browser can do something.  

TypeScript allows us to compile the Javascript that all browsers use.  Get some definition files and other things.

Greg shows us a demo of the Web Framework 2.0:

Shows a WebPage that has working TabPanel.  Layout Editor drag and drop not working quite like it will in release version.  Shows me MessageDialog.  Shows new ChartingControl.

He then shows us changing the theme.  Simple drag and drop of Cyborg theme changed everything in the project.  Very nifty.

Greg shows us pre-Alpha Feedback using Web Framework 2.0.  TextField support password managers now!   Buttons are Escape and Enter sensitive now.  Listbox has custom column types:  Picture column and URL column.  Clicked on a link (Feedback report) and then opened it.  Showed use of the back button that took us to previous action.  Then showed Dynamically Load listbox an dhow it loaded more data as he scrolled to the bottom of the list.

Very functional demo!

Q & A:

Message Dialogs have icons?  Yes, just like current desktop.

The demo showed 3 buttons.  Will it return values?  Yes, just like current desktop.

Will container control will be draggable?  Redesigning drag and drop.  So maybe?  Might not be right away.

Pushing more stuff down to the client will be have access to hardware/devices on client side?  You’d have to use Internet Explorer and the WebSDK to load and ActiveX control.

How easy to support Dark Mode in web apps?  Only supported in Safari.  Answer is maybe and change the stylesheet on the fly.

Recommend load balancer for new web framework?  No.  Used it with several load balancers and they all worked.  Changed how much data is being transferred between client and server.  Transmissions cut down by 60%.

Can users change theme at runtime?  Yes.  Maybe not in version 1.

With Xojo Cloud load balancing is there any scheduling or rules?  Control distribution is up front – no thoughts on scheduling.

With new Canvas control would you be able to create a game with it?  Their intention is to expose the canvas handle to developers.  Some restrictions.

Custom skinning on progress wheels?  Yes.  Current one is SVG and it just rotates it.

How will editing in web listbox work?  Custom column type.  Doesn’t work today but a huge want.

Listbox has a built-in Search Field.  ListBox in general has a number of things built-in.  By Default has pagination and search field.  Will eventually support multiple layout types (list, picture) but not for version 1.

Open events work by the way.

Will tags be available in more places?  We haven’t done that yet.  Unknown if it will get into version 1.

User get click happy is there a way to prevent weird stuff from happening?  Still have the Auto Disable for buttons.  There is some mechanism in place to prevent the exact same event from being sent to server.

Column sorting and pagination?  Adopted desktop behavior for column sorting.  Sorting a column will requery the database.  Always goes back to the data source.

Xojo Cloud Database Support

Last week Xojo announced new features for Xojo Cloud.  They now support MySQL and PostgreSQL database servers in addition to SQLite that they have supported since day one.  One of the interesting features with the database support is that db admin tools that support SSL tunnels can connect to the database as if it was running locally.  In my testing it was surprisingly easy to setup and use.

The first thing to do is log into your Xojo Cloud account control panel.  Then simply enable either the MySQL or PostgreSQL database and enable the SSL Tunnel.  In each case you will receive a username and password that you’ll need to copy before moving on to the next step.

Screen Shot 2015-02-26 at 10.28.25 AM

Our MySQL admin tool of choice is NaviCat.  Setting it up was pretty easy to do.  Create a new connection and then navigate to the SSH tab.  Enter your server IP address, the username and password.

Screen Shot 2015-02-26 at 10.32.30 AM

Then navigate to the General tab and enter a Name for this connection (I used Xojo Cloud).  Because you’re using the SSL Tunnel you need to enter ‘localhost’ into the Host field.  Enter your Xojo supplied username and password and then test your connection.

Screen Shot 2015-02-26 at 10.38.00 AM

After that, everything acts just as if the server were local to you.  In this example I created a sample database named ‘bkeeney’ and a table called ’t_temp’.

Screen Shot 2015-02-26 at 10.34.09 AM

Your Xojo web application, then, will connect to it via the localhost parameter along with username and password suppled to you from Xojo.  Because it’s inside the firewall your web app needs to do nothing more.

Setting up a database server in Xojo Cloud really is that simple.  It just works.  From start to finish it only takes a few minutes to get up and running.  It’s a great addition to Xojo Cloud.

Be Paranoid About Your Data

Last week wasn’t a very good week.  Over the weekend the hard drive on my iMac failed and by failing Mac OS X said it couldn’t repair the drive so it came up read only mode.  So I did the sensible thing and copied the entire contents to my external Drobo (essentially striped RAID).

Then Monday morning the Drobo wouldn’t boot up.  It would just do a continuous boot and restart.  Not good, but at the end of the day all of our most important stuff, the source code for projects, is stored on a commercial source code hosting service.  In case of theft or disaster of my equipment I’m only down as long as it takes me to buy a new computer and download the repositories.

The Mac hard drive was replaced by Monday night and by Monday afternoon Drobo tech support had the Drobo back up and running.  They didn’t give a reason but I suspect that because the Mac had hard crashed a few times (due to the bad drive) it got into a state that it didn’t know how to recover from.  But it works and I didn’t lose any data.

Tuesday when things started to go back to normal we couldn’t reach our source code hosting service, Code Spaces.  On Twitter they said they were experiencing a DDOS attack and I didn’t worry to much about it.  They’re the experts, right?

By Wednesday they still weren’t back up.  A little concerned I went to their website and found the message that you never want to hear.  They accounts had been hacked and ALL of their repositories had been deleted.  Oh, and pretty much immediately they are ceasing operations as a company.  You can read more about it at http://www.codespaces.com and http://www.electronista.com/articles/14/06/18/hosting.company.returning.what.data.it.has.left.financially.crippled.by.attack/

So much for the offsite backups.  The fact that the backups could be accessed through their Amazon Web Services account should give anyone pause for concern.  Is your web services company really paranoid enough to protect your data?

I know more than a few people have given Xojo some grief that their security for Xojo Cloud is over the top.  Maybe it is, but then you hear stories like this and you start to wonder if maybe being overly paranoid is a good thing.

So here is my advice.  Have multiple sources of backups.  Keep one source in a safety deposit box and update it regularly.  Use a commercial host that you trust.  There’s no guarantee they they won’t be the next Code Spaces and get hacked but hopefully this incident was a warning to them to be more paranoid and strengthen their security procedures.

I know of developers that backup everything to a thumb drive on their keyring.  I’m not sure that’s entirely secure but if that makes them feel better so be it.  At least their source code is always with them.

While last week was not a good week at least I’m learning to be even more paranoid about my data.  Being paranoid about your data is a good thing.

Xojo 2014 Release 1

Xojo 2014 Release 1 hit the internet this week.  This substantial update fixes a number of issues, has some very nice enhancements, and has the long awaited release of Xojo Cloud.  So let’s dig in!

Xojo Cloud is, as the name implies, a hosting service for web applications written in Xojo.  It is a one-click deployment solution that greatly simplifies the process of deploying your Xojo web apps.  It really is pretty simple and there are really only a few caveats with using it.

Xojo Cloud is using RackSpace servers and there are three configurations that are currently available.  The small and cheapest server has 512 MB of RAM, 20GB of storage, and 1 Virtual CPU for $49/month.  The medium server has 1 GB of Ram, 40 GB of storage and 1 Virtual CPU for $99/month.  The biggest server has 2 GB of RAM, 80 GB of storage, and 2 Virtual CPU’s for $199/month.

This seems like a lot of money considering that a VPS offered by many hosting companies runs you about $400 a year (or less).  However, those VPS solutions are unmanaged and it’s up to you to keep them secure.  The Xojo Cloud solution has some pretty strict security that has intrusion detection and some other goodies that will make it difficult for an intruder to get to your application and data.  Add on that Xojo web apps are compiled and it makes for a pretty secure system.  Only time will tell how secure it is but unless you’re an expert on security it’s unlikely that your unmanaged VPS will be more secure.

Xojo web apps are guaranteed to work with Xojo Cloud (duh).  That’s not always the case with my experience with VPS solutions.  You have to worry about 32 bit compatibility libraries, permissions, and a whole host of other things that could go wrong.  Really, Xojo Cloud is a pretty decent value if you don’t like, or want, to manage your own server.

Xojo Cloud is a version 1 release.  There are a number of things that are not available yet.  For one, the server does not come with a database server though this is very high on their list.  During the alpha period I was able to, with the help of Xojo engineers, use a Rackspace Database Server (MySQL) working with a Xojo Web app.  Also, if you have a lot of storage needs (we have 40 GB of video for the Xojo Training Application) you probably will have to get a RackSpace Cloud Files account.  All-in-all it’s not very hard once you get it setup but RackSpace can be kind of daunting  as you wade through all of their options.

Xojo 2014 Release 1 comes with some Cloud specific framework additions.  The first is a TargetXojoCloud constant that lets you call code specific to Xojo Cloud.  One of those is the XojoCloud.FirewallPort method this allows you to open a port in the server firewall.  Once the reference goes out of scope the port is automatically closed.  If you do any communication with the outside world such as sending an email, you’ll need to open the port to the mail server.

There is currently no control panel to upload or view files.  Release 1 comes with an example on how to do this via a web app.  There are four areas that you can access on your server:  the application area, the Temporary directory, Shared Documents, and Documents.  The latter 3 can be access via the SpecialFolder object.  Accessing the Documents folder of your application creates a Documents directory next to the application and accessing the Shared Documents creates a Documents directory in the overall applications directory.

A few other miscellaneous things that are kind of a drag:  There’s no way to create testing builds without changing the name.  Ideally, I would want the Stage Code to let me make testing builds without affecting the production app.  My second issue is that as a consultant I will potentially have multiple clients with their own servers.  Currently there is no way to share servers. The good news is that both of these items are in development and could be added at almost any time.  I’ve been told that some Xojo Cloud enhancements don’t depend on the IDE release schedule.

The IDE has some Xojo Cloud specific additions as well.  In the Build Settings you’ll now find Xojo Cloud as one of the targets.  Once selected you’ll get Cloud Specific properties in the Inspector.  Currently there are only two:  The name of the application and a popupmenu listing your servers.

All-in-all, Xojo Cloud is a very good first release.  In the years that Web Edition has been around, deployment issues are the biggest headache for many.  It can be quite frustrating to deal with the various issues and while Xojo Cloud seems a bit pricey we plan on migrating our apps over to it (technically some already are but they’re not public yet).  File Storage and Database support is an extra addition, however, and some might find that unpalatable for now.

As if that wasn’t enough, there’s more!  Release 1 has a ton of fixes and enhancements.  The Layout Editors are MUCH speedier.  I have several layouts that in previous versions were almost unusable with web containers.  I had several web pages with fairly complex containers on them and when I selected one of them it would take a second for the Inspector to load and forget about doing a drag of the container as it would lag to the point of being worthless.  This enhancement alone is worth the upgrade, in my opinion.

The IDE received a bunch of love fixing some of the more painful bugs in the Navigator.  There are simply too many to list here but it’s a lot of changes in improving the user experience.  Some of the properties in the Inspector have now been migrated to the advanced tab of the Inspector.  The advanced tab used to contain only the Attributes panel but now some things like Font, Control Set, Focus and Database Bindings.  No great loss of those since they’re not changed very often (or even used).

The SQL Server database class was enhanced so that it works with SQL Server 2012.  This is good news for folks running Microsoft SQL Server.

Another big change in this release is the removal of QuickTime dependencies in the IDE and in Cocoa builds.  Apple has deprecated QuickTime and is rejecting apps from Mac App Store that use it.  In release 1 all framework references to QuickTime and QTKit are removed.  If you are using EditableMovie or any of the QuickTime decencies in the MoviePlayer you are out of luck.  There are currently no plans to replace EditableMovie.  Along with this, the MoviePlayer was rewritten to work without QuickTime.

A new language feature is the IF operator.  This is similar to the VB IIf or VB.Nets’s If operator.  An example is:  If(myInteger > 40, “Big number”, “Small number”).  My only beef with the IF operator is that the debugger can’t show you the results unless you have a local variable defined to show it.

I highly recommend that you peruse the release notes as there is a plethora of changes and enhancements listed.

What are your thoughts on Xojo Cloud and this release?

Edit: Fixed a few typo’s.

Xojo 2013 Release 4(.1)

Xojo 2013 Release 4 hit the internets this week.  And they promptly pulled it after they discovered a crashing issue when it tried to verify licensing on their servers.  Release 4.1 was released today which fixes the issue.  As far as I know, it’s the only fix in 4.1.

I would characterize Release 4 as a maintenance release as it has several hundred bug fixes and just a few new items. I’m okay with this and if I had any say in the matter I would alternate releases with new features and bug fixes. One thing this release does NOT include is the Xojo Cloud that has been in development for over a year.  I expect Xojo Cloud will be released for the 2014 Release 1 (so it will probably go into beta soon).

The big change in this release is that the IDE and applications built for Cocoa require Mac OS X 10.7 (Lion) or later.  I think this is a pretty good move though it will make life harder for some.  Apple updates their OS regularly and many update their OS when they can because the upgrades have been safe.  I can’t find the statistics but it appears that a vast majority (in the neighborhood of 80%) of Mac users are on 10.7 and above now.  Obviously, if you have clients and customers that require 10.6 (Snow Leopard) you’ll need to stick with Xojo 2013 Release 3 (or continue building in Carbon).

New in Release 4 is new cryptography functions using the Crypto class.  The new class adds RSA encryption to the Xojo framework.  It has functions that allow you to generate public and private keys, verify the keys, encrypt and decrypt data, sign data blocks, verify signatures, and generate a random block of data.

For desktop users, the Canvas and ContainerControls now have a transparent property.  The default is true to maintain current functionality.  This change is particularly important in Linux as child controls on an opaque (not transparent) canvas or container control can be clipped.

The IDE can now use constants for the application identifier which can be useful if your application has multiple names or versions.

Release 4 has a ton of bug fixes and tweaks to the IDE.  This includes many fixes and changes to the Navigator and some of the copy and paste bugs that have afflicted the IDE since its first release.  It’s still not perfect, but it’s getting better.

Better is subjective, of course, but one of the bigger annoyances to many users (including me) is that changing text values in the Inspector (such as a control name) didn’t actually stick unless you tabbed out of the field.  This has been fixed and just this one change alone is worth getting and using Release 4.

There are a few debugger changes that are worth mentioning.  First, the debugger now catches exceptions raised in computed properties.  Before it wouldn’t, which could cause navigating in the debugger to actually change the control flow of the program.  Second there are some specific fixes to the debugger for Windows and Linux users, and finally a new DebugIdentifier property was added to the Thread class to make it easier to debug code that’s running in a thread.

One item of note that came through late in the beta cycle.  Several developers had issues with rejections from the Mac App Store (MAS) due to using QuickTime API calls (or the framework linking to them).  It appears that Apple, while only deprecating QuickTime in Mavericks, is actively rejecting apps that use it.  Release 4 no longer links to QuickTime but according to the Beta list testers this is still an issue.  In my opinion, this is more an issue with Apple, suddenly and with little warning, rejecting MAS submissions than it is Xojo doing anything wrong.

While I like Apple, sometimes getting apps into their store is like hitting a moving target.  Apple giveth and Apple taketh away.  <insert favorite negative Apple cliche here>  If you know more on this, please add comments below.

What are your thoughts about Release 4?  Are you happier with the IDE after 4 releases than you were initially?  Are you looking forward to Xojo Cloud?  What about the eventual iOS support?

[Edit:  Changed wording on the debugger changes for computed properties so it was more accurate.]