Monday, October 27, 2014

New WorkXpress Platform Version released: 14.10.1010

Coming soon to a WorkXpress installation near you, Platform Version 14.10.1010.  At the end of this post are the full release notes, but I wanted to take a few minutes to highlight some of the new features that I find particularly exciting.

Improved Password Strength and Security


Our Application Developers have a wide array of Field Types to choose from, and many of these field types validate the data they store.  Some store numbers, some dates, email addresses, website URLs, and the list goes on.  One thing we haven't been able to provide, before now, is a consistent set of tools for defining what must go into a *password* for it to be valid for your users.  That is, until now.

You can now setup a password field to have: 

A minimum length.
A minimum number of uppercase letters.
A minimum number of lowercase letters.
A minimum number of digits.
A minimum number of special characters.

When you do this, and the User enters an invalid value, they will get an instantaneous prompt that their password isn't strong enough and the prompt will tell them the password restrictions you have setup!  

This validation is triggered as part of a new, super fast, UI-level Validation system.  We'll be transitioning all of our built in data validations to this new system soon, and hope to allow you to write your own validations against this system in 2015.

Meanwhile, in the backend, we've always employed a one-way encryption algorithm when storing our passwords.  This methodology allowed users to set their password, and for no one.. not even me.. to find out that password.  When you set your password to "thispasswordissecure", the best I could do is read something like 32dDS3412SADFT%321 (32d...321).  Obviously, not helpful, if I want to break into your account.

This is pretty cool, and the way this works is simple.  When you're changing your password, and you enter "thispasswordissecure", we apply some encryption/hashing magic to that string, get 32d...321, and store that in the database.  Then, when you login, you type "thispasswordissecure" we apply that same magic, and get 32d...321 again!  Assuming the stored value, and this current value match.. we know that you entered the correct password.  We don't know what it is, but we know you entered it correctly.

So, that's good.. but it's not great.  For instance, if I happened to set my password to "thispasswordissecure" also, then my stored value would also be 32d...321.  When I see that your hash and my hash match.. now I know your password!!  That's bad.

To combat this, we are generating a unique key for every user that has a password, different for each user, and we're using it as part of the encryption magic.  This key is called a "Salt".  Since my salt and salt are different, the same password doesn't even look alike in the database.  Problem solved.

To take things to the next level, instead of applying only 1 round of magic, we're doing it over 30,000 times.  This not only helps with the strength of the encryption, but it also means it takes about 0.8 seconds to do the encryption.  Yes, this will mean it will take a little extra time when logging in; but it also means that a brute force attacker who is trying to break your password, has to wait 0.8 seconds to find out his latest password attempt failed.  When they are going to have to try millions of possible values to get a hit.. that translates into a lot of seconds.

Intuit and Quickbooks Integration

Quickbooks.. that pesky accounting system that just won't go away!  Now you don't have to replace it with hours of building functionality in WorkXpress; instead.. simply integrate with Quickbooks online!

We have just released a pairing of integration tools to let you do just that: the Intuit Login Field Type, and a series of ESB Profile's for Browsing, Adding, Editing and Deleting records in many of the tables in Quickbooks, right from inside WorkXpress.

Your User will need to use the Intuit Field Type to get connected to Quickbooks Online.  Here's a Wiki Page that talks all about it.

Quickbooks has a SQL-like syntax for working with it's records, so you can sort, and filter when Browsing, Editing, and Deleting.  It's pretty sweet, IMHO.  If you plan to build an application with a Quickbooks Integration, you'll want to read the documentation carefully.

Facebook changes their API, so we change our calls!

So, this one isn't so much a new feature, as it is just a shout out to the power of the WorkXpress Platform.  Facebook recently changed part of the call we need to make for logging in through Facebook, and we were able to release a new Beta Platform Version to the clients who use Facebook within minutes!

Many of our built in features could easily be added to a lot of basic web apps.  Download the Facebook oAuth Docs, implement the login capability to their standards.. and you're done right?  Well.. sometimes.. but not usually.

See, connecting to, or logging in through, any web technology can be great, it can be consistent, work all the time, and never change.  But, the reality is that these things change from time to time.  These changes are generally not made available all that easily, and when you discover that something as important as signing in to your app is suddenly broken because Facebook changed something.. you're going to be running around panicking, trying to find a fix as fast as possible.

Enter WorkXpress.  We monitor the developer feeds of over 50 services we provide integrations for, on the look out for upcoming changes in these services, and new versions.  Our staff is dedicated to keeping the downtime because of changes in these services to an absolute minimum.  That's what happened here: Facebook changed their service, we responded with a changed to the data we were passing them, and the clients using Facebook Login were able update their platform, roll out, and go back to business as usual.  Chickens, with their heads still attached, so to speak :-)

And much more...

Here are the full patch notes.  At time of posting, this release is but a few days away.


Platform Version: 14.10.1009:

Action Type - Display Field (available in Evaluated Field Triggers)
- Added a setting for which field mode the chosen field will display under (View, Edit, or both). This allows an evaluated field to show one field when viewing a field and a different field when editing the field, for instance.

Action Type - Excel Read
- Fixed an issue with adding new Actions of this type.

Action Type - Read Email
- Updated IMAP implementation so it handles MIME Encoded Subjects properly, and does some encoding checking of the body of the emails that are coming in and corrects for this automatically.

Action Type - Reload Form
- Added options to "Reload the Current Tree Row", "Reload and Expand the Current Tree Row", "Reload the Tree Row from the Opening Page", and "Reload and Expand the Tree Row from the Opening Page".

Action Type - Save Field
- Fixed an issue with setting dynamic selection fields in the interface that use records from the page below.

Action Type - Send Fax
- Updated to include an option to record the page count of the sent fax in the application.
- Updated to read multiple files and fax them all in one, combined fax.

Action Type - Set Tenant
- Fixed typos in the configuration screens.

API
- Updated WX API Key generation to utilize improved password security.

Authentication
- Facebook Login Integration
  * Updated the Log In button to request appropriate permissions for their newer oAuth API.
  * Updated the Log In button to request the permissions to post to the wall only when there are Actions that will post to the wall in the application.
  * Updated instructions for their Application approval process are on the wiki at http://wiki.workxpress.com/doku.php?id=Logging%20In.

