XDC 2015 Recap

The Xojo Developers Conference is my favorite week of the year.  It’s where I go to renew friendships, make new ones, talk to potential clients, learn from other Xojo developers, and learn what Xojo is up to.  Along the way there’s usually a surprise or two and this year was no exception.

The first surprise from XDC was that all sessions were recorded.  All attendees will get access to the sessions.  Currently it’s unknown if they will be available to the general public for free, or for a fee.  During the wrap-up session several people gave an impassioned plea to make these available to everyone at no cost.  The argument is that their experience with other conferences showed attendance actually goes up after releasing session recordings.

Not really much of a surprise since they’ve been telling us this for over a year now, but 64 bit builds are coming in 2015 R3.  This is indeed welcome news in a  software world that’s quickly becoming 64 bit.  From what I gather from people way smarter than me (insert joke here) is that 64 bit won’t really change anything in our apps and won’t give us much, if any, enhancements, and will make some things slower.  As Geoff joked at the conference, let’s hope that 128 bit computing doesn’t come any time soon.

Drag and Drop for web applications is coming for R3 as well and I expect this to be a big deal.  There are just some times of applications that do well with a drag and drop environment.  Think graphical editors where you have an object that you select and move by dragging it.  The current web framework has drag events but they should absolutely not be used – ever – since they don’t really work like we expect.  Drag and Drop might very well be my favorite news from XDC.

Raspberry Pi apps built using Xojo.  I think this is a wonderful addition to the product.  Raspberry Pi is a hugely popular processor because of its price and it’s used in a lot of places.  Hobbyists and the DIY crowd really like it and I’ve seen more and more ‘professional’ level projects with them too.  Heck, my sons 3D printer is run by a Raspberry Pi.  The XDC crowd didn’t react much to it when they announced it but as the week went on it came up in conversation more and more.  What a great way to introduce Xojo to new developers!  Really, the only question that’s come up is how much will it cost?  We already know it will be part of the Pro license but what about those that don’t need all the other stuff?

One unexpected surprise was the mention of the long deprecated and removed SpriteSurface and SuperSpriteSurface.  It seems that more than a few people got their start in Xojo/REALbasic developing games using it.  SpriteSurface wasn’t a great class, in my opinion, but it was enough to get started and getting people exposed to the language.  Perhaps we’ll see a Son of SpriteSurface in the future?

One thing that I expected to hear more about but didn’t was Auto Layout.  Norman had a session on it but other than there wasn’t a mention of it anywhere.

This isn’t a surprise because I’ve been many XDC’s now, but the official evening events are usually a lot of fun.  This year there was a mystery dinner theater that most found entertaining but the river cruise to watch the bats come out at dusk was awesome.  What goes on after the official events is even better as clumps of developers go exploring and Austin is a great place for exploring.

I encourage you to go to an XDC.  It’s a very nice event where you’ll learn a lot not only from the sessions but from those attending as well.  No word on where next year’s XDC will be. The cities under consideration:  Seattle, San Antonio, Miami, New Orleans, and I believe San Diego.  If you have a preference, be sure to let Xojo know.

So that’s my recap of XDC 2015.  Did any of the news surprise you?  Anything you expected to hear more about but didn’t?

Xojo Developers Conference 2015 Keynote Notes

Geoff Perlman from Xojo spent an hour this morning talking to the attendees about what Xojo is working on and there was some interesting news.  So let’s dig into the highlights!

In a major change of XDC policy all sessions at this years conference are recorded!  All attendees will get access to all of the videos in June.  According to an announcement in the Xojo forums, these recordings will be for sale at some point in the future.

If you look on the App Store, you can find an XDC iOS application that contains the list of sessions, give feedback, as well as maps.  This app required a bunch of technologies currently not built into Xojo for iOS:  Notifications, iBeacon, and camera access to scan QR codes.  Furthermore, this app and administration application will be open sourced.

Xojo Cloud servers will pretty much double in most of their specifications while keeping the price the same.  The small server will now support DB servers (Postgres and MySQL), have 1 GB of RAM, 20 GB SSD drive, and 200 GB outgoing bandwidth.  The medium and large servers have similar upgrades and all of this will be available in June.  Xojo will contact customers to help them migrate their servers.

Web apps are getting drag and drop capabilities.  Starting in R3 developers can specify if controls can allow a drag or accept a drop.  This includes controls.  The API is similar to the way desktop apps work with drag and drop.  In fact, it’s a little easier than desktop, and while Geoff didn’t promise anything he said it’s possible that this API may make it to desktop at some point.  No word if there is drag and drop being added from client file system to the browser.  I will try to follow up on this.

Xojo gave a little history on how the Xojo IDE came about.  When they redid the Real Studio IDE they wanted a modern looking IDE, that was more approachable, had better search results, and had less tab management.  However, they acknowledged this morning that it has some shortcomings.  The panes take up too much screen real estate, too much time spent hiding/showing panes, to much dependency on the mouse, poor Layout Editor workflow, and poor project Navigation.

