Tuesday, December 15, 2009

Emotions

No! Not those awful designed "emoticons" that were "popular" but seem to have become less so, at least on the services I choose to use.

Services like Twitter, where 140 chars or less is supposed to support a "conversation" seems to support something else - and its name is the clue. It is supposed to be a place where a meme can spread due to its inherent usefulness. It is promoted as "a place for conversation" but that is a bit like saying the training wheels on a kids bike are useful for transportation.

Treating Twitter like it is a conversation opens up its doors to its world of water cooler comments and useful links that you can respond to with your own links.

It is also a far better way to get curious eyeball traffic to websites. So all the mad marketeers love it, and get quietly unfollowed by most of the saavy accounts. I keep a few pet marketeers just to remind me not to fall into the squawking insistent enthusiasm that seems to be their art.

The limiting of the line to just text, just 140 chars constrains language to such an extend as to reduce meaningfulness. Conveyance of emotion by reaction is confined to ReTweets - repeating or supporting a view. It is designed as a cool medium, so that a real meme can only take off due to its inherency. Trending topics is an attempt to identify memes but it actually is a guide to being rather dull. Twitter is not a popularity context, more a voyage of tepid discovery and wonderful surprises like discovering Read Write Web.

See also:
Read Write Web

Saturday, December 12, 2009

Knowledge

There are alternative models for thought storage and retrieval.

Knowledge is language based and can be stored as historic documents with providence, both electronically and physically. What we know about specific objects is enhanced when viewed historically, the artifact and the digital study of the artifact, plus all the collected strands of human experience, thought and academic reasoning that can be attributed to it, all available wherever and whenever required.

This is the model of the universe envisioned at first by Encyclopedias, which Microsoft modeled digitally as Encarta, available on CD, now discontinued. Along came the new model of shared information: collaboration. Wikipedia revised the printing press revolution that produced forests of expensive books of knowledge. The internet supercedes printing. The economics were turned inside out, and properly so. Advertising brochures are great, but we all throw them away.

Mobile phones hooked into storage retrieval is a far better personal model than lumbering PCs, even laptops are almost redundant around the truncated reality of a 3x2 screen. iPhones are the most perfect expression of the paradigm. Yet the majority of gadget-ware is like the almost magical Twitter application - it is functionality, not substance.

They provide vehicles for the carriage of knowledge. All these companies competing to tweet, it is really just a function. Google Wave is a smarter expression of a more in depth paradigm. Very few get it yet. As a programming development tool, it is far better than twitter which is universally distracting.



The sharing of information is a new model of commerce, espoused mainly by google and the Open Source movement.

Friday, November 27, 2009

Shaken, not Stirred

Programming is based on certainty. You can only write code if the layers that connect together do so without any holes in the logic. When you discover a method by which an infrastructure should produce a bunch of objects you do not need to be concerned that the infrastructure gets it wrong, that is why it is infrastructure.

When the infrastructure does not respond in the most wholesome way, crashes the server memory or simply seems to fails inexplicably and you have checked things, your confidence in the infrastructure may be shaken, but if, for example, the infrastructure delivers a set of objects cleanly, and also provides a method that sets a filter for that selection in the infrastructure but that filter method crashes badly, there are two approaches:

a) develop a work around that applies the filter at the higher (application) level

or

b) rewrite the infrastructure to do what is required without crashing

Always, always aim to do b), unless you do not have enough time, in which case always do a). Or of you are developing against a "code freeze" version, then never do b). The infrastructure could be incomplete and you can not reach your deadline.

Good software, infallible software is written in layers each of which can be separately monitored. If the infrastructure is broken, then a software team with a good architect will know what is going wrong and may rewrite the infrastructure.

The worst thing to do is to rewrite infrastructure incorrectly and allow untested bugs into the system. And if you are using a "version frozen" open source module, you may be in for a quagmire.

Suddenly you have 10 days work being added to the schedule already agreed, and there is no way
to do that. So, you do option a). The software gets delivered and it is slightly less efficient but it only affects the instance of the decision tree that it affects.

Now, you can upgrade the infrastructure, it will still work, but you can replace your workaround and test it on a staging site before you release it.

Wednesday, November 25, 2009

A new copyright model

Should original works be protected by copyright? I think there is merit in rewarding writers and originators of new ideas with financial reward. It encourages me to write more interesting and accessible articles, giving away years of experience and knowledge - there has to be a reason to do this.

Passing on knowledge makes it more valuable. Copyright law should never prevent the passing on of knowledge but should ensure that the rights of the owner are respected.

