WillPower iPhone skins and Dream Seeker Media…

LA: iPhone Skin

The multi-disciplinary artist/musician William Ismael gave a show in Los Angeles last year called “11/11/11”. There I was introduced to his excellent work—much of it is driven by computer programming as well as traditional visual arts. When you can’t go to his work then let his work come to you in the form of iPhone skins! My favorite is “LA: iPhone Skin.”

DreamSeeker Media

I haven’t written about filmmaker Mobolaji Olambiwonnu since 2008—so I was pleased to find his latest terrestrial project(s) at dreamseekermedia.com. “Dreamseeker Media is a fully-integrated creative consulting firm that specializes in branding and production, bringing years of award winning experience to the creative process.”

For old times’ sake, check out “Mobolaji Olambiwonnu: Candlelight Dinner (YouTube.com)” here in the kinté space.

Message Media ED Talking Points

ХудожникTroy and Bryan speak!

Here are my talking points for the upcoming talk. I do not expect to hit even 5% of what’s written here but this may serve as guide for what I should have said. As always, when I send you something I welcome feedback—I’ve never expected to grandstand and perform alone. Just like any child at play, I have the traditional expectation that, whatsoever I do, others can do just as well and often better.

General Preamble

  • The “mainstream” is a polluted river, an unsustainable environment. Speaking “outside of the mainstream” often means you are investing in the future of universe—not your next paycheck.
  • Most technical people “of color” worked in cultural isolation and risk getting too comfortable with being alone or functioning in a social scene where they are the only person “of color.” The need to be collective is not just a pretty ideal from the 1960s. It is a mental health exercise.
  • The ethnic origin of my intellect is not European—this is not an outburst of irresponsible hatred but a carefully considered revelation that has taken decades for me to see.
  • Recommended reading Black Life in Corporate America. This book takes testimony from the previous generation.

Answering Dr. Shani

  • My current title is “Silverlight Consultant”—I’m a contractor for 20th Century Fox Filmed Entertainment. I am not a permanent employee—this means that I have to pay for medical insurance with my own money. This also leads me to the topic of “at will employment”—which means that I can walk in to the office on any work day and be told that my contract is cancelled. Since the end of legal slavery in the United States, it’s an American tradition to find me early and often to tell me that my contract is cancelled!
  • My educational journey—and my professional career—are dominated by Black women. This means that—as far as I am concerned—I have a classical African education. When I went to UCSB, I knew I was there because they had all of the material equipment—access to physical resources. All of the metaphysical came from deliberate preparation and attention from my family and the Black activist educational community of that time. When crack cocaine hit hard during my teens in the 1980s all of this went away—and the extreme isolation began which has never ended to this very day.
  • The first person to help me was my mother. All people come through women so it is natural that women should know all people—this is fundamental theme of traditional, pre-Columbian Black Africa—and this ancient ideal was glimmering faintly and brightly in my mother. My mother taught me personally how to read. As far as I am concerned, it is a sign of wealth and prestige for a child to be taught directly by his parents—this working class American tradition of parents leaving their children with strangers for hours per day for years is the greatest rip off of “modern” humanity. My father made it possible for my mother to teach me because he went to work to provide a home for my older brother, me and my mother. My father was an aircraft mechanic for Western Airlines—so as a child I could look up at the sky, see a huge airplane and know that my father worked on it to make fly. We often forget that Compton has an airport—my father was flight instructor there for years (my father’s teacher, by the way, was taught by one of the Tuskegee Airmen). My father built a train set that took up half the garage for me and my brother—so I was motivated to become technical at an early age. I used to sit out by myself there in that garage in my robe and pajamas trying to get the trains to run—this is the earliest stage in my life where having technical skills became important to me. My father is also a Bible scholar and he unintentionally introduced me to critical thinking and literary criticism by going over scripture with me. But then my mother and father divorced—my brother flipped out and became “the man of the house” which led him to gangs and then crack cocaine hit… My mother and father were both teachers. My mother got her teaching credentials and masters so she was very involved in the K-through-12 educational scene of the 1970s and 1980s. My mother became a nerd of sorts about finding often very exotic educational programs for children—she even barged her way into getting me into the Korean YMCA one summer! There were two very important institutions she got me into: The Museum of Science and Industry and the King/Drew Medical Magnet—both of these environments exposed me formally to the world of computers.
  • The traditions of the place we now call Africa are the key to my personal sanity—my personal mental health—and the deep reservoir of biofuel that powers my intellect. This power allows me view the Western world from outside of its worldview—and inside of it simultaneously. To give you an example of how far you can fly with such personal, internal freedom I remind us of the name Kwabena Boahen of Stanford University. He says plainly, “there is not enough Africa in the computer.” See his TED Talk that took place in 2007 in Arusha, Tanzania.

Art Beat featuring Dr. Shani Byard!

Dr. Shani Byard

Wednesday, February 8, 8pm PST @Blog Talk Radio Online

Hosted by Kinte K. Furgeson

Live listener call in #424-222-5228

Shani Byard, Ed.D., Founder/Executive Director

Message Media Ed—School of Black Leadership in the Digital Age
A unique learning center designed to close the digital divide
and advance leadership and innovation in the African American
community of South Los Angeles.

4923 W. Adams Blvd. Los Angeles, CA 90016 323-708-2526

http://MessageMediaEd.org

Center Hours: Tues-Fri, 3-8pm (*unless otherwise noted)

My Lack of Responsive Web Design