Xojo is in the process of designing changes to address these issues.  The changes will reduce pane management, be more keyboard friendly, improve the Layout Editor workflow, and greatly improve project navigation.  No idea on when this will occur as it’s a big change.  And there’s no real way to incrementally change the IDE so it’s an all or nothing change.  Let’s hope that it doesn’t take the two years it took to go from Real Studio to Xojo.

Starting in R3, Raspberry Pi (Linux on ARM processors) is supported.  This turns out to be an interesting addition since these tiny little processors are inexpensive and used in many embedded and hobbyist applications.  This is an interesting new target and might bring some new developers to Xojo.  This new target is included in the Pro license.

Also in R3 we will get the first opportunity to build applications in 64 bit for Mac OS X, Windows, and Linux.  Geoff showed off the Feedback app built as a 64 bit application.  He also said that if you are using plugins it’s likely that your app won’t work until plugin developers can get them 64 bit capable.  Attendees will get Alpha one (emphases on the one) where 64 bit compiling only works on Mac OS X.  Later R3 alphas will work on all platforms.  However, for R3 the debugger is still 32 bit.

Sometime between now and next years XDC we will be able to create plugins using Xojo.  These are available for iOS and 64 bit Mac OS X, Linux, and Windows applications.  32 bit desktop apps will not be supported.  What’s interesting about the new plugin format is that it can contain resources (images, sounds, etc) that current plugins can’t do.  These new plugins can also interact with the IDE meaning that you can have dialogs and editors.  This is very exciting news and should lead to some interesting developer solutions.

EDIT:  Geoff worded this poorly. What he meant is that you can have plugins that use the GUI framework. There’s nothing in the announced roadmap for extending the IDE itself.

Retina support is currently being worked on.  In R2 for iOS we now have image sets and your application will pick the right image resolution at runtime.  This will get moved into desktop targets and into the IDE in 4th quarter 2015.

Updates for Windows.  Geoff showed us a currently usage chart for Windows.  Windows 7 and 8 are now accounting for over 80% of the installed base.  Therefore, starting with R3, Xojo will not support builds in Windows XP.  While Retina support for Mac OS X will come soon, he did mention that Windows HiDPI support is coming.

EDIT:  This was poorly worded as well.  Support for Windows HiDPI is not in the announced roadmap, just that it’s something Xojo would like to tackle at some point.

Those are the highlights.  If you have questions, let me know below and I’ll see if I can get them answered.  Anything particularly excite you?  Anything you dread?

XDC Predictions

Next week is Xojo’s annual developer conference.  Wednesday morning will be the keynote address by Xojo and I’m sure we will get an advanced look at what’s coming up soon and what’s coming up in the future.  I will be at the conference and I’ll be doing some blog posts on the news.  So what do I think the news will be?

Very High Probabilities

Good progress on 64 bit apps.  I suspect we’ll see Mac OS X builds for sure simply because the jump from iOS64 bit and Mac (Cocoa) 64 bit isn’t large and I can’t imagine spending years on the Cocoa version without planning for 64 bit.

I’m not as sure about Linux and Windows.  I suspect that Linux may be close as well since it seems to be a very high need by the community.  I know that every time I deal with a web app on a server provided by the client I will have issues.  Windows might be a no brainer but I’m also not sure how that affects the Win32 API – this might be tougher than it sounds.  Regardless, by Wednesday morning we’ll know for sure.

Retina IDE.  In R2 we got a taste of image sets.  I believe this is a prelude to making the IDE Retina aware.  Perhaps we’ll also get some new framework calls that tell us if the display we’re on is a high density display or not.

Edit:  AutoLayout.  I believe we will see demo’s of AutoLayout running in Web and Desktop.  I think (hope?) we might see some simplified rules since it seems to be a point of confusion for many developers.  In it’s current form it’s really not all that friendly.

Probables

Additional new Framework goodies.  One thing that we can be assured of is that a lot of thought and effort has gone into the new Xojo framework.  What we’ve seen, so far, are classes that eliminate ambiguity in the language that in turn eliminate subtle bugs.

For example, the new Auto data type is a replacement for Variants.  Variants are useful but when used improperly can lead to very subtle, and very hard to find, bugs.  Mainly this is do to their implicit type conversion that may or may not be what the developer intended.  Auto has none of that nonsense which makes Auto slightly harder to use but much safer.

Another good example is the Text replacement for String.  An old string means different things in different parts of the old framework.  The developer using a string in a socket had to worry about encodings and, again, it often led to very subtle bugs.  The sockets in the new framework will not give you a string – they give you a MemoryBlock.  And then it’s up to the developer to convert it to a string and during the process you tell it the encoding you want.  Again, it’s a bit more work on our part, but it’s inherently safer.

Perhaps the change the I most want, yet fear, is new Database classes.  The database classes are old and they’ve not really been changed much in the past 15 years.  Oh sure, they’ve been updated for the times and changes in databases but they still have the same issues now that they did years ago.

For an object oriented language Xojo really doesn’t do much to help you when it comes to the database.  It doesn’t help you in table or field names nor does it really help you with data types.  Those things are all left to the developer to figure out.  Another gotcha that gets almost everyone is that new Xojo developers don’t check for database errors.  The PreparedStatement class is almost a must these days for security but it’s optional and kind of unwieldy.