Browser Detection
- Improved our compatible browser detection method so it will be automatically updated nightly as new browsers are released.

Enterprise Services Bus (ESB)
- Google Calendar Event ESB Profiles
- Fixed an issue when the user did not select a default calendar to post events to.
- *New* Intuit Quickbooks ESB Profiles
- Added ESB Profiles for Browsing Records from, Adding Records to, Updating Records in, and Deleting Records from Quickbooks.

Expressions and the Expression Builder
- Added RSASHA1, RSASHA1_Base64, HMACSHA1 and HMACSHA1_Bas64 to the CONVERT function.
- Fixed an issue with the CONCAT wizard interface.
- Fixed an issue with the parameters of the DISTANCE_BETWEEN function in the advanced expression builder.
- Fixed an issue with the return type for sub expressions not loading their stored value (HTML or Text).

Forms
- Added the For Each Logic Control to all Form Validation Triggers.
- Added a quick search to the Wizard Step where existing fields are selected for attachment to a Form.

Form Type - List
- Added fixed table header support to list forms with a maximum height set so that the list headers are visible when the form is scrolled.
- Added drag and drop column resizing for Testing and Production Applications. These settings are stored per User.

Form Type - Map
- Fixed an issue with some elements going behind the map controls.
- Fixed the name of a step in the configuration of these forms.

Form Type - Page
- Add and Save Behaviors
  * Added options to "Reload the Tree Row Below" and "Reload and Expand the Tree Row Below".
  * Renamed "Close" to "Close Popup".
  * Added "Close Page", which works whenever the page has been opened indirectly.
  * Updated how the 'Close' button is rendered on pages so it's compatible with quirks in IE11.

Form Type - Tabs
- Added the ability to define Ribbon style Tab Forms with options that are defined dynamically, by records in the database. The content for each Tab in this style is defined by an expression.

Form Type - Tree
- Added "Expand All" and "Collapse All" controls.

Field Type - Address
- Fixed an issue with saving the longitude or latitude parts when geocoding is enabled.

Field Type - Brain Tree Credit Card
- Updated when the non-editable flag is set to only work when the transaction amount setting is enabled.

Field Type - Counter
- Fixed an issue with Counter fields and their actions causing the counting to pause/stop.

Field Type - Google Calendar Subscription
- Updated the interface to automatically select the default calendar to the first calendar the user chooses to subscribe to.

*New* Field Type - Intuit oAuth
- This Field Type allows authenticated Users to connect to their Intuit Account. This connection generates a key that is used during the new Intuit Quickbooks Enterprise Service Bus Profiles.

Field Type - Location
- Fixed issues with saving and searching the individual longitude and latitude parts.

*New* Field Type - Password
- Fields of this type are now available for software developers to create. Note that the Password used during login is still the "Password" field on the User Record; so these values will need to be copied there for them to be read during login.
- Added settings for password validation, to enforce password strength.
- Password storage security has been revamped and improved.

Field Type - Recurrence
- Fixed an issue with filtering a Recurrence Field inside a query.

Field Type - Selection
- Updated how parent selection field data is handled by database driven selection fields to better support a multi value selection field being a parent.
- Updated context detection inside selection field config fields to include the parent picker context inside evaluated filters.
- Fixed an issue with interface actions acting on dynamic selection fields that used their parent field in their query configuration.

Internationalization - Language Import
- Fixed an issue with trying to import a file that references blocks that have been deleted.

Relational Tables
- Updated the 'Edit a Relationship Table' Wizard so it appears in the handbook, and is searchable through the help search in the bottom right.

New WorkXpress Platform Version released: 14.06.964

Today I am pleased to announce that a new version of the WorkXpress Platform has been made public, version 14.06.964.  At the end of this post are the full release notes, but I wanted to take a few minutes to highlight some of the new features that I find particularly exciting.

Multi-Language Support

This is a feature that I'm surprised we managed to hit 14 years in business without needing to add.  We've been planning for it all along, but only needed to pull the trigger recently.

In WorkXpress Multi Language support breaks down into three categories, along clear lines in our platforms architecture: 

1. User Values
2. Application Values
3. Platform Values

User values are the values that your end users enter into the system.  When someone writes into a long text field the phrase "Hello, my name is Drew." it will appear as "Hello, my name is Drew" to everyone who view's that value, regardless of their language settings.  In an application that also supports Spanish and German, for them, this should read "Hola, mi nombre es Drew-." or "Hallo, mein Name ist Drew." respectively.  Handling translations for every User value in an application would be un-managable for your translator.  You'd be sending new files to be translated hourly, or daily, and it would be quite expensive.

Because browsers have come a long way in offering automatic translations for your end users, we decided not to implement User value translations.  Read more about how Chrome handles this.

Application values are the values that you, as a Software Developer, enter into the system when you create Tables, Fields and Forms.  When you create a field to store a Contact's First Name, you've just entered 2 values that could be translated: "Contact", and "First Name".  If you were writing an application in Spanish, you might call that table Contacto, and that field might be called "Primer Nombre".

Fortunately, these values are, comparatively, fixed in quantity.  When you begin building your application you will generate a high quantity of these as you're building out your Tables, Fields and Forms, but once you roll out your application for the first time, you're typically at a point where 80% of your application is complete, and won't be changing.  At this point, if you're planning to provide multi-language support, it's time to export your language values, get them translated, and then import the translated results.

Platform values are the values that the WorkXpress Engineers create to build your tools.  Fields like "Field Label", on Field, "Form Label" on Form, "Number of Columns" on Field Grid, are examples of Platform Values.  Translating the Platform Values would provide the tools to you in different languages so that you can see them in your native tongue.

We plan to add translations of the platform tools in the future (like, late 2015 future).

Skype Integration!

The Skype Integration comes in the form of two constructs in WorkXpress: A Skype Field Type (for your users to enter their Skype name into), and an "Initiate Skype Call" ESB Profile.  This ESB Profile can be triggered anywhere Actions are triggered, of course, and allows you to specify the Skype Name Fields of all Skpe Users to be involved in the call, and what kind of call it should be.  It can be a Chat, Video Chat, or Phone Call.