My Lack of Responsive Web Design by rasx
My Lack of Responsive Web Design, a photo by rasx on Flickr.

I took this last week at the Apple Store in Century City. This is my homie’s site I’m designing, megafunk.com, running on the latest Apple iPad. You can see that I’m not yet using CSS media queries and other Responsive Web Design techniques.

My Three WCF Paths to Silverlight Data Access

Flippantly, here they are:

  • One: Silverlight-enabled WCF Service (backing View Model collections with ObservableCollection<T> by default)
  • Two: WCF Data Service (OData, backing View Model collections with DataServiceCollection<T>)
  • Three: Domain Service Class (RIA Services, backing View Model collections with LoadOperation<T>)

ServiceReferences.ClientConfig Is Useless in a XAP That Is Loaded by Another XAP.

My Songhay.Silverlight.ApplicationLoader compiles into an 8KB XAP file and is designed to load a bigger XAP file—which in turn uses MEF to load even bigger XAP files. One of these MEF-composed XAP files may contain a Service Reference, which, by default, generates ServiceReferences.ClientConfig. This file is designed to be used by the initial XAP declared in the HTML markup used to call Silverlight. My initial XAP is only 8KB and has no room for one or more Service Reference entries.

My way around this issue is to replicate the ServiceReferences.ClientConfig declarations imperatively. I have written an extension method to System.Windows.Application that accomplishes this:

public static BasicHttpBinaryBinding GetServiceClientBinding(this Application app)
{
    var mode = app.Host.Source.Scheme.Equals("https",
        StringComparison.InvariantCultureIgnoreCase) ?
        BasicHttpSecurityMode.Transport : BasicHttpSecurityMode.None;
    var binding = new BasicHttpBinaryBinding(mode);
    binding.MaxReceivedMessageSize = int.MaxValue;
    binding.MaxBufferSize = int.MaxValue;
    return binding;
}

For more details, see “Silverlight ServiceReferences.ClientConfig Alternatives” by Manish Dalal. Notice the my extension method returns a binary HTTP binding—Silverlight requires this more payload-efficient binding, which is the chief characteristic of a Silverlight-enabled WCF service.

IEditableObject Moves CRUD Eventing into the View Model

Controls like the DataForm use IEditableObject by convention, defining three methods BeginEdit, CancelEdit and EndEdit. The “begin” method is an opportunity to cache the instance implementing IEditableObject such that the “cancel” method can be used to restore data from this cache. The “end” method passes the instance implementing IEditableObject to the data layer.

Based on my current level of experience with this IEditableObject pattern, I am recklessly confident that my “end” method will not need to distinguish between Insert and Update. This suggests that I am rather foolish and/or I am setting a default value for the primary key associated with my instance implementing IEditableObject—like this:

[Display(Name = "Primary Key", Order = 0)]
[Key, Editable(false)]
public int? PrimaryKey
{
    get { return this.GetPrimaryKey(ref this._key); }
    set
    {
        this._key = value;
        base.RaisePropertyChanged("PrimaryKey");
    }
}

My private method GetPrimaryKey() passes the key field by reference and should be able to derive a valid key for the real-world underlying database. In fact, it can actually perform an Insert operation and have an “empty” record persisted before the user begins an edit session. This technique strongly suggests that the “cancel” method in the IEditableObject contract needs a cleanup procedure to ensure that the underlying database is not littered with “empty” records. I may need to study how more experienced developers address these issues.

What I do notice is that there appears to be no way to use IEditableObject with Delete operations. I assume that one would have to fall back on control eventing to handle any ceremony around deletes. The DataForm, for example, has a DeletingItem event, described by Tim Heuer in “Silverlight DataForm and confirming deleting an item.” Another DataForm event to consider is the EditEnded event, covered by Dino Esposito in “The DataForm Control in Silverlight 3—Revisited.”

My Scroll-into-View Strategy for the DataGrid

As of this writing this is my scroll-into-view strategy for the DataGrid:

this.DataGridOne.SelectionChanged += (s, args) =>
{
    if(this.DataGridOne.SelectedIndex == this._previousSelectedIndex) return;
    this._previousSelectedIndex = this.DataGridOne.SelectedIndex;
    this.DataGridOne.ScrollIntoView(this.DataGridOne.SelectedItem,
        this.DataGridOne.Columns[0]);
};

This approach requires declaring an x:Name on the DataGrid.

PagedCollectionView Swallows Collections Whole!

As of this writing, I know of only ways to implement the classic Master-Detail relationship between, say, the DataGrid and DataForm: with a PagedCollectionView and with the simpler CollectionViewSource. Both of these types implement ICollectionView (for details, see the 2008 article “ICollectionView explained”).

Because the PagedCollectionView supports client-side paging (and the DataPager), I prefer the CollectionViewSource (however, when server-side paging is in effect the CollectionViewSource might be useful when a more lightweight design is required). With the PagedCollectionView, the initial problem for me was getting synchronization to work between the Master control and the Detail control—the ObservableCollection<T> was not working out of the box. However, passing an instance of ObservableCollection<T> into the constructor of PagedCollectionView did the trick!

DataServiceCollection<T> is not “Blendable”

Because DataServiceCollection<T> has a dependency on some data-service “context,” DataServiceCollection<T> is not “Blendable” because mocking up design-time data is non-trivial (it may require a live, local OData service always running). However, because DataServiceCollection<T> is a subclass of ObservableCollection<T>, the recommendation here is to use ObservableCollection<T> in View Models.