If we take a look at the database classes in iOS we might be able to peer into the future of databases.  For one, database errors, like every other failure in the new framework, will throw an exception.  Not just an error but an exception.  This will cause much consternation because it will make transactions harder to deal with (but not impossible).  Another clue from the iOS framework is that SQLExecute and SQLSelect will have PreparedStatements built-in so this will be inherently safer.

I look for new database classes to be more helpful and friendly when writing code, or at the least, to show more awareness about the database.  Xojo showed off an ORM solution many years ago at the developers conference and we’ve not heard a word since.  Perhaps this is the year it will spring to life?

So why do I fear this change?  Well, exactly 100% of our consulting work is database related so any change may have a big impact on our workflow.  And because of the shortcomings in the database classes we created our own ORM (ActiveRecord) framework that we use in most projects.  I did convert ActiveRecord to iOS in the early days to learn more about the new framework but we’ve not done much with it since (mainly because consulting has been so busy).

Wish List Items

Windows .NET framework to reduce flicker.  The bane of our existence (at times) is flickering in Windows apps.  It sometimes seems just breathing on the app will cause controls to flicker.  Xojo has repeatedly told us that this is common in Win32 native controls and while that may be true, it’s also true that Xojo competitors and Microsoft seem to have solved this problem.  Perhaps the Windows framework will have its own Cocoa-type project that brings considerable improvement to Windows builds.

A Usable Reporting Tool.  Here is a fact:  Xojo does not use their own reporting tool.  It is not used in the IDE or Feedback or Lingua (the major public applications).  It’s more of a marketing bullet point than a usable tool.  If you ask around most Xojo developers don’t use it because it falls down as soon as you want to do something real with it.  If Xojo really wants to attract business users, make this tool rock solid and usable.  Yes, I have my own reporting tool (BKeeney Shorts), but it was created out of necessity.  BKS Shorts isn’t a banded reporting tool (like Xojo reporting is) so it will still have a niche to fill.

Speaking of ways to get more business users, I’d love for Xojo to create simple and basic (i.e. good enough) controls so that new developers don’t immediately have to look for 3rd party components for what many believe to be necessary controls.  This includes a basic date and time picker, numbers only fields, and masked text fields (that actually work) to name a few.  A decent grid control (not a listbox replacement) that we can put container controls in.  The list isn’t that large but the omissions are prominent.  I know the argument:  cross platform controls are hard and getting it right is even harder.  You bet it is!  That’s the type of solution that the makers of a cross-platform development tool should be doing!

A new web framework that makes web development closer to desktop.  In the desktop world we can do a lot of really cool things with Constructors.  In Xojo web apps those are usually disastrous and do nothing but generate Javascript errors.  Make it so Open events are safer to use instead of relying upon the Shown event.  I understand that some of this might be impossible but the differences between desktop and web are frustrating.

Long Shot Items (i.e. don’t count on it)

Here we are several years after the Xojo release.  I still really dislike the Navigator in Xojo.  I still have some projects in Real Studio and it’s hard going back and forth because enough things are different that it takes me a good hour to get comfortable in each version.  I’m hoping (probably against all hope) that they’ll announce some level of change in the IDE.  Ideally I’d love a hybrid between the Real Studio IDE and the Xojo IDE.

Conclusions

I love the Xojo Developers Conference.  It’s where I go to learn about what’s coming up in the product I spend so much time in.  It’s also where I get to bend the ears of some Xojo engineers (but usually over a drink or two) and it’s where I renew my friendships with Xojo developers that I’ve known for years.  If you’re going to the conference, please don’t hesitate to stop me and introduce yourself.

What do you think will be announced?  What are your wish list items?

The First Law of Demos

It’s the last full week before the Xojo Developer Conference in Austin.  I’ve gone through my presentation on Reporting Tools in Xojo at least once already.  I have the Keynote presentation done (added a few things), have the sample projects done and ready to upload to the website.  You’d think I’d be done, right?  Wrong!

The First Law of Demo’s says that unless you’ve done the demo multiple times on the hardware you’ll actually use it’s as if you’ve never done it in the first place.  I should know, I’ve been standing in front of a group of people to do a demo only to have the first element fail and then flounder away for the next twenty minutes with plenty of, “well, if this worked I’d be able to show you this feature.”

I have learned from my mistakes, the hard way.  Several times.  Here are Bob’s rules of effective demo’s.

Rule #1:  Disconnect from your normal network/regular computer

There are things floating around on your drive that you tend to use all the time.  So when you take your development project off your home network, or move to a separate machine, you’ll quickly find the things that you forgot include in your demo packages.

In my case, I discovered that a Xojo project had references to graphic files that weren’t included in the folder I moved to the presentation machine.  The graphics weren’t necessary and it was easy to fix but how embarrassing to be in front of your peers to have a simple error like that occur.  It shows a lack of preparation.

Rule #2:  Run all of your Demo’s in the latest version of the software

