Web Theory

the society of weblogs, twitter, social networks, Web 2.0 are a canvas, what we paint on it with structured thinking, object oriented systems, well thought out RESTful architectures and web services - and how we can use this or not depending upon economics, politics and intellectual capital.

Saturday, November 7, 2009

CMS page structure

Think of the page structure as three primary objects:

either:
[LEFT CONTENT RIGHT]
or:
[HEADER BODY FOOTER]

are defined as Primary, the other is contained by the middle element of the other.

i.e. [HEADER BODY FOOTER] defined inside CONTENT; or, [LEFT CONTENT RIGHT] defined inside BODY.

It is a column arrangement (not all columns need be used) that can be used to slice the site into "containers" that define how far the right icons are from the right edge, etc. i.e. to get stable pages (without having to fix it at every design change, requires you only change the BODY-CONTENT or the CONTENT-BODY module, and nothing else changes.

Think of coloured blocks. Take a big red one, and lay two skinny blue ones - one on each side. Now you can find a yellow one to cover the top and bottom. That is the expected behaviour of page structure. These are not rules, but guides to help to design rapid consistent pages without a CMS or a basic object strategy in a CMS.

Wednesday, October 7, 2009

Frameworks

Everyone loves Frameworks but there are good software stacks that follow design patterns and there are ones that labour away in your browser.

The whole idea of RESTful design is that the client has an independent life. But RESTful design coupled with intelligent clients that are now possible to write with Javascript frameworks (so we now have two separate software stacks talking through the TCP-IP stack - do we see a pattern here?) so stuff that gets transmitted to the client is designed for that client only, so we craft a software "one fit only" key so that the server can know which client it is talking to - this "state" is preserved in a cookie.

That is what happens when you log in. Your authentication token is added to the package of information providing a secure network. Is this new? Not at all. Why do we not do it all the time? We do, it is called SSL. It provides a "standard" - a measurable way of doing something with an agreed visual clue. Is it secure? Yes.

Innovation and Capital

Over seven years ago I created a website that published academic articles of a leading professional and put in links that allowed you to generate links for your own site to link to the article, or get a link to email to your friend. I also provided lots of expensive looking paper backgrounds with multiple style sheets. It was all innovation and if things had gone better, could have gone somewhere.

Unfortunately when I billed out the work, things did not go as smoothly as they should and that perhaps is a matter of luck or personality. Apparently computer programmers do not have either, but after one year the "dispute" was settled, albeit without no handshake. The client could have angel-invested these social networking ideas, but it was not to be.

At the same time I was suggesting to another client that having groupware could be valuable and was told that they did not want any kind of social interaction on the web. That ex-client now uses Facebook to achieve the same thing.

Both clients basically were not sold on the ideas I had invented. They could have invested in social networking and as an early start been bought out, but those for whom I worked found no confidence in these ideas. Frankly, I was not that committed to them either, but I had worked on a website's groupware functionality in the UK and that website was sold to the Metro group for five million pounds.

Later on I had this other crazy idea for a shared poetry site, only to see it appear about two years later in the form of Twitter. What I tried on AucklandPoetry.com did not bite and I am not really claiming prior art. When working on that groupware in the Cambridge lab I worked in, another programmer was demonstrating his Flash games. We all laughed thinking this was going to be a hard way to make money. Of course on line gaming using Flash may be the most successful business model of all, so far.

The next big business model is what I am thinking about. But there is no time, I have to go and get a job. My clients are all worried about their mortgages and its back to implementing other people's labour intensive ideas.

One of the jobs I decided not to go for was a local version of Netflix. Mailing out DVDs is a wonderful business model but with a limited life as bandwidth rolls out over the next three to five years.

The infamous P2P work that supports skype, bit-torrent and joost.com - allowing video distribution over the current AM quality internet (it may be faster in New York city, but so is everything else) will become better and better as more people use it. It is a bit like electricity, it relies upon all the connections of the grid to maintain the grid.

And that leads me to the next idea. The next big thing (for me) may be to collect all my blogs into an online magazine and start to get some income from them. But for the internet, and the world, it is ...

Wednesday, September 9, 2009

Follow this blog

From somewhere this blog found a follower. I maintain about 30 blogs. The ones with followers get updated more often. If you want to read more "Web Theory" follow this blog using your google account.

Free advertising for a giant. A very big giant.

Social Security and Networking

A recent case of a woman who's password was hacked and her account cracked, meant she had to shut her Facebook account down as the hackers then harvested pity from her close friends and actually extracted $1000 via Western Union from one of them within 24 hours. She found the "report" link on Facebook and after 12 hours, Facebook closed her hacked account.

The first line of defense is your password. Quite often it is your only line of defense, and that should NOT be the case in a public networking environment where identity is important.

There has to be a better way. Online password safes (repositories) are asking you to trust them to never make a mistake. There has to be a better way. There is. It is the Law.

Identification of an individual is a human right. Long have civil libertarians fought for universal anonymity, but in the digital age more individual freedom may be had from universal identification. Not so much by Government. But by anyone.

How do you know your Facebook postings are not being hacked? You do not. You trust Facebook to have thought it through. Governments have been thinking laws through for centuries and still people will find loopholes. It follows that software, especially things used by millions, are going to have security holes.

It is easy to blame Facebook rather than the victim. But in this instance, it was one person vs unknown criminals and all she had to go on was being unable to login to Facebook, followed probably a phone call from a friend or finding her page had been changed from her friends login, still connected to her.

It may be that Facebook are seen as guilty of a significant oversight here. One could wonder, why is there no heuristic testing of identity? Why was it so hard for her complaint to the police to not immediately ring alarm bells at Facebook - a business?

Security takes vision, it must be thought out for the application. It could be that they are so busy being successful they become too focused to realize what safeguards they may need to wrap around new features like plug ins (which must follow certain sandbox rules, certainly, but that does not stop them being implicated in data theft). The value of social networking is limiting marketing costs.

The cost of social networking is: enormous distraction. Do the staff at Facebook get enormously distracted? If so, is this the real problem with this fractionation? As the rivers of human attention fractionate into many tiny streams we seem unable to keep commercial reality afloat. President Obama's warning to teenagers "be careful of what you post on Facebook, it may come back to haunt you" in response to one who wanted his job was appropriate advice.

If anyone has, President Obama has proven the social business model works for politics has it been adopted universally due to it being so successful. But it is just one path to success. Back in the day, businesses paid people for their work. We now seem so keen to promote our works on a social network for the attention, never mind the moola. It will change.

But at the moment it is a bit of a case of the Emperor's new clothes.

Tuesday, August 18, 2009

Web 2.0 interactivity

When a field selector is used to load values or a web interface wants to interact with a back end process, a useful design pattern to use is Ajax MVC.

This works very well with jQuery, PHP and a database.

MVC

Model

The model is a map of how data is stored. The model may also provide object structures that inform the view how to use data.

View

The view is a form with active fields that talk to the controller. The fastest way to make an interactive view is using a smart template system such as TAL or Smarty.

Controller

The controller mediates messages from the view, and formats data according to the Model which gets delivered to the view.

Intelligent View

Ajax requires that the View contains scripting that allows page elements to POST and GET data. HTTP has several methods of packaging data to be sent to the server.

RESTful Web services

RESTful webservices conceptually implement PUT and POST. GET is simply used to sent record filters (i.e. selection criteria) and is considered "Safe" - that means that it must never be possible to change data in the Model using a GET. This prevents user database poisoning by URL.

HTML 5 allows PUT - which simply means record establishment. If you PUT a record that already exists - it will create another record, or better, results in an error condition. XHTML does not incorporate PUT, so it is common practise to overload POST.

POST is common to all versions of HTTP and is implemented in HTML 4.x and XHTML. POST packages and sends data via a mechanism (called Standard Input) that is not available for hacking except by modifying the form sending the data. Of course it is possible to do that, so some serialisation or encoding is important, minimally a timestamp and a hash that ensures that the data is recognised as valid.

The Web is distracting

The internet is distracting humanity from the humdrum pointless paper pushing inanity that used to rule us. Now we can share without authority, now we can make things and see them without institutions dictating, but it helps academia prepare our minds.

Compare TED.com with Sarah Palin. One shares ecology and values, educating humanity. The other exposes the mind of a greedy person.

Now, back to Facebook...