Archive for category Uncategorized

Kobo launches Vox, ‘the first … (thenextweb.com)

 

When I came across this news I couldn’t resist to grin. In the last F8 Mark Zuckeberg seemed like a child learning to put verbs into his language repertoire. I thought that the partnership with Spotify is great as adding a social dimension to music listening is a masterful implementation of a jukebox on the net, but sharing book reading? At least in a book club people make the conscious decision to share the experience of reading a book. sometimes it is good, sometimes it is rubbish. But why would I want to let the world know what kind of trashy books (or mostly tech manuals) I am currently reading?

I’m curious to see how successful this is going to be!

Tags: , , , , ,

Batchbook forms – required fields

Problem 1: making fields required.

This is a simple problem at the top of a more complex issue. In standard HTML there is no such thing as a ‘flag’ value which can be added to fields in a form indicating whether they are required or not, but there are two methods available to go around the problem: server side and client side solutions.

In the old days you had two options: the form was submitted to the server. Then a cgi script validated the data and returned it to the browser with cryptic error messages like ‘something is missing’.

The alternative was to submit the page to itself (pseudo- client side): some javascript was handling the processing of the form and allowed to highlight the missing fields before you could submit it. This is certainly an improvement in the user interface and a quite solid and reliable one, but there was no way for the user to notice whether something was incorrectly entered until the form was submitted.

Neither of the above is possible in the case of Batchbook forms as I obviously don’t have access to the server-side script which handles the forms, nor I wanted to have custom-made function to validate the forms as it is too cumbersome to maintain!

In the meantime user interface developers have been crunching numbers in the background in the past few years and wonderful libraries and APIs have been developed making the magic happen on the client side in very clever ways: jquery and mooTools are probably the most well-known libraries.
Even if you don’t fully understand how they work (and I’m one of who is only tinkering with the libraries and plugins!), it is not too difficult to adapt things to fit the purpose of what is needed.

That is exactly what I have done: I borrowed a plugin for jquery and modified the code of the form to ‘validate’ on the client side. The key adavantage of using a library is that a lot more becomes available on the client side and unlike the early days of javascript in which people were concerned that the browsers were not able to handle it, these days it seems that only 1% of users actively deactivate javascript.

The choice for me was jquery (this is already available in wordpress), with the jquery.ui library and an inline validation engine plugin developed by Cedric Dugas. The latter is doing all the hard work!

The first thing was to figure out which fields were deemed ‘required’. In my case the name, lastname and email were the core fields to start with.
After including the libraries and the css in the head of the document:






I then customised a little the validation function:

		$(document).ready(function() {
			$("#publicForm").validationEngine()
			//$.validationEngine.loadValidation("#date")
			//alert($("#formID").validationEngine({returnIsValid:true}))
			//$.validationEngine.buildPrompt("#date","This is an example","error")	 		 // Exterior prompt build example
			//$.validationEngine.closePrompt(".formError",true) 							// CLOSE ALL OPEN PROMPTS
		});

		// JUST AN EXAMPLE OF CUSTOM VALIDATI0N FUNCTIONS : funcCall[validate2fields]
		function validate2fields(){
			if($("#contact_details[first_name]").val() =="" ||  $("#contact_details[last_name]").val() == ""){
				return false;
			}else{
				return true;
			}
		}

The final touch was to add the class to trigger the verification of the fields when the user moves on to the next field. The immediate popup alerts the user immediately saving them the submit and recheck type of interaction we have talked about earlier. In my example this is what I have done:


Repeat the same with the other fields as required (check the instructions on Cedric’s website for more details) including checkboxes:

Student Teacher/Staff

And that’s all folks! You can look at the other installment of this batchbook forms tutorial:
- big dropdown menus & custom dates
- hidden fields
- help tooltips

And as usual leave comments/notes if it was useful!

Tags: , , ,

Steve Jobs against the world?

As many others I came across mr. Jobs’ Thoughts on Flash, a 1700 word open letter to the community this month and, as many others can’t ignore the message.

I am a ‘late user’ of Apple products, and unlike many others I can’t see myself as a PC or Mac person, however I love certain things of my iMac and iPhone and can’t do without my (now over 5 years old P4) for other things.

Jobs’ comments are quite interesting, beyond the fact that Apple wants to retain a market control over apps. I think that they actually sum up a vision and given the success of his company we ought to take notice. Despite other savvy individuals like Joe Hewitt (commentary by MG Siegler) openly disagreed with the Apple CEO.

I personally buy his conclusion:

Flash was created during the PC era – for PCs and mice. Flash is a successful business for Adobe, and we can understand why they want to push it beyond PCs. But the mobile era is about low power devices, touch interfaces and open web standards – all areas where Flash falls short.

I buy it for a number of other reasons too, which he fails to mention, probably because it would be perceived a direct marketing attack. For example, I’ve been around long enough to knwo about Adobe’s previous life, when it was Macromedia. I’ve seen changes in Flash scripting from a design aid to full blown programming/development environment. I’ve been doing stuff with Director since it was fighting with Authorware for a place in the industry. Although I commend the huge progress, and I was amazed by the recent presentation of Adobe CS5 products, I have to ackowledge that despite the efforts in the right direction, Adobe products remain a privilege for the few, with price tags well beyond the pockets of the average user. This is making training and development more inaccessible and I embrace Jobs’ comments on openness, which is reflected in their releases of SDKs and training material.

Neverthless Hewitt’s comment strike a chord: at the time I loved my Netscape browser, but must acknowledge the raise and quirkiness of Internet Explorer opening new horizons when embed multimedia into a page was not yet possible without plugins. Flash filled the niche wonderfully, so much, in fact that over 75% of video content out there these days is a flash video!

I also agree that the W3C is just too slow in promoting changes: it took nearly 15 years to get to HTML 5 standards! Browsers should promote innovation, but we must keep in mind that standards are important: we are at a stage in which Adobe had to provide developers with useful tools to compare differences in design between browsers! This is a great response to needs, but how did we get into this mess in the first place? Maybe Hewitt forgot the pain of single platform focus because it was a pain to do anything different! (and some other developers responding to his Twits seem to agree with this point).

Going back to Flash, my verdict is ‘great, but not affordable’. I received today an offer putting the price tag fo CS5 in the UK at 80% less than the retail price for academic purposes. Excited I went to look at the online store and found out that the price for the CS5 Masters Edition costs £560 and my hopes were shattered. The average pay in the UK for a full time job is about £1400 after tax. Students working part-time are likely to earn about half (£700). How did the Adobe people do marketing research?? An article on the BBC painted an interesting story about what an ‘average’ salary is compared to the big salaray in the UK.

Obviously there is no way that students can afford the suggested price tag and whilst it might benefit Adobe’s image to look education-friendly, it doesn’t actually change the reality on the ground, maintaining an elitist position in the development, which Jobs criticised (not enough?).

I have no doubt that more comments and wars of words will provide more food for thoughts in the next few weeks! In the meantime it should be noted that YouTube has already shifted to HTML 5 rather than Flash, well before Jobs’ letter… I stick with the open and free for now!

Tags: , ,