This sounds silly, I know, but I found that one of the reporting tools I’m talking about in my session doesn’t work with Xojo 2015 R1 and R2.  For whatever reason I was using 2014 when I first created the project and didn’t run into the problem until I started working with it on the laptop which had the latest version of Xojo.

Another reporting tool I’m talking about in my session had to have a number of libraries installed to work properly.  And then it needed a newer version of its plugin.  These issues were not very hard to fix when I have reliable internet access and access to all my files, but once you’re away from home that’s not always the case.  Again, if this happens in a presentation it looks like you have not prepared.

Rule #3:  Practice saying your presentation out loud  

Speaking your presentation is important in a number of ways.  First, it will show you where you have not prepared enough.  If you find yourself um’ing and ah’ing in a particular session that’s an area to do again (and again).  Since you can think faster than you’re speaking you’ll often find yourself saying “I need to mention this.”  Having this happen during your actual presentation is a bad time.  Practicing beforehand will show you these problems.  Practice multiple times to catch even more of them.

I’m a good writer (I’m sure that’s open for debate) and I have my ‘inner voice’ that talks to me when I’m reading something.  That’s not good enough when practicing for a presentation because your inner voice lacks depth.  It lacks the pauses and breaths that you need when speaking.  Practice your presentation as if there are people in the room.  Pause for effect.  Pause for eye contact.  And in technical presentations pause for people to wrap their head around the idea.  Silence is good in a technical presentation and that pause is never as long as you think it is.

A lot of people have a fear of public speaking.  I can’t say was overly enthused about the subject a few years ago either.  I decided to tackle that fear and enrolled in a local chapter of Toastmasters (TM).  At this point I have achieved the Competent Communicator award and feel more comfortable speaking in a crowd.  Frankly, after two years of TM it’s hard not to evaluate all speakers and count their use of um’s and ah’s.  Toastmasters is a safe and friendly environment to learn how to speak in public.

Rule #4:  Practice, Practice, Practice

This seems intuitive but I’ve seen it happen to myself and others way too often.  The more you can practice your presentation, out loud, the better off you’ll be.  I can’t remember which Toastmaster’s speech I was giving but I didn’t have the same preparation as I normally did and it showed.  My use of fillers words was awful, I fidgeted a lot more, and I was uncomfortable with the topic, and I had to use my notes more often than I wanted.  I did okay but it was not my best speech.

Steve Jobs was known for his awesome keynote speeches where he introduced new, sometimes buggy, products to the world.  He practiced, on stage, with the actual product hundreds of times until everything seemed magical and when something didn’t go as planned he could make joke of it and move on (and use the backup device).  That last bit is very hard, but if you’ve practiced your presentation to the point where you’re dreaming of it you should do okay if things go awry.

Rule #5:  Relax

I can’t say I’ve ever been to a technical presentation where the audience was hostile to the speaker.  We usually have a choice on what sessions to attend and we are there to learn something new and hopefully be entertained.  The audience is pulling for you!  When you make a mistake during your presentation know that we’ve been there and had the same thing happen to us.

Toastmasters has another fine tradition of telling a joke to start off their meetings.  It makes everyone relax a bit and if the joke, even an awful joke, can get a chuckle or two it’s a great way to start a presentation.  If you can do a joke somehow related to the topic you’re even better!  One word of caution on jokes, though, unless you’ve practiced the heck out of telling this joke don’t bother!  The timing of joke is everything and unless you’re are comfortable with it don’t screw it up (unless you’re comfortable enough to botch the joke and recover from it and make everyone laugh anyway).

So that’s it.  I have a lot of work to do before the conference next week.  I have to practice some more and when I get tired of talking about it I’ll do it again once or twice.

Hope to see you at the conference.  Please stop me and introduce yourself.  I really enjoy meeting my fellow Xojo developers.

Xojo 2015 Release 2

Xojo Release 2 went public this week.  This release is a typical mishmash of new features and bug fixes.  So let’s dig into it!

iOS

The DatePicker was added to iOS.  This is a most welcome addition and let’s you switch between Time, Date, Date and Time, and Countdown Timer.  There’s still no generic data picker which is a shame.

The Launch Images and App Icons folders for iOS has now been replaced with an editor that allows you to drag and drop images into it.  If the image isn’t the appropriate size for the selected image a message appears saying what the dimensions of the image is and that it will be scaled to fit.

[Edit]   One thing I forgot (because I didn’t see them in the release notes) was that build times are much better in R2.  From comments I’ve seen it may be an order of magnitude faster.

Web Apps

If you are using the HandleSpecialURL or HandleURL the RequestHeaders now has a Secure property telling you if the request came in over a secure channel.  If you are using SSL Certificates they can be specified on the command line.  Another new web feature is the ability to set the HTTPOnly property attribute in the Session.Cookie.Set method.  This should work as a preventative measure against cross site scripting attacks against Xojo web apps.

New Framework

The new framework is making its way to more and more of the overall package.  The Xojo.Data, Xojo.Crypto, and Xojo.IO.Folderitem are now available for all targets and platforms.  The Xojo.Data namespace includes the ability to read/write JSON (no work on XML yet).  The Xojo.Crypto framework gives you access to MD5, RSAEncrypt/Decrypt, RSASign, RSASignVerify, SHA1, SHA256 and SHA512 hash methods.  Xojo.IO.Folderitem gives  you file handling.

