Matteo Di Furia

Ranch Hand
+ Follow
since Jun 20, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Matteo Di Furia

Well, actually I could, but I hoped there was a standard way to accomplish this task with core Spring configuration, without aspect, advice or pointcut (which I don't even know since I never used them)
13 years ago
Hello everyone,
I'm converting an old web application to Spring framework and I'm using annotated controllers.
In my Spring configuration xml file, I added this definition :



copied directly from a Spring tutorial.
Now, I'm looking for a way to add an interceptor to a certain set of controllers, and not to every annotated controller, but I can't find any example or documentation explaining how to do it.

I need this interceptor to be run only for some controllers (or for some urls, which is basically the same).

I think I need to configure two different handlerMapping beans, first with interceptors and the last without, and map urls on an handler or the other.

Could anyone please share a bit of light on this subject ?

Thank you everyone.
13 years ago
Hello ranchers,
I'd like to know your opinions about a fair estimation of the price of a portal like this one :

http://www.mondotrasporto.it

Please consider these few things :

1) The site is built with an eye to internationalization, so it's both in Italian and in English, but opened to be translated in many other languages. Anyway, the content of articles are just plain Italian. Internationalization of the entire content requires a direct action of those who input the articles (i.e. no automatic translation of inserted content).
2) Employees manage the content from a private area which allow to insert, modify, delete and list basically every single content type of the entire portal.
3) Some features developed on the portal : user registration, mail and newsletter, admin area, photo galleries, articles, banner system with related counters and custom search engine.

So, what would be a fair price for a portal like this one ? Either in dollars or euros.
Thank you very much for your help.

Best regards.

Matteo
14 years ago
Hi David, thank you for your reply.
Could you please elaborate more on this : "they abstract away (sort of) the chasm between objects and RDBMS data" ?
I mean, unless you use the generated orm model directly in your application (which I think would be suicidal), you still have to convert from it to your business model, so this is not a complete abstraction, since you must program this conversion by hand.
Am I wrong ? I'm still missing something.

P.S. What I wrote is valid if you use a model generated from the DB. If, instead, you config XML mappings to use your business model, you would not need a conversion layer, but you'd still need to put efforts to build XML mapping that handle your business model (hence, losing the opportunity to use generated mappings).
Hello ranchers,
I'm here to hear your opinion on a discussion I had with a colleague about ORM tools (iBatis and Hibernate).

First of all, I'd like to point out that I'm not expert on these tools, although we use iBatis at work and I read the Hibernate documentation to study it, so I'm not a complete ignorant about them.

So, I know that those frameworks save you from the pains of the persistance layer since they create and manage all the operations concerned with a database, along with all the problems concerning transactions, connection handles and so on. Using them, you don't have to write tedious and repetitive classes to save or read your model to the DB, saving you a lot of work. Or, at least, a part of it!

I say a "part" because while you don't have to bother with crud operations (unless you got some more sophisticated ones, which you probably must deal with by hand anyway), you now have to put efforts in the configuration those tools need, which can lead to manage a pletora of XML files if not more. Furthermore, it seems to me you'd also need a conversion layer to translate from your business model to the one created and managed by those tools, which usually reflects the database structure and is therefore not the best to work whit at business layer. I don't know about some tool to automate the construction of this conversion layer, although I think it would be a mess to use something like that since your business model could reach a very high level of sofistication.

In the end, what we did is move a lot of work from a part (dao classes) to another (configuration and conversion).

Which makes me loose the point about ORM tools.

So, why would you recommend to use iBatis, Hibernate or such tools ?

Thank you in advance to shed some light on this always-learning rancher.
Thanks Gregg,
I understand your point and I'm happy, at least, that mine are not the doubts of a fool ("what !? who are you to have doubts about Hibernate and such tools?!").
I think I'll take my time to test each framework and see which one is the best for me. It's my own project anyway, made in my free time, so I guess I can take all the time I need ;)

Regards.
Hi Frederic and Gregg,
I'll answer at both of you.
First of all, I'm using iBatis at work, but I'm thinking about an ORM tool for a personal project I'm developing.
What I can't get, and I discussed with a colleague about this, is what do you actually benefit from using such tools ? I mean, of course you don't have to manage by hand the persistence business and you get facilities to handle transaction and connection issues, but on the other hand you have to manage a very lot of configuration files and/or properties, along with the conversion from your model to the one generated by IBatis/Hibernate. Both these tasks must be done by hand (correct me if I'm wrong), so you're actually moving a lot of work from the classes that actually perform database operations to the files the configure them (and to converters!). I'm missing the point.
But this is another discussion that maybe should be opened in a separate topic of its own.
I was just asking what would you use between i(My)Batis and Hibernate if you were to start a project from scratch and considering you know something about iBatis but you know Hibernate is more powerfull.

@Gregg : indeed what you wrote about Groovy is impressive. But I'm always sceptical about those tools that generate so much code starting from few lines. Again, the effort you have to pay when it comes to personalize the result of such code generation (and you always need to tune or adjust something in real applications) is nearly equal to the time spent by making everything by your own (of course, using the right frameworks).
In the example I made, Spring + Webflow + Tiles let you do everything and they're great, of course, but you really have to configure everything in a lot of XML files. Stripes, on the other hand, works with just some add to the web.xml and some little more. But it's not so difficult to extend and to personalize Stripes to fit it to your needs.
Hello ranchers,
I'm seriously thinking about a complete refactoring of my web application, which is now implemented with just servlets and jsp, with the addition of business classes to perform database operations and some utility functions. I think about it because the application has grown quite a bit since its beginning and chaos is growing with it. I'd like to find a solution to this problem, although I know that it will be a long and tedious job.
So, this time I'd like to apply the so called best-practices and, of course, I'd like to take advantage of the many frameworks around to make my web app more compliant to the de-facto standards (this way, if someday someone will work on it on my behalf, he might have a chance to understand something about it).

I'm thinking about Hibernate for DB layer and Stripes as main web app framework.
And here comes my problems.
1) I'm using iBatis at office, so I know how to use it, but I've also read that Hibernate is more powerfull and more complete than iBatis. But, on the other hand, I don't know Hibernate, so I'd like to read your opinion about it, to understand if I might be better to study it or if I should avoid it.
2) I also use Spring + WebFlow + Tiles at office, but reading the Stripes documentation it seems to me you can do with it what we do with the combination of 3 different frameworks. So, what do you think about it ? Which is better in your opinion (I know that "better" has little to no sense when comparing different frameworks, just leave your two cents about this argument).
3) I've also had a look at portlets and portal frameworks (especially Liferay). What about them ? They seems quite powerfull, my main doubt is that I need maximum customization on the layout and contents of the site, and I don't know how far I could go with it. Could you share any experience about it ?