With the advent of the Internet, file sharing and republishing, the question of "enforcing copyright" is a major legal problem. Who to accuse? A fictional average individual who has perhaps ripped an average of 1 film or one album from the web really would not be able to front up with payment if sued for copyright for their brief career as a file downloader. In other words, the prosecution of users is counter productive.

We have the internet. It is the solution. Distribution of information can be tracked with meta-data that allows it to be attributed correctly. Any use of information should be rewarded with a right to pass it on to another. The old model suited the creation of artifacts.

The new model is more to do with the fluidity of distribution. Knowledge shared is knowledge that benefits people.

An international copyright register makes more sense than all these prosecutions. If we create the roads for data to travel on, then we should expect that people will use them. Subscriptions could contain a copyright tax that adds to the international pool and the number of times an article or item is copies could then allow an artist to make a claim for copyright.

This model has the intention of rewarding sharing.

Monday, November 23, 2009

Ways to use Twitter

Here are some working phrases:

"More than it appears to be"
"Deceptively Simple and Mad Enough to Work"
"More return than effort put in"

and some more

"Less than you expect"
"Elegant design fits so easily with other applications"
"Returns come when you put the effort in"

which set of statements (assumptions) are more true of Twitter?

The answer is dependent on how you want to use Twitter.

If you are a programmer, like me, then you want something to "just work". You do not ever want to see it "fail sometimes". It has to be consistent. Therefore simplicity is a distinct advantage, just look at all the problems Microsoft had with it's less popular version of Windows (Windows 2.0, Windows 4.x, ME, Vista) vs its more popular renditions (Windows 1.0, Windows 3.11, Windows 95, NT, 98, and Windows 7). Complexity can lead you astray. (Windows 4.x?)

The "small is good" approach to software engineering brought utility as entertainment. It is a mistake. iPhone apps are great if they reduce human time involvement with the gadget, otherwise they are entertainment.

Entertainment eventually fades, you can only watch the same film a few times, really. Software must have "utility" and that means that from day one to day last it must function 100%, it must be able to establish your data from import or carry you though all the boring data entry somehow, it must work with that data and finally, be able to export the closing balances of the life of the computerised activity. That is "utility". It is there when you need it.

The internet is both utility and artifact. By making everything artifact, we fail to discover the most current services; conversely, making everything utility means that brains switch off.

It is like art vs science. Both being present in an invention is what gives it both legs and continuity.

Twitter feeds that are using the first set of assumptions seek to sell. These do not work.

Twitter feeds that use the second set of assumptions are smart services that have a chance of attracting customers.

How to do that...? Something to think about....

.

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...

Monday, March 2, 2009

myspace

I put TOP FRIENDS into random order for entirely selfish reasons - for instance - whom I rate or do not rate is something that seems entirely private.

Although it is thrilling finding ones' mug on someone else's page is not just an honour but a risk. I hate that kind of thing - so I randomised the friendset on myspace.

It results in this being more of a performance space and less of a personal space. Private conversations do not really belong in a public space, to leave them there is to change their value, commodify them. All real conversation is private even when it is public as it is only the present tense reference points that have meaning... if you can follow this logic, and I do not expect it, but if you can then it becomes more obvious why myspace is better for a soul like me than that other popular site of social madness and intellectual theft.

As I said, a performance space. Comments are always most welcome, especially on videos as the comments one gets on youtube are not very helpful, to say the very least.

I do not publish much poetry here - only a sampling. Tho' I trust Tom, it's his ultimate boss that may not be such a vassel of virtue...

Friday, February 20, 2009

Defining Web 3.0

Web 2.0

What Web 2.0 delivers is audience. It leverages our own social network as a model for promotional activities and audience gathering. But like most of the user initiated movies on youtube the engagement factor is missing.

MySpace/Facebook

Both are inventions of the same thing, but with very different orientations. One is designed to majestically implode upon the interaction of the me-too generation with itself. The other appears to keep trying to leverage its "social map" to market to us a set of "needs"? Any invasion of privacy based on the apparency of "ownership" of our postings will be met with derision by artists and those who have something of value to say.

Both these mediums are of no value to advertisers per se, but they do provide an extraordinary market for artists and those who have something of value to say but generally the culture is to borrow or steal content and misrepresent it as one's own (or to publish photographs that really should remain in the private domain).

Social networking 2.0 does provide for effective cross cultural linkages and is an instant boon to event organisers. You do not have to go viral to contact people.

As vehicles for advertising they both are too distracting to be click farms. Just as well, as the idea is to sell yourself to your circle.

As venues for advertising, perhaps the individual is prepared to bare their soul for themselves but the advertising and media industry has only tried frantically to use their subscription model to protect their existing landscape as we stop buying their paper copies of the news and TiVO' their Ads.


