• About

    Twinapex Blog is the voice of mobile and Internet experts. We tell tales about our exciting life in the world where communication methods convergence and you can access whatever information you wish, wherever, on whichever device you want.

    If you find us interesting and talented and you are looking for developers, please contact us and we might just be able to help you.

    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.

Mobile phone users skip PCs



Recent research done by IBM Institute reveals quite interesting facts about the use of mobile phones and network based services. IBM interviewed 600 people in USA, UK and China and more than half of them were willing to use internet (services) via their mobile phones. It was seen also that in some cases, especially in China, that first time people used internet, they used that via their mobile phones, not PCs.

Most popular services were quite natural: map and location related services, quick messaging with others, email and news services. More than half of the 15 to 30 years old were seriously considering to lose their PCs and start using mobile phones (or similar devices) as their only way to access internet….

Userland templates for Plone – template engine abstraction layer for Python



I have been working with collective.easytemplate product which allows users to use template tags on various places on Plone site. Currently supporting

  • Kupu
  • Outgoing email actions (Content rules ones)

The users can place ${title}, ${object_url} and other template in the edit mode. These variables which are directly mapped from Archetypes fields when the content is viewed/sent. Also, one can register custom snippet generators like $list_folder_content.

I hope Easy Template to cover some more actions in the future. I have noted PloneFormGen and Singing & Dancing product authors that we could add some mixed in functionality together.

Currently Easy Template uses Cheetah template backend. Cheetah is not Zope security friendly and exposing templated actions should be allowed only to trusted members. I am not huge fan of Plone’s TAL template language which is based on XML attributes and thus suitable only be used in XML context – this language is aimed only for hardcore hackers and software designers and ordinary folk really cannot wrap their minds around it.

Because I am not sure which will be the chosen template backend in the future I chose to abstract the template engine layer away. I created collective.templateengines product. It is a bunch of Zope interfaces and utility functions to abstract away common template actions like

  • Applying a template
  • Adding a template context variables
  • Registering custom template tags

Currently collective.templateengines supports Cheetah and Django templates.

So, dear audience, what do you think of all this? What template engine would you suggest which would be Kupu friendly – you can edit the template language in WYSIWYG editor? Do you see any other usages for collective.templateengines? Which other projects could adopt template engine abstraction layer?