Archive for the 'Development' Category

Updates to the SWX Service Explorer and SWX Data Analyzer

I took today to implement further usability enhancements to the SWX Service Explorer (formerly the PHP Service Browser) and the SWX Data Analyzer (formerly the SWX Analyzer) and to give them both a new, more streamlined and consistent look and feel.

You can see the results here:

Here are the changes I made to the SWX Service Explorer:

  • Replaced the methods data grid with a combo box (usability enhancement). It is now much faster to browse the methods in a service class/API and to go to the one you want (you can press the first letter of a method to jump to it, for example.)
  • All action buttons have been moved into control bars at the bottom of the sections that they affect (usability enhancement).
  • Defaults to the correct gateway (amf.php not gateway.php) and will work out of the box with the SWX MAMP Bundle without requiring any configuration.
  • Added labels to the buttons to make their purpose clearer.
  • Reduced size of the header and made it consistent with the one in the SWX Data Analyzer.

The only changes to the SWX Data Analyzer are aesthetic changes. Both apps now use a custom background color for the preloader too (what can I say, I'm a sucker for pretty things!)

The URL of the SWX Service Explorer on the public SWX gateway will change to http://swxformat.org/php/explorer with the release of SWX Beta 1.2 this week. The http://swxformat.org/php/browser URL will forward to the new one so old links don't break.

I will be recording new screencasts for Beta 1.2 featuring the new Analyzer and Explorer.

I hope you like the new tools and here's to Beta 1.2! :)

New service browser

I just updated the service browser on the public SWX gateway to the latest version in SVN.

There are a few minor usability improvements:

  • Changed the default gateway URL so that it points to the correct gateway (amf.php instead of gateway.php) and will work out of the box with the MAMP Bundle without requiring configuration.
  • Moved the Call button so that it is always present on the screen and doesn't scroll.
  • Added a Hide Results/Show Results toggle button to make it easier to go back and forth between viewing returned results and altering method paramaters.

This version of the service browser will be included in Beta 1.2, to be released this week.

About the gateway URL in the PHP Service Browser

Service Browser Config

One thing I forgot to mention in the SWX screencast is that you have to change the gateway URL in the PHP Service Browser from gateway.php to amf.php when you first start it. This setting is saved locally so that you only have to set it once.

Php Service Browser Config Icon

You can change the setting in subsequent uses of the PHP Service Browser by accessing the Configuration panel using the first icon at the top-left of the application.

I do apologize for the unnecessary extra step in configuring the PHP Service Browser. It should come pre-defined with the correct URL but I have not been successful in getting the source for the PHP Service Browser from Patrick Mineault (the service browser is the one that is in Amfphp). I will keep trying and hopefully, once I have the source code, I will be able to make this change.

Worst case scenario, if I can't get the source, I will have to fork the service browser using the latest publicly available source (which is not for the latest version of the service browser in Amfphp) and lose time recreating some of the great functionality in the latest version.

I'm off to send Patrick another email... :)

Heads up: Upcoming SWX Twitter API changes in Beta 1.1

SWX Beta 1.1, which will be released shortly, contains a couple of API changes for the SWX Twitter API. These changes are currently in the trunk of the SWX SVN repository.

  • friends() method now requires a password and returns all friends (even those marked as private).
  • The old friends method (that doesn't require a password) has been renamed friendsNoAuth(). This method will not return friends who only give updates to friends.
  • New method: followersWhoAreNotFriends() returns a list of your followers who you have not added as a friend. This is a utility method that uses the friends() and followers() methods.

Additionally, thanks to code contributed by Wouter, the SWX Twitter API no longer requires cURL. It will use cURL if it is available but if not, it will fall back to use a non-cURL method.

PHP 4.4.3 supported in SVN

Thanks to Larry Mahony, who reported the bug, I've now fixed SWX so that it should work correctly on PHP 4.4.3. The fix is in the trunk of the SWX SVN repository and will be incorporated into the next Beta release too.

Thanks again, Larry! :)

Heads up: Changing public SWX gateway to latest Beta 1 version

I'm updating the SWX gateway on swxformat.org to the latest Beta 1 version that I am about to release within the next hour or so. This change should not require any client-side changes in your SWX applications.

The main changes here are that your applications will not need to call System.security.allowDomain() on the loaded SWX SWF data files. Instead, if you are not using the SWX API, you will need to pass a url parameter into your data holder movie clip and set its value to _url. The SWX server, after validating that this is a valid URI, will use it in the allowDomain() statement it places in the SWX data SWF to allow your application to access its data. This is a much better way of doing things than the previous method which used (_parent._url) and meant that your application had to allow the SWX data SWF access to itself also. Although you should never place any sensitive data in a SWF, this approach makes more sense in terms of security.

If you do not set a url parameter in your data holder, SWX will function as it did before and you will need to specifically allow domain the data holder movie clip (i.e., your existing apps should continue to work regardless of whether you use the new method or the old.) The Full API in the Beta release uses the new method.

Also, there is now a cancelAllCalls() method in the Full API that you can use to cancel all outstanding SWX calls in the queue.

Cross-domain issue in SVN fixed

I deployed the Beta 1 SWX gateway to swxformat.org yesterday and my twitter badge on aralbalkan.com promptly stopped working. This was because I had mistakenly removed the System.security.allowDomain call in the main SWF. This call is currently necessary because, if allowDomain is on in the SWX server config file, the created data SWF using _parent._url in its own allowDomain call. Of course, it needs access to the parent SWF for this call to succeed so the parent SWF has to, in turn, grant it access. That's not really ideal as the data SWF doesn't otherwise need access to the parent SWF. I'm looking into a better way of doing this by actually writing out the URL of the parent SWF into the returned data SWF and want to include this in Beta 1.

In the meanwhile, though, if you have deployed examples that stopped working yesterday, please either add System.security.allowDomain(gatewayUrl); to your examples (if you didn't already have it) or update from svn and use the full API, which will do this for you automatically.

Heads up: Major API change to affect public SWX gateway shortly

In a few moments, and ahead of the Beta 1 package release, I will be deploying the Beta 1 build of the SWX server to swxformat.org in order to make sure that those sample files that use the public gateway work correctly.

There is one big API change in Beta 1 that will affect all existing SWX applications that are running off the public SWX gateway on swxformat.org (http://swxformat.org/php/swx.php).

The arguments property for your data holder movie clips is now args. This change was made for two reasons: One, arguments is a reserved word and, although it doesn't clash with the built in arguments object (for method calls), I still didn't feel right using it. The second reason is to make it consistent with the new SWX full API in Beta 1. See this post for an example of the full API (note: I just updated that post to reflect this API change so it will be slightly different to how it was yesterday).

I will amend this post with an update once this is done. Please update your applications accordingly once the public gateway is upgraded.

This change (of course) will not affect any local development versions of the SWX gateway you may have until you upgrade to SWX Beta 1.

Update: I'm still updating all the sample apps (of which there are multiple versions to demonstrate usage without the api, with the minimal api and the full api) so this, along with the beta release, is going to be delayed to tomorrow).

Update: I've updated the gateway on swxformat.org to the Beta 1 version. Please implement the API change outlined above in your applications if you are hitting the public gateway here.

SWX Analyzer fix and heads up on today’s the Beta 1 release

The SWX Analyzer was displaying a redundant root array (data). I've now fixed this in SVN and will issue an official release later on today.

At the same time as this release, I will be removing the public SWX gateway on aralbalkan.com. If you are currently using this, please switch to the official public SWX gateway on swxformat.org: http://swxformat.org/php/swx.php.

Finally, if you're using the SWX Twitter API, please note that the method signature for the getNumFriendsUpdates call has changed. The order of the parameters is now friend name first, then (optionally), the number of updates to receive (up to the default, which is 20.) This used to be the other way around but I changed it since the friend name is a required argument and must come first.

Update: Instead of the Alpha 0.3 release as planned, I will be releasing Beta 1 today (May 15th, 2007) this week. See this post for more information.

Heads up: SWX 0.2 is almost ready!

SWX 0.2 is almost out the door (I'm aiming for tomorrow) and this is going to be another huge release.

Here are the top three changes coming up in 0.2:

  • SWX now works across domains. Among other things, this means that, starting with 0.2, existing APIs can support SWX. If you want to, you can turn this behavior off using the SWX config file.
  • The SWX Analyzer works across domains too so you can easily debug remote calls as well as local ones with a single instance of the Analyzer.
  • We bid goodbye to PHON and say hello to JSON.

There are other changes too. Among other things, GET was broken since the API change from className to serviceClass and is now functional again and I've fixed a couple of bytecode-related issues.

I've updated the Twitter examples on my blog to use the new version and I aim to release 0.2 tomorrow.

The release after this one (the last one before FITC) is going to be a big one too so stay tuned! :)




Bad Behavior has blocked 2997 access attempts in the last 7 days.