Twitter

To see if monkeys are social or "intelligent" - (one imagines) tests could have been designed to examine the lowest common denominator of recognition. If the monkey could hit the right coloured button it would get the reward. Thus behaviouralists were borne upon an unwelcoming world. And no wonder they think the rest of us are apes.

The path of least resistance is to ride the trend and young people talk to each other with txt msgs - so twitter.com broke onto the scene asking for people to describe what they are doing in 140 chars or less.

With the simplest stripped down application possible - the online opinion poll - combined with public SMS style messaging - and twitter.com soon revealed to its burgeoning audience a pattern of "buzz" in the air. A giant social microscope that allows us all to contribute in real time our links and stuff randomly to the currently curious. If you tweet when they are not looking, then they may miss it and they may catch up with it later.

The point of twitter really, is that it is real-time. And by being only a message relay (plus links) - by being minimal - it defines a new language. In that it is Web 2.5 - other web 2.0 sites may persist in lag-time, but twitter does not only give you live updates - but with imparted meaning that reflects your point of view - it is a stronger relational direction than the very structured and unchanging information you see on true Web 2.0 sites like myspace. It is the google page to the yahoo cacophony we accept as "social networking".

If you are going to waste time, it may as well be a little bit of it.

The natural redundancy of twitter is truly marvelous. You miss so much you do not need, thus it mimics human perception far more precisely than insanely linked nice pictures of the "friends I poke".

The age of attention seeking is over. Web 2.0 is inward looking, validation seeking and rather non-profound (except for music - that has found a new definition of engagement on myspace and youtube).

Another type of site - a Web 2.4 extension of Youtube perhaps - interactive video chat rooms - appears interesting but the more people talking - the less is said and the noise factor makes it largely noise.

The camera and liveness is a less compelling experience than 140 chars. At least on twitter they say something interesting. Why does it work? Because there is no need for a contract. It is RESTful architecture at its most compelling - the API is RESTful as it allows logic to overlay syntactically upon the medium without fear of illegal characters. Remember how in Web 1.0 we were worried about filtering user input. Web 2.5M says publish any URL and the normal rules of community apply. (You know you are in "good hands"). These rules may not apply in Web 2.0. You can simply reinvent the projected "self" - so there is no need for authenticity.

Web 3.0 should allow us to be free to create and share without fear of being ripped off by copyright thieves, or clear of copyright restriction. Web 3.0 may have to disambiguate conventions and provide frameworks for reuse - along the lines of OpenID - shared conventions to achieve simple congruity.

Web 2.5 achieved that by accident. The limits of their design and the acceptance of simplicity is a certain zen. But to provide uniform common services (such as message delivery) is simply called a protocol. Web 3.0 in my view will be a set of common protocols that achieve building blocks of an effective interactive and/or entertainment experience.

What the Web 2.x approach lacks in compelling productivity it makes up for in buzz. It is half of the picture. Now we need to mix in some core values.

Web 2.5 is part of the answer. Now for a theory of Web 3.0?


Web 3.0


  1. Has to be transportable

  2. Can mix the introspective with the social in a naturally selective way

  3. Is safe for the audience

  4. Universal identification of social criteria (e.g. age filtering)

  5. Declared Ownership and an economy based on shared use

  6. Public ownership of data provides a safe library for sharing

  7. Artist repository allows for the registration and protection of private works

  8. Agencies bind artists to appearances in real life, why not on the web?

  9. Effective cheap web cash, so anything offered may attract micropayments against a universally recognised banking system

  10. A safe system for conducting scientific polling

  11. A set of virtues.



The Web 2.0 system was an experiment in engagement. Web 3.0 is the leveraging of this to enable individuals to safely build ways to virtually trade with public acceptance of a recognised virtue.

Web 1.0 + Web 2.0 = Web 3.0

Combining web 1.0 trading sites like Amazon with the leverages promotional ability of Web 2.0 does not mean the same thing as Web 3.0 per this definition, but it forms a cornerstone of its public face.

Another way of viewing this, Web 1.0 was one dimensional business, Web 2.0 is two dimensional business, like a flat map of potential connections around a subject. Web 3.0 is taking all these disparate networks and doing something intelligent with them - like a map compared to a contour map.


Copyright © 2009 by Nicholas Alexander



See:

Thursday, February 19, 2009

Parliament: Don't screw up copyright

Media will take an angle on anything. But so will ISPs and in their tricky negotiations with various parties about copyrights without making blunders they will be sued for, and passing on unnecessary legal expenses? A good law would pave a path to economic prosperity. This hampers economic progress and cements a stupid set of relationships into fact.