You can Call up to.. I think 10 Skype users at a time over video, and unlimited otherwise.

We've built some slick interfaces where the User sees a list of all of the Users who should be attending a meeting; and clicks "Start Skype Call" and a few seconds later, they are on a Video call with their meeting attendees!


And much more...

Below is the full patch notes, there is more in this release then I can detail.  Enjoy!

Platform Version: 14.06.964:

Action Type - Set Tenant

- Fixed an issue with defining a Tenant ID to change a record to as a non-numeric, or blank value.

Action Type - Web Service

- Added HTTP Authentication Support for REST Web Services.
Read more about this on the wiki.

Actions

- Fixed an issue with interface actions not working when the page was reloaded using a Reload Form action instead of a Reload Page action.

- Fixed an issue with interface actions when a Reload Page action was used as part of a List Form's inline add actions.


Application Settings

- Enabled international support for the support and sales contact phone number. These phone numbers appear on the login page.

- Added Multi-Language Support! You can now extract the translatable bits of your application into a CSV, provide that to a Translator to get their counterparts, and upload that updated CSV to your application. Once uploaded, when a User changes to that language, many labels and other pieces of your application will change to show the translations.

Read more about this on the Wiki.

Enterprise Service Bus

- New Services for pushing and pulling Google Calendars! This Service allows information about the Google Calendars themselves to be pulled/pushed into WorkXpress, for settings like Time Zones.
Read more about this on the Wiki.

- New Service for initiating Skype communication! Create an ESB Action with this service and you can enable Mass-Action Skype interactivity to start Video Calls, Phone Calls, or Text Chats with all of the People a User checks off on a list (for instance).

Read more about this on the Wiki.

- New Service that is triggered anytime Geocoding is performed. Actions under an ESB Profile for this service have access to three variables: Free Geocodes User, Premium Geocodes Used, and Geocoding Source Message. These three values can be used to increment simple counts for tracking Geocode usage, or to make a log of when, how many, and from what source, Geocodes were used.

Read more about this on the Wiki.

- New Service for generating Fedex Shipping Labels.

Read more about this on the Wiki.

- New Service for generating UPS Shipping Labels.

Read more about this on the Wiki.

- Added filtering to the "Past Queue" tab of the ESB Profile List.


- Fixed an issue with editing existing ESB Profile's through the Actions interface.


Expression Builder

- New Function - DISTANCE_BETWEEN_DRIVING. This Function calculates the distance between two points on Earth via driving directions.
Read more about this on the Wiki.

- New Function - TIME_BETWEEN_DRIVING. This Function calculates the approximate time to drive between two points on Earth.

Read more about this on the Wiki.

Field Type - Address

- Added placehoder text for the inputs to label them more clearly

Field Type - Recurrence

- Fixed an issue with saving recurrence fields that use a date to end on.

Field Type - Selection

- Fixed an issue with selection fields that were set to ignore tenancy not ignoring tenancy when displayed in the filter interface.

Field Type - Skype (New!)

- Added a new Field Type: Skype! This Field stores Skype usernames and allows Video Calls, Phone Calls, and Chats with one or many Skype Users to be initiated by a simple click (provided you have the Skype client loaded.)
Read more about this on the Wiki.

Form Type - List

- Added Multi-Column sorting. Enable User-driven Multi Column sorting in the list definition area.
Read more about this on the Wiki.

- Minor Sorting interface change: Click a column to sort by it (ASC), click it again to sort by it the other way (DESC), and a third time to reset the sort back to the default sort for the form.


- Fixed an issue with saving filters when using the popup interface

- Fixed an issue with loading a favorite with filters on a list.

Form Type - Matrix

- Fixed an issue with context when using Item Is and Tenant Is filters as part of the body query in the Matrix configuration.

Reporting

- New Gauge Graphs are configurable when creating a Report.
Read more about this on the Wiki.

Platform

- Improved speed and stability in Internet Explorer by using non-mini-fied Javascript.
- Improved reliability when Internet Explorer aborts an AJAX call < 1ms after it begins.

Monday, January 17, 2011

Satisfaction

Recently I was forwarded an article in Event Marketer Magazine where the author reviewed 5 products that have allowed "the last of the low-tech event sectors [to plug] in."  One of the products reviewed was built on the WorkXpress Platform, and is competing with no less than 4 software solutions built to serve the industry of Event Staffing, directly.  This level of success is very exciting to me personally because it shatters the depths of removal that our engineering team is constantly buried beneath.

A screenshot of the homepage of their WorkXpress product.

Feature development at WorkXpress is very abstract. On any given day I might make a change to how values of a certain field type sort, or are searched. I might add a new type of field, defining how it looks when edited, and viewed, how it's searched, etc. I might add a new type of action, adding power to our logic engine. Often times these additions and changes are done inside a contained development space so that I know what will go in, and can tweak what will come out. Seldom do I get to see how a builder uses this new feature, and even less often do I get to see a customer using this new feature in a way that impacts them. Unfortunately, without seeing how what we do impacts feet on the ground, there is a certain satisfaction missing from our role as engineers.

Granted, we hear things like "Tom from ServoLift told me yesterday that this past year was the best year they've ever had and in large part it's thanks to their WorkXpress product" from the support team, but that pale's in comparison to actually seeing a product built on our platform adding real value to a company's employee's day to day work.  Even that pale's in comparison to the satisfaction I got when I found out that not only does a product built on WorkXpress (EPS Tracker 2.0) power EventPro Strategy's day to day business, but it does it so well it was featured in a tech magazine about that industry.

Our vision is to build a platform that is business agnostic; anyone should be able to use it to build solutions that can solve any business need regardless of size or shape.  We believe that if we do a good enough job in delivering our vision then businesses will be free of the non-customizeable, 'You will run your business this way,' industry products that are out there now.  They will be able to produce software that's custom fit to their needs so they are free to run their business as they see fit on software that works with them instead of against them. 

The satisfaction of seeing that vision deliver so well to EPS that they not only have a solution that's helped them be more successful, but that it competes with industry specific products, is immense.

Friday, October 22, 2010

Speeding up MySQL Routines with C using UDF : Part 2 -> MySQL's Example udf_example.c

<- Part 1 : Intro

