What's the equivalent of Java Beans in .net? [modified]
-
Recenlty I've been reading some articles about java beans. I wonder if there's an equivalent of Java Beans in .Net Framework and if the answer is yes what is it? -- modified at 9:18 Wednesday 8th August, 2007
I'm not too familiar with java, but very familiar with .NET. What exactly is "Java Beans" anyway?
-Matt Newman
-
Recenlty I've been reading some articles about java beans. I wonder if there's an equivalent of Java Beans in .Net Framework and if the answer is yes what is it? -- modified at 9:18 Wednesday 8th August, 2007
-
I'm not too familiar with java, but very familiar with .NET. What exactly is "Java Beans" anyway?
-Matt Newman
-
As far as I know POJO stands for Plain Old Java Objects and We have POCO (Plain old CLR objects) in .net (although they are not very old :)) I'm talking about EJBs. Thanks
-
I guess sort of yes. What I am seeing is classes that follow certain design guidelines. If you are looking for a package that can be reused you are probably looking for a dll project.
-Matt Newman
-
I guess sort of yes. What I am seeing is classes that follow certain design guidelines. If you are looking for a package that can be reused you are probably looking for a dll project.
-Matt Newman
Here's a tutorial from Sun that explains Java Beans and their usages: http://java.sun.com/docs/books/tutorial/javabeans/[^]
-
Recenlty I've been reading some articles about java beans. I wonder if there's an equivalent of Java Beans in .Net Framework and if the answer is yes what is it? -- modified at 9:18 Wednesday 8th August, 2007
From my days in working in Java, Java beans was a means of encapsulating server logic that could be called from JSP pages (later JSF pages). I believe this would be similar to a dll assembly. But, in all honesty, ASP functions very differently on the underside compared to Java server programming models (EJB,JSP,JSF...etc). Aaron
_____________________________________________________________________ Our developers never release code. Rather, it tends to escape, pillaging the countryside all around. The Enlightenment Project (paraphrased comment) Visit Me at GISDevCafe
-
As far as I know POJO stands for Plain Old Java Objects and We have POCO (Plain old CLR objects) in .net (although they are not very old :)) I'm talking about EJBs. Thanks
beatles1692 wrote:
As far as I know POJO stands for Plain Old Java Objects and We have POCO (Plain old CLR objects) in .net (although they are not very old :)) I'm talking about EJBs.
Enterprise Java Beans (EJBs) and Java Beans are entirely different beasties. As others have pointed out, the "Java Bean" spec is quite sparse and simple - it's mostly a naming contract for standardized property getters/setters for aggregate objects. Enterprise Java Beans, while still following the Java Beans spec, necessarily imply the massive J2EE architecture itself in their own existence. .NET (or Microsoft-centric development in general) has nothing along the lines of J2EE in terms of formal specification. There have been a number of attempts by MS over the years to come up with an architecture with similar goals as J2EE, but nothing has stuck (frankly, I don't think anything they've come up with has approached J2EE). You can do all the things that a J2EE app server does or allows its beans to do (connection pooling, cross-connector transactions, remote object lookup and instantiation, queuing, etc...) but it's not all tied up in the nice bow that a J2EE app server gives you.
-
Recenlty I've been reading some articles about java beans. I wonder if there's an equivalent of Java Beans in .Net Framework and if the answer is yes what is it? -- modified at 9:18 Wednesday 8th August, 2007
Beans or enterprise beans? System.Component is probably the closest equivalent to Java beans.
-
beatles1692 wrote:
As far as I know POJO stands for Plain Old Java Objects and We have POCO (Plain old CLR objects) in .net (although they are not very old :)) I'm talking about EJBs.
Enterprise Java Beans (EJBs) and Java Beans are entirely different beasties. As others have pointed out, the "Java Bean" spec is quite sparse and simple - it's mostly a naming contract for standardized property getters/setters for aggregate objects. Enterprise Java Beans, while still following the Java Beans spec, necessarily imply the massive J2EE architecture itself in their own existence. .NET (or Microsoft-centric development in general) has nothing along the lines of J2EE in terms of formal specification. There have been a number of attempts by MS over the years to come up with an architecture with similar goals as J2EE, but nothing has stuck (frankly, I don't think anything they've come up with has approached J2EE). You can do all the things that a J2EE app server does or allows its beans to do (connection pooling, cross-connector transactions, remote object lookup and instantiation, queuing, etc...) but it's not all tied up in the nice bow that a J2EE app server gives you.
Thank you
-
I'm not too familiar with java, but very familiar with .NET. What exactly is "Java Beans" anyway?
-Matt Newman
If you've ever done any MFC work, they are very similar to
CDialog
-derived classes. They are in charge of comunicating with the UI components.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
I'm not too familiar with java, but very familiar with .NET. What exactly is "Java Beans" anyway?
-Matt Newman
I am a .net Developer and with best of my knowledge about java,beans are component which hold business logic and can be used as a supporting component for main executing programme and in .net this task is accomplished by assemblies ,which hold reusable business logic i hope this helps
-
If you've ever done any MFC work, they are very similar to
CDialog
-derived classes. They are in charge of comunicating with the UI components.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Beans do not imply UI. It's more like COM objects really.
-
Beans do not imply UI. It's more like COM objects really.
Joergen Sigvardsson wrote:
Beans do not imply UI.
They do for the specific Java project that I am currently working on.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Joergen Sigvardsson wrote:
Beans do not imply UI.
They do for the specific Java project that I am currently working on.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
That's like saying "COM objects imply ActiveX, because they do for the project I am currently working on." :)
-
Recenlty I've been reading some articles about java beans. I wonder if there's an equivalent of Java Beans in .Net Framework and if the answer is yes what is it? -- modified at 9:18 Wednesday 8th August, 2007
Java beans are the equivalent of COM objects. They do not imply the presence of a GUI, business logic, databases, or whatever. The Java bean spec just says that you should be able to construct the object, initialize it through accessors (set/get), and be serializable. That's it.
-
That's like saying "COM objects imply ActiveX, because they do for the project I am currently working on." :)
The major Java GUI toolkits AWT, Swing, and SWT use JavaBeans for its components, which allows GUI editors like the Eclipse Visual Editor to maintain a hierarchy of components and to provide access to their properties via getters and setters.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Recenlty I've been reading some articles about java beans. I wonder if there's an equivalent of Java Beans in .Net Framework and if the answer is yes what is it? -- modified at 9:18 Wednesday 8th August, 2007
-
Recenlty I've been reading some articles about java beans. I wonder if there's an equivalent of Java Beans in .Net Framework and if the answer is yes what is it? -- modified at 9:18 Wednesday 8th August, 2007
beatles1692 wrote:
I wonder if there's an equivalent of Java Beans in .Net Framework
Yes. As others pointed out EJB is different than JavaBeans. The most significant aspect of "JavaBean" is the standard getter/setter implementation that allows the various IDE's (Designers) to present developers with GUI tools (PropertyGrid in .NET) to setup the component in their application. To build an equivalent to a JavaBean in .NET you include Designer implementation for your component that you develop. You can find documenation and many articles about that on MSDN.
-
Joergen Sigvardsson wrote:
Beans do not imply UI.
They do for the specific Java project that I am currently working on.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
DavidCrow wrote:
Joergen Sigvardsson wrote: Beans do not imply UI. They do for the specific Java project that I am currently working on.
Don't be silly. The project I'm working on proves categorically that they imply translation of XML schemas to Java objects, and vice-versa. How could you not know that?