updates

February 14th, 2010

1. deepsplink 0.9.0

there are various new IRequestBuilder implementations to provide different page transition orders. Here is a quick configuration excerpt:

 
<pages request="hide-initshow-finalize">
<page id="home" clazz="Test" />
<page id="p1" clazz="Test" />
<page id="p2" clazz="Test" />
<page id="p3" clazz="Test" request="init-show-hide-finalize">
<page id="p4" clazz="Test" />
<page id="p5" clazz="Test" />
</page>
</pages>
 

All pages beneath a page whose request attribute has been set are processed by the configured request until a page has configured a different IRequestBuilder which then is used to process the pages beneath that page. This mechnism is very flexible and should enable to cover a lot of requirements. However, you can always add your own custom IRequestBuilder implementations if the default ones don't suffice.

The deepsplink configuration data classes now have a 'toXML' method which spits out the configuration xml recursively.

The boot package now provides two default bootstrappers (ExternalConfigBootstrapper, XmlConfigBootstrapper) which should cover most usecases. For special requirements it is quick and easy to write a custom bootstrapper.

 
new ExternalConfigBootstrapper("config.xml", new BootStrategy(this)).start()
 

Finally the framework and sample codebase has been updated to use the latest splinklibrary and splinkresource releases (both 1.1.0)

2. splinkresource 1.1.0

The configuration data beans now have a 'toXML' method which spits out the configuration xml recursively just like the deepsplink configuration does.
Finally the time had come to change all the explicit to implicit getters because implicit getters are more concise, hide more information from the client (is it a var or a method) and thus allow more changes without affecting client code because of public API changes ;)

3. splinklibrary 1.1.0

As deepsplink makes heavy use of splinklibrarys tree package some things needed improvement:
The TreeUtils class has been removed and it's static methods were shifted to the Tree class which seemed much more compact and suitable. While at it I also added a static convenience methods

 
visit(node : INode, fnc : Function) : void
clone(node : INode) : INode
 

Finally, to gain more flexibility for a low level component like a Node I decided to introduce the INode interface and use implicit getters.


No Comments »




deepsplink 0.8.0 released

December 14th, 2009

Over the last weeks I put some more work into my actionscript 3 deeplink framework deepsplink.

In particular I

- simplified the public API
- refactored a lot of the internals
- enhanced comments
- updated the sample application
- wrote a getting started tutorial based on the sample application

If you want to find out how easy it is to create a flash application with full deeplink support, asynchronous page transitions and a modular and loosely coupled application design, then check out the getting started tutorial


No Comments »




Deepsplink update

November 14th, 2009

deepsplink 0.7.0 released


No Comments »




Updates

October 15th, 2009

i published updates for my libraries:

deepsplink 0.6.0

- several enhancements including better page stacking, page parameters and performance

splinklibrary 1.0.2

- fixed memory leak in QTween

splinkresource 1.0.1

- fixed bug which prevented the ResourceProcessor to ever complete processing, but the bug only occurred when loading assets

- added convenience method getAssetById(id : String) : DisplayObject, which directly instantiates the requested asset instead of just returning it's class like getAssetClassById does.


No Comments »




deepsplink released

May 27th, 2009

I'm proud to anounce the release of deepsplink, an actionscript 3 deeplinking framework. deepsplink provides a clear, flexible and easy to use api to build a scalable actionscript 3 application very quickly.
The source code, the api documentation and a simple demo application which showcases the main features can be found at googlecode


2 Comments »




splinklibrary & splinkresource updates

May 26th, 2009

I just released new versions of splinklibrary and splinkresource. The version number is now 1.0.0 as both projects are pretty stable and have been used in a number of projects. The splinklibrary classes are now covered by unit tests.

I also improved the public api's of the queue (which is now even more powerful and easy to use), the tween engine (which runs a bit faster and is now much more convenient to use) and the shape package.

Because of the changes to the public api, splinklibrary is not backward compatible as previous versions were, which is the main reason for the splinkresource update (no new features there).

You can access the new versions here:

splinklibrary
splinkresource


No Comments »




splinklibrary feature demo

October 18th, 2008