Xojo.Net.HTTPSocket now works for all platforms (except Xojo Cloud).  It should be noted that HTTPSocket is now ONLY asynchronous.  No longer can you wait for the response but now you have to use the events from the socket.  This is really a better way of using the HTTPSocket but if you’ve been using it in the old framework synchronously you’ll need to adjust your code accordingly.

[Edit] The new HTTPSocket supports HTTP 1.1, automatically supports proxies on all platforms, and performs proper certificate validation.  It also no longer performs polling on the socket so it should be have significantly lower CPU usage.

The Xojo.Core.Timer now works properly on Mac OS X 10.7 and 10.8.  Apparently it didn’t work properly in older versions of Mac OS X.

Miscellaneous

For many, the recent addition of the Windows ICU DLL was a major setback as they were quite large.  You’ll be happy to know that they’re now statically linking them and removed the unused portion of the libraries so the built package is now considerably smaller.

The IDE receive a large number of bug fixes including a couple of memory leaks.  They also fixed how deleting items works and how the focus works when switching between tabs with the Code Editor displaying.

According to the release notes there are 147 total items that were changed in Release 2.  This number seems a little low in comparison to some previous releases.  Given the short period between the R1 release and XDC I think this makes sense and the engineers have a lot of work to do in getting ready for XDC.

I did not get as much of a chance to run the beta as I usually do but there hasn’t been a lot of chatter on the forums about issues either.  What little I did with the beta was solid and this looks to be a decent release.

Have any comments about this release?

Xojo Desktop vs Xojo Web App Development

The question comes up every now and then on what’s the best target to develop for:  desktop or web.  The answer is sometimes pretty straightforward but, in reality, the answer should be “it depends.”  You see, each target has some very good strengths and also some bad weaknesses that you need to evaluate before you start coding.  Let’s go over some of those issues.  Let’s start with desktop apps.

Xojo has been making desktop apps for it’s entire history.  Thus it is very stable and mature and there are a lot more 3rd party libraries and plugins available.  You get most, if not all, of the goodies that come along with the desktop environment and this can mean your desktop apps can have most of the buzzers and bells that modern users demand.

With desktop apps, if you need 10 more copies, it’s as simple as installing them on new machines.  These days there’s not a lot of issues deploying to Mac OS X and Windows and most versions of Linux, but still, you need to test on all supported platforms.

The major downside to desktop apps is deployment.  Each user has a copy of the software and depending on your needs/requirements you might need to ensure that everyone be on the same version.  Example:  You’ve created a desktop app for a veterinary clinic that handles everything from pet checkin to billing.  All of them connect to the same database so when you introduce a schema change in the database you need all the clients to use the newest version.    For a small organization this might not be so bad but scale that up to a corporation with several hundred copies of your software.  A good organization might have a good IT department and can deploy your software to everyone at once, but my experience says that most organizations don’t handle this well.  So your software has to be programmed to be cognizant of database versions and check at startup and complain if it’s not what it’s expecting.  From experience it’s a pain to deal with.

Desktop apps that are part of an n-tier system also need to be programmed differently.  You can program each client with all the logic it needs, but then you have to worry about record locking issues (i.e. who wins if two users are editing the same record at the same time).  You also have deployment issues, again, since you’re back to the issue of updating every client every time there’s a little change in logic.  The better solution is to have a middleware application that handles the business logic and is the go-between between the client apps and the server.  The middleware app does all of the business logic and handles the transactions between the database and the client apps.  It’s a fair bit of work and is not what I would consider a simple undertaking.  But at least you generally only have to update the middleware app most of the time and the clients can stay the same.

Web apps, on the other hand, have several advantages over desktop apps.  First, they are n-tier by design.  Each client has its own set of logic via Xojo WebSessions even though there is only one application running.  The user runs in a browser and everything is processed on the server.    So when you need to update your web app you shutdown the old one, replace the executable and the next time someone hits the URL the newer version is there and running.  Having only one instance to update is really nice (and quick).  Web apps eliminate many deployment challenges.

Web apps aren’t perfect though.  Since they are generally exposed to more random user interaction via the web you spend way more time dealing with security and making sure nefarious users don’t get into your system or abuse it.  All of your database operations should use PreparedStatements to make sure SQL injection attacks cannot happen.

Web apps run in a browser.  That’s both good and bad.  Users can access your app as long as they have internet access.  In some areas this is no big deal and for others it’s a huge deal.  Browsers also have a lot of built-in security to keep bad things from happening on your computer.  This security also limits what your browser can do in terms of file handling local.  Xojo does not currently support drag and drop operations with the browser.

Xojo web apps are also not as stable and mature as the desktop side simply because it’s younger.  That’s not the same as unsafe but it does mean there are not as many 3rd party options for Xojo web apps.  Some controls, in particular the listbox, are vastly inferior to their desktop counterparts in terms of capabilities and may not be good enough for your needs.  Web Containers go a long way towards solving this issue but it’s not ideal.

