explorers' club

explorations in dev, science, sci-fi, games, and other fun stuff!

jwoLib: PaginatedItemsControlBase

6 Comments

I finally got around to using Flex Builder 3 for my personal projects since the project I am working for migrated to it awhile back. Call me a late adopter.

Generally when you think of pagination, you might think immediately about returned search results from google.  You know, the little arrows down at the bottom indicating the previous and next pages with links to the pages in between them.  Now to me, a RIA will hopefully find a better means of implementing paginated data, whether that be via internal scrollbars or collapsible/expandable* content.  But sometimes a design or use-case doesn’t allow for it.  A good implementation of this can be found on the Kuler app.

I really like their implementation but since that design and custom functionality might not fit with a future design/use-case I wanted to find a reusable solution.  So how does one go about formalizing that sort of functionality?

The first step is to disconnect the functionality from the design implementation.  An interface is a good candidate for this as it ensures that regardless of the UI, you can expect a certain feature set.  Enter IPaginatedItemsControl.   I won’t go into detail about it as you can read the docs but suffice it to say that this is the starting point for building any paginated items control.  The next step is actually building out some of the functionality and making a container to host the custom controls.  Check out PaginatedItemsControlBase.  Its basically an empty box with most of the needed functionality.  All it lacks are the controls in order to browse the paginated content.  Some might ask why I even bothered with any interface.  This was intended to allow a developer to customize the inner workings of the implementor if they found the PaginatedItemsControlBase too restrictive.

Anyway, I have a new build on the project home as well as updated documentation on all the jwoLib components.  Certainly sound off as I appreciate the feedback and criticism.

* Being somewhat of a English/grammar guy, I really don’t understand the rules for adjective modifiers.  Logic would suggest that since collapse and expand are antonyms that their adjective modifier would be the same: verb + modifier.  This is not the case though.  It seems there is no rhyme or reason to how these modifiers are selected.  Anyone?

Advertisements

6 thoughts on “jwoLib: PaginatedItemsControlBase

  1. I would imagine Kular uses some of the ideas from http://www.adobe.com/devnet/flex/samples/fig_pagedlist/
    As to rules for english grammer – they tried to tidy it up in the middle ages, except it didn’t work out too well.

  2. I’d had seen this a long time ago but found that it was rather restrictive in that you had to adhere to their framework for both the display of the data as well as the controlling of the data.

    Of course my component doesn’t incorporate the fancy animation of sliding the data set in and out of focus so that may be a reason for their setup.

    As for the English/grammar response, being a native English speaker, I find it confusing as hell to remember all the little additives to our vast library of words. Its more like a crap shoot where memorization rather than a logical rule set is the rule of thumb.

  3. Looks interesting. Do u have a sample .mxml to try out this pagination component?

  4. I am currently working on that. Once I get that posted I will update the project wiki and add a comment here. Should be tomorrow most likely.

  5. @naijer
    I got all the srcview & example apps uploaded. – http://code.google.com/p/jwopitz-lib/

  6. Once again,
    Very useful component and saved lot of my time! Thankx a ton! you rock man!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s