The first thing I did when researching UDF's was to head over to the MySQL Documentation and read about what was ahead of me. Makes sense, right? If only it were that simple :-)

This page in the MySQL Docs tells us that there's an example udf file that comes with the source code for MySQL.  So, I hopped over to their site, downloaded the source, and found the file.  sql/udf_example.c  Now, admittedly it has been a long time since I wrote any C, or even compiled any (with the exception of ./configure, make, make install type "install from source" stuff)... so I figured their example compile line would work :

dmclain@Percona:~$ gcc -shared -o udf_example.so udf_example.c
udf_example.c:127:23: error: my_global.h: No such file or directory
udf_example.c:128:20: error: my_sys.h: No such file or directory
udf_example.c:139:19: error: mysql.h: No such file or directory
udf_example.c:142: error: syntax error before ‘LOCK_hostname’
udf_example.c:142: warning: data definition has no type or storage class

.. Not even close.  As you can see, it was missing a bunch of include files, so I ended up adding -I/path/to/mysql/includes

dmclain@Percona:~$ gcc -shared -o udf_example.so udf_example.c -I/home/dmclain/mysql_5.1/include
In file included from ./udf_example2.c:127:
./my_global.h:80:23: error: my_config.h: No such file or directory
./my_global.h:602:26: error: my_attribute.h: No such file or directory
./my_global.h:639:21: error: my_dbug.h: No such file or directory
In file included from ./udf_example2.c:127:
./my_global.h:678: error: syntax error before ‘size_socket’
./my_global.h:678: warning: data definition has no type or storage class
./my_global.h:803:2: error: #error "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS"
./my_global.h:871:1: warning: "isnan" redefined
In file included from /usr/include/math.h:28,
 ------ Snip --------

Now keep in mind, I didn't actually install mysql from the source that I downloaded, I was just trying to compile the udf_example.c to use with my existing PerconaDB or MySQL installation.  I didn't want to mess up my existing installation.

So, after a few hours of banging my head against this.. I found this cool site : http://www.mysqludf.org .  This is a group of folks who are trying to being a bit of order to a set of C functions that can be added to your MySQL installation in terms of the parameters, and naming conventions, etc.  What caught my eye mostly tho was the Skeleton package : http://www.mysqludf.org/participation/lib_mysqludf_skeleton.tar.gz

I downloaded and uncompressed this package which seems to include everything I need to compile an example C function for use in UDF in MySQL, which just returns it's own name, using commands I recognize!

dmclain@Percona:~$ autoreconf
dmclain@Percona:~$ ./configure
  -- Snip --
dmclain@Percona:~$ make
  -- Snip --
dmclain@Percona:~$ ls lib_mysqludf_skeleton/.libs
lib_mysqludf_skeleton.a  lib_mysqludf_skeleton.la  lib_mysqludf_skeleton.lai  lib_mysqludf_skeleton_la-lib_mysqludf_skeleton.o  lib_mysqludf_skeleton_la-mysqludf.o  lib_mysqludf_skeleton.so

Now you can use installdb.sql to register it.  I like to know what those kinds of scripts do tho, since I will need to replicate the registration process during the WorkXpress engine rollout that includes this work.  First it drops the function incase it already exists in your database, then then it adds your new function :

CREATE FUNCTION lib_mysqludf_skeleton_info RETURNS STRING SONAME 'lib_mysqludf_skeleton.so';

Notice there's no full path on the front of the SONAME. That's because MySQL has a directory where it puts plugins. You can ask your MySQL Server where *it* stores plugins with :

mysql> show variables like '%plugin%';
+---------------+-----------------------+
| Variable_name | Value                 |
+---------------+-----------------------+
| plugin_dir    | /usr/lib/mysql/plugin |
+---------------+-----------------------+
1 row in set (0.00 sec)

So I added a sym link from /usr/lib/mysql/plugin for my SO in my working area :

dmclain@Percona:~$ sudo ln -s /home/dmclain/lib_mysqludf_skeleton/.libs/lib_mysqludf_skeleton.so  /usr/lib/mysql/plugin/lib_mysqludf_skeleton.so

Then I restarted MySQL so it would find the new plugin; and ran the command :

mysql> select lib_mysqludf_skeleton_info();
+------------------------------+
| lib_mysqludf_skeleton_info() |
+------------------------------+
| lib_mysqludf_skeleton 0.0.1  |
+------------------------------+
1 row in set (0.00 sec)

So, this is step by step to download, compile, register and run the "Skeleton Info" function from http://www.mysqludf.org.

Now that I have a C function running in MySQL.. it's time to make one that does something I need it to do :-)

Speeding up MySQL Routines with C using UDF : Part 1

Most of you probably already know that you can write Routines in MySQL (5.1+) to allow you to encapsulate logic that you re-use into a simple to run command. An example...

In WorkXpress we store Address data in our databases as XML, since an address is just one field there's only one cell in the database to store Address 1, Address 2, City, State, Zip and Country. So, instead of creating a special kind of table to store this data, we decided to simply store it like this :

   <multi_part_field>
   <part id="street">1757 Canvasback Lane</part>
   <part id="street2"></part>
   <part id="street3"></part>
   <part id="city">Eagan</part>
   <part id="state">MN</part>
   <part id="zip_code">55122</part>
   <part id="country">United States</part>
   <part id="type">United States</part>
   </multi_part_field>

So, when we need to pull just the City out of an address because it was requested in an expression, I can use an XML XPATH function built into MySQL called extractvalue() and pull the value out and return it. The bold line is the key to this function, the rest is just structure/sanity checks :

FUNCTION `wx_Address_Us_GetCity`(input_value text) RETURNS varchar(64) CHARSET utf8 DETERMINISTIC
 BEGIN
   IF input_value IS NULL THEN
      RETURN input_value;
   ELSE
      RETURN extractvalue(input_value, '/multi_part_field/part[@id="city"]');
   END IF;
 END

With this function in place, you can run SQL like the below (assuming there is XML Address Data in your 'value' column) and it will pull out just the City :

SELECT wx_Address_Us_GetCity(value) FROM table;

