Showing posts with label Servoy. Show all posts
Showing posts with label Servoy. Show all posts

Thursday, October 13, 2011

Servoy TIP: Next Work Day Function

I needed a simple function that would return the next working day (Monday - Friday) from the date that was passed in. So here it is - it's simple, but it works:


function getNextWorkDay(myDate){

   var dow = myDate.getDay();
   var daysToAdd = 1;
   //remember JS days start at 0!
   if(dow >= 5 ) { daysToAdd = 8 - dow; }
   return new Date(myDate.getFullYear(), myDate.getMonth(), myDate.getDate() + daysToAdd);

}

Monday, September 19, 2011

Servoy TIP: Getting Current Quarter Date Range

I do a lot of applications where users want reports or lists that take a date in the current record and filter or find all the records "In This Quarter".

The calculation isn't all that difficult - but it's a cool time saver. Below, I've actually created 3 functions - so you can use the quarter start date, end date, or date range.


/**
 * Return the starting quarter date for a given date
 * 
 * @param {Date} inputDate
 * @return {Date}
 */
function getQuarterStartDate(inputDate) {
if(!inputDate) { return null; }
var inDate = new Date(inputDate);
var mo = inDate.getMonth() + 1; //remember JS months are 0-11!
var yr = inDate.getFullYear();
if(mo > 9) {
return new Date(yr, 10, 1);
} else if (mo > 6) {
return new Date(yr, 7, 1);
}  else if (mo > 3) {
return new Date(yr, 4, 1);
} else {
return new Date(yr, 1, 1);
}
}


/**
 * Return the ending quarter date for a given date
 * 
 * @param {Date} inputDate
 * @return {Date}
 */
function getQuarterEndDate(inputDate) {
if(!inputDate) { return null; }
var inDate = new Date(inputDate);
var mo = inDate.getMonth() + 1; //remember JS months are 0-11!
var yr = inDate.getFullYear();
if(mo > 9) {
return new Date(yr, 12, 31);
} else if (mo > 6) {
return new Date(yr, 9, 30);
}  else if (mo > 3) {
return new Date(yr, 6, 30);
} else {
return new Date(yr, 3, 31);
}
}

/**
 * Return a search string properly formatted for the start/end quarter dates
 * 
 * @param {Date} inputDate
 * @return {String}
 */
function getQuarterRange(inputDate) {
if(!inputDate) { return null; }
var sDate = getQuarterStartDate(inputDate);
var eDate = getQuarterEndDate(inputDate);
var theFormat = i18n.getDefaultDateFormat();
if(sDate && eDate) {
return utils.dateFormat(sDate,theFormat) +
"..." + utils.dateFormat(sDate,theFormat) + "|" + theFormat;
} else {
return null;
}
}

Monday, September 12, 2011

Servoy TIP: Changing A Form's Style - LIVE

I had a need the other day to change the style that was displaying on a form. My first thought was to just change all the object properties via scripting (a HUGE pain!). But, with the help of the SolutionModel (and controller.recreateUI() - in version 5.2+) - it was a snap.

Let's say you have two styles: "defaultStyle" and "fancyStyle" defined in your resources. If you use this code:

var myForm = solutionModel.getForm(controller.getName());
myForm.styleClass = "fancyForm";
controller.recreateUI();
Done! Be careful here - depending on how you designed your styles - things could get "wonky" (margins are the big culpret)... but man, did I mention how much I LOVE this tool?!

Friday, September 02, 2011

Servoy TIP: Number Suffix

Here's a tip for adding the number suffix - like 1st, 2nd, 3rd, 4th, etc:

/**
 * @param {Number} input - the number to get the suffix for
 * @param {Number} returnWholeString - values: 0 (or null) - just the suffix, 1 (or >0) - number and suffix
 */
function getNumberSuffix(input,returnWholeString) {
if(returnWholeString == null || returnWholeString == undefined || returnWholeString == 0) {
returnWholeString = 0;
} else {
returnWholeString = 1;
}

var output = "th"
var last = 0;

if(input%100 >= 11 && input%100 <= 13) {
output = "th"
} else {
last = Math.ceil(input%10);
if(last == 1) {
 output = "st";
} else if(last == 2) {
output = "nd";
} else if(last == 3) {
output = "rd";
}
}

if(returnWholeString) {
return input + output;
} else {
return output;
}
}

Example usage:

getNumberSuffix(21) returns "st"
getNumberSuffix(21,1) returns "21st"

getNumberSuffix(13) returns "th"
getNumberSuffix(13,1) returns "13th"


Pretty simple - but powerful!

Friday, August 26, 2011

Servoy Tip: Calculating Age

Calculating the age of something (or someone) is a task that I come across a lot. Here's a simple function that will help get you the basics:

function getAge(myDate){
  // myDate= new Date("7/12/1968")
  var now = new Date();
  var yr = now.getFullYear() - myDate.getFullYear();
  var mo = now.getMonth() - myDate.getMonth();
  if(mo < 0) {
  mo = myDate.getMonth() - now.getMonth();
  }
  var days = now.getDate() - myDate.getDate();
  if(days < 0) {
  days = myDate.getDate - now.getDate();
  }
  var agestr = yr + " years, " + mo + " months, " + days + " days";
  plugins.dialogs.showInfoDialog("Date DIff", agestr,"OK");

}
You can (should) enhance the function by checking the years, months and days for plurality and modifying the strings accordingly:

function getAge(myDate){
  // myDate= new Date("7/12/1968")
  var now = new Date();
  var yrTxt = "year";
  var moTxt = "month";
  var dayTxt = "day";

  var yr = now.getFullYear() - myDate.getFullYear();
  if(yr != 1) {
  yrTxt += "s";
  }
  var mo = now.getMonth() - myDate.getMonth();
  if(mo < 0) {
  mo = myDate.getMonth() - now.getMonth();
  }
  if(mo != 1) {
  moTxt += "s"
  }
  var days = now.getDate() - myDate.getDate();
  if(days < 0) {
  days = myDate.getDate - now.getDate();
  }
  if(days != 1) {
  dayTxt += "s";
  }
  var agestr = yr + " " + yrTxt + ", " + mo + " " + moTxt + ", " + days + " " + dayTxt;
  plugins.dialogs.showInfoDialog("Date DIFF", agestr,"OK");

}

Happy age calculating...

Friday, August 19, 2011

Servoy TIP: How To Trap For Modifier Keys

When you're developing your solution - there are times where you want to know if the user had any modifier keys pressed when they performed the action (drag and drop, right click, shift key down, etc.). Servoy returns a number for each key that is held down and, if you add up the numbers, you can tell which keys are down (much like my FileMaker Tip on the same subject)


Luckily, there's a really straightforward to accomplish this - and it's all held in the event that triggered your method.
if ((event.getModifiers() & JSEvent.MODIFIER_SHIFT) != 0) {
   application.output("shift")
} else if ((event.getModifiers() & JSEvent.MODIFIER_ALT & JSEvent.MODIFIER_CTRL) != 0 ) {
   appliction.output ("alt and ctrl");
}
The operator is a bit operator - that's why you have to use this type of syntax - but since there are event constants (under Application -> JSEvent in the Solution Explorer) - it's easy to check for whatever key combination you want!

You can also tell what type of action the user was doing (as well as any key combinations) - by using the event.getType() function. Here's an example:
if (event.getType() == JSEvent.ACTION) {
   application.output("user clicked");
} else if (event.getType() == JSEvent.RIGHTCLICK) {
   application.output("user right clicked");
} else if (event.getType() == JSEvent.DOUBLECLICK) {
   application.output("user double clicked");
}
There are other even type constants you can take advantage of including: action, datachanged, focuslost, focusgained, none (for unknown types), ondrag, ondragover, ondrop and rightclick.

Thursday, August 11, 2011

Servoy TIP: Leap Year Function

There may be times in your solution when you need to see if a certain year is a leap year. Here's the basic rules to determine if a date is a leap year or not:

A year will be a leap year if it is divisible by 4 but not by 100. If a year is divisible by 4 and by 100, it is not a leap year unless it is also divisible by 400.

So, as always is the case when you use JavaScript - there are many different ways to get this done. I've seen some very long functions that use  the "brute force" method to parse the date and check the year. Here's one example (modified for copy/paste use in Servoy 4+):
function isleap(yr)
{
 if ((parseInt(yr)%4) == 0)
 {
  if (parseInt(yr)%100 == 0)
  {
    if (parseInt(yr)%400 != 0)
    {
    application.output("Not Leap");
    return "false";
    }
    if (parseInt(yr)%400 == 0)
    {
    application.output("Leap");
    return "true";
    }
  }
  if (parseInt(yr)%100 != 0)
  {
    application.output("Leap");
    return "true";
  }
 }
 if ((parseInt(yr)%4) != 0)
 {
    application.output("Not Leap");
    return "false";
 }
}
However, there's a MUCH easier way to do the same thing:
function isLeap(yr) {
 return new Date(yr,1,29).getDate() == 29;
}
This function simply creates a new date with the year you pass in and February as the month (JavaScript months start at 0=January... yeah, I know - I HATE that as well!) and 29th as the day. JavaScript will auto-convert this to either Feb 29, yr - OR March 1, yr. So if the day that gets returned is the 29th - it's a leap year, if not, then it's not a leap year.

You can also test if your calculation is working - by looking at this list of all leap years 1800-2400.

Friday, August 05, 2011

Servoy TIP: Setting or Passing Multiple Variables At Once

Servoy methods are JavaScript (or Java) functions - and in today's tip I'm going to show you how to initialize multiple variables at once and how to use an array to send multiple values as parameters to a different method.

