These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Map what?
PostPosted: Thu Aug 18, 2005 11:25 pm 
Newbie

Joined: Thu Aug 18, 2005 11:08 pm
Posts: 1
Hi,

I don't want to be mean to Hibernate users, but I really cannot understand how anyone can map object with relation. It doesn't make sense. It should be objects HAVE relations, and the relations can be described and maintained by SQL. Therefore, it seems to me Hibernate is pointless.

So all the fuss is just for persistency, and let's see what is persistency. First you get your persistent model for your business logic, and then you translate it to SQL to implement it. What is the point to add all those XML mapping stuff? Map for what?


Freakie


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 19, 2005 4:17 am 
Newbie

Joined: Sat Aug 13, 2005 4:48 am
Posts: 5
Location: Pakistan
I find hibernate useful, because in implementing projects, the most annoying work for developers is persistence. Secondly the process is always the same.

Hibernate is my first choice, as the persistence mechanism can be used with jboss as it is. Now with ejb3, the difference is very little if any.

_________________
Custom Software and Custom Website Design
Dont forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 19, 2005 4:25 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
No problem to explain.

In a complex system you will have many objects, which are related to each other. Unfortunately users have this weird idea that they shouldn't have to key in data everytime there's a power cut so they insist on persisting this data.

Now there are many methods for persisting data, my personal favourite is paying small children to inscribe the data on the side of matchsticks until they go blind. Failing that I use hibernate because there is nothing more boring than spending time writing SQL just to persist objects.

With time and effort you can do almost anything with SQL, but I don't want to spend time and effort doing dull routine nonsense which leaves me tied to a db. Or having to maintain a small mountain of SQL and constantly thinking about the associated code and security issues.


Top
 Profile  
 
 Post subject: NO SQL, of course not but HQL
PostPosted: Fri Aug 19, 2005 8:16 am 
Beginner
Beginner

Joined: Fri May 13, 2005 9:39 am
Posts: 21
Hi,
Persistence on matches is really a good idea... I'd tell my boss to buy 1 or 2 childrens.


So, you think it's boring to type SQL queries, but to perform fine tasks with hibernate, you've got to type HQL queries.

HQL is not so easy to use (I've got to learn), in some aspect, it's hard to get the result. It is not as flexible as SQL.
Secondly, if you build a good architecture (DAO, value Object, Services Object, ...) using the good old JDBC, it's not so hard to maintain.....

Hibernate, sometimes, is really to heavy.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 19, 2005 8:30 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
HQL, yeah you can use it. But strangely enough I don't seem to actually use it very much. I tend to use criteria and querying by example. But even if you did write HQL queries you still don't have the amazingly dull task of retrieving and storing objects in a db.

Yes hibernate is sometimes too heavy for trivial apps, but many of us don't write trivial apps. We write apps which take time to develop, have many complicated issues and cause us much pain. Hibernate is the ibuprofen of the movingDataBetweenDBsAndObjectsAndThingsWorld.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.