This is great functionality, and it enabled us to do a lot of really cool stuff in the backend of WorkXpress with our Expression Builder.  We hit a wall, however, with the functionality of what you can do inside a MySQL FUNCTION, as declared above, and that's where UDF's come in.

The UDF features of MySQL allow you to write functions in C/C++, and hook them up into a MySQL function!  UDF Functions are not only more fully featured, but rumored to run more efficiently/quickly depending on the functionality you're looking to write into a function.

As part of our switch from MyISAM on MySQL Server 5.1 to XtraDB (a better version of InnoDB) on PerconaDB we will absolutely need to re-write 4 of the 96 functions in C, because of feature limitations to MySQL's Function language.  Because of the rumored speed improvements in using UDF C functions over MySQL's built in language, we're likely going to rewrite all 96.

I'll be sharing performance benchmarks, pitfalls and potholes I hit along the way and hopefully my success story when the functions have been converted and are ready for release into the WorkXpress PaaS Engine.

Part 2 : MySQL's Example - udf_example.c

Wednesday, October 28, 2009

WorkXpress goes in for some pastic surgery

Today the Engineering Team at WorkXpress took the bandages off of the Engine after a few rounds of plastic surgery; and it looks goood.

Below are some screen shots of before and after the changes :

Production Mode : No Tools, 'old and busted':


Production Mode : No Tools, 'new hotness':


Development Mode : With Tools, 'old and busted':

Development Mode : With Tools, 'new hotness':


Never, ever... touch.. the red button!

Monday, July 6, 2009

The Branding Spot : Week 3

The Week 3 review of how things are going with "The Branding Spot" has been posted. Please take a minute to check it out : http://tiny.cc/JTcoM

Thursday, June 25, 2009

The Scoop on PaaS

Ever wonder how a PaaS might help a mid to large sized business like the one you work for? Give this post a quick read, and if it strikes a nerve "Oh yeah.. we deal with that.. and MAN is it a drag!", get in touch with Jake, or Anna, or the Sales Team so we can have a deeper discussion about how we might help you out!

Believe it or not.. we truely want to help!

http://www.workxpress.com/blog/2009/06/5gl-paas-will-change-it-landscape

WorkXpress working with The Branding Spot

Recently Jake Burns wrote : http://www.workxpress.com/blog/2009/06/week-2-week-week-introspective-how-branding-spot-will-use-workxpress-transform-clients-

It's exciting to me, having worked on the platform since the beginning, to hear customers say things like

"As far as we know, and we’ve done the research, our company will be far ahead of the curve in ability to provide companies exactly the staffing they need to pull off successful sampling and other promotional events. "


It's just very rewarding. I get a similar thrill out of walking down the hall and seeing TexVisions Users screens with WorkXpress up on them. It's one thing to build a product, and make it the best you can, but its another to have a business owner choose it to help run their business. Despite all the customers using WorkXpress, it still excites me to see it :-)

Last, I'll just say that I really enjoy working with Noah. He's a sharp guy, communicates well with his customers, and communicates well with the Dev team on the occasion that ne needs to. For the most part, tho, he doesn't need to.. and that brings a satisfaction all it's own.

Thursday, June 18, 2009

Q2 (early Q3) 2009 Upcoming Engine Features

The WorkXpress Engine Development team's schedule is booked, and the requests keep coming. More work the better, I say :-) I have posted the items we'll be working on for the next 4-6 weeks on the WorkXpress Blog, so if you're interested check it out :

Monday, March 30, 2009

The Videos are up!

Today is a capstone day, marking the completion of a recent video production project that we embarked on.  A few weeks back we had my brother, Tim McLain, up for a 1 day "shooting spree", shooting the raw video for our training videos, introduction and our "Build an app in 10 minutes" video.

He turned them around quite fast, and after wrestling with the bandwidth costs of hosting the videos ourselves, we decided to post them on Google's Video service.  That went quite smoothly, and we got the videos posted to our live website around 1:00PM today.

My favorite video is the "Build an Application in 10 minutes" video and it's one that really captures the basics of what WorkXpress IS, and what it's used for.  I urge any of you who still don't understand "What does WorkXpress do/What is it?"  Please, enjoy this video!

Thursday, March 26, 2009

How WorkXpress cut my project timeline by 70%

Recently I wrote a Blog post for WorkXpress about how I was able to produce a fully featured Systems and Network Monitoring tool in record time, and with 100% user satisfaction.

Check it out here!

Saturday, March 7, 2009

Does a Fox go on Safari, or to the Opera?

Browsers, the bane of all web developers. Anyone who's ever tried to write their own web code (not talking about DWeaver, Blogger, Google Pages, or even AngelFire) has gotten this inevitable email.

Dear Webmaster,

I'm using Netscape 3 and your web page doesn't look right!

Sincerely,
0.5% of the Market Share

The existence of more than 1 web browser has lead to a lot of extra work for web developers all over the world. This morning my desktop looks like this :



I have just completed close to a week of cleanup of our WX2 engine fixing small problems that effect one browser or another. Mostly, IE7 is the problem as it treats the box model, float and positioning layers a bit differently than the other browsers do; and... according to a few of the leading browser market-share reporting sites, it still holds a small lead over FireFox.

I'm encouraged tho, the balance of "power" is starting to shift.

I looked at w3schools (IE6+7 43%, FF 45% in Jan), W3Counter (IE6+7 57%, FF 31%), and stats for our own site :



And it's undeniable that FireFox is on the rise.

IE8 : Good News * 2

1: Supposedly, IE8 is aimed at fixing the rampant IE standards compliance issues that have been causing web developers so much headache over the past 10 years. How good is it? Well.. the latest beta finally passes the ACID 2 test, but doesn't do too well on ACID 3 (20/100). No browser of Microsoft's has ever scored well on those tests, at least they seem to be trying.

2: According to reports by people who spend time trying this kind of stuff out you will be able to uninstall IE8! So, I'm *hoping* this means mainstream PC makers, like Dell and HP, will consider taking a few hours to implement a simple interface to let people pick which browser they would like to use when they "setup their computer" the first time it boots.

I see some argument for including IE with Windows, unlike the justice department. If there was *no* web browser, then how would people go download FireFox, Chrome, Opera or Safari? It would be like a network card that doesn't run on Windows XP native drivers (so you have to download the drivers (1.2MB) on another machine, and grab your thumb drive to get them installed.. /sigh).. but I digress.