Not all web browsers are created equal.  Some perform better than others and all of them have gone through tremendous growth in the past ten years as the internet has become ubiquitous.  This means there are a lot of different browsers, and versions of those browsers, being used by the general public.  Testing the various browser type and version combinations is critical and despite all the efforts of Xojo to get it all right, the speed of new browser releases does mean issues pop up now and then.  Mobile browsers have their own set of issues that you might need to take into account as well.

Desktop apps have a huge advantage in that they don’t have to convert text to UI like web apps do.  For example loading 1,000 rows in a desktop listbox, while slow is blazingly fast compared to doing the same thing in a web app.  1,000 row list boxes in web apps are SLOW simply because the server has to create all that html data, send it through the internet to the browser, and then the browser has to reassemble it for the user to see.  To get around this most websites do data paging where they only show you 25 to 50 records at time.  Again, not hard to do but one more thing to develop.  Also keep in mind that mobile browsers try really hard to minimize data connections over cell connections so what seems fast on your desktop might be incredibly slow on a mobile phone.

Perhaps the biggest issue with web apps (not just those made with Xojo) is scaling.  Your app will react differently when accessed by 1000 simultaneous users than when it has 10.  The way around this is to do load sharing and balancing using NgInx and works well on Apache web servers.  Finding a good web server to host your web app can be challenging too.  Until Xojo releases their 64 bit support for web apps it will be increasingly difficult to find and install 32 bit compatibility libraries that work with Xojo web apps.

As you can see, there’s is no right answer.  Both desktop apps and web apps have their place in the world since they each have strengths and weaknesses.  Before you start development work you need to think through the implications of doing each.

Happy coding!  Was there anything I forgot to mention in the debate of desktop vs web apps?

BKS Shorts Webinar

JpicAppIcon256oin me from 1 to 2 PM (ET) on Tuesday, March 31 as I do a webinar with Paul Lefebvre of Xojo.  In this webinar I’m going to talk about BKeeney Shorts, our reporting classes for Xojo.

Many Xojo developers are familiar with banded-style reporting tools.  They are generally easy to understand and use and are great for simple reports.  However, if you’ve struggled with complex reports that don’t easily fit in the banded reporting tool paradigm then BKS Shorts is worth looking at.

BKS Shorts is 100% native Xojo code and its strength is that you have 100% control over all of your report objects.  Its drawback is that you have to code everything!  BKS Shorts has multiple rendering options including to the Graphics object (Canvas and printer), to HTML, and to PDF  (using the MBS DynaPDF plugin).  BKS Shorts works on desktop, web and console apps on Mac, Windows, and Linux.

In this webinar I’ll go through an example or two explaining the code and answering any questions that come up.  To register for the webinar, please go to https://www.zoom.us/webinar/register/9a94b333833729fbcde7dc3c8da9331e

 

See you online!

 

BKS Spell Checker 1.0.2

picBKS_SpellCheckerWe released a new version of our Mac/Windows spell checker plugin today.  Version 1.0.2 works better with foreign language Hunspell dictionaries that are in different encodings.

The Spell Checker plugin has two different spell checking modes.  In the first mode it  works with the native spelling dictionaries on each platform.  On all versions of Mac OS X (that Xojo supports) and Windows 8 and above it uses the built-in spell checker dictionaries.  If you can’t, or don’t want to, use the native dictionaries you can use the Hunspell dictionaries.  There are hundreds of Hunspell dictionaries available for use in a variety of languages and speciality industries.

There is no Linux version at this point due to lack of interest.

More information, including downloadable demo, pricing, and usage is available at http://www.bkeeney.com/allproducts/bks-spell-checker-plugin-for-xojo/

LiveCode vs Xojo

I have been a Xojo developer for many years and I make a decent living at it.  That doesn’t mean, however, that I don’t look around at other development environments every now and then.  I do this because it makes good business sense to keep my options open.  This week I looked at LiveCode after a reader asked me to.

LiveCode (formerly called “Revolution”) is a unique development environment that has been around since 2001.  It was inspired by HyperCard and due to its lineage it uses a Card and Stack metaphor to represent windows, objects, and applications.  To put it more in Xojo terms you can think of a window as being a Card and the entire application as a Stack (of cards).  Dialogs and other objects can then be sub-stacks.  LiveCode can make Mac OS X, Windows, and Linux desktop applications, cgi-like web apps, and mobile apps for iOS and Android.

Its scripting is a natural English-like programming language that presumably makes it easy for casual programmers to get started.  Another interesting feature is that there is very little difference between ‘development mode’ and ‘debugging mode’ and switching between the two is literally just a button.  This means that you can run LiveCode commands practically at any time without the need to compile the application first.

