posted on 10 January 2011
Following the reasons for wanting to build a Facebook-integrated app, we're going to need to define the user roles and associated rules for the two different instances of the app.
This is where things start to become a bit confusing!
Types of users entering directly from the site;
- AnonymousVisitor
- AnonymousUser
- RegisteredUser
An AnonymousVisitor is a visitor that's accessed the app, but we know absolutely nothing about.
An AnonymousUser is a visitor that's chosen an available username. The username is not stored, but will remain a unique identifier for the remainder of the session, to avoid conflicts in the application.
A RegisteredUser is a user that has decided that they enjoy the network and would like to further explore the other features and services. They will have the ability to reserve a username.
Types of users entering from the Facebook application;
- FacebookAnonymousVisitor
- FacebookVisitor
- FacebookUser
- RegisteredUser_Facebook
A FacebookAnonymousVisitor visits from Faceboook for the first time and will be immediately asked for permissions from the application.
A FacebookVisitor is a visitor that has given the application permission to access their details. The details are to be stored and the username temporarily reserved.
A FacebookUser, is a visitor from facebook that has chosen a username and is now using the app.
For seamless user experience, a returning facebook user will enter the chat immediately with
their previously reserved username.
The RegisteredUser_Facebook user type is a visitor that has sucessfully signed up to the main site, but has also chosen to integrate with their Facebook account.
Pretty crazy eh? Believe me, blogging about this helps! lol
package com.chrisbward.domain {
public class UserType {
public static const ANONYMOUS_VISITOR:String ="anonymous_visitor";
public static const ANONYMOUS_USER:String ="anonymous_user";
public static const REGISTERED_USER:String ="registered_user";
public static const FACEBOOK_ANONYMOUS_VISITOR:String ="facebook_anonymous_visitor";
public static const FACEBOOK_VISITOR:String ="facebook_visitor";
public static const FACEBOOK_USER:String ="facebook_user";
public static const FACEBOOK_REGISTERED_USER:String ="facebook_registered_user";
}
}
posted on 8 January 2011
For the last 3 weeks I've been tackling Flex4, trying to build a webcam chatroom to awaken one of my dormant social networks.
The idea is that the chatroom will be free to use, easy to access and should incentivise visitors to keep returning and to eventually join the network.
Free? Because you can't build a brand on the web without a following!
I came up with the idea that this application should run in a dual-instance - firstly it should be accessible from the main site by the same usual mechanism (a link), but it should also run as an application in facebook.
Why Facebook?
I'm not going to lie, I fully expect more of the chatroom users to come from facebook than from the main site, but is this such a bad thing? - after all, it provides powerful social mechanisms such as;
- awareness - automatic posting on the wall (after being given permission, of course)
- user-endorsed recommendations - the user can refer friends for extra features
- user details - it helps us lower the barrier for registration by using the user's details
Two instances of the same application, both with a registration form to the main social network, one to be enhanced by Facebook.
I'm a strong believer of requesting action from a user only up until the last possible opportunity - this way you can fully engage the visitor, total reward, with no commitment of effort on their part - so we're going to keep this concept in mind when building the application.
So there's the challenge and that's what I'll be blogging about for the next few posts.
posted on 6 January 2011
I recently noticed that there's been a bit of anger vented towards the browser vendors introducing their own proprietary style properties to support the latest CSS3 spec.
You know... say you want a CSS3 dropshadow effect and decided to go for the bleeding-edge, progressively-enhanced (no CSS3 support, no easy drop shadow - live with it!) solution;
#example1 {
-moz-box-shadow: 10px 10px 5px #888;
-webkit-box-shadow: 10px 10px 5px #888;
box-shadow: 10px 10px 5px #888;
}
And I can understand why they would prefix the properties - a CSS spec will always be open to interpretation, before becoming settled as a pseudo-industry-standard and browser vendors may have specific preferences on how to render - we all remember the box model saga, right?
... and it just got me wondering, what if there was a way to alias these property names, so instead developers could just use the actual property name likely to be supported in the future (for the browsers that eventually catch up)?
/* [ALIAS] "box-shadow" -moz-box-shadow,-webkit-box-shadow; */
#example1 {
box-shadow: 10px 10px 5px #888;
}
Or maybe just a name, unique to our own bit of the web, but at least the numerous selectors wouldn't have to be repeated nth-amount of times;
/* [ALIAS] "cwards-box-shadow" -moz-box-shadow,-webkit-box-shadow, box-shadow; */
#example1 {
cwards-box-shadow: 10px 10px 5px #888;
}
Maybe not, but you get the picture...
I can imagine for market penetration and admission to standards - supporting something like this could take a while, but if microsoft can already (and unobtrusively!) make things a little easier for us with conditional comments(!), it wouldn't take too much for any particular browser vendor to knock out a solution to make everyone's job a little easier in the meantime?
posted on 6 January 2011
Had some fun yesterday trying to force a webserver to send a PDF as a download to the browser.
After a quick search I found this excellent resource that provides the configuration syntax for firing off a download;
<FilesMatch "\.(?i:pdf)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
But i'd just like to note that there's as it uses the header directive there will be a dependency upon Apache's mod_headers.so, so you'll need to uncomment that line in your httpd.conf;
LoadModule headers_module modules/mod_headers.so
And as a preference, and probably as a usability issue, if you're going to force a download make sure that the user is aware of the deviation from the usual behaviour!
Also to note, that if you're using Google Analytics there is also documentation on how to track any download action on a page.
posted on 31 December 2010
A quick round-up of 2010;
- CW Web Trading Ltd has now been incorporated for a year.
- First time in 5 years since a snowboarding holiday...
- 8 years since a summer holiday!
- Home office set up.
- Personal website established, well received.
- Launch of GetSetUp brand.
- Initiative to launch quick-build websites for private clients.
- Learning HTML5, CSS3, ActionScript 2 & 3, Flex4, AIR.
- Several webcam applications built for want2cam.com
- Driving lessons in full-swing and motorbike lessons started.
- Two contracts landed.
2011 will be even better, as SNAPI starts to take form, want2cam.com will become the prototype social network site with traffic driven by the chatroom and roulette-style webcam applications.
I will try to launch several other social networking sites, along with a series of tutorials on this site for development of web applications as part of the blog.
I would like to cover the new material by creating a video channel on youtube, publishing screencasts of my findings.
posted on 17 January 2010
So I'm doing a little vanity search on the G-machine for my 'chrisbward' moniker and I come accross this;