There is no reason to incriminate the curious.

A better arrangement is for the government to publish a list of IPs to exclude and ISPs simply to filter them. Now the copyright can be protected without costing everyone an arm, a leg and their freedom for being curious.

Why hide all this content, anyway? Educational documentaries for example should be free of restrictive copyright. We do not have to make a buck of everything, but we should respect Artist's copyright independent of corporate lawyers. Distribution was always expensive and now it is not. A legal framework for protecting our artists is necessary.

But bad laws will only kill innovation.

Tuesday, February 17, 2009

NZ Government experiments with ISPs

The New Zealand Government overlooked an opportunity to dissect a contentious law that seeks to enforce copyright by giving ISPs the responsibility to cut off any user not complying with three warnings.

This is the bull headed socialism that the Labour Government enacted defensively and very unwisely in the last year of it's 9 years firmly holding the reigns of government. Most likely, hoping to confuse the then opposition and predictable winners of the next election, the National Party, they left behind this obviously "shonky" law. It simply will cause more damage to New Zealand's reputation as a fair and just environment. It will also be an own goal by the incumbent government.

Unfortunately, it seems that this new Government been caught with not having read it properly and deferred opportunities to have it discussed so allowing it to proceed into the law books.

The law in question is not only a violation of human rights but demonises copyright law. The consequences are not really in the control of the law makers. This could also have terrible and far reaching economic consequences as injustices start to evolve out of ISPs using the law defensively to avoid prosecution and blacklist customers.

Imagine waking up one morning to discover that you can no longer run your hosting company or even access email. That is the uncertainty this bill will create - an environment where anyone can be called an ISP and called out for "copyright violations" perhaps even accessed by bots on their network. It simply is unsound, unjust, and as a precedent - it puts the entire internet and the freedom of speech it bestows on humanity at risk of short sighted convenient or reactionary legislative barriers.

In other words it is a distortion of the relationship between user and ISP. This legislation needs to be fought at every level. It is a precedent that that Internet most certainly does not need.

Today, New Zealanders are writing to their MPs. If this law proceeds, the protests may become more widespread. Already the international media have picked up on the draconian measure.

Letter to NZ Minister of Arts and Culture

Dear Minister

There are grave concerns about a very destructive law which comes into effect at the end of February this year, passed by the previous Government.

As an artist and publisher, I support copyright as a means to return value to artists.

This law is well intentioned, but destructive to NZ's image. If our Government allows laws that enforce the presumption of guilt and enforces punitive measures taken by citizens for something that existing laws actually cover, chaos will ensue. There is a balance in law, but this law is a black sheep upon the NZ legislature.

The new Government will be considered weak and unintelligent if it does not grasp this nettle and expunge this black mark. It has made the international media with articles in The Guardian today.

We must protect copyright - not by preventing publication but providing a simple way for artists to insist on the payment of royalties. That solves the problem.

The issue of file sharing - distributors merely need to adopt the new technology and take ownership of their market. It is not expensive. Law should never enshrine old technology or it risks uncompetitive failure.

This law rewards those who refuse to service their market with the most effective means of the promulgation of the arts. Government has no business over-regulating normal business processes.

Yours sincerely,
Nicholas Alexander

Thursday, January 29, 2009

ROA and PHP

According to the PHP Manual HTTP PUT is implemented as a sort of file upload emulation as though that was useful.

The whole subject of HTTP PUT was very murky until I read the RESTful Architecture O'Reilly book. What you need to know is that in a ROA (a Resource Orientated Architecture) uses HTTP PUT to create a resource.

Think social networking paths to individual resources requires a different function. In php it is analogous to:

HTTP PUT thing = make a file thing

You never want to make a file on a website. If you want a user to supply a resource this should be in a sequestered way, not in the actual pathways of the website.

With PHP there is a far more powerful way to implment HTTP PUT. First test that your brower is sending PUT and PHP is getting it.

Next, implement a resource appliction architecture that creates resources, not files. What is a resource? It is a set of objects you want to have exist on the server.

For example

GET /customer

returns a resource, in this case a list of customers

PUT /customer/1441

creates a resource, in this case customer 1411

PUT /customer/1411/name/Johnson

creates a customer whos name property is set to Johnson

Of course how a ROA is implemented in PHP is slightly different from the PHP manaul.

As a ROA maps against existing directories, you either will have to implement an extensive directory tree with index.phps at each level (preferably using a template like PHPTAL) for the views. But this is only good for STATIC objects. In other words for the "fixed" aspect that shape the system.

