Blog

The English part of my blog is mainly technical. If you can read Italian, check the Italian section for articles of other kind.

How To Use NHibernate in an ASP.NET Web Site Project (Even With Visual Studio Express)

This is the first time I write an article about ASP.NET, even if I use it at work every day. Yesterday I got NHibernate working in a web site project (which is different from a web application one), despite of all unsuccessful searches on the web, and I wish to share my configuration.

Please note that if you are completely new to NHibernate, you'll learn nothing about it in this article: I just want to help you to get it running in a web site project. For the same reason I've also avoided to implement all those best practices that are already widely documented on the web.

I think that some of you might wonder why one would want to use NHibernate in a web site project, since it looks like using an enterprise tool in a small project. But I don't think that (N)Hibernate must be confined into somewhat big applications: once you've learned it, there's no reason to use another persistence framework for small projects. And being able to use it in Visual Studio Web Developer…

Read more

Another Approach To Use GWT With NetBeans

GWT is one of my favorite tools since it was born, but unfortunately I never had a chance to use it at work. I tested it some time ago and I loved it, but version 1.5 stands even above. I can't keep ignoring it, so I'm going to use it in my free time. I'm a GWT newbie, keep this in mind while reading, nevertheless I've organized a simple setup that I like and I wanted to share it hoping for comments and suggestions.

Most Java developers use Maven, as I do, although not always. I tried the GWT Maven plugin, it does everything, but I found it to be slow, even after it downloads everything. Since I've not found an easy way to make it run fast, I went back to Ant. The setup I'm going to describe runs faster than the Maven based one.

I tried the GWT4NB plugin for NetBeans, it works very well, but when I tested GWT for the first time, I used the tools created by Joakim Recht (GWT Task for Ant and GWT XDoclet). It looked smarter to me than using the wizards provided by an IDE. Now another…

Read more

Dissecting a Real World MeshCMS Theme

Themes are one of the most important parts of any CMS. They let users define how pages must be shown to visitors, so I want to show you how the theme of my website is written, with the hope that this can give you some hints on how to add value to your pages with MeshCMS.

First of all, a doctype is declared:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I import user information since I want to display a different footer for logged users:

<jsp:useBean id="userInfo" scope="session" class="org.meshcms.core.UserInfo" />

The tag library is imported as usual:

<%@ taglib uri="meshcms-taglib" prefix="cms" %>

Setting a default locale is always a good idea, even if you're going to use the multilanguage feature as in this case:

<cms:setlocale defaultValue="en"…

Read more

Using MeshCMS To Manage a Blog

MeshCMS has been thought to manage websites, not blogs, but I really wanted to start a blog within my site, so I created a Blog module that is currently available on SVN. Let's make clear that if you want to get a blog, MeshCMS is not the best tool around, but in situations similar to mine, where the blog is just a part of the whole, it might come handy to be able to use a single tool for all things.

The blog module is really easy to use: just create a new page and insert the blog module into it. Articles must be subpages of that page, and it is recommended to hide the submenu for the main blog page (you can do that with the Page Manager).

You can add the Comments module in the theme as a fixed module, so you don't need to insert it into each article you write. Alternatively, you can do that for each page, so you get fine-grained control about which pages should be opened to comments.

Page keywords (declared using the standard <meta name="keywords" content="..."…

Read more

Search

Tag Cloud