Personal tools
You are here: Home Authors nicolasenno

Nicola Senno

May 17, 2012

Plone e i sistemi di monitoraggio

Come fare il monitoraggio?

Plone e i sistemi di monitoraggio

Filed Under:

Breve introduzione sull'integrazione tra sistemi di monitoraggio e applicazioni Zope/Plone

La buona riuscita di un progetto e la conseguente soddisfazione del cliente è determinata da un insieme eterogeneo di fattori. Molte le pratiche coinvolte nel processo di sviluppo di una applicazione, queste vanno dalla progettazione al rilascio della stessa. Ma non solo, una parte non trascurabile viene affidata a un buon sistema di monitoraggio.

nagios

Il sistema di monitoraggio in particolare nell' IT si basa su tecniche e tools collaudati e affidabile che con precisione misurano lo stato di salute delle di server ed apparati di rete, come per esempio Nagios. Spesso però quello che si ottiene sono informazione parziali che non sempre sono in grado di fornire un quadro completo che comprenda lo anche lo stato delle applicazioni.

In ambiente Zope/Plone come in altri ambienti è molto importante poter controllare costantemente con un certo grado di accuratezza le istanze e i servizi in esecuzione. Informazioni precise aiutano in maniera considerevole a garantire continuità del servizio oltre a migliorarne la qualità.

Un esempio di integrazione potrebbe essere l'inserimento di Munin in
Check_mk
.

read more

Apr 27, 2012

HTML5 vs native app

HTML5 vs native app

HTML5 vs native app

Filed Under:

Riflessioni sullo sviluppo mobile

Anche quest'anno a marzo ho partecipato al Codemotion di Roma, evento che ormai è fisso nella scaletta annuale delle manifestazioni da seguire.

Stranamente, però, tutte le volte torno a casa con l'amaro in bocca, deluso da un'aspettativa regolarmente sovrastimata, al punto che sulle prime mi riprometto di non tornarci l'anno successivo.

Ma poi, pensandoci sopra un attimo, mi accorgo che le cose non stanno così.

Mi spiego meglio: se in un primo momento può sembrare di aver impegnato male le proprie risorse, non appena si riescono a metabolizzare le informazioni ricevute si arriva a un'immediata galvanizzazione della curiosità che porta a utili riflessioni.

backbone

 

 

read more

Nov 04, 2011

Say hi to Android

Filed Under:

A brief introduction to Android for developers

In the last months, I have been looking for an opportunity to get into the Android world.

Finally, after a while I got the right one: porting an iPhone app to Android platform. 

The application is quite simple because it doesn't involve anything far from a common web application: it just retrieves information about events from a web service.

If you make a list of performed tasks, it would look like this:

  • retrieving the xml content
  • parsing the xml
  • storing a few configuration files
  • loading images
  • building a couple of data structures
  • showing everything using the specific views and widgets

 

Thanks to the reference documents and materials found in the Internet, I got a demo app smiling on my device in a couple of days (not a proper relase, but it could run smoothly).

If you are familiar with Eclipse, you will appreciate the effort made by Google, in order to provide a confortable developement environment. Let's see why.

From the official site you can download:

  • Android SDK (JDK required)
  • Android Development Tools (ADT) Plugin

 

You just need to set your SDK. And that's all! Ready to start. 

As you can easily guess, the default API provided by Google is Java-based. 

I know that some of you can argue "Java is not the best choice", but it's solid and well known by most programmers. It is also well documented and it comes with tons of libraries.

The Android application layout is done by a bunch of xml files. The ADT provides a nice interface to manage them.

All the Java code needed for your app can be taken from your personal toolset or grabbed from the net.

What I love most, is that you can easily connect your device and directly deploy the application on it. Moreover, for those who make use of remote debugging in Java, Android (DDMS) is faster and simpler then ever: just press the debug button and your code will be ready for debugging from your android device. Nothing new to the world, but as I said easier then I thought. 

A small disadvantage if you use the virtual device (AVD), because it is really slow, especially in loading.

Just a small consideration: because the hardware behind a mobile device is usually less powerful then a standard pc, you have to be careful.

In a few days the release of AppEventi for Android will be ready. http://www.ferraraterraeacqua.it/

Here is the iPhone app: http://itunes.apple.com/en/app/ferrara-eventi/id449817238?mt=8

Jun 26, 2010

System.getProperty() returns null

Filed Under:

How to avoid a null pointer using System.getProperty() within a java agent.

Sometimes, for some reason, you have to do it. I'm talking about the use of System.setProperty() method within a java agent. If you don't pay attention it's easy to get a null pointer as result. Infact I got it. 

After a quick search I found out a way to solve the issue:

I will use "jna.library.path" as example.

First of all add the following line in "java.policy" file (in the "jvm\lib\security" folder below the Domino program folder).

permission java.util.PropertyPermission "jna.library.path", "read,write";

 

After that, add the java code to your agent :

String jnaProperty = "jna.library.path";
if(System.getProperty(jnaProperty) == null) {
   System.setProperty(jnaProperty,"your path");
}
 
And that it's all.
 
Bye

Nov 09, 2009

Conversione da millisecondi a data/ora standard

Filed Under:

tip per la conversione da millisecondi a data/ora standard in Lotus Notes tramite @ function

Nello sviluppo di form per appplicazioni web può capitare di scontrarsi con un ben noto problema nella gestione dei dati: la conversione del formato data/ora.

In questo breve post descrivo il caso in cui la data viene fornita in millisecondi a partire dal 1970 (Unix time) che deve quindi essere convertita in un formato leggibile.

In Lotus Notes tale dato può essere elaborato usando la seguente formula:

millisecond := @TextToNumber(@UrlQueryString("data"));
@Adjust(@Time(1970;1;1;0;0;0);0;0;0;0;0;millisecond;[InLocalTime])

il risultato sarà: 19/01/2004 16:16

Nell'esempio i millisecondi vengono estratti dal url come sotto:

http://dominio.it/db.nsf/nomeform?openForm&data=1074528964

NB: viene ritornata una stringa, attenzione quindi al suo utilizzo.