Flex4FileMaker - New Open Source Adobe Flex 2 API to FileMaker

There's a new API in town... one that you probably don't know or care about, but...

Well... that's all I've got. Lets try again...

Flex4FileMaker is a new Google Code project that currently allows an Adobe Flex 2 client to access a FileMaker database via the FileMaker Web Publishing Engine. By modeling Flex4FileMaker after the FileMaker API for PHP and leveraging Adobe Flex 2, the library accomplishes it's primary goal of enabling FileMaker developers to inexpensively build new, distributed, "cutting edge" user interfaces to new and existing FileMaker databases.

Some things to consider:

  • The project is young.
  • Flex4FileMaker currently only provides "find" capabilities. (Feel free to join in and help grow this)
  • Columns/properties of resulting Record instances are accessible via "dot" notation
    • aRecord.column_name
    • aRecord.JoinedLayoutName.column_name is equivalent to JoinedLayoutName::column_name
  • Flex 2 applications using Flex4FileMaker are subject to Flash Player's Security sandbox rules
  • The XML result set parsing works, but is probably not the most efficient and should be refactored.
  • Although FileMaker.as constructor accepts a username and password, I wouldn't recommend embedding database credentials in a compiled SWF, but rather accept credentials in the application.

The compiled library can be downloaded and the source is available primarily from the Google Code SVN repository, but has also been published for viewing.

Many thanks to Abdul Qabiz for publishing his HTTPURLLoader that facilitates BASIC HTTP Authentication.

Click here to launch an example application using Flex4FileMaker. Right-click on the application to view and download the source or alternatively download the entire FlexBuilder project source here or from SVN

Enjoy!

Wanted: A strong tolerance for video games played in the middle of the day

Yahoo! Pipes is hiring. There's a link on the Pipes homepage to the list of positions available. It's pretty neat that they're advertising their positions to their own end users. I guess if you're a pipes fan, then you're at least approaching fulfillment of a couple of the job requirements. Speaking of job requirements... all of the positions listed have a common set of requirements of which one stuck out like a sore thumb:

"A strong tolerance for video games played in the middle of the day (Mario Kart, etc.)"

At first glance, I was WOW'd (I still am, but in a different way). I know that more and more software "shops" are striving to improve the work environment and that video games/consoles are a growing contribution to the cause. I read the requirement again; "A strong tolerance..." I was even more impressed. The requirement is double-edged. Had the Pipes team been purely advertising the coolness of their work environment, I would have expected something else... maybe, "A strong desire to beat your coworkers at Mario Kart" or even "Loves to play video games" (orsomethinglikethat), but they didn't. All positions require "A strong tolerance" of at-work video gaming. Corporate culture and team dynamics are key factors to the productivity and success of a project. Everyone works differently and not everyone tolerates at-work coworker video gaming the same.  Not only is the Pipes team advertising their work environment, they are working to preserve it.

Maybe I'm reading into this too much. If I am, then thanks for provoking this thought. If I'm not, then congratulations to the Pipes team for acknowledging and guarding a good thing.

To whomever reads this: Am I off my rocker? What do you think about video gaming at work? Would/does it bother you to be busy working on something while another coworker plays video games? Would you play if your employer had a gaming station setup for your team? Please comment.

Spread the word... These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Slashdot
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

Adobe Flex 2 SDK Source Available

If you've got the Flex 2 SDK, then you've got the source; at least most of it. It's nothing new, but I don't think it's well known. The source can be found at [Flex SDK Install DIR]/frameworks/source. If you've never downloaded the SDK by itself and only use FlexBuilder, then you'll find the SDK under your FlexBuilder install directory.

I point this out because I've imported the source into FlexBuilder for easy reference and code navigation. If you're curious how the Flex team does something, then now you know.

Enjoy!

Spread the word... These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Slashdot
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

The Well-Behaved ActionScript 3 Enum