If you gave someone like my Mom a choice of web browsers, with truthful information about each and let her pick.. would she pick IE? Probably not.

What the WorkXpress Staff really cares about most : Performance

We have spent a lot of energy on trying to make the User Experience for both builders and users of WorkXpress as pleasant as possible. This means neat things like little indicators that AJAX activity is going on inside the Actions interface, on layout load, tab content load, etc. Some of these wait times are caused by the PHP processing on our end, but a healthy % of it is waiting for your browser to process the Javascript (JS) for the page.

So, that means that if your PC is fast, and not doing a whole lot other than WorkXpress, you will have a better experience then if you're also actively running a lot of other apps. If your PC is slow, your WorkXpress experience will be slower; and there's not a lot we can do about it.

What can *you* do about it, besides upgrading your PC? Use a browser with a faster Javascript engine! An independent review of the current, and near-release browsers reveals that FireFox 3.5, Google Chrome. Safari and Opera all have JS engines that are far faster than IE's. Even IE8!

See, while Microsoft has been struggling to catch up with compliance issues (that the other browsers started off handling properly) the other browser companies have been working on making their JS engines lean and mean. We like that; fast JS means fast pages in general, and it means a faster WorkXpress experience.

Get FireFox
Get Chrome
Get Opera
Get Safari (for Windows)

Wednesday, February 11, 2009

WorkXpress 2 hits the streets!

Ladies and gentlemen, I am VERY proud to announce that WorkXpress 2's public release is officially here!

Check out http://www.workxpress.com; and click on "Sign Up" in the top right corner. This link will take you to a page that lets you get your User/Account setup and ready to roll. Then, after a short call and demo with one of our sales folks (Welcome Steve Treglia!) you'll be ready to rock and roll with WorkXpress.

Over the next few weeks Ill be documenting how to pull a pre-built Application Version off the shelf and use it in an existing, or new Project. I'll show you how to update the Add/Search areas of the header to meld your existing structure in with the newly imported structure, and Ill cover some of the most recent features added to the Engine.

I know it's been over a year since I posted here, but I've been locked in a dark room writing code :-)

Please, check it out and let me know what you think!

Wednesday, January 9, 2008

Language Translation and Currency

Our newest client continues to demand things we don't yet do with WorkXpress. This time, it's language translation and currency conversion.

They are a company that works with people in Europe and so they have a need to know how many Euro's $200 converts into at any given moment (since the exchange rate changes every second), and they need to know what those comments mean that were faxed into them from overseas.

Currency Conversion : Web Services to the rescue!

The problem with telling someone that $200 is 174.78 EUR is that this minute that is true,but th next minute it might be 173.99 EUR. So, as a programmer the challenge is figuring out how to lookup the rate, in real time.

Conversion basics :

1 USD = 0.7544 EUR (Euros) at this moment.
So, if you have USD's, then $rate = 0.7544

$new_amount = $amount * $rate;

Simple enough. Now, for my next trick : I'll find an accurate place to get the rate!

You can pay $200 a day for it : http://www.oanda.com/site/converter-intro/ccc_intro.shtml

Or, you can pay $40 a day for it : http://www.xe.com/sitemap.php

Or, you can get it for free! : http://www.webservicex.net/WS/WSDetails.aspx?WSID=10&CATID=2

All of these are SOAP Web Services, which with one SOAP call will give you the up-to-the-minute currency exchange rate. But, how good is the free one?

So, I setup 4 Tabs in Fire Fox. One that showed the rate of USD to EUR on all 3 of these web services, and the 4th was Yahoo! Currency Exchange. Then, every minute or so, for 15 minutes I hit refresh on all 4 tabs, and compared the rates. They were the same... across the board!

So, I decided to use the Free one :-)

Language Translation : There's got to be a webservice for that, right?

The short answer here is : there used to be! BabelFish used to provide their translations through web services, but apparently it caused them big load issues, with no benefit ($) to the company. So, they shut down their web service, which also shut down every other translation web service, since it seems they all actually used babel fish :-)

So, I had no luck finding an actual web service that did this. I did come across the "Unofficial Google Translate API". Which is a simple post, and screen scrape setup of Google's Beta Translation service.

So, while not a SOAP Web Service, it does provide real time translation that I was able to integrate into WorkXpress using AJAX.

Monday, December 31, 2007

Creating a Document with nice Headers and Footers when all you have to work with.. is HTML (A solution found in Word 2007)

Our newest client is pushing the limits of our reporting tools. Our customers, to this point, have been quite happy with either no header/footer (they print on letter head), or one header at the top and one at the bottom of their documents. And, in fact, all of them have either transmitted their report results via inline email (which means we can use HTML to add Header/Footer, and no one cares about "Pages"), or they have printed their documents (on letter head). So, headers and footers on each page has never been an issue... until now!

So, the problem is this : You let your customers enter as little as 1 sentence or as much as 50 pages of text into a rich text area, with formatting, tables, images, etc. Then, they want to output their fluid body of a document into a template of sorts with headers/footers and better yet, in PDF Format, for emailing to customers!

Well, HTML doesn't know anything about page breaks, and I don't know about you, but programming to the PDF standard, or even using FPDF is a nightmare I wouldn't wish on any developer, especially not if you want your users to be able to create content, that's later saved in PDF Format.

I had no luck with the HTML to PDF Converters; they lack CSS support almost completely, don't handle images particularly well, and if an integration package that's supposed to make my life easier has me pulling my hair out after 6 hours working on a simple sample that they provided, I tend to look for alternate solutions.

Enter : Microsoft Word 2007.

Tho previous "new releases" of word carried with them only a nicer logo, and 5 new features buried under 30 menus that no one needs any way, it appears that Word 2007 has introduced an actual improvement that will make my job here a lot easier : Open XML.

See, previously a Word Document was encoded in some way, so generating an actual word document was near impossible; especially for those of us who don't use Microsoft programming languages. Word did, however, do a nice job of taking my HTML Document (named with .doc on it), and converting it to look just like a Word document when opened in Word. There were some issues here tho (Save As... "Web Page" ??; and no support for Headers, Footers, Water marks, etc.) which didn't make it much more attractive as a final format. Meaning it didn't add anything I couldn't already do with just straight HTML.