The IDE has a variety of windows.  The Application Browser shows you all of the objects in the stack and lets you open each card into an editor.  The editors let you put controls on the Card (layout) and each card and UI object has a number of Messages that are similar to Xojo events.  LiveCode does not have an all-in-one window like most other IDE’s.  At first, I found the individual windows to be refreshing but after I while I found that I was fighting with background application windows.  I’m sure this is something that becomes more natural with usage but I had issues with it.  I’ve always wondered if Xojo’s all-in-one window IDE approach was really the ‘best’ approach to a development environment and now I see that I prefer it as it eliminates the distractions of other windows.  Also, Eclipse, Visual Studio, Xcode and Xojo all have all-in-one IDE’s so I this it safe to assume that most developers are comfortable with this style.  You may find LiveCode strange if coming from an all-in-one IDE.

The LiveCode scripting language definitely takes some time to get used to.  The natural English syntax seems inviting but after 30+ years of coding in various languages I found it frustrating.  It’s wordy and not exceptionally compact in its meaning.  If you don’t already have any programming experience this might be good for you.  If you’re coming from a different language you might be as frustrated as I was.

Xojo events are relatively easy to find and implement.  You simply right-click on an object either in the Navigator or in the Layout Editor and add Events to the object and it’s added into the code waiting for you to add your own code to it.  The object messages in LiveCode are not so easy to figure out, in my opinion.  To figure out the events I had to go into the documentation (which was decent, in my opinion), and had to look them up and then type them into the Script Editor.  I’m sure with a little time and practice I would pick up the messages that I use most often, but it is a hindrance to picking up the language.

LiveCode Dictionary

LiveCode API Dictionary

 

The Xojo Code Editor has a pretty good auto complete.  Auto complete means that when you start typing, say “SQLite”, and if there are either language keyword matches or variable matches the eclipses (…) is shown and if you hit the tab key a list of available properties and methods are shown to you in their proper context.  This makes discoverability much easier.  LiveCode has no auto complete in their Script Editor which means you have to look up the commands before you start typing and you won’t know if they’re correct until you run the project.

LiveCode has objects but they don’t have the same Object Oriented nature as Xojo.  In Xojo you create an instance of the object and then get/set a property or call a method using the dot notation.  Thus opening a database in Xojo means creating a new instance of the Database, setting a FolderItem property on that object.  Then calling the CreateDatabaseFile method on that same object and it returns a true or false to indicate success or failure.  All of that revolving around the same object (database).  The same thing in LiveCode requires less coding steps but there is no dot notation and it’s definitely more procedure driven.  Each method is its own call – not part of an object – and means that you’ll spend more time looking at documentation to discover them.  I feel that Xojo’s discoverability is superior to LiveCode.

LiveCode is not a strictly typecast language meaning you can use a variable anywhere at any time.  This means that writing scripts can be very quick but it also means that introducing errors is easy and with larger projects it might be hard to find errors.  Xojo, on the other hand, is strictly typecast and the compiler will tell you if a variable is not defined or if you try to put the wrong type of data into a variable.  There are plenty of other languages out there that don’t require variable type declarations but I never have spent much time with them.  If you’re used to them it’s probably no big deal but I tend to like the compiler to warn me early and often of any potential issues.  Another little thing about the language is that to assign a value to a variable using the Put command rather than an equal (=) sign.  In LiveCode you would say:

put “ABC” into myStringVariable

In Xojo this same thing would be

dim myStringVariable as String = “ABC”

LiveCode Create DB

Creating an SQLite Database File using LiveCode

Xojo Create Db

Creating an SQLite Database File using Xojo

 

One of the major drawbacks that I discovered early on was that LiveCode does not make native looking applications.  The good news is that PushButtons look the same on each platform (no mean feat) but it also means that those Pushbuttons don’t look native on any platform.  There are commercial plugins available to make LiveCode applications look native on each platform.  I don’t believe that the plugins are using native controls either so this means that an OS update might ‘break’ the look of an application until those plugins are updated.

LiveCode Mac app

LiveCode App running in Mac OS X

LiveCode Ubuntu App

LiveCode App running in Ubuntu

LiveCode Win8

LiveCode App running Windows 8

 

Xojo is not perfect in this regard as not all of its controls are native on each platform either.  It does, however, use them whenever possible.  Another drawback to Xojo is that control features are often times the lowest common denominator between Mac, Windows, and Linux for desktop platforms.  This is more for feature parity than any malfeasance on their part.  Xojo web apps and iOS apps use native controls.

LiveCode, like Xojo, lets you create external libraries using C++.  LiveCode calls these Externals while Xojo calls them plugins.  It appears that there is an active community of developers and an active 3rd party development community for LiveCode.

Unlike Xojo, LiveCode comes in two different varieties:  Community Edition and Commercial.  The Community Edition is open sourced and free but limits you to open source and GPL applications.  If you are interested in LiveCode this is where I’d recommend that you start.

There are four different types of commercial LiveCode licenses.  The Indy Commercial license costs $299/year per seat and lets you do closed source and royalty free commercial apps with a $500k revenue limit (how this is enforced I have no idea).  The Business license costs $999/year/seat and eliminates the revenue limit.  The Pro license $1,999/year/seat and gives you more personalized service and a Premium license is $10,000/year for 3 seats and gives you priority support, use of their test suite, extensions, priority features (whatever that means) and a LiveCode conference ticket.

