RAD Still Means You Have to Learn the Language

Xojo is a great development tool that is a Rapid Application Development (RAD) environment.  That’s marketing speak for you can get stuff done quickly.  The marketing speak isn’t wrong but for many people they think this means that Xojo is ‘easy’ and the learning curve is next to nothing.  I hate to break it to those developers, but it just isn’t true.  Xojo, like any development language has a learning curve.  It might be a lot less than others but there is definitely one.

The truth is that Xojo is RAD once you learn how it works.  This means you have to learn the basics of the IDE, the language, and the debugger.  And only after understanding the basics of Xojo can you start taking advantage of the RAD part.

There are parts of Xojo that aren’t so RAD.  One of those, in my opinion, is database coding.  You still need to know SQL, and use the basic database classes to read and write data into your application.  In fact, it’s so low level that the IDE does not help you, in any way, which may lead to database errors.  The IDE will happily let you try to put a string into a numeric field in the database.  What worse is that depending upon which database is used (looking at you, SQLite) it won’t complain when you do so (thankfully this is not true of all databases).

Putting data into a database using the database classes is a two step process.  One, you have to query the database knowing what the field names and datatypes are as there is no autocomplete for them.  Xojo will happily let you (try at least) put a date value into an integer at design time.  It’s not until you try all this at runtime that things fall apart.  The same is true for updating and inserting data.  These are the reasons why we came up with ActiveRecord – our database classes for Xojo.

ActiveRecord is our way of making the Xojo compiler a little bit smarter.  It maps each table to a class and the properties in that class map to the database fields.  ActiveRecord checks to make sure that all of the fields in the table are represented in the class.  If not it flags the developer.  (It does way more but this post isn’t really about ActiveRecord.)

From our experience, jumping straight into ActiveRecord isn’t all that helpful for new Xojo users.  It’s a shortcut and you’re depending on our code without understanding it and I strongly discourage it until you’ve gone through the pain and tedium of using the standard Xojo classes.  In fact, when we train new developers we ALWAYS have them do a small project using the standard Xojo database classes.

Then we train them in how to use ActiveRecord.  The setup is a bit more involved and it’s not a perfect system, but once they start using the Table/Field autocomplete and having the compiler warn about mismatched datatypes they start to understand how much faster they can code database applications.  We are consultants, after all, and time is money.

Rapid Application Development systems do NOT mean quick to learn and being able to create an application with no experience.  RAD means that AFTER you’ve learned how it works it can be incredibly fast.  Once you learn Xojo is *can* be very fast to develop applications.

Anyone disagree with this?  What is the best method of learning Xojo?  Online documents?  Webinars?  Videos?

3 thoughts on “RAD Still Means You Have to Learn the Language

  1. The current confusing state of the 2017r3 IDE means this latest version is the least RAD IDE this product has every been. I am finding it quite hard to navigate to code. and the back forward buttons are completely broken

    • I’m not sure I understand. Xojo 2017 isn’t much different than Xojo 2016 and earlier.

      If you mean it’s harder to use than Real Studio than I agree. For large projects the Navigator makes things a mess and harder than it needs to be. I almost always open an object into a new tab just so there’s less clutter. At last years XDC Geoff showed off some concept ideas for making Xojo a little bit more like the Real Studio IDE. Maybe we’ll see more of that at XDC this year but I’m not holding my breath.

  2. Well, Xojo can be RAD, as you said Bob, but I would still advise every serious developer to start building up you own code-libraries and framework, in order to have quick starts for every new project. And as soon as you have good practices that work for you, stick with it in order to build quick and error free, at least for the parts you need by default within every single project you do.
    I decided to develop my own database class for quick and straight interaction with most common databases. It’s a fact, that once you start using your own classes and trust them, you forget about techniques you used in it, for example how to use prepared statements, since these are encapsulated. Benefit is that you can concentrate on just what you want to build for your client.

Comments are closed.