Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!usenet.ukfsn.org!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: Java servlet on browsers: dying or kicking ? Date: Sat, 5 Jan 2013 01:32:13 +0000 (UTC) Organization: UK Free Software Network Lines: 41 Message-ID: References: <50d892e5$0$282$14726298@news.sunsite.dk> <50dbf6d1$0$80176$742ec2ed@news.sonic.net> <50dcfecc$0$292$14726298@news.sunsite.dk> <50dd5b51$0$80184$742ec2ed@news.sonic.net> <50de2260$0$293$14726298@news.sunsite.dk> <50df9c4b$0$284$14726298@news.sunsite.dk> <50e77ae9$0$282$14726298@news.sunsite.dk> NNTP-Posting-Host: 84.45.235.129 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: localhost.localdomain 1357349533 32008 84.45.235.129 (5 Jan 2013 01:32:13 GMT) X-Complaints-To: usenet@localhost.localdomain NNTP-Posting-Date: Sat, 5 Jan 2013 01:32:13 +0000 (UTC) User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Xref: csiph.com comp.lang.java.programmer:20965 On Fri, 04 Jan 2013 19:59:14 -0500, Arne Vajhøj wrote: > And using an ORM does not in any way preclude putting well let me call > it integrity logic instead of business logic in the database - > constraints, triggers and views work fine in this environment and even > SP's can work in some cases. > I agree with putting data integrity constraints in the DB - its hard to see what is better than that. The main issue I see, particularly if an ORM is involved, is the difficulty of getting user-understandable error messages back to the user who caused the constraint violation. Is this a serious issue or have I missed something, like the fact that all ORMs throw understandable exceptions? > And it is a lot easier to duplicate classes between different systems > than it is to duplicate the production database without being caught. > Agreed. I try to centralize error handling that but is often harder than it appears at first, especially if the errors should contain reason and localisation information. Providing the latter can easily distort the business logic. >> But let's say they put all the business rules in the Business Layer >> implemented in a Java or C# class. Who is going to inforce thos rules >> from PHP Perl or Python access? > > Nobody. > > In that case business rules in the database is a solution to a problem. > Agreed - provided there's a clean way to get a clear description of the error back to the user. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |