How’s Your Xojo Mojo?

June 11th, 2013 15 comments

Xojo was released a week ago.  For those of us that were in the beta program (and even earlier with the alpha program) it seems like we’ve been using Xojo forever.  I have plenty of my own opinions and I can take some small satisfaction for saying, “I told you so” in some areas in regards to the new UI.

There are plenty of things in Xojo that I dislike.  The use of vertical space in the Inspector is atrocious.  The lack of keyboard shortcuts is annoying.  Getting lost in the Navigator makes me less efficient.  The inconsistent use of checkboxes vs sliders is disappointing considering this release was put on hold for a year.  Note that I didn’t say that any of these issues were show stoppers.

For me, the IDE has crashed some but not to the point where I want to put my fist through the screen.  I’ve gotten the Navigator so lost that it doesn’t redraw properly but a simple Xojo restart seems to fix that.  There have been times when the focus is somewhere other than where I want it and a Duplicate command creates a duplicate of something else entirely and sometimes it takes me a day to find the duplicates because they’re hidden in the Navigator.  Again, these are annoyances and not show stoppers.

I know that some Windows users are very unhappy with the new user interface and that for some Windows users the IDE is horribly slow and the flicker is bad.  I’ve not investigated this in any great detail but it seems to be related to GPU power and OS on the end users computer.

While there are plenty of things to dislike there are also things that I just use.  Xojo is usable for me and my team and I’ve spent a considerable amount of time using it (roughly 80% of my time) the past couple of weeks.  For me, the Cocoa framework seems to be solid and while some things are different I expected a certainly level of incompatibility.  It is after all a new framework that, while close to Carbon, is still different enough to cause some heartburn.  Really, the only major difference that I’ve seen is that using Threads is a pain now.  Software development isn’t always pretty or easy but Xojo has done a good job of making it easier.

I am looking forward to the future releases to see how they combat some of our biggest gripes.  A few changes can’t come soon enough but bottom line, for me anyway, is that I can use Xojo for consulting projects.  My fallback is always to go back to Real Studio but I don’t think I will need to.  The few times I’ve gone back into Real Studio I have discovered that it looks ‘strange’ now.  So give Xojo a chance.  It tends to grown you.

So what are your thoughts?  Do you like it, love it, hate it?  And why?

PS.  Let’s keep the remarks civil.  I don’t like it when users make personal attacks on me and my team in tech support.  I’d like to keep the comments respectful.  I’m friends with much of the Xojo team and I know they put in a ton of work for this release.  I for one will cut them some slack and I hope you will too.

Categories: Opinion, Xojo Tags: , ,

Xojo 2013 Release 1

June 4th, 2013 23 comments

XojoXojo 2013 Release 1 is the biggest change to the Real Studio IDE since 2005 when the modern REALbasic/Real Studio IDE was introduced.  The User Interface, while still relatively familiar, has been changed throughout the IDE.  Some changes are blatantly evident and some look almost exactly as their Real Studio counterparts but regardless of looks almost everything was rewritten.

In addition to the major UI changes the Cocoa framework has been worked on extensively.  The Xojo IDE is compiled for Cocoa (on Mac OS X) and the beta tag has been lifted from Cocoa (yay!).  For many applications you will have to make few if any changes but if you’re a heavy user of threads it’s likely you’ll have your work cut out for you with the new ThreadAccessingUIException.

Without further ado, here is my review of Xojo 2013 Release 1.  I have some opinions and some pretty strong ones.  Expect a few in this review.  :)

Project Chooser ProjectChooser

Starting up Xojo is a bit faster than Real Studio.  Optimizations were made with the documentation and a new plugin format makes this a less onerous task.  When you start Xojo you’re presented with a new Project Chooser that lets you select the type of build (Desktop/Web/Console) you want.  You have the ability to input some data up front but it’s not mandatory.  The project chooser also has a way to quickly get to the example projects.

Workspace

Navigator

Gone from the IDE is the Project Tab.  In its place is a new Navigator that contains every item in the project as well a Build Settings.  These two groups can be collapsed and expanded independently.  When run your app in the IDE an additional section called Run is added that contains the debugger interface.  Once you stop this section disappears.

Content Section

The Content Section contains all of your project items.  This hierarchal list shows everything.  Every window, class, control, subclass, module, method, event, property, constant, structure, menubar, menu item (and more!) can be found in this list.  Open a Window to see the sections it contains whether that be constants, controls, methods, properties and events (more on events later).  Expand the individual sections to drill down into their contents.

As you select the various objects the appropriate editor is loaded into the center pane.  Click on a window and the layout editor appears.  Click on a menubar the menu editor appears.  Click on a constant the constants editor appears.  Click on a Method and the code editor appear.  You quickly get used to the right editor showing up at any given time.  As with Real Studio there are some funny things happening with the focus so to select an item in the Navigator it sometimes takes two clicks.

At the top of the Navigator are several controls to aid you in the search of your project items.  In the Filter field you can start typing the name of the item you’re looking for.    This is convenient if you already know the name of the item, but not so good if you don’t.

Double clicking on an item will drill down into that item and only that item is shown in the list.  Just below the Filter field is a Jump Bar that allows you to do a couple of things.  On the far right is a set of left and right arrays that let you navigate the hierarchy of the object you’re in.  On the left the current item is named and has a disclosure triangle next to it that displays a popup menu of the hierarchy allowing you to quickly navigate back to the top level or any level in between.

One of the goals in Xojo was to eliminate tab management.  If you really want a tab you can easily open the entire Navigator/editor structure into a new tab.  Simply right click on any item in the Navigator and select the Open in New Tab command.  There is also a Preference setting to allow a double click of any object to open in a new tab.  Some users may find this a more comfortable transition (I know I did).

The Navigator has some very handy features that the old Real Studio IDE didn’t do.  For one, you can select multiple items at the same time.  Have ten methods you want to copy and paste into another object?  Simply select the items you want, copy them, and paste in the new location.

One item of note here.  Keyboard handling can be tricky with copying of objects so I’ve gotten into the habit during the beta period to use right-click to copy items.  It is my belief that as this UI matures most of these inconsistencies will disappear.

Drag and drop from the Navigator is also possible in some editors.  For example, if you had a subclassed control (say a listbox) and found it in the Navigator you can drag and drop the subclass into your layout editor.  Since the Library doesn’t contain your project items this is the best way of adding subclassed controls to our layout (though you can always drag the original and then change the super).

One of the more annoying things the Navigator left out from Real Studio is that it doesn’t display super or data type information or interfaces.  You can get that information by selecting the item and looking at it in the Inspector (assuming the Inspector is open).  You can also see this by hovering your mouse over the item until the tooltip appears which gives you the missing information.  Regardless, both methods require additional work and are less than ideal.

Build Settings Section

Gone in Xojo is the Build Settings dialog.  The replacement is access through the Build Settings section of the Navigator.  In its place there are now 4 new sections allow you to access various settings.  The Shared settings replace much of what was in the Application object in Real Studio.  The Mac OS X, Windows, Linux, and This Computer sections let you change the settings for their respective platforms.  The platform options look like CheckBoxes in the list and, indeed, are checkboxes that tell Xojo which platforms to build for.

Run Section

If you decide to run the project from the IDE a new section appears on the Navigator called Run that contains one entry and that’s the debug instance of the application.  This is where you’ll see the slightly redefined runtime debugger.  The debugger is really just another editor and to start, stop, step into and out of code you have to go find the Run section and select the running application.

If you have multiple tabs open the debugger will always run in the first tab.  If you happen to close that tab the debug application is killed.  If you profile your application, the profiler instance will reside in the Run section.  More on Profiling later.

Toolbar

The main Xojo toolbar contains commonly used commands.  The toolbar is not customizable yet so you’re stuck with the big icons with text.

Insert

The Insert toolbar button is a menu button that mirrors the menu items in the Insert menu that’s located in the MenuBar.  This is the primary way to add things into your project.  You’ll use this button (and menu) quite a lot as you’re developing your applications.  In addition to adding objects, it’s also another way of adding events to objects (more on this later).

Another place the insert menu is available is in the right-click (Contextual Menu) of the Navigator.  Right click and along with numerous other options the Insert menu is available.  If you don’t want to move the mouse to the toolbar or menubar this is a good option.

Back/Forward Buttons

The back and forward buttons let you quickly navigate the history of each tab.  So if you look at the application object, then drill down to the App.Open event, and then go view a window the back button will take you to each of those.  This was a rather late addition to Xojo since so many people had complaints of ‘getting lost’ in the Navigator.  The history buttons definitely help out in this regard.

Run

As with the Real Studio IDE, the Run button starts a debug session.  The compiler will start up and if no errors the Debug panel is loaded waiting for an exception or breakpoint.  At this point this is also when the Run Section is added to the Navigation list.

Build

The Build button creates non-debug builds based on settings.  It will invoke the compiler as well.  Errors will be shown in the Errors pane (if there are any).  The Errors pane appears at the bottom of the screen.

Help

The Help button invokes the Xojo online documentation that lets you access the Language Reference and all other documentation.  A preferences setting lets you choose On-Line or Local documentation.

Feedback

The Feedback button opens the Feedback application.  Feedback is THE way to report bugs to Xojo Inc (after searching for existing reports) and to put votes toward those reports you want Xojo Inc to implement faster than others.

Library

The Library button shows/hides the Library pane.  If the Inspector is visible it will replace it.

Inspector

The Inspector button shows/hides the Inspector Pane.  If the Library is visible it will replace it.

LibraryLibrary

In the Real Studio IDE the control palette was available for Layout Editor.  In Xojo it has been replaced with the Library panel and you get to choose when this is visible.  In the Xojo toolbar is a Library button that shows and hides the Library.  As with many things in Xojo this area has been completely redesigned with a number of options.

The first option is that you can view all controls or a subset at any given time.  Subsets are things like buttons, controllers, decor, indicators, etc.  Moving the mouse over any of the items in the list loads a brief description of that control into an information pane located at the bottom of the Library pane.

This Library list itself has a number of options that allow you change the view.  You can see the list as large or small icons with or without labels.  You also have the option of grouping them by category and sorting them alphabetically or not.  In addition to all that there is also a search field at the bottom of the Library that filters out controls based on name.

After playing around with settings for a while I settled on Small Icons with Labels, No grouping, but sorting alphabetically.  This as close as I come to the Real Studio control palettes.  I’ve also been finding myself using the Library search rather than trying to find it in the list.

One of the major things that the Library does not do that the old Real Studio control palette did is show you any subclassed controls.  Instead, the thought is that you can find any subclassed control in the Navigator and drag and drop it into the layout editor.

InspectorInspector

Properties Panel

The old Real Studio properties list was very powerful.  It let you change and and all properties via the keyboard and you never had to touch the mouse.  In Xojo, the properties list has been replaced by the Inspector.  It is not keyboard friendly so expect to use the mouse to set some of the non-text properties (checkboxes, sliders, color pickers, lock positions, popup menus, etc).

Another missing feature is the ability to use dynamic constants for certain properties.  In Real Studio you could make a dynamic constant for a color and use that constant in the properties list.  In Xojo this is impossible and to do something similar you’ll have to resort to the open event of the control.  This seems to be a huge oversight in the design of the Inspector.

The Inspector, in my opinion, is one of the big weaknesses in Xojo.  So much power and functionality was removed that I hope they really rethink their decisions.  Among some of the UI faux pas in my opinion was the use of sliders for boolean values.  They look cool (with animation!) but they don’t really add much to the product.  They take up more vertical room than a regular checkbox and thus require more vertical spacing so they don’t look crowded.  Their usage is inconsistent as well even in the Inspector.  Some boolean properties use a slider and some use checkboxes.  I’d prefer one or the other but not both.

The vertical spacing used in the Inspector makes large lists hard to deal with.  For example, the desktop Listbox control has a lot of properties and it is impossible to see the entire property list without scrolling even on a large display.  I expect this issue to be even more glaring on a laptop with limited vertical real estate.

Attributes Panel

The second part of the Inspector is the Attributes panel.  Attributes are a more advanced feature that most developers won’t use.  It has a simple interface to add attributes as well as boolean sliders to mark whether to include the object in Desktop/Web/Console builds.

Library/Inspector

One odd feature in Xojo is that the Library and Inspector cannot be open at the same time in the main Xojo window.  There is a preference setting to make them palette windows but that’s not exactly ideal for many people.  The reason I find this so distasteful is that in Real Studio I put a control on the layout and then immediately name it (we never use the default names except for labels that are never referenced in code).

To do the same thing in Xojo I have to open the Library, place the control, and then Open the Inspector.  Then I have to place my cursor in the Name field which usually requires two clicks to select the entire name and then put the new name in.

This change isn’t a huge deal but it is irritating because it changes my workflow. What I have to do now is put all my controls on the layout and then open the Inspector and rename the controls.  Like I said, it’s a simple thing but I’d love to have the ability to have the Library and Inspector be open at the same time (not in palette windows).  I’d also love to have the option to put the Library or Inspector on the left side next to the Navigator.

Panels ErrorPane

At the bottom of the Xojo IDE is a new area for panels.  These panels let you search the project, see error messages, and to show system messages.  The panes can be resized to some extent but there’s a vertical limit that can be kind of annoying.

Find

The Find panel takes the place of the Real Studio Find dialog.  It allows you to search and replace anything defined in the scope which depends on the item selected in the Navigator.  Otherwise it is very similar to the Real Studio find and replace mechanism.  Doing find and replace in the current method requires selecting that option from the control widget.  Again, not very onerous but it is yet another mouse event.

Errors

When you compile your project or use the Check function any errors or warnings are displayed in the Errors pane.  It is displayed automatically when it is needed.  The functionality of the Errors pane is nearly identical to the Real Studio errors tab.

Messages

New in Xojo is the Messages pane that shows you any System messages your app may have generated.  This includes anything sent to the System.DebugLog which is handy.  A convenient search field lets you find specific messages quickly.

Layout Editor

The  Xojo layout editor does not have many new changes other than both Web and Desktop editors look and feel like the Real Studio Web Edition layout editor.  Despite it working there are some changes that you’ll have to get used to.

ShelfShelf

One of the more welcome changes was the addition of the Shelf where non User Interface controls, such as the Timer, or Socket controls live.  No longer do you have to figure out where to put those pesky controls.  The IDE now puts them there automatically.

Non-UI controls also included Toolbars.  Adding one to a Window places it on the Shelf.  This might be the one control I really want shown at the top of the window as a visual aid.  After all it HAS a user interface and see what it contains is sometimes important.  Not a huge thing but as someone who uses toolbars a lot this is a drag.

Inline Editors

InlineEditorLike the older Real Studio Web Edition layout editor, both the Desktop and Web layout editors for Xojo have new inline editors.  The inline editors are small editors you invoke directly on the layout that let you manipulate the control.  For example, if you place a pushbutton on a window there is a small circular button with a pencil icon on the right side.  Click that and an editor appears right next to the control allowing you to change the button caption.  More complex controls like the Listbox have more complex inline editors.

This is another instance where some functionality was taken away.  In Real Studio if you placed a pushbutton on a window and started typing, whatever you typed would become the caption.  This was a very convenient way to get things done.  In Xojo you can’t do that and you’re forced to either use the Inspector or use the Inline editor.

Adding Events

Perhaps the biggest change in the Layout Editor is how you access events to an object.  Recall that in Real Studio every event for every control/object is available at all times.  This is no longer the case in Xojo and you have to add the events you want to use.

AddEventHandlerThe mechanism for adding events is a little weird because it depends on if the control already has an event handler or not already.  If it has no event handlers yet, double clicking on the control will invoke the Add Event Handler dialog.  The dialog then displays a list of all the available events for the object.  If you need more than one event you can select one or more events by holding the modifier key or shift key to select the ones you need.

However, if you already have an event handler for the object double clicking on the control drops you down into the Code Editor for the event (which one seems to not always be clear).  To add another event you have multiple options.  The Insert toolbar, menu, or contextual menu all have Add Event Handler options.  Selecting it invokes the dialog again.

The dialog itself has some interesting features in that as you highlight events a brief description shows up on the right.  If you select multiple events (whatever the standard platform modifier keys are for list boxes) the dialog will attempt to display descriptions for all the events selected.

I see this area as being the most controversial and perhaps generating a ton of questions from those new to Xojo.  Adding and using events was always one of the most appealing things in Real Studio and that now takes extra work to use them in Xojo.  It’s not a lot of extra work but I can see it generating some questions.

In my opinion the biggest reasoning for forcing the user to add events in this fashion was because of the Navigator.  Since the Navigator list can get rather large on even small projects having every event available for every object would just make the Navigator worse.  So the obvious solution to help the Navigator was to limit the events it shows.  Voila!  Force the user to pick which events they want.

To be honest for some controls I absolutely love this decision.  Label’s are one of those controls that has 18 events that I rarely ever use.  However, some controls, like the timer have only one event and to use it I absolutely have to add that one event.  So the dilemma for Xojo going forward is to how to make this feature more useful and smarter for all of us.

Code Editor

CodeEditorThe Xojo code editor is mostly the same as the Real Studio code editor in appearance and functionality.  In reality it’s a completely rewritten editor mainly because the entire IDE is a Cocoa application (on Mac OS X, of course).  The code editor is a canvas subclass and in Cocoa applications the canvas control cannot get the same keyboard input as regular text fields.  This led to the creation of the Text Input Canvas plugin that lets Cocoa applications get the same level of keyboard information (more on this later) for non-text controls (i.e. the canvas).

The one big change in the Code Editor is that to define a new Method you absolutely must have the Inspector visible.  In Real Studio you defined the method name, parameters, scope, and return value at the top of the Code Editor.  Now those are defined in the Inspector.  Moving all this to the Inspector makes sense from a consistency standpoint but the Inspector is generally a much smaller area so now long parameter lists are cramped into a much smaller and less usable text area.

When you define a new method the Inspector shows if it’s not already shown.  The method name field is highlighted allowing you to type the new method name.  Hitting tab takes it to the Parameters text area.  Hitting tab again *should* take you to the Return type but at the time of this writing it inexplicably puts the focus in the text editor.

Moving the definition into the Inspector one of the more annoying changes.  Moving my eyes from the Navigator where I’ve decided I need a new method to the extreme right to the Inspector (or wherever it’s at as a Palette window) is a bad design.  Not only is there massive eye movement but moving the mouse from one edge of the screen to the other just seems silly (the tab control bug withstanding).

Tab Editors

Web Edition Tab editor WETabEditor

The tab editor for Web Edition is using the same tab editor used in Real Studio Web Edition.  It’s an easy editor to figure out but if you have a ton of controls it can quickly become a mess.  Otherwise, it’s exactly the same.

DesktopTabEditorDesktop Tab Editor

For many people the existing Tab Editor for Real Studio (desktop) was a capable editor.  It’s one big deficiency was that if you had to add a control at the beginning of the tab order you ended up renumbering a lot of controls.  The Web Edition tab editor doesn’t work very well in desktop since Web Edition applications have no concept of parent controls.  So Xojo takes an alternative approach by using a hierarchical list to display the contents of the window.  The user can then simply drag reorder the controls in the order they want.  Non-tabbable controls do not appear in the list.  It’s simple but it works.

Menu Editor

MenuEditor

The Xojo menu editor has been modified to fit in the Navigator.  Besides having the menubar itself in the Navigator each individual Menu and each individual Menu Item is also in the Navigator letting you select it directly from there or through the editor itself.

Having items in the Navigator *should* make it easier to copy/paste/duplicate menu items but as I write this review that functionality is currently not working.

Database Editor

I was not a fan of the Real Studio database editor.  I recommended that you don’t use it because it led to some bad practices because it wouldn’t let you define your own auto increment primary key for a table you created.

The Xojo Database Editor is different though I still can’t say it’s improved.  It still has most of the same flaws as the Real Studio database editor.  So until Xojo, Inc. decides to get serious about the DB editor I recommend not bothering to use it.  There are much better free or inexpensive tools to manipulate your databases and I’d recommend using them rather than the Xojo Database Editor.

Constants, Enums, Structure Editors

Much like the Code Editor the constants, enums, and structures editor has changed so that the definition is forced into the Inspector.  Editing individual items then takes place in the center editor.  I have no problem with the editors in and of themselves but forcing them to use the Inspector seems like a solution waiting for a problem to fix.

Profiler

The Xojo Profiler was rewritten for Xojo and now handles threads much better.  The Profiler has some nice features to make it easier to figure out what code in your app is taking the longest.

Invoking the Profiler is different than in Real Studio where it was a menu option. In Xojo it is a boolean option in the Shared Build Settings section that is reached via the Navigator

Project Formats

The file extensions in Xojo have changed to accommodate the new name change and to help avoid collisions in the future (how many times did you double click on an .rb project file in Mac OS X and it opened Xcode?) with other languages.  So now the default file extension starts with xojo and then an identifier with which type it is.

The three formats available to Xojo are Project, Binary, and XML.  If you have any valid license you can use any format.  If you are using the IDE without a license you can only save in the binary format (though read any of them).

Xojo Project (text)

The new default project type is the Xojo Project file type.  It is the Real Studio version control format and a file is created on disk for every object in your project.  This is awesome for version control systems that scan the files for changes and then save ONLY the changes it detects.

Xojo Binary

The Xojo Binary format is similar to the old Real Studio binary format.  Many people use this format for the ease in transporting projects.

Xojo XML

The Xojo XML format is similar to the old Real Studio xml format.

Cocoa Framework

The Cocoa framework is finally done and the beta status is ready to be taken off the build option.  Why am I so confident of this?  Because there is somewhere in the neighborhood of 125 Cocoa bugs that have been fixed for Release 1 and Xojo itself is a Cocoa application when running on Mac OS X.  Building for Carbon is still an option but don’t expect a whole lot of fixes for Carbon going forward and part of that is simply because Apple is not fixing many Carbon bugs.  Cocoa is the wave of the future so you should really start using it and, to be honest, in my testing it’s been solid.  I should note that the carbon build option isn’t going away anytime soon but the clock is ticking.

Not everything is a perfect in-place upgrade.  A new runtime exception has been added to Xojo for any thread (other than the main thread) that accesses a user interface object.  The new UIException is thrown whenever you try to access literally any part of the UI.  Trying to create menu items at startup in a thread?  You can no longer simply create new MenuItem objects and add them to a menu because it will generate the UI exception.  You can generate the exception even by simply accessing the properties of a control at runtime.

For years Real Software (now Xojo, Inc.) said that doing so wasn’t safe but most of us did it anyway.  Now Xojo enforces the limitation.  The workaround is to add events to a thread object which fire timers.  The timer action events fire on the main thread letting you do your UI work there.  There is a new example project under Projects -> Desktop -> Threading -> Tasks that you should probably take a look at.

SQLiteDatabase

The REALSQLDatabase class has always really used SQLite in the background.  However, based on decisions that were made many years ago, the REALSQLDatabase class did a number of things that were less than ideal.  For one, it inserted the rowid into many of the SQL queries.  While most queries never noticed the addition there were occasions where it really messed up the underlying query.

In Xojo 2013 Release 1 the REALSQLDatabase has been deprecated and a new SQLiteDatabase class has been added.  The new class no longer inserts the RowID into queries for you.  If you were relying upon this (I highly recommend you do NOT) you can insert it yourself.

Another change in the new class is that it no longer has the AutoCommit property.  Xojo will treat all database actions as an implicit transaction which means that the commit will happen automatically unless the user specifically starts a new transaction.

Also new in the SQLiteDatabase class is the ability to backup your SQLite database while it is open.  This is a convenient way back up your database during runtime without having to close connections and copying the file.  While the backup is occurring it will block other database operations but otherwise it won’t throw an error.

Remote Debuggers

Desktop

Xojo comes with an updated Remote Debugger (GUI) application.  It is now at version 2.0 and has the same functionality is the Real Studio version.

Console

New in Xojo is a Remote Debugger Console application.  The new console debugger can be used to remote debug console and Web Edition applications on headless servers.  In my initial testing the UserGuides aren’t quite as helpful as they could be on how to setup and use it in conjunction with Xojo.  I’m sure the documentation will get better but in the meantime good luck in getting this working!

New Licensing

If you have not heard, Xojo is now free until you want to build a final executable.  Then you need a license for the what you’re building for.  I won’t go into much detail on this since it’s been documented at http://www.realsoftwareblog.com/2013/04/coming-soon-new-pricing-recap.html

For many developers their license costs will go down.  For those that are current Enterprise owners the price will most likely go up a little.

Control Sets

One thing that’s changed in Xojo is that Control Arrays are replaced with Control Sets.  They are really the same thing but the naming threw people off (myself included for many years) because we heard ‘array’ so we expected that we could use them like a normal code array.  Since you couldn’t the switch was made to rename them control sets.

The change has caused a few minor changes to the Inspector so that you can tell Xojo which control set it’s a part of and what its index is in the set.  Naming a 2nd control the same name as another control invokes a dialog asking if you want to create a control set.

Plugin Format

Xojo plugins are now really zip files.  The old format used the considerably slower Virtual Volume.  This speeds up the startup of Xojo drastically.  You can use old style .rbx and new style .xojo_plugin at the same time.  Monkeybread users will want to migrate to the newer xojo plugins to take care of incompatibilities.  Most of the major plugin vendors have migrated to the new format.

Text Input Canvas Plugin

Cocoa is a different beast in many ways when it comes to text and keyboard handling.  Carbon applications give you a bunch of additional information for free as part of Apple Text Services that gives you (for free) special character handling.  Unfortunately in Cocoa this mechanism is completely gone.

We’ve already talked about how the Code Editor is a special canvas subclass.  It was suffering from the lack of information and there was no way around it.  Xojo Inc has produced a new open source plugin that allows you get all of the events you need to capture special text handling.  It does this by introducing a number of new events that your canvas subclass will have to take care of.

We, BKeeney Software, have been beta testing the Text Input Canvas plugin in the Formatted Text Control with great success.  Once Xojo Inc. releases the plugin we will release version 3.1 of the FTC.  It will also prove to be an ideal example of how to parse the new events and commands that the plugin requires and uses.  Expect this plugin to be released soon after the Xojo release.

One Click Hosting

Xojo Inc announced the June 4th release date at the Xojo Developer Conference.  This was roughly 24 hours before their web server got hacked.  The hack caused them some delay in getting those services back online and forced their migration to their new Xojo Cloud server.  Delaying the release again was out of the question so the One Click hosting has been delayed and it will enter beta at some point after Xojo Release 1.

Documentation

Xojo has completely new example projects and completely new documentation. All of the example projects have been rewritten to use the file formats as well as the new Xojo classes.  The examples have also been reorganized to make things easier to find.

The documentation for Xojo is quite impressive.  The standard download package has 9 PDF guides ranging from QuickStart guides for Desktop and Web, to Tutorials for Desktop and Wb, and UserGuides for Development, Framework, Fundamentals, and UserInterface.  In addition to all of that Xojo comes with a PDF and iBooks version of the Upgrade Guide.

If you read no other documentation about Xojo I highly recommend reading this book.  It contains more in-depth description of many of the items I’ve talked about today and contains additional screenshots.

Conclusions

There are many, many reasons to like Xojo.  A lot of thought and care has gone into many of the design changes.  There are some areas of improvement such as keyboard handling and some workflow issues that they’ll have to change to satisfy Real Studio old-timers such as myself.

For Windows and Linux users there is less to be happy with.  The UI is identical on those platforms (minus animations) and looks even more foreign on those platforms.  Linux and Windows users should not expect many changes to the frameworks for those platforms.  This release all about Cocoa and the new UI.

Xojo Inc. has put a lot of time and effort into this release.  I admit that I am, and will continue to be, critical of the product.  It is, after all, what supports me and my employees.  I will say this though:  Xojo is much better than I had feared but not as good as I had hoped.  For my own consulting company all new projects going forward are using Xojo.  Existing projects will move forward under Carbon in Xojo unless they use no threads in which case they’ll be converted to Cocoa.

Please let me know your thoughts about Xojo!

Categories: Opinion, Review, Xojo Tags: , ,

RB Code Reports Updated

May 28th, 2013 No comments

appicon64We updated RB Code Reports today after we realized that it wasn’t reporting properly against Web Edition projects.  The Statistics Report now shows Container Control, Web Container, and Web Page counts.  It did not before.

We also added a preference for the Signature Report so that you can now specify the scope of the signatures you want in the report.  For example if you wanted only Public, Protected, or Private methods/properties you can now filter on them.

It’s interesting.  Our big Web Edition project is now getting rather large.  228 Web Pages, 173 Web Containers and a little under 65,000 lines of actual code.  I estimate that we are less than 50% done.  We are definitely pushing the edge on Web Edition.  Fun, eh?

RB Code Reports Version 3.0.5 is a free update for all registered version 3 users.

For information at https://www.bkeeney.com/rb-code-reports/

BKeeney Shorts Progress

May 26th, 2013 8 comments

picAppIcon256It’s been a little over a month since BKeeney Shorts, our Real Studio/Xojo reporting classes, were released to the general public.  All I can say is thank you!  The response has been tremendous and has exceeded my wildest explanations.

We’ve been working on a few updates this week.  First, we can now search a report for specific instances of a string.  This wasn’t on our radar but during the Xojo Developers Conference someone blurted it out during our training day and it got me thinking.  It turns out it was really easy to implement.

One of the things that Shorts does is has all of the pages available to the document and all of the objects on the page available to search so it ended up being an incredibly easy thing to do.  We don’t really ‘render’ the page until it’s called for.  In the demo app we added the search function and also created a list to show which pages the instance is on.  I think you’ll be really happy with it.

The second thing we accomplished this week was to get RTF Text blocks mostly working.  RTF is a particularly troublesome format to deal with because you have to convert from RTF into something that Xojo understands (StyledText) and then figure out how to draw it because we can’t use the standard TextArea.DrawInto command because our Page display can zoom in and out and also deal with Retina display on Mac OS X.  What a pain and I’ve already been able to get it to fail if I make the RTF even remotely complicated.

The conversion to HTML and PDF has gone relatively smooth but there are some minor glitches to work out there too.  Few conversions are 100% perfect and the trick is to get it close enough so most people are happy with it (or at least don’t send angry emails).

So what else is coming up?  That’s always a tough question to answer.  One of the things we really need to get into the product is automatic text block height calculations.  You provide the string, block width, and characteristics and it returns the height.  You can do this on your own now but it’s not nearly as easy as it could be.

The second thing that I really think would be cool for a Xojo application is runtime interaction with your report and receive events when a user clicks on a report object.  Imagine if you will an account balance report.  You see that account 10100 has an unusually high balance and rather than go back to the report screen to create a report on that account you simply click on the account.  The Shorts viewer receives an event, and the smart developer responds to the event and automatically creates a drill down report on account 10100.  I know of no other reporting tool in the Xojo world that is doing that.

Then there are some of the obvious needs.  We really want to add a designer control allowing you to visually create reports and then save that format into an external file so that in the long run reports don’t have to be compiled into your application.  Client wants a tweak to a report?  Find, send them the new report definition file and voila, it’s done.

I’m sure I can come up with a half a dozen other things I want to see in the product.

Some of the comments we’ve received about BKeeney Shorts so far have been awesome.  Things like it being easy to import into an existing project, fast in creating reports (about 300 pages a second!), and thanking us for wonderful support are all really cool things to get in your email in box.

That’s my quick update for BKeeney Shorts.  What sorts of things do you want to see in a reporting tool for Xojo?

Xojo: Inspector in Windows

May 16th, 2013 9 comments

Based on one of the comments from this morning I captured some screenshots of Xojo in Windows 7.  Hopefully this time you can get the side-by-side comparison in the post.  The only thing I’ve done is stitch together the Inspector image so it’s one continuous image.  I think I would have to agree that even in Windows it ‘looks’ like a Mac OS X app and I’d say that’s probably not a good thing for most Windows users.

 

RealStudioWindows XojoWindows

Xojo: Inspector

May 15th, 2013 13 comments

Xojo is just a few weeks away from its inaugural release.  Those of us that are in the alpha and beta programs have been treated to interesting changes in the venerable Real Studio user interface.  Some of those changes are very cool and some make little sense.  

Today, I’ll share with you a few select screenshots of what I call obvious inconsistencies.  Keep in mind that it’s quite possible that some or all of these screenshots will be obsolete in the very next beta release and you’ll never see them.  In some ways I hope this post might spur some action on this.

Boolean Switches

The Property List has been replaced by the Inspector.  Instead of using a custom listbox the new Inspector looks to be a container list of containers.  Boolean values that were simple checkboxes in the Real Studio Property List are now sometimes Sliders in Xojo.  The switches look very nice and have nice animation (if you have animation turned on) but otherwise act just like the standard checkbox.

XojoScreenSnapz001Real StudioScreenSnapz001

There is inconsistent usage of the Boolean Switch in the entire Xojo application.  If you look at the

examples, the Behavior section of the Listbox uses nothing but the boolean switch.  However, if you scroll down to the Font section the Xojo developers decided to revert to the old CheckBox.  The Preferences window also uses the standard checkbox.

Inconsistencies are bad enough but I believe using the Switches caused the entire Inspector UI to be stretched out.  If the vertical spacing was tightened up in the Inspector so that it wasn’t such a pain in the butt to deal with I believe the switches would look cramped.  Their design has no buffer space around them like the CheckBox.

I’m on a 27″ iMac.  It took me two screenshots to put together the Xojo Inspector screenshot!  I can’t imagine how awful scrolling is going to be on a 13″ laptop.  I believe that tightening up the vertical spacing is a must before release.  You only get one chance to make a good impression for some folks not already committed to Xojo.

One of the biggest deficiencies in the Inspector is that it’s not keyboard friendly.  In Real Studio you can tab to each line and set the values without your hands leaving the keyboard.  In Xojo this is impossible.  In my opinion, this one feature alone makes Xojo a major step backwards in in functionality.  but I digress…..

The Navigator

But wait, the checkbox vs slider pain doesn’t stop there.  The Build Settings dialog has been done away with in Xojo too.  In its place is a new section in the Navigator list that has what looks like checkboxes.  They are in FACT, checkboxes that control which platform to build for.  Click on the checkbox portion to set and unset the option.

XojoScreenSnapz003

This was not immediately obvious to me (and others) and it took me a while to stumble upon the fact that the checkboxes in the Build Settings were indeed live checkboxes.  Seriously, since they didn’t look like real checkboxes was misleading since I expected the new sliders.  So we have make believe checkboxes, real checkboxes, and boolean switches that aren’t native (as far as I can tell).

Native vs Drawn Controls

I find it ironic that Xojo Inc. penned a blog post titled “Why Native Controls Are Important”  and didn’t use the native checkbox throughout Xojo.  Instead we have switches, real checkboxes and faux-looking but real checkboxes.

In Mac OS X I know of one app that’s using a Boolean Switch like in Xojo and that’s in the Time Machine Preferences.  That switch is friggin’ HUGE!  I find it hard to believe that’s the standard size that Apple wants to foist on millions of users.

System PreferencesScreenSnapz001

Yes, the switch is common on iOS applications.  It’s a touch operating system from the very start.  As far as I know Xojo isn’t coming to an iPad near you anytime soon.

As others have pointed out to me, there are Linux distributions that are using the boolean slider control.  They are moving towards touch-oriented user interfaces too.  Windows 8 seems to still be using CheckBoxes though I’m sure someone, somewhere is using the slider.

In the grand scheme of things these inconsistencies are not a big deal.  But what it shows me is a lack of attention to detail.  Years worth of work to create a new UI and it’s not consistent and harder to use.  I find the boolean switches to be a distraction.  They serve no purpose other than to make checkboxes look pretty in a desktop application.

The bigger aspects of usability being worse than Real Studio is definitely troubling.  Anytime I have to scroll it’s bad.  My general rule of thumb is that methods should be short enough to never scroll.  I would expect the same thing when it comes to properties and my project list – especially on my 27″ mega monitor.

That’s my opinion.  What is yours?

[Updated]:  Added Preference window to show another place where native checkbox is used instead of switch.

XojoScreenSnapz004

Categories: Opinion, Xojo Tags: , ,

Database Primary Keys

May 11th, 2013 12 comments

The primary key that you define for your tables is critical to a well performing and well designed database.  The primary key to your table is very important so it’s worth spending some time on it BEFORE you start coding.

Let’s start out by describing what the primary key does.  The primary key is the unique identifier of a record for each table.  Regardless of how many rows the table has in it, the primary key is the pointer to a particular row.  This key will never change during the entire lifespan of the row.  There will never, ever, be two records with the same ID.

The primary key should never change.  This is why using a text field as a primary key that contains human readable/changeable data is such a bad idea.  I’ve worked on databases where they used Name as a primary key.  This is such a bad idea especially in cultures where women change their last name when getting married.  Even exempting female name changes most places in the world allow you to change your name legally.  Since it can change it’s a bad idea for use as a primary key.

Another example that we’ve dealt with in the past is using a Social Security Number (national id).  Another bad idea for a number of reasons.  One, data entry mistakes happen.  Two, government agency mistakes occasionally happen where there are two (or more) people with the same SSN.  Three, it’s not uncommon in certain parts of the country where undocumented workers use the same SSN.  Four, identity fraud is common.  Because this means it’s possible for two people or more people to have the same SSN it’s not a unique identifier.  Avoid using it.  It’s  a bad idea.

We recommend using an auto increment integer primary key.  Let the database do what it does best and let it pick it out for you.  That way there will never be any collisions or duplicates.  It’s what databases do very well all on their own.

I’ve worked on projects where there was no auto-increment primary key and was defined as an integer.  The developer devised a scheme to get the largest record ID and increment it by one when needed.  This was fine when a single user used the app but when multiple people were inserting data at the same time collisions occurred generating errors because primary keys must be unique.  It was ugly to fix and it all would have been avoided if they had used an auto increment primary key to begin with.

Someone asked me the other day if ActiveRecord could use a text primary key.  No, and it won’t ever.  It expects an integer primary key.  If you ARE using a text primary key.  Stop.  Add an auto-increment primary key and then add a Unique Index on the text field.

Real Studio/Xojo has some interesting things happen if you try to open a recordset that’s not returning the primary key in the query.  It won’t be able to update it in some cases.  You’ll get a generic message about not know which record you’re trying to access.  I’ve had some issues, in the past, using many-to-many tables that couldn’t be edited even though they had a unique index on fields.  So I recommend adding an auto-increment primary key event to many-to-many tables.  Then, if you have constraints on your index (like the index needing to be unique) you can add them there.  So far it’s worked for me.

For primary keys we use a standard naming convention:  tablename_ID.  A lot of people use a generic ID field but we’ve found that to be less than ideal when doing table joins.  If you have table A, B, and C all with an ID field joining them together means I have to put an alias in my SQL statement so I can retrieve those primary keys later.  By using the A_ID, B_ID, C_ID I never have to alias the field names in a query.  Plus, it has the added benefit of making the SQL easier to read because the name is explicit and the _ID tells me its a primary key.

Each database has its own internal record id.  SQLite uses rowid and you can actually query against it.  If you haven’t specified a primary key in your table it will use that rowid as the primary key.  When you specify a primary key, the specified primary key and rowID are the same.  However, if you do not specify the primary key the rowID is not guaranteed to stay the same.  If you were relying upon rowid to identify records in other tables you might be putting yourself in through a world of hurt if the user ever does a vacuum on the database.    The moral of the story is don’t rely upon the internal id – always specify your own primary key (that auto increments if you haven’t heard it enough now).

If you get into the habit of using an auto increment integer primary key you’ll avoid many problems later.  You don’t have to use our naming standard for primary keys but doing so will improve the readability of your SQL statements.  Primary keys are too important for anyone/thing but the database to figure them out.

Happy Coding!

Training Day Video Online

May 10th, 2013 2 comments

We held a full day of training the day before the Xojo Developer Conference (where we couldn’t use the term Xojo yet) on April 23rd.  We had over a dozen people at the training day where we discussed what we knew about databases.  We did that for most of the day and then spent the rest of the day going over 3rd party plugins, controls, libraries, and utilities to help you get your Real Studio/Xojo apps going.

We recorded all of it and have rendered it all (except a 30 minute portion where the mic wasn’t on) and made it available for our Real Studio/Xojo subscribers (as well as attendees who got a year subscription for attending).  It is now available online at http://www.bkeeney.com/RealStudioTraining/realstudiotraining.cgi