ActionScript 3 doesn't have an enum language construct built in, but that doesn't mean that you can't create your own. That is an enumerated value that is an object with behavior. It's not rocket science, but I've included my attempt to mimic an earlier post, "The Well-Behaved Java 5 Enum." There are some things you should note while viewing the source:

  • There is no such thing as a "private" constructor in AS3. Several work-arounds have been introduced and discussed on other websites. This source doesn't include any of these, but also doesn't prevent someone from including it in their own.
  • Comparing the MenuItem.as to MenuItem.java (in the previously mentioned post), you'll notice that the AS3 version doesn't include the DOUBLE_CHEESE_MEAL value. The AS3 version doesn't allow "inline" overriding of definitions as does the Java enum. I would think it's possible to do in AS3 (passing a function to the constructor orsomethinglikethat), just not the same as in Java 5.
  • I've also added a public static const values:Array which is an array of the defined values - This provides similar benefits as the Java 5 Enum.values() method, but unlike Java, it requires developer maintenance.

It's far from perfect, but please feel free to correct/comment as you like.

Spread the word... These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Slashdot
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

“Mayday Mayday Call a Plumber” - Yahoo! Pipes Meets Infinity

I was pretty amazed two days ago when I was prompted to visit Yahoo! Pipes only to find my name on the main page because my first pipe, "Search Google & Yahoo Simultaneously" had been run 19,000+ times; making the top 5 most run pipes. It's really a pretty simple pipe, so it'd be foolish of me to take any credit as it should really go to Ben Hammersley for his "Google to RSS" service that the pipe employs. (Ben; if you're reading this... I'd like to apologize for the heavy use on your Google API key. I didn't notice the option to provide your own, nor did I ever expect this pipe to be used so much)

Inspired by the "success" of my front page pipe, I decided to mess around on Yahoo! Pipes a bit more to see what else I could come up with. By the end of yesterday evening, I had only the idea to implement recursion with pipes. Was it a good idea? That’s questionable. Was the implementation good? No. Actually, I didn’t get much further than an incomplete Pipe named, “Recurse.” The recursion experiment was cut short when I gave the pipe a test spin prior to adding the base case logic; thus resulting in an infinite loop. No big deal right? The pipe execution will just timeout, and I’ll continue editing the pipe. Well… the pipe did timeout in a sense. It just stopped, so I clicked on “Edit this Pipe” to continue work. This is when I realized that it wasn’t just my “Recurse” pipe that timed out, but all of Yahoo! Pipes had taken a break. This happened around 9:20PM CST, on Monday, March 7, 2007. Pipes was down for the rest of my evening. I was a little concerned that “Recurse” had been the cause.

The next day, I noticed the Yahoo! Pipes Blog had posted a couple entries about unplanned downtime and a kind reminder that Pipes is in Beta. I don’t know what I had expected, but there was nothing about the outage being caused by a user created pipe; less the user that caused it.

Last night I logged on to Pipes, created a Google Search pipe (sorry Ben, I really didn’t notice your API key option until writing this), played around with the idea of employing Google Translate to translate feeds (a bust), and then finally… had another look at “Recurse.” I ran it. It worked. Yahoo! Pipes was still up. It was obvious that “Recurse” hadn’t caused the outage the night before. If, by chance, it had – it would have been a quick fix (or so says the guy not working on the project); put an limit on the number of times a Pipe can invoke itself within the context of the original execution. The easiest way to do that (again, from the guy not working on the project) would be to catch it at the “pipe definition level.” What about catching the problem at the HTTP request level by checking the referrer? Curiosity got the best of me, and I wanted to know. “Recurse” was modified to do the same as before, but instead of invoking itself, it would invoke a new pipe, “InvokeRecurse” which took the same input as “Recurse,” but invoked “Recurse” using the Yahoo! Pipes, “Fetch” pipe that takes a URL – In this case the “Recurse” URL with its query parameter. I ran the revised pipe around 9:30PM CST on Tuesday, March 7, 2007 and the exact same thing happened. The “Recurse” pipe just timed out. I clicked edit and that timed out too. Yahoo! Pipes was down again, but only and hour or so this time. Either Pipes is experiencing problems with some 9:30PM CST scheduled program (orsomethinglikethat) or it’s not prepared to handle infinite loops. You decide.

I do want to thank the Yahoo! Pipes team for a fun and innovative product. They’ve done an excellent job and deserve much credit. I’ll try to quit breaking my toys. I’m sure the best is yet to come as it’s only in Beta.

Spread the word... These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Slashdot
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

Run JBoss as a Windows Service on BEA’s JRockit JVM using Java Service Wrapper - not JavaService

Now that's a long title, but still not long enough. It doesn't mention the "java.lang.OutOfMemoryError: PermGen space" errors that led to the use of BEA's JRockit as the JVM of choice for our application server.

After reading several resources (#1, #2, #3) we'd determined the cause of our PermGen Problems:

  • Continuous integration was causing frequent "Hot" deployment to our application server (Tomcat 5.5 then JBoss 4.0.4 - Same problem on both). We're crediting the JVM's garbage collecting for not correctly unloading the "old"/previously deployed classes, thus causing the PermGen to run out of space.
  • Using Cruise Control running on Jetty, every time the build ran, we'd get a PermGen OutOfMemoryError during JUnit test target execution. We're crediting JUnit for this problem due to the massive class creation/loading that it uses to provide it's much appreciated "clean" environment with every test.

We temporarily solved the problem by not deploying "Hot"; automatically restarting the server instead. The JUnit test problem was temporarily solved by increasing the Jetty server's max PermGen size using the -XX:MaxPermSize=128m JVM arg. Neither of these solutions are great. The most commonly suggested real solution to these problems is to switch to BEA's JRockit JVM - I guess it doesn't have a Permanent Generation memory space so it's impossible to get PermGen memory errors.

Our next step... Running JBoss on BEA's JRockit JVM as a Window's service using JavaService... This didn't work. Why? I have no idea. After a lot of searching for JavaService and JRockit recipes and only finding unanswered questions to a common problem, "...the service will install correctly, but it won't start..." (orsomethinglikethat), I gave Java Service Wrapper a try. I initially preferred JavaService for it's simplicity and small learning curve for the impatient, but Java Service Wrapper works (even with JRockit) and isn't too complicated after a little reading.

To summarize my ramblings to this point: If you're having PermGen memory problems, then BEA's JRockit JVM may be your answer - just don't try to use it in combination with JavaService. Use Java Service Wrapper instead. Here's how to configure Java Service Wrapper to run JBoss on JRockit Read more »

Spread the word... These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Slashdot
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

Goodbye Yahoo! TV - Hello TV Guide

I've been a long time user of tv.yahoo.com/grid - until recently. I don't have cable television. I don't have satellite either. I've got a big set of rabbit ears in my attic. My complaint is not the lack of channels, how well standard definition broadcasts view on my 16 year old 25" Sanyo TV, and especially not the price; Free. What the rabbit ears don't get you is a nice on screen TV schedule. I've been using http://tv.yahoo.com instead. It was simple but very functional.

Yahoo! TV got a face lift... it might even have new features, but I wouldn't know. I only used the TV schedule. I won't use it anymore though. The TV schedule was part of the botched operation. It's now potentially pretty and very "Web 2.0ish"... minus the usability improvements at the heart of #2.

My critiques complaints:

  1. Time Zone: As a software developer, I understand that localization is no fun, but if you let the end user select a locale using a zip code and then display the "region"/metropolitan area associated with that zip code (ie. Kansas City), your time-based schedule software better show the correct time for the user's selection. Kansas City time is CST not EST (I thought that was pretty obvious). FYI... "King of Queens" aired at 7:00PM CST and 7:30PM CST.
    Time Zone
  2. Select Favorites: I watch (at least have available to me via rabbit ears) channels 4, 5, 9, 19, 29, 38, 41, 50, and 62. The "old" - or should I say "stable, production" version of tv.yahoo.com/grid knew about all of those channels - even how to order them numerically... but I'll touch on that in a bit. For some reason the new, improved tv.yahoo.com has overlooked channel 9 and replaced it with channel 7 (the digital/HD version orsomethinglikethat). It may sound like a petty complaint, but hey... "what happened to channel 9?"
  3. Display My Favorite Channels Only: This is a fantastic feature! If only it worked correctly... When I opt to use this feature, channel 7 (MIA channel 9's replacement) is missing from the list. This feature is now useless as ABC is one of my household's favorite channels.
  4. Overall Display: This is a "two-fer" complaint. If I can't use the Display My Favorite Channels Only feature to filter unwanted channels, then at least display all the channels neatly. Get rid of the huge (app. 275px) gap in the middle of the page. I'm sure there is a logical split in the channels... I'm just not smart or patient enough to figure it out. It'd also be nice if the channels were ordered numerically... I'd had expected channel 4 to be listed before channels 19, 29, and 38, but I'm no Human Factors Expert.

No single complaint here would have turned me away from the new site, but put it all together and it is no longer useful to me. I'm now using TvGuide.com's TV listings that doesn't fault on any of the above.  I'd love to continue to use Yahoo! TV, so please let me know if I'm using this software incorrectly.  I've encountered the same problems in both FireFox and IE.

Spread the word... These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Slashdot
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

What’s right isn’t always easy…

I'm sad to report that the subtitle for deepthoughts.orsomethinglikethat has turned out to be terribly inaccurate. "flex, ruby, and other romantic stuff" has revealed it's true self as "flex, ruby java, and other romantic stuff". It's a real shame you know... I haven't interacted with Ruby as much as I had hoped and therefore I haven't had much to say about it. The grand total of occurrences of the word "ruby" on this blog is now up to five - only one if you exclude this post.

It's only right.

Spread the word... These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Slashdot
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

flawlessly fix a flaw…

How about this... "The system should perfectly correct subjective data whenever it is identified as incorrect." In other words... not all provided data is able to be system validated for correctness, so if and when incorrect data does make it into a system process the system should be able to perfectly correct the identified problem.

What a great goal for a system in development.

Spread the word... These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Slashdot
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

The Well-Behaved Java 5 Enum

While Java 5 is no longer considered "new," I would guess that many of the features introduced with the version are still "new" or underutilized by most developers. In this entry we'll take a look at the "new" Enum. So what is so great about the new Enum? For starters, it's an object... well kinda... it's a Java object; inconsistent semi-OO quirks and all.

An Enum instance is technically an instanceof java.lang.Object, but when creating a new Enum you don't declare a new class, you use the enum keyword. I hear the (non-existent) reader asking, "that's pretty basic stuff... what's the big deal?" The big deal is that unlike traditional uses of an Enum as a grouping of constant values, the Java 5 Enum is a grouping of constant instances that have properties and behavior. Every instance is statically defined at design time, but that doesn't prevent it from providing behavior to interact with other dynamic objects at runtime.

Let's have a look at an example:

  • MenuItem.java - Our Java 5 Enum defining values; CHEESEBURGER, FRIES, DRINK, & DOUBLE_CHEESE_MEAL.
  • MenuItemTest.java - JUnit test case for our enum.

Every MenuItem instance has two properties and one behavior-defining method; private String displayName, private Double price, and public Double calculateSalePrice( Double salesTaxRate ) (respectively).

We'll focus on the DOUBLE_CHEESE_MEAL instance... you'll note that it's declaration provides it's own overridden implementation of getPrice() that doesn't just return a constant property value, but instead returns a calculated value based on the price of it's contents (a "Double McCheesy Meal Deal" - two "McCheesy" cheeseburgers, one "McFrench Frie", and one "McSoft Drink"). You'll want to note that the calculateSalePrice(...) method makes use of getPrice() so the DOUBLE_CHEESE_MEAL instance will calculate it's sale price against it's own calculated price.

To finish this longer than necessary post to explain a little with a lot, I'll add that any Java 5 Enum instance that provides it's own methods (ie DOUBLE_CHEESE_MEAL), is compiled like a standard inner class. For example, MenuItem.java compiles to MenuItem.class and MenuItem$1.class. If there were more than one declared MenuItem with it's own overrides, then MenuItem$2.class would exist after compilation.

The sample code and eclipse project can be downloaded in it's entirety here.

Spread the word... These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Slashdot
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati

« Previous PageNext Page »