For example these resources can be fixed:

/customer
/supplier
/organization

But these resources must be dynamic:
/customer/1001
/supplier/new
/organization/staff/accounting/

Why? Because supporting or instantiating a directory structure for each entity is ridiculous. It is often method used for primitive resources: e.g. images contained in a resource mapped (i.e. customer_id in path) resource path. Often reflected by placing these images in files on disk.

Images will probably always just act like one dimensional arrays of bytes, accessed by a path name. The object handling is implicitly tied to system calls.

But if I want to dynamically create an object that has new functions being added to it - then its behaviour is not merely dump a file in a predictable way. The HTTP PUT carries a different set of semantics along with it, and this is handled in code.

So how do you access a resource on

/organizatation/staff/accounting/101

without it being a directory structure on the disk?

htaccess

URL Rewriting is an art that allows you to translate a dynamic predictable path like
/organization/staff/accounting/101

to

/organization/staff/accounting/customer.php?id=101

or

/orgaanization/staff.php?dept=accounting&customer_id=101

htaccess URL rewriting allows you to do this.

The rest of the ROA implementation using PUT to create a resource, GET to view it, POST to update it, DELETE to remove it - can be accomplished fairly easily.

Tuesday, January 13, 2009

NZ ISPs to be pirate police

NZ Herald discussion page

A new law in New Zealand makes ISPs responsible for cutting off copyright pirates. This is all a bit silly.

For a start, define "pirate". A pirate is not the same thing as a thief. A pirate is someone who steals contraband. What is contraband? Goods in transit that have not yet been destination cleared. So, how is a "downloader" a "pirate"?

When a downloader also allows uploads. Then the downloader is effectively trafficking in contraband.

The law should cover that activity, and that activity only when it can be proven to have been done deliberately for stolen profits. That people confine their internet and cultural needs to channels that exist is not their fault. They are naturally curious.

What about the ISPs that provide access to dodgy sites? That is something so easily controlled that all a copyright claimant has to do is to ask for the offending source of copyright violation is nationally filtered. Won't happen, the government will not want to be seen encouraging censorship.

But when you make the consumer a target of the law, you are making innocents into targets for the law. It is not only socially repressive, but it is damaging.

Allow the kid who has no other access to TV to watch it without insisting his parents inspect what he is doing 24/7. Easily done. How?

Filter the damn traffic at source (or at least at the ISP), then you have nothing to worry about. Yes it is a violation of our freedom, but if the government is going to limit my free speech and curiosity, I would rather they did not threaten the curious, but let wandering minds be free to wander elsewhere. Removing their access is reactive and ineffective.

Since TVNZ purports to offer a free TV download service that hardly works through my Orcon connection, it is going to be very hard to prosecute those who download TV. The law should realize that TVNZ is offering a useless service. That is a primary cause for breaches of copyright.

My stance on this is simple. I am against piracy of copyright material. I am against threats to the general public. I see no balance in the new law and predict it will fail.

Never kill the messenger, or the consumer. As the Government can direct an ISP to filter an IP address it deems is a copyright violation - it is just a line in a computer file. So the law is an ass. A total stupidity, and waste.

Sunday, January 4, 2009

A model of a business

RESTful Business models seem to proceed presently as follows:

/business/address/street/street_number
/business/contact/email
/business/staff/executive/manager

and so forth. Nouns are nice as they relate to tangibles, that in turn have attributes, actions resulting in changes in their state.

This subject-noun centralisation appears to make sense but is that Resource Orientated? Probably not, unless you see a business as a container of raw materials. It enforces hierachy in development. This is our business module. This is our contacts module. And so forth. Objects are then "business", "user", "customer", "inventory", "cash", etc.

Seems right. Which means it is probably best deconstructed.



An earlier approach was to use gerunds to name actions:

/contact[ing]/customers
/sell[ing]/products

but then software to "contact" has to interface with diffent data types, each one differently. It makes more sense to define a business as a thing that can contact, and to define other things that can contact similiarly. The OO concept of extensibility addresses this linguistically:

where the path:
/entity/contact/email

may define
/business/contact/email
and
/staff/contact/email

by making entity a parent class to business and staff. But why include the path in the URI? If we consider each element as a semantic pair:

entity/business contact/email

then we are constructing our URI to include implied parent classes.

Our objects define:
entity as a parent of business
entity contact method when its a business
business contact method is inherently the entity contact method

the uri may say:
/business/contact/email
or
/entity/contact (which type of contact may be defined by the entity type)

therefore:
subject nouns require a superclass (categorisation) to define generic methods.
Generic actions imply a switch/case decision tree.