It seems that google are now presenting some kind of embedded data into the SERPs!
About two summers ago I would have been in a drive to promote Microformats and/vs. the W3C's Semantic Web... and after a quick rightclick-viewsource, turns out the page in question uses hReview-aggregate model to embed semantic information based on the ratings.
It's unlikely that building stuff like this will improve your rankings in the search engines, it will certainly help the presentation of your results - and that will ultimately lead to more user confidence, click throughs and conversions, right?
I called it a long time ago, but Microformats, inherently, are not the way forward and will cause more problems than good in the future, but for the moment, as evidenced above - they work and they're pretty easy to implement.
Looking into how Google are doing this, it seems that they are indexing both Microformats and RDFa statements... with plenty of examples.
Personally, I'd recommend the RDFa flavour, and now is the time with XHTML 1.1 + RDFa (final) and HTML5 + RDFa (working draft) DTDs now out there.
posted on 13 January 2010
So I've been giving twitterizer, a .net twitter connector a go for this site...
seems pretty straight forward, but then I soon realised that requesting a twitter user object for every request would have been a very slow execution to go through each time
The code below is an example of how I store the user's (mine) latest status object into the application cache to call locally if the last request was less than 20 minutes old
1: private void GetLatestTwitterStatus()
2: {
3: //twitter.com/users/show.xml?screen_name=chrisbward
4: if (Cache["TwitterStatus"] == null)
5: {
6: try
7: {
8: TwitterParameters tparams = new TwitterParameters();
9: tparams.Add(TwitterParameterNames.ScreenName, "chrisbward");
10:
11: tstatus = new Twitter().User.Show(tparams).Status;
12:
13: Cache.Insert("TwitterStatus", tstatus, null, DateTime.Now.AddMinutes(20), Cache.NoSlidingExpiration);
14: }
15: catch
16: {
17: //twitter is down / problems with API
18:
19: pnlTweet.Visible = false;
20: pnlTwitterFail.Visible = true;
21: }
22: finally
23: {
24:
25: }
26: }
27:
28: tstatus = (TwitterStatus)Cache["TwitterStatus"];
29:
30: }
posted on 11 January 2010
Using MS' RSS toolkit to generate RDF, I can then examine the output and place inline to the blog post itself and create inline RDF statements
posted on 7 January 2010
Serving AJAX responses to form submissions - appending ?mode=ajax to all query calls - use mod_rewrite to make seamless;
RewriteRule ^(.*)\.(json)$ $1?ajaxmode=true[L]
BasePage should pick up the logic for this, Interface to force good response - will investigate this idea further in practice
posted on 6 January 2010
Tonight, on the commute home my brain, my eyes, were on fire.
I had forced myself to stay about after work to finish off an item on the todo list.
It seems for every idea I finally finish working on, another 10 arrive! but maybe this one was worth taking note...
While fixing up form submission mechanisms, I realised I could drive a lot of traffic back to the site if I correctly engaged with a twitter audience.
I came to detail the requirements;
- When posting to the blog, the site should tweet and/or post to my facebook wall
- The posting mechanism must allow me to rule which channels I would prefer to communicate by
- A posting mechanism should read in '@' characters and possibly alert the intended audience by twitter/facebook
Roadmaps and todo lists are becoming my friend, they help me to keep my eyes on the prize... but I must remember to be tough on myself.
In the end I decided that I would tie said functionality in with the basic blogging engine, a showcase for the CMS services built into SNAPI, and open-source the development.
I could have used third-party code, or a product, but in the end - they don't tie into my plans and won't scale
Another dynamic to the story is that reaching these goals is always going to be a step closer to the end - there will be no refactoring this time round.
I only intend to build content and feedback mechanisms the once, so for me - blogging is a massive win.
SNAPI now has user management and blogging capabilities.
posted on 5 January 2010
Sometimes the ASP.NET framework takes me to a dark dark place, where I wish I was back using in-line PHP, no entities and inline SQL statements.
I launched a dating network that way once... it ran for 2-3 years and amassed just over 30,000 signups.
I knew what I was doing was wrong, and in the end it didn't scale well for my ultimate goal - but damn - It bloody well got the job done...
But then I had big big plans and a switch to .NET was obvious, all that rich functionality - dynamically created WSDLs and an awesome IDE
But you had to let me down so so bad...
posted on 24 December 2009
I've created this blog to detail my professional findings and experiences.
I'll probably aim to post one or twice a month, and use my twitter feed for quick updates.
Topics covered will mostly revolve around my attempts at setting up a sucessful business, observations on online industry and details of new product launches and features.
Unfortunately there's no feedback mechanism for the moment, but please feel free to use the contact form in the footer of the page!