here is a quick demo class showcasing a few splinklibrary features. Please note that this example focuses on showing some splinklibrary features and it is not considered to be a best practice approach for loading and tweening an image. Also note that the demo is just a teaser, splinklibrary has a lot more useful concepts to offer. I recommend you to checkout the source and see for yourself.

 
package
{
import org.splink.library.loading.QLoader;
import org.splink.library.loading.QUrlLoader;
import org.splink.library.logging.ILogger;
import org.splink.library.logging.ILoggerFactory;
import org.splink.library.logging.LogLevel;
import org.splink.library.logging.LogRange;
import org.splink.library.logging.LoggerFactory;
import org.splink.library.logging.LoggerProvider;
import org.splink.library.logging.logoutput.DefaultOutputFormatter;
import org.splink.library.logging.logoutput.FirebugOutput;
import org.splink.library.logging.logoutput.QLogOutput;
import org.splink.library.queue.Queue;
import org.splink.library.queue.QueueEvent;
import org.splink.library.queue.QueueResultProvider;
import org.splink.library.queue.ResultQueue;
import org.splink.library.tween.TweenAction;
import org.splink.library.tween.TweenPool;
import org.splink.library.tween.sprop.FilterProp;
 
import mx.effects.easing.Sine;
 
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.filters.BlurFilter;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
/**
 * This class demos the usage of some of the splinklibrary classes.
 *
 * @author Max Kugland
 */
public class Demo extends Sprite
{
private var _logger:ILogger;
 
/**
 * Configure the logger once for the project
 */
private function configureLogger():void
{
	// we need an ILoggerFactory, which will create our ILogger instances
	var factory:ILoggerFactory = new LoggerFactory();
	// set a factory id
	factory.setId("demo");
	// set the range of LogLevels which will be logged
	factory.setRange(new LogRange(LogLevel.TRACE, LogLevel.FATAL));
	// set an IOutputFormatter to format our logmessages
	factory.setOuputFormatter(new DefaultOutputFormatter("demo-app"));
	// add ILogOuputs which will send the logs to their destination,
	// in this case we let the logs appear in QLog and in Firebug
	factory.addLogOutput(new QLogOutput());
	factory.addLogOutput(new FirebugOutput());
	// add the factory to the LoggerProvider
	LoggerProvider.addLoggerFactory(factory);
 
	// get an ILogger from the LoggerProvider using the ILoggerFactory
	// with the id "demo"
	_logger = LoggerProvider.getLogger("demo", Demo);
}
 
public function Demo()
{
	configureLogger();
 
	// log a message with the LogLevel INFO, as INFO is within the
	// specified LogRange, the message will get logged
	_logger.log(LogLevel.INFO, "starting Demo");
 
	// Create a ResultQueue and register listeners for error and
	// completion events as ResultQueue is capable of distributing
	// events because it extends Distributor
	var queue:ResultQueue = new ResultQueue;
	queue.register(QueueEvent.ON_COMPLETE, onComplete);
	queue.register(QueueEvent.ON_ERROR, onError);
 
	// add a loader to the queue which loads xml and assign it an id
	//(feedResult)
	queue.add(new QUrlLoader(
	new URLRequest("http://splink.org/?feed=rss2"),
	URLLoaderDataFormat.TEXT, "feedResult"));
 
	// add a loader to the queue which loads an image and register a
	// listener for its completion event, also pass the queue instance
	// (q) to enable it's usage within the method which is called on
	// it's completion, (QLoader also extends Distributor and therefore
	// can fire events)
	queue.add(new QLoader(
	new URLRequest(
	"http://splink.org/wp-content/themes/splink/img/header.jpg"))).
	register(QueueEvent.ON_COMPLETE, onImage, queue);
 
	// start the queue
	queue.start();
}
 
/**
 * Called when the image loader completes
 *
 * @param e the event sent by the image loader
 * @param q an optional object, in this case the queue
 */
private function onImage(e:QueueEvent, q:Queue):void
{
	// unregister from the event source (the image loader)
	e.getSource().unregister(QueueEvent.ON_COMPLETE, onImage);
 
	// cast the event source (IDistributor) to QLoader
	var loader:QLoader = (e.getSource() as QLoader);
 
	// add the loaded image data to the stage, and set it's alpha
	// value to 0
	var bmp:DisplayObject = loader.getContent();
	addChild(bmp).alpha = 0;
 
	_logger.log(LogLevel.TRACE, "image present: " + bmp);
 
	// create a bitmapfilter which is used for tweening
	var fprop:ISpecialProp = new FilterProp(new BlurFilter(0, 0, 1));
 
	// create a TweenPool and add some TweenActions targeting the
	// loaded image (bmp). tween the alpha from it's current value
	// (0) to 1 and tween the blurX  and blurY properties of the image
	// from 100 to 0
	var t:TweenPool = new TweenPool;
	t.add(new TweenAction(bmp, Sine.easeOut, 500,
	TweenAction.ALPHA, bmp.alpha, 1));
	t.add(new TweenAction(bmp, Sine.easeOut, 500,
	TweenAction.BLUR_X, 100, 0, 0, fprop));
	t.add(new TweenAction(bmp, Sine.easeOut, 500,
	TweenAction.BLUR_Y, 100, 0, 0, fprop));
	// add the TweenPool to the end of the queue
	q.add(t);
}
 
/**
 * If one of the queued operations fails, we get notified here
 */
private function onError(e:QueueEvent):void
{
	_logger.log(LogLevel.ERROR, "Demo error " + e.getErrorMessage());
}
 
/**
 * As the queue continues even if a queued operation fails onComplete
 * gets called in any case.
 */
private function onComplete(e:QueueEvent):void
{
	// as we used a ResultQueue we can retrieve a QueueResultProvider
	// which carries the results of the IResultQueueable items within
	// the ResultQueue. Note that the TweenPool is not an
	// IResultQueueable but an IQueueable, as it doesn't compute any
	// results, so the QueueResultProvider only holds the  results of
	// both loaders (the image loader and the xml loader)
	var p:QueueResultProvider =
	(e.getSource() as ResultQueue).getResultProvider();
 
	// here we retrieve the result with the id "feedResult" from the
	// QueueResultProvider and as we know its content is xml we cast
	// it to xml
	var xml:XML = XML(p.getResultById("feedResult").getResult());
 
	// we log the title of the loaded xml document which is a rss feed
	// at the TRACE LogLevel and ouput that the demo is complete at
	//INFO level
	_logger.log(LogLevel.TRACE, "xml feed title: "+xml["channel"].title);
	_logger.log(LogLevel.INFO, "Demo complete.");
 
	// Eventually we invoke finalize on the event source which results
	// in removement of all the registred listeners
	e.getSource().finalize();
}
}
}
 