Let's start with the easy one first - initializing multiple variables to a single value. Now, keep in mind - there is no "right way" to do this - it's a matter of your personal preference and it also depends on how readable you want your code to be.

A best practice, and a good habit to get into, is to declare all the variables you're going to use in your method at the top of your method. This way, they're all in one place, and it's easy to assign default values. To demonstrate, here's some code:
var formName = null;
var showPreview = null;
var hasRecords = null;
var whatReport = "Customers";
var useDefaults = 1;
In JavaScript - rather than having each command on its own line, you can combine commands (that end with a semi-colon) into a single line. So we could reduce 5 lines to 1 - but it's much less readable:
var formName = null; var showPreview = null; var hasRecords = null; var whatReport = "Customers"; var useDefaults = 1;
So rather than putting all in a single line - you can reduce the top code to 3 lines - by defining all the variables with a single value into a single line:
var formName, showPreview, hasRecords = null;
var whatReport = "Customers";
var useDefaults = 1;
Now that we've set our variables - let's say we want to call another method and pass all the variables to that method. We could do it a couple of different ways - depending on how we define the incoming parameter list on our function.

For example - we have two methods - one called setVariables() and one called doAction(). The setVariables() function will just set the variables like we did above and then it will call to doAction() method:
function setVariables()  var formName, showPreview, hasRecords = null;  var whatReport = "Customers";  var useDefaults = 1;  doAction (formName, showPreview, hasRecords, whatReport, useDefaults);end function
Then when we define the doAction method - we define it like this:
function doAction( formName, showPreview, hasRecords, whatReport, useDefaults)
  //my actions here
end function
This is the best, and most readable way to accomplish passing the parameters. This will allow you to use all the variables in the doAction method just as they're specified and passed.

However, there may be times when you need to package more information into a single variable. Each variable you pass to a function does not have to be a single value - they can be any object that Servoy supports! That means you can pass arrays, record objects - even entire foundsets between methods! Here's an example:

function setVariables()
  var formName, showPreview = null;
  var hasRecords = forms.customers.foundset;
  var whatReport = "Customers";
  var useDefaults = new Array[1,'blue','green'];
  doAction (formName, showPreview, hasRecords, whatReport, useDefaults);
end function
I hope this will help you with your Servoy development efforts! What other tricks to you guys use when passing/setting parameters?

Thursday, July 28, 2011

Servoy TIP: How and Why To Implement UUIDs As Your Primary Key

When setting up your database tables (if you create them in Servoy) - you know that Servoy automatically creates an integer unique record id that you can use when you relate data to/from another table. It's called a primary key. If you're working with datasources and tables that were created elsewhere (or you have a DBA that creates them for you) - they probably have a record id column that set to auto-number (also called an identity column) that auto-increments when a new record is created.

In most cases, an auto-incrementing integer primary key will be just fine.

However, there are some circumstances where that simple system will cause you huge headaches. Here's just a couple of them (if you have others - leave a comment):
  • If you have a runtime solution that you want to synch back to a "main" system
  • If you want to use database-level replication to have multiple instances of the same data
  • If you have a SaaS solution where you have multiple customers entering data
All of these situations demand that you have something other than a simple auto-incrementing integer as your primary key. Enter the UUID. What exactly is a UUID? Here's the Wikipedia definition:
A UUID is a 16-byte (128-bit) number. The number of theoretically possible UUIDs is therefore about 3 × 1038. In its canonical form, a UUID consists of 32 hexadecimal digits, displayed in 5 groups separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters (32 digits and 4 hyphens). 
For example:
550e8400-e29b-41d4-a716-446655440000
Luckily, Servoy makes it simple to create these types of columns. It's easiest to implement UUIDs when you're first starting off your solution - but it is possible to change over an existing solution (although it can be a ton of work).


If you're starting from scratch here's how to set up your primary key as a UUID:

Create a new table - I'm using a table called "customer" as an example. You'll see that Servoy automatically creates a column called "customer_key" that is defined as an auto-increment, integer, primary key:


The first thing you want to do is to change the "Type" to TEXT and set the length to 50;
Then from the "Sequence Type" choose "uuid generator";
Finally, make sure you check the UUID checkbox in the "Flags" section (Servoy 6 does this for you automatically):


