giovedì 19 marzo 2009

Subversion e la gestione del ciclo di sviluppo di un progetto

Utilizzare e strutturare il repository di subversion è un requisito fondamentale per supportare correttamente il ciclo di sviluppo di un progetto software. Qui di seguito alcuni appunti che sintetizzano l'uso del repository.

Struttura del repository

Il repository è suddiviso nelle seguenti cartelle:

  • Progetto 1
    • trunk
    • branches
    • tags
  • Progetto 2
    • trunk
    • branches
    • tags
La cartella trunk è la cartella di lavoro principale, contiene i sorgenti nella versione attualmente in lavorazione (next release). La cartella branches contiene delle sottocartelle dei vari branches anche loro in fase di sviluppo: il nome delle cartelle è significativo (ad esempio, per lo sviluppo alla risoluzione di un bug, viene creata una cartella BUG-xxx). La cartella tags contiene invece le versioni alpha, beta, RC o final del progetto; qui i nomi sono nella forma [VER].[REL]-[alpha, beta, RCx].

Branching e merging

Il branching viene effettuato per creare una copia di lavoro per la risoluzione di un BUG o per l'implementazione di una nuova feature in prova senza intaccare il trunk principale: utilizzando i front end grafici di svn oppure il comando svn copy, è sufficiente creare una copia dal trunk nella cartella branches e nominarla in modo appropriato; occorre quindi (utilizzando svn switch) passare alla copia di lavoro il nuovo repository ed effettuare le modifiche. Al termine del ciclo di vita del branch, occorre fare un merge con il trunk principale (utilizzando svn merge) ed eventualmente cancellare il branch.

Rilascio di una versione (alpha, beta, RC, final)

Per rilasciare una versione, occorre effettuare una copia di trunk (si suppone ovviamente che la versione venga fatta sul trunk principale e non su un branch) con il comando svn copy o tramite il frontend grafico. A questo punto, per fare il building della versione occorre fare un checkout (svn co) dalla cartella tags di riferimento (ad es. svn co svn://server_svn/Progetto/tags/1.5-RC2)

martedì 3 marzo 2009

Primi passi con Glade e gtkmm

Oggi ho cominciato a fare qualche piccolo esperimento con Anjuta, Glade e GTKmm.
Dopo aver creato una form con due pulsanti, ho creato un gestore di eventi minimale:

struct Gestore
{


Gestore(Glib::RefPtr<Gnome::Glade::Xml> &the_xml)
{

dynamic_cast
<Gtk::Button*>(the_xml->get_widget("button_due"))->signal_clicked().connect( sigc::mem_fun(*this, &Gestore::on_click_due) );

dynamic_cast
<Gtk::Button*>(the_xml->get_widget("button_uno"))->signal_clicked().connect( sigc::mem_fun(*this, &Gestore::on_click_uno) );
}


void
on_click_due()
{

cout << "Click sul bottone DUE!!!" << endl;
}


void
on_click_uno()
{

cout << "Click sul bottone UNO!!!" << endl;
}
};


A questo punto, ecco il main (generato da Anjuta) con l'aggiunta del mio gestore:


int
main (int argc, char *argv[])
{


Gtk::Main kit(argc, argv);
Gestore *gestore;

//Load the Glade file and instiate its widgets:
Glib::RefPtr<Gnome::Glade::Xml> refXml;
try


{

refXml = Gnome::Glade::Xml::create(GLADE_FILE);

gestore = new Gestore(refXml);
}

catch
(const Gnome::Glade::XmlError& ex)
{


std::cerr << ex.what() << std::endl;
return
1;
}


Gtk::Window* main_win = 0;
refXml->get_widget("main_window", main_win);

if
(main_win)
{

kit.run(*main_win);
}

delete
gestore;

return
0;
}

C++ to HTML

http://www.bedaux.net/cpp2html/

Molto utile, complimenti Jasper!

giovedì 22 gennaio 2009

Svn integration on nautilus

http://naughtysvn.tigris.org/ should be something like TortoiseSVN, but integrates with Nautilus!
It's just version 0.0.1,and I didn't see any new release in the past year... I hope the project is still alive!

Have a look at this post about using subversion not only for source code.

martedì 13 gennaio 2009

Tech 2009

I'm writing down a couple of notes about what I'm going to expect this year from an IT (strictly personal and professional) point of view. Two years ago I wrote about multicore processors and new operating systems, I was expecting RIA application to be the main trend on the web side (google stuff, facebook, linked-in...), while I've mistaken about Vista... I was expecting a huge interest and a great leap foreward, with new .NET based application, but Vista has been quite a flop.
Actually in these years I worked mainly on the old WinXP, and did something interesting under Linux.
In 2009 I will sure increase my activity under Linux and I hope to start studing Mac OS X; I think that the new releases of the Linux kernel with ext4 will renew the interest on file systems, and the "Btrfs vs Zfs" affair will be the major topic on the server side.
Again on the server side, I will sure broaden my knowledge of PostgreSQL (impressive... a really impressive dbms!): this year I will try to develop the project of my object oriented repository based on a relational dbms, hoping to see soon some innovative OS based on a OODB instead of a file system.
C++09 (or 0x)? Let's see, but I'm quite excited about that! Hope compilers will appear as soon as possible!
What else? Of course, more processing power, new cpus, bigger storages, both hd and ssd... I am also thinking about replacing one of my old desktops with a iMac, but I'm waiting for Snow Leopard to see if it's worth the price.
Summarizing: because of The Economic Crisis, there won't be great revolutions; Win7 will be what Vista should have been 2 years ago, Os X will gain more and more users, like GNU/Linux.
So my keyword for 2009 is "consolidation".