Word 2007, however, has changed that landscape quite a bit. DOCX files (the new, Word 2007 document extension) is now just a .zip file! Upon unzipping one, you will find the insides quite interesting. Heavy use of XML, and document relationships which point one XML document to another in the tiered directory structure inside your Word Document. This structured format is termed OpenXML.

The prior "mystery encoding" is gone, and we are left with something that humans can understand.. for the most part :-) The document.xml file (the body of the actual document) still uses XML to describe the body of your document, which would leave me in a position much like writing to fpdf or some other non-html structure.

So, Treff and I set out trying to figure out how Microsoft could go to an open standard like this, support converting HTML to it's native format (for display inside Word) without allowing us to feed it HTML, embed the HTML inside the docx file in some way. Were they really that... unhelpful?

Turns out, the answer is no... they weren't! It's actually quite easy to take normal HTML, and merge it into a Word Document with Header, Footers and Water marks and these elements stay in tact, while the body of the document changes to what you added to the HTML. AND... once opened, Word converts this HTML to it's document.xml "Voodoo" syntax, and saves as a normal .docx document, or as a Word 2003/XP format... OR as a PDF!

It took me a while to get all the pieces to come together, but at this point the process to create a PDF with Headers, Footers and Water mark from HTML input involves :
  • Create your headers/footers/watermark in Word 2007, save as DOCX
  • Unzip the document
  • Follow this example for adding HTML to it
  • Save all files, ZIP, change name to .docx.
  • Open the document in Word
  • Save as PDF
Next step is to work out creating the Header/Footer with HTML Contents, and setting the water mark image. Then, I can create a Report Output type in WorkXpress that allows the Implementer (IM) to create a Header, a Body, a Footer, and set a Water mark image, click Next, and have a Word .docx download right to their machine!

If only PDF had an open standard like that, we could skip all the remaining silly steps.

Friday, December 28, 2007

A Quick Books integration

A few days ago I set about trying to figure out how we're going to add Quickbooks integration functionality to WorkXpress, and today I had my first bit of success.

I've found that the tricky part of developing an "Integration" is almost always figuring out what the other side has to offer. What does *their* API look like? How do I connect to their systems? What 128,000,000,000 bit keys do I need to access their systems, and where do I get them? Now that I have one.. where do I put it?!? It goes on and on.

So what's the first step? Making a Connection to the third party, in an elementary way.

The trouble with Quickbooks is that it's on it's 7th SDK revision. So, the net is covered in a sea of integration examples from all different revisions of Quickbooks connectivity; and I had trouble even figuring out which one would work with the version of quickbooks the client wants to use.

In the end, it was QuickBooks Enterprise 2007, which meant SDK 7.0. This version of QuickBooks uses the "Web Connector", or QBWC.

The Web Connectors role in allowing Quickbooks to be exposed is quite cool.

Quickbooks, as you know, is a "standalone desktop app". Which is tech speak for "a program you install, in Windows, that just works." So, how does a developer connect to this kind of application? Through the web connector!

The QBWC is another desktop app that you install on the computer with the QuickBooks company file. These three things (an install of QuickBooks, QuickBooks Web Connector, and the Company File you want to access) all live on one Windows machine, that becomes the "QuickBooks Server", or the computer with Windows that is always running that always has this quickbooks file open in QB, and the QBWC always running.

Once I got the QBWC running, it was time to tell it about my application; IE : LET ME IN! It turns out, instead of providing access to Quickbooks directly, this little gems job is to make SOAP calls out to another server, retrieve work to do, do the work with QBooks, and return the results from the requested work, via SOAP.

So you don't make "Calls" to Quickbooks really, what you do is you queue up work for Quickbooks to do the next time it connects, which QBWC controls the frequency of.

You provide QBWC with a username and password to give back to you to authenticate itself, and you have to implement authenticate for your own UName/PW. There's a series of simple calls that the QBWC makes to get its work, and report back it's progress/completion/response.

Instead of reinventing the wheel on this side, I found a PHP Framework for Quickbooks on the Intuit Developers Blog, developed by Keith Palmer. Keith went ahead and wrote a MySQL Driven, PHP supported Soap Server that handles receiving communication from QBWC, queueing up tasks to send to QBWC, and sending them when they are requested.

All you have to do is figure out how you want to store your data for the queue, and implement request and response functions which are the interface between your app (the one making the request)... and your app (the one that you need to effect when there is a response).

So, he's gone ahead and ripped out all of the tough stuff, and left us with simple implementation, based on what WE need to tell, and listen to, from Quickbooks. Thanks Keith!

So.. I modified his examples a little bit, and built myself a page, that queues up an Add Customer request, that will add me, myself and I to the QuickBooks File when the QBWC asks for work.

Now that I have the simple implementation working, it's time to move on to what the customer actually wants :-) And, all the while, trying to figure out an elegant way to allow an Implementer to simply create an action, answer some questions, and BOOM, pull data from their QuickBooks installation.

Chances are pretty good, since we're under the time (as usual) on this project, that I will just implement exactly what's needed for this customer, and worry about circling back and implementing something elegant later. Once we have one customer integrated with Quickbooks, we can setup similar integrations for any other customer.

Thursday, December 27, 2007

What is WorkXpress?

Well, you can check out the marketing version of what WorkXpress is here : http://www.workxpress.com

I can give you the short story here :

The Engine
WorkXpress is an engine for building applications that are served over the web. It is designed with a high level of usability in mind, so much so that the goal is to allow non-programmers, people who are essentially "really good with Excel", to create sophisticated, totally customized (and customizable) web based applications to run their department, their division, or ultimately their whole company.

The Technology
The technology is based in the open source world of products utilizing PHP, MySQL, Apache on Gentoo Linux based servers. We use other open source packages such as many PEAR packages and JQuery for javascript.

How it works
The website has a bit about the building blocks on it but I'd like to talk about them from a more.. traditional-programming perspective.

Items
In WorkXpress, we track things. These things can be grouped into types. In any CRM Tool people track Contacts and Companies. These things are types of items, or Item Types. Each individual Contact or Company is AN item.