I think I'm too much confused about all these, I just would like to choose the best solutions since they all need a bit of studying to get them started.
Thank you in advance.

Matteo
Well, I'm not a PDF expert too. PDF keywords are just ... keywords. Like HTML keywords, you can insert some metatag inside a PDF to list some words related to the PDF content. Keywords are not displayed when you read the PDF with clients like Acrobat Reader, but they're still there to be managed by other clients which will need additional informations which can't be displayed in the document.
I myself found that iText allow you to set keywords in a PDF document (but only prior to write the PDF document itself), while JasperReport can't manage keywords at this moment (if the informations I've gathered are correct, this feature will be implemented in the future). Unfortunately, JasperReport is our main engine to export PDF documents, so I need to find a way to handle keywords via JasperReport somehow or, if this is not possible, to find some other libraries that allow me to add keywords to an existing document.
I still hope my search capabilities are not perfect and I've missed some topic concerning JR and keywords or some other about Java library which handle PDF documents.
I wonder why PDF has become a standard when it comes to exchange documents when it is so far from being manageable.
Hello everyone.
I'm in the need to put some keywords in a PDF file. By now, we use JasperReports/iReport as our main library to output PDF documents, and it worked quite well till today.
This new request, though, seems to be hard since I can't find documentation or examples to let me understand how to put keywords in a PDF document with this framework. Actually, I'm not even sure if this can be done at all with JasperReports.
I'd like some input about this subject, if you know if we can solve this task with JR or if we should look some other library, and in this case, which library should we pick.
I'm not asking for examples or source code (although those would be very appreciated), just an input based on your own experience about this problem would be great.
Thank you in advance for your help and support.

Regards.

Matteo.
Yes, I've planned to download some distros, try each one on a virtualized system to check all distros. When I find my preferred one, I'll burn it and try the live version of it to check if it works well on my laptop. If this works, I'll finally install it.
I also know I could use both XP and Linux (maybe best solution to maintain XP for gaming purposes), but I don't like the idea to have to re-install it every now and then to solve its problems. I was also thinking about install XP and all the software I need and then make a ghost image of it, to restore it when I see a decrease in performance, but it's kinda tedious anyway.
15 years ago
Hi Joe, thank you for your reply.
I'm actually using XP, it used to work quite good when freshly installed, but after many updates and many months, the slow down is kinda unacceptable. I want to try Linux. On my laptop, I'd never use Vista, since it's just an Intel Core 1,7 Ghz with 512 MB RAM (can't remember the video card, but I'm pretty sure it's nothing impressive).
I mainly use my laptop to program with Eclipse and run under Tomcat, watch movies and listen music. Probably a virtualized XP to run some old game (or through Wine maybe), nothing special and nothing more than this. I'd like anyway to get the best from my laptop, I think it's not that bad to do such simple tasks. I'm not interested in fancy effects or whatever, I just want a stable OS, customizable enough (I don't like unwanted stuff running out of my control), but also enough user friendly (don't want to spend hours to tune it and to control it at fine grain level).
15 years ago
Hi everybody, I'm here again to ask for your knowledge to help me with my problem.
I'm looking among the vast ocean of Linux distributions to find one that most suites me. I'm mostly interested in fast and stable distros, still maintaining a modern appeal (I like KDE and Gnome window managers).
Reading some forums, I saw many people telling that you can speed up some distros which are quite known to be not so fast (like Fedora).
I wonder what would you guys do to tune your Linux box ? At first glance, I'd start removing all those programs and daemons which I don't need. After, I could think about compile some modules to optimize them for my laptop, but I never tried such procedure and I don't really know how much improvements could it bring. Some more ideas ?
I kinda like openSuse (11.1) but I'll give a try at all the distros I downloaded in a virtualized environment, with special attention on Arch Linux, which I've been told and I've read is kinda fast.
Any more input ?

Thank you in advance for help and support.
15 years ago

John Todd wrote:I recommend Arch Linux, it is a light, fast and versatile distro but it takes some effort to configure at the beginning but it is so smooth then.



Hi John, thank you for your suggestion, I'll try Arch Linux.
Considering the low amount of RAM and the need to run programs like Eclipse, I need a distro as light as possible.
By the way, why don't you like Ubuntu ?
15 years ago
It's a Toshiba Satellite, Centrino with 512 MB RAM and 60 GB hard disk drive.
15 years ago