Because it’s Friday and I don’t feel like doing any real work, I decided to pull some stats about our Real Studio training app:

It was originally written in a fairly popular web CMS framework.  It was re-written using Real Studio Web Edition (because we could) and went live in late 2011.

We have 39 hours 44 minutes of Real Studio training video available.  A little over 6 hours of it is available to non-subscribers.

We have served up over 4,800 hours of streaming video since we began tracking it.

We have a little under 1000 registered users on the web app with about 100 current subscribers.

Web Edition has been interesting.  The training area has been our test bed of new for new versions of Real Studio Web Edition and now for Xojo.  It continues to grow as Web Edition gets better.

Browser stats actually surprised me a bit.  FireFox is stronger than I anticipated and Chrome is much higher than I expected.

Likewise, platform usage surprised me a bit with Windows users at 41 percent.  I know very few Windows-only Real Studio/Xojo users so perhaps this just indicates that I travel with a Mac-centric crowd or a lot of Windows users are looking at Real Studio/Xojo and need some additional help.  When I get a chance I’ll have to see if I can figure out the stats of subscribers vs. non-subscribers.

Browser Usage

 

Platform

 

Xojo 64 Bit

May 2nd, 2013 No comments

Xojo will eventually be 64 bit capable. Xojo Inc said at last weeks developer conference that the 64 bit work for Cocoa is about 70% done and for Windows and Linux apps it’s complete except for the testing (they said specifically you could compile apps but that didn’t mean they ran properly). The next real trick is to get the compiler itself working in 64 bit.

iOS is causing a delay (naturally) and this is pushing back the release of the 64 bit compiler until summer of 2014. There will be betas before then with the option to compile in 32 bit or 64 bit. Eventually the 64 bit version will become the default and then at some point in the future you could presume that the old compiler will just go away.

64 bit has been promised for a while now. At last Real World (2012) they gave us this roadmap:

64 Bit Support: Early next year (2013) Mac OS X console applications will become 64 bit capable. Then Cocoa applications. By the summer of 2013 Linux and Windows apps will get converted.
LLVM: Real Software is upgrading the backend compiler to use LLVM. During the first quarter Mac OS X 32 bit applications will start using it. By second quarter 2013 Mac OS X 64 bit apps will use LLVM. Finally, by third quarter 2013 Windows and Linux will use the new compiler.

So I guess another delay won’t mean much.  Like any good sports fan I know the saying, “There’s always next year.”

Categories: Opinion, Xojo Tags: , ,

Xojo for iOS

May 2nd, 2013 3 comments

Xojo Inc showed off the iOS version of their development tool at XDC last week.  They showed several Xojo compiled applications running in the iOS Simulator.  They noted that all of the controls they showed were native iOS controls rather than drawn.  This is important because some non-Apple iOS dev tools are not using native controls and instead draw their controls.

They showed buttons, lines, rectangles, ovals, html viewers, canvas controls, images, text area and text fields.  The text fields automatically bring up the keyboard when they have the focus.  In addition to controls that are more or less common to all platforms they iOS specific controls like bar buttons, icon buttons, views, split views, tab bars, tab buttons, and tables to name a few.

Tables look like they will be very easy to implement in iOS.  Xojo implements sections and grouping at runtime and allow buttons and all sorts of crazy things you’d expect in an iOS table.  One thing it will not do for the version 1 release is support gestures (swipe a table item to bring up a delete button for example).

The iOS version is going to use Styles for their controls.  Styles can be at the application level, view level, and even down at the control level.  This should make for some very interesting style sets.  Xojo Inc indicated that eventually this new Style set will be implemented in all UI builds starting with iOS, then for Web Edition, and then finally for Desktop builds.

Debugging occurs in conjunction with the iOS Simulator on Mac OS X.  Builds will be made with the LLVM compiler which is the same compiler that Apple uses for ARM.  LLVM is a little slower than the regular Xojo compiler so builds will take longer than debug runs.  LLVM is scheduled to be ready for iOS for the beta.

Because iOS devices change their rotation the concept of control locking is kind of outdated, or at a minimum rotation makes it much harder.  Apple recommends using Auto Layout which allows you to make the maximum use of space for your controls.  For example, localizing your apps can be difficult when it comes to sizing and laying out the controls.  Auto Layout should make this easier.  Cross-platform differences (like pushbuttons in Linux) should be easier with Auto Layout too as you can control sizes, relative sizes, fit to caption, and matching other controls.

The Xojo IDE handles much of this silently when you add controls to the layout.  The Guidelines in the view/page/window editor will show the constraints and then there are a number of properties you can use too.

The demo that Geoff demonstrated during the keynote showed a couple of interesting Auto Layout properties.  For one, he changed the localization between English and Afrikaans and captions automatically resized properly.  Auto Layout also automatically constrains window minimum widths and heights.  Frankly, it was nothing that you couldn’t do via code right now, but the demo showed what you could do without code.  Only time will tell if Auto Layout is helpful or not.  Xojo is implementing Auto Layout for iOS first, then Web and then for Desktop apps.

Building for iOS requires using the new Xojo framework.  See this post for more info on it.

Xojo for iOS Beta isn’t close yet though it is scheduled for late summer 2013.  They plan on shipping in December 2013.  It will be missing a number of things like Core Data but there should be nothing from stopping a developer from making declares into the system to use what they need at the OS level.

iOS for Xojo looks promising.  Much of the heavy lifting has already been done and now it’s just a matter of finishing it up.  Sure, not everything will be available in the first release and I expect there to be hiccups that no one thought of but it’s showing promise now in the iOS Simulator.

I am skeptical of the summer beta and December release timeframes but perhaps we can all be pleasantly surprised for once.  You can be sure that once we get closer we’ll know a whole lot more about its limitations in comparison to doing it in xCode and CocoaTouch.

Categories: iOS, Xojo Tags: ,