You can think of Item Types like Tables in a traditional database model. When you're designing a CRM Tool, you decide you will definitely need a 'Contacts' Table, and this table will have columns like "First Name", "Last Name", "Phone Number", etc.

In WorkXpress, the Table is an Item Type, the Columns are 'Fields', and each Row in the Table, is an Item.

Item Types's go a few steps further than tables, and start to be more like OO Classes when you add Rules. If Fields are like Member Variables in your class, then Rules are like Methods. You can (through a web-based, point and click interface) build simple, or complex methods which are fired when certain events happen. For instance, there is a set of Rules that fire when an Item of that type is created (like the constructor of a class), an item of that type is recycled (destructor). The difference is that the instances of these classes are preserved, saved in the database, so they are available to other users, and they are available the next time you login, etc. Much like rows in a table.

Fields
We've already covered Fields a bit, they are simply data stored on an item. When you create a field, you setup it's parameters like a label, width, max characters, etc. These options vary greatly based on the type of field you create. Currently, WorkXpress supports over 40 Field Types, from the familiar and common Text Box, Text Area (Long Text), Check Box, and Select Box to the advanced field types like Date/Time Pickers, Rich Formatted Text (Like a forum post body, blog entry, etc. where you have formatting controls), Item Selectors, File Uploads and Buttons.

Some field types map directly to INPUT elements, and some are a collection of Javascript and INPUT elements to create a very pleasant user experience using these fields. The goal here is to make each field type as naturally easy to use, and familiar as a select box.

Layouts

Stepping out of backend world for a second, every application needs an interface. Some of the elements of the interface are provided by the fields that are created/placed on a page. The remaining interface elements are provided by a block we call Layouts.

First, each page in WorkXpress is just that.. a Page Layout. This Layout has one important job : receive the information about what item we're going to show data for, and draw it's child layouts with that information.

Inside each Page Layout is a series of other layouts, of varying types. When a new Item Type is created, an Add Page and a Home Page (or View Page) are both created, a single Field Layout is created, and placed on both the Add and Home Pages. Then, the first field is created and placed on this Field Layout, giving the implementer a very basic framework to start with.

So, one major type of Layout is a Field Layout. This layout.. shows fields and allows those fields to be edited.

Another major type of Layout is a List Layout, or Related Item List. This layout shows a list of items that are attached to the item the page is about, via relationships. The implementer sets up what columns (Fields) are shown about each related item, and the Layout allows new relationships to be added, and existing relationships to be destroyed.

Relationships
Ok, so I have Contacts (Drew, John and Sally), and I have Companies (Express Dynamics, Best Buy) and I want to somehow store the fact that Drew is an Employee of Express Dynamics and John and Sally are employees of Best Buy. How do I do that? We have created relationships to track exactly this kind of situation.

First, you create the Relationship Type. Much like an Item Type, a Relationship Type describes the kinds of relationships we're going to make. In this case, we want to Relate Contacts to Companies, and we want a related Comapny to be called an "Employer" and a related Contact to be called an "Employee". These 4 pieces of info (Item Types on both sides, names on both sides) is all it takes to setup a relationship.

Second, we create some way to create these relationships. For this we have 2 constructs.

The Item Picker
The Item Picker is a type of field, that allows either 1 or many other items to be selected on an item. So, if you wanted a field on your Contact that allows you to select this Contact's Employer from the list of all Companies, you would create an Item picker on Contact, that selects Companies. On the item picker, you can choose a relationship for it to automatically create/maintain as the fields value is changed. It's important that we create the relationship as well as set the pickers value if we want to access this contacts employer later, through Actions.

An Item Picker with a value filled in (Employer Field on a Contact) will show the selected item's Name field, with it's Icon as a link to the selected item's Homepage.

The List (or Related Item List)
As described above, the List is a Type of Layout. It can be configured to use one or many relationships to show related items, and the implementer gets to pick what columns to show about the related item. So, in a List Layout one could show not only this Contact's Employer, but also its address, office line, yearly revanue, etc. Any other fields about Company the Implementer see's fit to show.

This is highly applicable on the other side, from the Company. One could show the first and last names, Email Address, Phone Number, Birthdate, etc. of each Employee attached to the Company (which there may be several).

Actions
Actions are programmatic functionality setup to be executed at various specific times while the application is in use. Actions can be added to Fields, Relationship Types or Item Types. Fields can have actions before and after saving, and before and after clearing that field. Relationship Types can have actions before and after creating a relationship of that type, before and after recycling a relationship of that type, and before and after deleting a relationship of that type. Items has a longer list, some of the highlights include before and after adding an item, updating and item, and recycling an item. These "times" when actions are executed are called "Events".

Each action can be configured to run on one or many events. So if you have something that you want to happen when a user adds a Contact, and anytime that Contact is updated, you can write one action and put it on both events.

Each action has 3 parts : evaluation, operation on pass, operation on fail.

Evaluations occur before any action takes place, the if in an if... then... else... type format, the evaluations job is to make sure that this action should run now...

Operation on pass and fail are the same, they are just the then... and else... parts in an if... then.. else... format. There are many Operation types that do many types of different things. They all have point and click interfaces to setup.

One quick example of an action is the age old "We want to store and sort contacts in a "Last Name, First Name" format.

No problem. Add an action on after add and after update with no evaluation. Make the Pass Operation a "Build String" operation, and begin building your value. You are presented with a map of information, starting on Contact (since you're writing a Contact Action), which shows all the fields on Contact. Click Last Name, "Finish", and you've added the first piece of the string. Then add just a Comma, and lastly choose First name from the map.

Then, you select a place to store this new string, which will also show a map, starting on Contact. Select "Contact Name", which is the field responsible for showing the Contact in pickers, and at the top of the homepage, etc.

You can also use actions to grab values from items through relationships. Let's say you have an "Employer Address" field on Contact. This field is supposed to show this Contacts, Employers, Address field. No Problem! Add an action, and use the map to navigate from Contact, across to Company through Employee -> Employer, and select the Address Field. Choose the local (Contact) "Employers Address" field, and save.

More on Items, Fields, Layouts, Actions and Relationships soon! Stay tuned!