Personal tools

You are reading the articles stored in Tutorial

Jan 30, 2013

Caution: in 2013 a "Meteor" will impact the World (Wide Web)

MAYDAY, MAYDAY, MAYDAY

Caution: in 2013 a "Meteor" will impact the World (Wide Web)

Filed Under:

Meteor is a very powerful Javascript framework: this short article demonstrate how to install, configure and create your first application using "Meteor"

Nothing to do with the Mayan prophecies, quiet!

Some time ago I came across a tweet that talked about Meteor and, as usual, I tried to investigate the simple reading.

I knew of the potential offered by Node.JS but I never tried something, so I took the opportunity to understand more. Also, these types of frameworks are increasingly directing a new way to write web applications (interesting this article). Furthermore, here you can find a lot of examples of application made with Meteor.
Meteor runs on Node.js. Has it's own server
Without spending a lot of time, I will try to reproduce steps how to create from scratch the environment and a simple application.
read more

Jan 17, 2013

Break free from forefront TMG proxy

Can Loca ride?

Break free from forefront TMG proxy

Filed Under:

I was asked to install and configure a debian server to run a Plone site behind Microsoft Forefront TMG. Mission impossible? No... just a story to tell!

It was a dark and stormy night, me and the server, Loca, left all alone in a chilly room.

To let a linux server connect with Forefront I wanted to set up and run cntlm, which is a local proxy that authenticates to a Forefront gateway to allow internet traffic.

read more

Jan 11, 2013

A custom port scanner plugin for Nagios and Check_mk

doors scanner

A custom port scanner plugin for Nagios and Check_mk

Filed Under:

“I can't believe how dark was the time without a monitoring system...”. This is what my boss told me last time we spoke about reliability of service

Some months ago I posted (Italian only) about Check_mk as a monitoring tool which can be used also to taking care of Plone instances. This time I will post a small custom plugin I wrote for Nagios.

Check_mk scan_port plugincode

 

 

read more

Nov 28, 2012

Mixing Lotus Domino and Twitter together - a way for mobile approach

"Mobilize" your Lotus Domino

Mixing Lotus Domino and Twitter together - a way for mobile approach

Filed Under:

What if you want to create different layouts for different devices in Lotus Domino? This is a way to make this possible, for example using Twitter Bootstrap

It's always more important to develop applications that are accessible from any device so we wondered what it takes to adapt an application, perhaps already developed, to ensure this possibility. In this case, Twitter provides its layout via Twitter Bootstrap, so it was decided to integrate it.

read more

Nov 21, 2012

Internazionalizzazione e javascript a braccetto in Plone

Javascript & i18n? Plone ti da una mano!

Internazionalizzazione e javascript a braccetto in Plone

Filed Under:

Ci sono un italiano, uno spagnolo, un francese e un inglese che... vogliono visitare il nostro sito multilingua in Plone. Come trattiamo le traduzioni se c'è tanto javascript?

Capita di dover sviluppare siti che sfruttano javascript per presentare dati e testi. Se il sito è multilingua, anche questi dati e questi testi dovranno essere tradotti coerentemente con la lingua in cui si sta visualizzando il sito.

Se le parole e le frasi da tradurre sono poche, questo compito può essere portato a termine tramite un dizionario. Supponiamo infatti di dover aprire un alert con un messaggio. Sarà sufficiente avere qualcosa di questo tipo:

// Tramite jQuery si prende la lingua corrente dall'attributo del tag html
var lang = jq('html').attr('lang');

// si dichiara il vocabolario con le traduzioni nelle varie lingue var messages = {'it': 'Benvenuti',
'en': 'Wellcome',
'es': 'Bienvenido',
'fr': 'Bienvenue'};

// apriamo l'alert scegliendo la traduzione opportuna. alert(messages[lang]);

Se la pagina web che stiamo creando ha molte parti caricate via javascript, e quindi molti testi e parole da presentare tradotte, questo approccio è scomodo; innanzitutto perché si rischia di dover mantere molto codice solo per le traduzioni.
Se siamo in un caso come questo, il sito sviluppato probabilmente è già multilingua e i dati verranno presentati correttamente. Per quanto riguarda i testi da mostrare in javascript, è meglio sfruttare un motore di traduzioni, e in Plone, grazie alla community, un'utility di questo tipo esiste già: jarn.jsi18n. Grazie a questo prodotto, infatti, è possibile sfruttare appieno il message factory di plone e tutti i suoi file di traduzioni.

read more