About

mFabrik Blog is about mobile and web software development, open source and Linux. We tell exciting tales where business, technology, web and mobile convergence.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.

Python-like urlparser module for Javascript

I had to deconstruct and reconstruct URLs from pieces when doing advanced Javascripting for Plone.

I found this nice library from Denis Laprise. However, it had a bug with fragment extractor and lacked reconstruction possibilies. So I decided to make a new version.

Download urlparse.js version 0.2. thank you :)

Couple of examples:

var p = new Poly9.URLParser('http://user:password@poly9.com/pathname?arguments=1#fragment');
p.getHost() == 'poly9.com';
p.getProtocol() == 'http';
p.getPathname() == '/pathname';
p.getQuerystring() == 'arguments=1';
p.getFragment() == 'fragment';
p.getUsername() == 'user';
p.getPassword() == 'password';

var p = new Poly9.URLParser("http://localhost:8080/path);

p.setQuerystring("foo=bar");
p.setFragment("anchor");
p.setPort(7070);

var url = p.getURL() // http://localhost:7070/path?foo=bar#anchor

413: Page Cannot Be Displayed

Most of the major internet sites cannot be used with mobile phones! This was a conclusion of resent research done by english company Bango. Alarming result, especially because by IDC there will be by the end of this year 1,3 billion people using internet services via their mobile phones. Or, at least willing and trying to use but can they…

In this perspective it is praiseworthy how some companies, which has been traditionally considered stiff and slow moving ones, like BBC and YLE (Finnish National Broadcasting Company) have one of the best mobile services. Regardless of the ways how services are measured – by number of the visitors, by usability, by amount of content or by how willing the company is to try and explore – YLE has been sometime now been the most active on developing mobile internet services. They have been also advertising their mobile sites, both yle.mobi and ylex.mobi, quite actively on the web, tv and radio. BBC has been surveying how its services has been used and what users think of the services etc. and as a result of those surveys, BBC has increased marketing of its mobile internet services.

Today there was news story in Finnish digitoday.fi service where was some speculation of possible coming new launches next week by Nokia. The most interesting part of the story was comments of Gartner’s mobile area analyst Carolina Milanes. She said that Nokia’s own (mobile internet) services meaning and value is quite high and provides better position for Nokia in the future because for the consumers mobile internet services are now more important than number of the megapixels of the camera in the mobile phone.

Its quite easy to agree with Milanes. But when big (and smaller) site owners do understand that consumer is out there, literally, and using her/his mobile phone and not only for talking.

How do you prefer your documentation?

Lately there have been three long email chains related to Plone development documentation here, here and here (total ~100 messages). This little post tries to summarize the current discussion.

I think the dicussion is mostly fueled by third party developers’ frustration with the current development documentation situation. Developing for Plone is difficult, since finding references, how tos and examples for those little things you need is very hard. This is a turn off for many developers who would otherwise use this great system – high developer learning curve and gaps in the documentation makes the system useless.

Points everyone agree are

  • Plone development documentation is not good
  • Sphinx is good for API documentation – already happening
  • Contributors are needed

Points discussed are

  • Should developer documentation be more open ended (Wiki-like). This covers
    • Developer manual
    • How tos and other misc. references
    • API documentation
  • Mostly, it is not about generic end user, admin or system integrator or getting started documentation (here, here)

Pro wiki-like documentation stances

  • It should be more open ended (here, here, here)
  • It’s better to have something messy instead of nothing at all – the current approval process discourages contribution (here)

Con wiki stances

  • It should not be open ended, since this results to messy documentation (here, here)
  • There should be less plone.org documents (here)
  • Wikis are bad (here)
  • Incomplete wikis are discouraging (here)

Let’s wait and see where this goes.

Tourist is mobile

Tourists and travelers do carry nowadays mobile phones all the time with them, but are not using them only for calls and sending text messages. More and more, because of faster mobile phone networks, they are using mobile phones for chatting, checking emails and using other network based services, like searching for information. And use most likely will increase, especially here in Europe as European Union bureaucrats has taken lately active role for making use of mobile phones more cheaper while traveling in Europe.

Country and city tourist offices, as well as other organizations publishing information for tourists and travelers, traditionally have lots of information available on the internet. Background information, history, practical information like about transportation, sights, restaurants, bars and nightlife, not forgetting maps and other content types like videos and audios. Unfortunately this information is not easily usable, if at all, by mobile phones and mobile phone browsers thus making it practically unusable for tourist after s/he has left home and started her/his travel.

Its actually surprise how little there’s usable tourism and travel information which can be used with mobile phones. Here in Finland Helsinki has its own mobi site but, well, not so attractive service and could have more content. Especially if compared for the mobile service provided by eg. SAS, even their focus is a bit different.

What’s the problem? Most likely that those tourism offices and boards are just so traditional, slowly moving elephants. This have seen already when internet, as term and a “channel”, was new and how slowly tourism and travel communications moved into the net. Now the good sides, more cost effective and up to date communication, has been seen but hopefully value of mobile phones and services for them wont take so much time as it did with web services. Because the tourists and travelers are here, now, and willing to use information if that’s just available.