This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / Dear Jabber, I have two questions. Please come inFirst:
What is the difference of Model and Pattern?
Second:
In which condition, we must use Entity Bean instead of Session Bean.
Thank you very much.
-canada(canada);
2001-4-8
{157}
(#42073@0)
-
Let me try...
-jabber(jabber);
2001-4-8
{1164}
(#42081@0)
-
Thanks. Come in again pleaseI think I get some from your post.
1. the content of Model is much more than that of pattern.
2. We can always use Session Bean in stead of Entity Bean. But sometimes, Session Beans is less efficient than Entity Bean.
Am I right? Thanks
-canada(canada);
2001-4-8
{245}
(#42107@0)
-
Not exactly like you stated
-jabber(jabber);
2001-4-9
{650}
(#42266@0)
-
Dear Jabber, If the business concept has record in the database, we can use both session bean and entity bean. right?So, the advantage of entity bean is that we can write less code. But it is less efficient than session bean. If we choose bean managed persistence, we still need to write database access code. in this condition, which one is more efficient, session bean or BMP entity bean?
Thank you.
-canada(canada);
2001-4-9
{287}
(#42321@0)
-
If something persist in the database, we use EntityBean to model it. Either CMP or BMP. This is a rule of thumb.By the way, I thought about your question again. I just try to say that a simple word can have different meanings in different context.
We know some patterns. MVC is a big pattern. Since it is a big one, it is also called Model 2, or MVC framework. In addition, MVC stands for Model-View-Controller and here Model means business process in the whole framework. You see, "model" has different meanings.
-jabber(jabber);
2001-4-10
{412}
(#42869@0)