Now you can go ahead and add whatever other columns you want - and save the table. When you go to create a related table (in this case I'm creating a new table called "Invoice") - you want to create a TEXT foreign key (to relate the two together) - and you want to also make sure you set the UUID flag on that field as well:


Now you can go through and build your relationships, and everything as you normally would - easy!

Now, what if you want to convert a solution that exists - that's using the "traditional" integer keys? My suggestion: don't.

Seriously.

It's a lot of work and there will be a huge amount of testing and data stuff to do to populate all the primary keys and foreign keys; go though all the references to the ID field in all your methods, valuelists and relations; etc., etc.

However, if you must - here's a brief overview on how to do it.

  • Create a new TEXT column (length 50) in all your tables and make sure you check the UUID flag. I usually call mine something like TableName_UUID (e.g. customer_uuid, invoice_uuid, etc.);
  • For each of your related tables - create a new TEXT column for each related key and check the UUID flag. (You might need a few of these columns - for example in an invoice line item that is linked to the invoice and to the product - you'll need two columns);
  • In all your tables - populate the new UUID value. The easiest way is to use a form function like this:


function setPrimaryUUID() {
controller.loadAllRecords();
var fs = databaseManager.getFoundSetUpdater(foundset);
while (fsUpdater.next()) {
fsUpdater.setColumn('customer_uuid', application.getUUID());
}
fsUpdater.performUpdate();
}

  • Once all those UUID values are set - you need to set all the foreign keys in all your related tables. Now you could use a function like the above and substitute the getUUID() function with the related value (e.g. myRelation.customer_uuid) - or you can just use good old-fashioned SQL to do the update on the backend directly (that's what I usually do). My SQL statement would look something like this:

UPDATE invoice SET invoice.customer_uuid = customer.customer_uuid WHERE invoice.customer_id = customer.customer_id

  • Once that's all done - you want to EXPORT A COPY OF YOUR ENTIRE SOLUTION BEFORE YOU CONTINUE!
  • The easiest way to change all the other references in your solution - is to just search for all occurrences of your old, integer field - using the built-in search tool. Click the little "flashlight" icon and you'll see the search dialog:



  • After the search -you'll see all the places that reference that "customer_id" field (in this example). You can then just double-click each object in the list to make the change. You'll have to do this for every primary and foreign key field you create! (told you it was a lot of work!)
  • Once you've made all your changes, then you need to thoroughly test your solution - because chances are some stuff will break.
As I said, it's a lot easier to implement UUID primary keys when you're first building your solution (same goes with internationalization!).

Do you already use UUIDs as primary keys in your solutions - or just the integer keys? Drop a comment below to chime in!

Sunday, July 17, 2011

New Product: Documentorium Lite For FileMaker

OK, OK, I know we just brought our Documentorium for Servoy late last week... but I had a some FileMaker friends/customers ask if there was a FileMaker version available as well. It just so happens there is...

Friday, July 15, 2011

New Product: Documentorium For Servoy [UPDATED!]

I recently had a customer that required some technical documentation for a Servoy solution I built. Technical Documentation? YUK!

The more I thought about it - the more I realized that it would be handy for me to also get a "30,000 foot view" of the solution. I needed to know what objects referenced what method, where local variables were used, where global methods were used, etc - so that if I decided to re-factor the code I would know what I was in for.

Tuesday, July 12, 2011

How To Build Simple, Complex Software

Judging from the response I got from yesterday's blog posting about customer-centric design - I thought I'd do a more practical follow-up. The feedback that I got went something like this: "Yeah, well, ok - but how do we accomplish customer-centric design (in processes as well as our software)?".

Friday, June 24, 2011

New TIP Postings - Coming Next Week!

I talk to a fair number of people who either work with Servoy or FileMaker Pro (or both!). I was recently talking to a person who was evaluating Servoy and because I've worked with both tools for so long, I find myself doing things "automatically" - that are often a revelation to the less experienced.

In that vain, I'm going to be posting some Tips for both Servoy users and FileMaker users - and probably some generic Tips as well.

What kind of tips would you like to see?

Tuesday, August 31, 2010

Everything Old Is New Again

Over the last 6 months or so - I've been getting a fair number of requests to do FileMaker Pro work.

Yeah, I know! Right?

I worked on some pretty cool projects for a wide variety of customers - and found that getting back into FileMaker is like riding a bike - you just never forget.

Sure, a LOT has changed in the product over the years - and there have been many excellent improvements (can you say Script Triggers, Conditional Formatting and Functions!), and you can now specify a calculated result for just about everything in the world (yay!).

But somehow FileMaker, Inc. has managed to keep most of the "good stuff" that makes FileMaker... well, FileMaker. It's still fairly easy to use (just don't get me started on table occurrences!), the scripting engine is the same (with more and better functions available) - and the Server product is just much better than in the "old days."

After doing so many years of Servoy-only development, I must admit it was a bit of "an adjustment" getting back into developing projects in FileMaker. A lot of the keyboard shortcuts that my mind had (somehow!) managed to remember still worked. Defining fields and setting validations, global fields, auto-enter options and all the rest were just as I had remembered.

In the few times that I got stuck with a function or script (looked logical - just didn't "work") - I was able to easily find the answer in one of the many FileMaker "superstar" sites (BrianDunning.com, AngelCityData.com, FileMakerMagazine.com, FMForums.com, FMPro.org, etc, etc.).

I found that I had to get myself back in the "FileMaker mindset" when creating scripts... where there is usually only one or two routes to get from A to B - and normally only one way from A to C. I also had to remind myself that when finding data you need to actually go to a layout that's based on the table you're data is in... but once I got back into the "mindset" - everything went as smooth as silk.

Along the way I was able to re-connect with some very old and dear friends from years past - and have had the chance to chat with people that I literally haven't talked to in 5 or 6 years (sometimes longer).

Although I was unable to attend this year's FileMaker Developer Conference in San Diego - I'm looking forward to have a beer (or two) with some old friends and looking forward to learning all the new, subtle tricks from today's "young guns."

To celebrate Clickware's re-entry into the FileMaker services/consulting/training arena - I wanted to contribute SOMETHING to the FileMaker community at large. So, I've put together a new series of 4 videos aimed at helping FileMaker developers deal with end users who may be new to FileMaker, and hopefully, reduce the amount of "How do you do a find" support questions.

The videos are FREE, and I have some other ideas for a "Developer" series as well - so if you have ideas about a FileMaker-related video you would like to see - please email me and I'll see if I can get it going.

I guess the pundits are wrong - you CAN teach an old dog new tricks! Rock on, FileMaker 11!

Monday, January 26, 2009

Time For More Change...

President Obama's Inaugural speech last week focused on change - and how we as Americans need to embrace change and be ready to work hard to get there.

Well, speaking of change, I have a pretty big announcement of my own to make - this week will be my last as President of Servoy USA. Although I won't be actively running the US operations anymore - I still have Servoy blood coursing through my veins - and I remain committed to both the technology and the company.

As of February 1st, I'll be reactivating my consulting company Clickware, and will be specializing in all things Servoy including specification, consulting, development, conversions, implementations and training. I'll have a new email address as well you can reach me at bobcusick [AT] clickware.com.

"OK, so what's the story" you're probably asking yourself right now... The reason that I'm leaving my current position is because I'm ready for new challenges and I have some ideas for some new products and services (based in Servoy technology, of course) that I really want to bring to market.

The last time I re-invented myself is all the way back when Jan Aleman and I formally started a company around the incredible technology that Jan Blok and his team had created in 1998 - and completely re-wrote in 2001. We started down the Servoy road with nothing more than a terrific piece of technology and a dream, a vision and a plan.

It was a wild time back then - the bubble was bursting and money was tight. We were (and ARE) a group of people that simply refused to give up - failure was (IS!) simply not an option. In the ensuing years, we went from a scrappy little startup (an early competitor called us "5 guys in a windmill") to a multi-multi-million dollar international company with offices in 6 countries (with more on tap for 2009) and some of the greatest staff and customers anyone could ever ask for.

Change is a hard thing. There are uncertainties, uneasiness, and general internal conflict when the familiar and stable changes. In my case, there's no exception this time around. Servoy is in my DNA - it's literally a part of my very being. It's been a huge undertaking and now that the company is growing like a weed and is a thriving young adult - it simply doesn't need the constant parental care that an infant does.

So I made the decision late last month that it was time for me to start a new chapter in my life. Not a new BOOK, just a new chapter. As I said before, I remain committed to Servoy, to the technology, to the company and to its continued growth and leadership in the SaaS/PaaS marketplace. My colleague Yvo Boom (yboom [AT] servoy.com) will be taking over the day-to-day operations in my absence.

So, as I wrap up my duties at Servoy (the company) over this next week - I'm energized and excited (and, to be honest - a little anxious) as to what the future will bring. But I do know one thing - it will be AWESOME!

If you haven't been to the Clickware site in a while (or ever!) - then stop on by... and drop me a line if you want me to speak at your event, need some help with your Servoy project, or just want to say hi...

Monday, January 05, 2009

2009 Outlook: Cloud-y

Just as the world was learning about, creating a strategy for, and releasing 1,000 different tools for "Cloud Computing" in 2008 - I predict we'll see more of it in 2009.

Certainly, all the "big" players have announced their strategies - Google, Amazon, Adobe, Microsoft, Salesforce, Sun, etc. - but so far, the thing that's really lacking is some kind of cohesive standard or at least even parity with one another. The big problem is that everyone is convinced they have the "perfect" platform for cloud computing.

I'm sure in their minds they do. They've spent a lot of time and money figuring out how their offering would get some traction in the marketplace and, most importantly of all, gain developer mind share and get people who will actually use it.

They are so vastly different in the way they define things - from Google and their Gears product to Adobe and the Flex/Flash combo to Microsoft's Mesh. It's sort of all over the place.

Some take the approach that they'll just be the host (Amazon), some want to help enable online/offline browser-based apps (Google, Adobe), others think that the platform IS the platform (Microsoft, Salesforce) - and still, no one has come up with a way to actually build and deploy browser-based application in an easy, repeatable, flexible and seamless way (unless of course you count Servoy).

I think we'll see some great improvements in the tool sets and the capabilities of "cloud" vendors. It's just too much of a cluster to try to create (D)HTML and JavaScript applications that run on a server and also on your machine (not to mention all the "moving parts" required. End users want flexibility. Developers want standards-based stuff they can re-use their current skill set with. Bean counters want everything to be free or cheap.

So I think 2009 will continue to be a year of convergence, and in a down economy (at least until Q4) - the pressure of having to do more with less could either help cloud vendors or it might just backfire and cause developers to retreat into "what they know" in order to preserve their jobs.

Only time will tell.

Wednesday, December 31, 2008

Bob's 2009 Crystal Ball

Well, I guess it's time for me to dust off the old crystal ball - and (again) publicly humiliate myself by making some predictions for what will happen in the upcoming year. I've been loath to do this in past years - but as part of my new "happy place" resolution - I'm going to put myself out there and predict some winners and losers in 2009.

The Winners:

SaaS-based Solutions. We have all seen that the rise in Software as a Service (SaaS) applications are on the rise this past year. I think this trend will only continue in 2009 as companies are still in a really "unsure" position and continue to turn the lights off at an astounding rate.

I think most of the "big" cuts will wrap up in early Q1. The problem (and opportunity) is that now businesses will be left with 20% to 50% less people to do 100% of the work that needs to get done. Since the cuts have been (in most cases) all across the board - there are now even less IT folks to go around and they've got their own problems to deal with - and chances are good that your project won't be one of them.

SaaS implementation won't just be the domain of some Web 2.0 software, but I think that companies will also want to be able to offer the packages that they've traditionally bought as on-premises apps as internal SaaS applications as well. This means that ISV's and software vendors better get a solid SaaS strategy - and get it NOW. ISVs and software vendors also should take a good, long look at being in the financing business - offer customers multiple, flexible ways to pay for their software. The more flexible, the better.

Truly Agile Development. A few years ago offshoring development was all the rage, but now some of the same companies that were early adopters of offshoring are bringing their development efforts back in-house. Why? Productivity. It's sort of the same model that I've seen with folks who are trying to re-develop their aging software in .NET. They throw a bunch of money and resources at it - and because .NET is so complex and has so many moving parts - almost 100% of the time these projects miss their deadlines and budgets by a mile.

While that may be somewhat acceptable during "flush" times - that kind of nonsense will come to a grinding halt. The needs of the business don't change - and I would even argue that as competition heats up - time frames compress and business needs even grow larger. The need to preserve market position, the need to grow the customer base, the need to be ever more responsive to the needs of the marketplace, etc.

The companies that figure out how to do agile development that actually delivers value in a timely fashion will thrive. Those that don't won't.

Projects With Measurable ROI. Gone are the days of "someday" ROI. Gone are the days of "squishy" ROI. Now, as in the last downturn, companies are struggling with budgeting decisions and only those projects that can demonstrate measurable ROI will get funded. By measurable ROI I mean - "How much will that project deliver to my Q1 profitability?" or "How much in hard dollar (yen, euro, pound) savings can we count on by June?"

It's even more important to have not only measurable targets for increased productivity, decreased staffing needs or other metrics - but software vendors and consultants will have to commit to the "when" question as well. "WHEN can we see those savings?" That's going to put pressure on developers and consultants to be able to actually deliver what they say - on time and on budget.

Apple. Even though their stock is down (along with the rest of the world) - they have a history of innovation and they just have the knack of giving people devices that work they way they should. Their hardware is "pretty" and fairly reliable. Their software - although limited only to their hardware - is pretty easy to use, while at the same time build on a robust Linux core.

They no-doubt will pimp the variations of iPod Touch models (think "nano" versions), and may even hint at a new iPhone model. Plus, with Apple, there's always the possibility of "one more thing" - something that no one has even thought about yet that they've been working on in secret for years on. That's the fun (and frustrating) thing about Apple - you just never know what they'll do next. One thing's for sure - they'll

The Losers:

Traditional Client-Server Applications. I don't mean ALL client-server applications - because, let's face it, the browser is one of the worst application delivery vehicles ever invented. The browser only solves one part of the problem - the one that has plagued companies since the dawn of time: deployment. Specifically, deployment of traditional client-server applications.

You know, the ones that has a client you have to install on every single separate client computer. The ones where you have a "dumb" server and a "heavy client" that does most of the heavy lifting... those things will become deader than a doornail.

Does this mean that native client applications (ones that run outside the browser) will die completely. No way in hell. There are applications that simply demand they be native client applications (ones that talk to the serial port for scanners, bar code readers, cash drawers, or that have to access local files or other shared resources).

"Thin" will be "in". Thin, native clients that load quickly but still have native user interface elements and that don't rely on the Internet to be "up" will always have a place in business. In 2009, IT managers, software vendors and ISVs will be looking for tools like Servoy that can deliver the best of both worlds - while at the same time meets their needs for on-time, on-budget development.

.NET Deployments. I know, it's sort of an oxymoron - but .NET is seen as a more agile technology especially with companies with large scale COBOL applications or who are struggling under the weight of proprietary C++ applications that are crying out for updates.

The sheer speed of the changes in business and the ever-increasing need for ISVs and software companies to meet the needs of their stressed-out, under-funded, over-worked customers will be the determining factor in their own survival. I've never personally seen any .NET deployment that is able to be adapted quickly and efficiently to the changing needs of business (if you have - please feel free to comment!).

Offshoring. If you've made it this far in this post - you'll know the reasons why. I do have some personal experience with this - and even though workers here "charge more" than programmers and companies in "developing nations" - the results speak for themselves. I've talked to several companies who are scrapping their entire offshore operations and bringing them back in-house.

One manager I know from a major company (who asked not to be named) summed it up pretty well: "I found out that adding 65 people to our project (for the price of 9 US-based folks) - wasn't all it was cracked up to be. They would say 'yes, yes, yes' to everything but nothing would ever get done. It looks like most of the stuff they've worked on for the past 2 years will have to be re-written from scratch here." DOH!

Sun. And, last but not least, I'm afraid Sun will have to take some drastic actions in 2009 in order to continue their operations. Their $1 billion purchase of MySQL this year (as well as the tanking market for high-end servers) has seemed to take a huge toll on the company's balance sheet, forcing them to layoff 6,000 workers.

They're still struggling with finding a business model for their open source initiatives, and I'm not sure they'll find the answers they need in 2009. They've already open-sourced most of their products (Solaris, Java, MySQL, Java FX, etc) and now that they've done that they are finding it hard to put the Genie back in the bottle and make money off of their technology. Short of becoming an uber consulting and support company - I'm not convinced they will be around to see 2010.

Well, there you have it - my predictions for 2009. This time next year I'll make sure to review them and also make some other BS predictions for 2010...

Friday, December 26, 2008

Thursday, December 18, 2008

I Am Therefore I Tweet

My social media experiment these past couple of months has been... interesting to say the least. Like most social newbies who finally figure out what Twitter is - I was posting about 10 times per day. Yes, I was "that guy" - who told my 4 followers all the inane details of the boring crap I was doing everyday.

I was checking Twitter incessantly - and adding people that I was "following" like it was no tomorrow. I would hit "refresh" multiple times per day - and read all the posts from all the people I subscribed to. I would tweet from my iPhone, from my browser, from a friend's computer... I sounded like a damn Minah bird - tweet, tweet, tweet, tweet!

Then I got a life.

As I cut down on the number of times per day that I would tweet and would read the posts on Twitter, I noticed something interesting things:
  1. I actually got more work done
  2. People don't really care what I had for lunch
  3. Some people "spam" Twitter like a 5 year old with 100+ tweets per day (I've stopped "following" those people)
  4. I look forward to the tweets with funny, observant or useful information
  5. Only about 20 of the 50+ people I "follow" have anything interesting to say
These observations have lead me to be a better Twitter citizen. I now post only stuff that I think other people might be interested in, or might find useful. I've pared down my "following" list to just over 50 people that I actually want to hear from (mainly geeks).

I decided that if I wanted to indulge the "eating ham sandwich" side of me - that I should either set up a separate account for "blather" - or just do like everyone else and post that stuff on my Facebook page.

Then, just as I had completed the Twitter 12 step program, my wife suggests that we try using Yammer - a Twitter rip-off that is meant just for people inside of a specific company (people can only join yammer if they have the same email extension - e.g. @mycompany.com).

Well, Hallelujah! Within the first 24 hours most of the company was on Yammer and were... well... Yammering away. This time, though, no one put what they were eating for lunch. They said what they were working on, what projects where coming online, what interesting sales prospects were saying, comments and suggestions from customers... you know, real "work" stuff.

It's still in the experimental stage, but the results are pretty cool. We have employees in 6 timezones all over the world - and it's cool to be able to get a sense of what they're working on. I'm not sure how to explain it... but it's easier than sending an email, it's less intrusive than IM, and it's fast. The best part is - if no one want to read it (or respond to it), then it's up to them.

If you don't respond to an email or IM, then you're rude and sometimes will cause more than hurt feelings. But if you don't respond to a tweet or yamm (?) - then it's no big deal. You're broadcasting you status - hoping to be helpful, or to give people an idea of what you're working on. You can also ask for feedback, have people check out a link, spread the word about a new success story. It's like a living, Internal newsletter.

Well, with all this social media (special thanks here to Brenda Christensen for keeping the social media banner flying for Servoy!) - my wife (the "other" Brenda) came to me with another suggestion for a useful, online tool that would track what people were saying about any topic. It was basically a free service that would search some sites for any keyword you entered, and show you results on what was being blogged, twittered, etc.

Now I already have a Goggle Alert set up for some key terms - and that works great. But it's limited to what the mighty Google indexes - and not the rest of the world. The site that Brenda suggested - yacktrack - will show you the results of your keyword search across several sites (including Friendfeed, Technorati, Twitter, Google blog search, etc.). It's a pretty interesting service (free for now). The results are interesting - although if you are looking at the blog results, there's no link provided to the actual blog.

I found that the source of the search Google Blog Search - was much more efficient. But, it's nice to have a single service where you can enter a term, and get an overall feel for what the talk is on a topic, then if you're interested, you can always drill down to the actual search engines and get your "hands dirty".

Whew! Now I can finally Tweet-Facebook-LinkedIn-Plurk-Yammer about this entry!

Wednesday, December 17, 2008

Expectation = Reality

So the wife and I were watching a show that was recorded on our DVR (nothing fancy - just the default Motorola default box) - and we ran into a problem. We were about 20 minutes into a 2 hour show - trying to fast forward through the commercials - when the show just jumped to the end.

Well, since she had the remote - my deduction was simple: "You must have pressed the wrong button", was my immediate diagnosis. So, she tried again with the same result.

Now, everybody KNOWS that men are the superior species when it comes to working a remote control - so I smugly held out my hand for her to "hand it over, woman!" (silently, to myself of course). The remote to men is like having a second skin. My fingers just instinctively knew where to go - and so I restarted the show, forwarded about 20 minutes in, and then expertly hit the fast forward button... and... it did the same damn thing.

"You must have pressed the wrong button" came the smug reply. DOH! I hate when that happens.

After about 15 minutes of monkeying around and neither of us getting it to work - we were forced to, gulp!, watch the show in REAL TIME. Oh, the horror! We had to sit through all the commercials and the 2 hour show actually took 2 hours to watch.

We've only had a DVR for about 3 years or so, and my expectation is that the thing would work flawlessly every single time. Our "old" DVR (MOXI - also based on Moto hardware) had a button on the remote that would let you skip 30 seconds forward at a time - a perfect way to "zap" the commercials. It also included a very, very nice GUI that was easy, intuitive and looked nice. However, after about a year that model just "died." So I went to get a replacement at the cable company.

Our "new, upgraded" model ("Twice the capacity!" and "HD recording!") - promptly took the single-click commercial-zapper feature away and forced us to fast forward through the commercials (I guess the network advertisers were pissed at the previous functionality).

The new GUI was designed by someone who had obviously never used it to actually try to record something. It was (IS!) an absolute abomination in terms of look and feel and usability. It took us about a month to get adjusted to the new GUI and the new 15,000 button remote (again, designed by someone with absolutely ZERO clue on how people actually USE it to watch TV).

That got me thinking about how my expectations have changed about devices I use everyday - and it raises my expectation on how things "should work."

Another example is my phone. Now that I have an iPhone 3G - my expectation of what a phone "should" be able to do are forever altered. I can never go back to a non touchscreen device, nor a device that doesn't have games, music and a full Internet browser on it. I just "can't" do it.

My expectation when I first bought the phone was that I would occasionally use the browser, and probably listen to a few tunes now and then and maybe, just maybe install a few games or other "useless" applications that came along.

Wrong. I have 4 full screens of crap that I actually use all the time. Stock quotes, weather, movie times, 3 or 4 games, social media updating apps - I use all of them all the time. My expectations of what a phone "should do" are now permanently changed.

Same thing with the software I use. Before I started using Servoy - I was writing browser-based applications in ASP or JSP or ColdFusion or Lasso. That meant code. LOTS of code. Code for database connections. Code for business rules. Code for SQL. Code for parsing data that came back to the database. Code to update data. Code to delete data.

All of this was way before things like AJAX (Asynchronous JavaScript and XML) - and the Web 2.0 functionality (where the whole browser pages doesn't reload - just the parts you change or update). If I had to code that stuff now - there would still be all the other legacy stuff to code - plus a whole new layer of other stuff to code (the AJAX stuff).

With Servoy, I can simply drag fields to forms, write simple scripts (called "methods" in Servoy) to change field color, or perform a calculation or whatever, and then I can simply open a browser and all that stuff "just works" for me - exactly the way I designed it.

If there is a bug (and there will be - for 100% sure!) - rather than getting a cryptic "Error at line 33" browser message that isn't helpful at all - I can now even fully debug the browser based application - complete with breakpoints, variable watching, etc. All the stuff I would expect only when writing and debugging code for a native (non browser-based) application.

Just for grins - I downloaded a sample AJAX application from the Internet - a simple app that included basic CRUD functionality (CReate Update Delete). It had 4 HTML pages and had about 550 lines of code. I was able to re-create BETTER functionality in Servoy with 6 lines of code and ZERO HTML pages. It took me about 9 minutes to complete.

Not only will I never go back to the "old" way of creating browser-based applications - who knows where the technology will go from here. What's the next new thing? What else will poor application programmers have to learn in order to get rich, full-featured applications out the door? AND, more importantly, what will that do to all the applications they've already built the "hard" way?

*Shutter*

At least I'll never have to worry about it...
Web Analytics