1 Comment »




splinklibrary 0.2.0 and QLog 1.1 releases

September 16th, 2008

I just relased a new version of splinklibrary. There are a few bugfixes, some performance improvements and several new features:

- the logging framework is now prepared to address the new QLog features "tabbed logging" and "navigatable tree tabs"; If you use QLog you can send the current flash displaylist or the structure of any object to QLog which opens a new tab containing a navigatable tree of the displaylist or the object.

- the tween engine is now more than twice as fast, flexible and extendable
- there is a new "tree" package which makes working with tree structures quite convenient. For instance it is used internally to serialize the flash displaylist or any object into xml which can be sent via QLogOutput to QLog.

For more details see the splinklibrary svn changelog
To download the splinklibrary-0.2.0 release directly, click here or you can get it from the google code svn

QLog now supports a new kind of tab, the "tree tab" which is capable of displaying any xml structure sent by a client as a navigatable tree. Note that you need splinklibrary-0.2.0 in order to use the "tree" feature. You can grab the QLog 1.1. release here


No Comments »




QLog update

September 1st, 2008

I just added another couple of features to QLog and also made some major refactorings under the hood.
Now Qlog enables you to change the font size, it provides keyboard shortcuts for everything, there is a new useful scroll-lock toggle button which helps if you want to read the logs while new log messages arrive. QLog also exports your logfiles now as valid xhtml 1.0 strict files and saves all settings like window position, size and various other settings on exit, to spare you from the pain to adjust the settings each time you start QLog. Furthermore it enhances working with log tabs by highlighting tabs which are currently not focused but contain unread messages.

Get the latest QLog version here


No Comments »




splinkresource 0.2.0 released

August 29th, 2008

I just released a new version of the splinkresource project. It carrys only a few changes, but as I had to change the public api code is affected which relies on the 0.1.0 splinkresource api. Therefore I decided to make it a 0.2.0 release.

I you are not familiar whith the splinkresource framework yet I suggest you to read this article.

The new version now separates the code libraries declaration from the resourcebundles as code libs usally don't relate to language changes. It means that you can instruct splinkresource to load a resourcebundle for a given locale and decide whether to load your code libraries too. This is useful, because initially you probably want to load the code libraries into your application, but later when you just switch to another language you dont need to load the code libraries again.


No Comments »




Powered by WordPress