LiveCode also has a membership program that costs $99/year ($25/year for students) and gives you exclusive membership benefits and helps supports the continued development of the platform.  You also get access to over 100 training videos and access to the LiveCode Conference simulcast.

What I Liked About LiveCode

I found the LiveCode Start Center to be clean and uncluttered and useful.  It has four main areas, Projects that shows your recent projects, Getting Started that has handy links to the some beginners videos and guides, Resources that takes you to tutorials, sample stacks, the community forum and their API dictionary, and finally they have a Sample Projects list that has a sample projects in it.

The LiveCode website also does an excellent job of pointing out 3rd party commercial and non-commercial extensions and what they can do for the developer.  They also allow user reviews of the extensions so it makes it easier to make a purchase decision.  I have no idea what it takes to get listed on their website or if LiveCode takes a cut of the revenue but it’s something I wish Xojo would do a better job of helping their 3rd party developers market.

I also found it refreshing that their API documentation allowed user comments.  I really wish Xojo would do something similar because I feel that we, the user community, could add some really useful comments to the documentation.  While I like the Xojo documentation I feel it might be better served by opening it up a bit (with moderation).

LiveCode does deploy for Android which might be a huge bonus for some.  Assuming I could get a UI that looks native it might be the one thing that would make me look at LiveCode with any seriousness if a client asks for Android deployment.

Finally, the fact that part of LiveCode is open sourced is interesting.  They successfully ran a KickStarter campaign to open source the product in 2013 and successfully did a campaign on their own website to fund HTML5 web deployment in 2014.  I don’t know about anyone else but I would help fund certain items for Xojo development even if wasn’t open sourced (perhaps a better grid control?).

What I Disliked About LiveCode

If you’re coming from C++, Java, or any object oriented language I think you’ll find the lack of ‘objects’ to be disheartening.  Add to it that there is no auto complete for the Script Editor and I think it’s a deal killer for me.  Those two features make discovering events, properties, and methods so much easier without having to constantly check the documentation and I think it’s a huge adverting for Xojo.

The lack of strong datatypes, while not a deal killer, scares me a little.  I want to be warned early, often, and loudly when things go wrong and strong datatypes are something that I really find attractive in a programming language.  If there’s a data conversion going on it’s because I want it to happen (don’t get me going on Xojo variants – they’re evil – get over it).  The natural English scripting language also puts me off simply because it’s unnecessarily wordy.  Again, if you’ve never programmed before this might be an advantage.

The lack of native looking controls is also huge drawback for me.  Xojo apps will try their best to look native (though Linux apps require more of a nudge than Mac/Win apps) and while not perfect, out of the box, Xojo apps are generally native.

Conclusions

Is LiveCode worth a look?  Sure.  Like any development environment, if it speaks to you and you can get your projects done in it then it’s the right one for you.  For me, Xojo is a better language, with a better IDE, and has more features that I want.  Xojo is only lacking Android support and I’d probably look more at Xamarin than LiveCode for a variety of reasons.

If LiveCode works for you that’s great.  This review isn’t meant to be overly critical of the tool but as an existing Xojo developer I don’t see enough reasons to switch from Xojo development to LiveCode.  Feel free to leave comments below on anything you feel I missed or got wrong.

XojoTalk

One of the things that I love about the Xojo community is that it’s pretty friendly group.  You ask a question on the forums and you’ll usually get a decent answer or two.  This means that we’ve often ‘talked’ with Xojo experts but have never met them.  One of the things that stinks about the Xojo community is that we are a small enough group that it’s likely there are not a lot of Xojo developers near you.  That’s a shame because the Xojo developers I’ve met in person are as nice, if not nicer, than they were online.

If you can possibly attend the Xojo Developers Conference (this year it’s April 29 – May 1 in Austin, Texas) I highly recommend it.  Whether you are a newbie to Xojo or been around the block, as they say, a few times, I’ve always found it to be a good experience.  To be able to talk Xojo for 3 or 4 days is invaluable!  Nowhere on the planet will you find a higher concentration of Xojo developers per square foot.

Recently Paul Lefebvre, the Xojo Evangelist from Xojo, has been hosting a podcast called XojoTalk.  I love these podcasts because we get to hear from Xojo developers that we’ve ‘known’ for years through the forums and we get to learn a bit about them.  How they came to use Xojo and what they’re doing with Xojo.

Often the conversations veer off into some strange topic that you wouldn’t expect.  When I was a guest back in October the Royals were starting their playoff runs and while I’m not much a baseball fan it was a BIG deal for those of us in the Kansas City region (29 years since our last playoff appearance).  We also talked a bit about the, then, recently announced Windows 10 and what it meant for Xojo developers.  These organic conversations are entertaining and well worth a listen.  Paul does a great job so check it out!

You can subscribe to the podcast via your favorite RSS reader via http://feeds.feedburner.com/xojotalk or via iTunes at https://itunes.apple.com/us/podcast/xojotalk-podcast/id920411434

My entire team will be at XDC.  We are doing only two sessions this year.  Carol is doing a database design session and I’m doing a reporting tools session.  Hope to see you there!