الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

ما هي Java Beans

مغلق
بدأه msaqer في 12 نوفمبر 2002 · 3 رد · 5,398 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

لدي أسئلة أرجو الإجابة عليها

ما هي Java Beans ؟

و ما الفرق بين javaapplet and java beans

ما هو Jsp(java server page) ولماذا يستعمل.

وشكراً

#2
اقتباس
ما هي Java Beans ؟

الجافا بينز هى المقابل الخاص بلغة الجافا لتحكمات ActiveX/Com و بالتالى الجافا بينز فى ابسط صورها ماهى الا تحكمات تقوم بعمل ما و قابلة للتوزيع مما يوفر الكثير من الجهد البرمج

اقتباس
ما الفرق بين javaapplet and java beans

الجافا اليت هى برمجيات قائمة بذاتها تعمل من خلال متصفحات الأنترنيت مثا IE و NetScape بينما الجافا بينز لا تعتبر برامج بالمعنى المفهوم كما اوضحت فى إجابة السؤال الأول

اقتباس
ما هو Jsp(java server page) ولماذا يستعمل.

JSP هى احدى تقنيات الجافا لبرمجة صفحات الويب و تحمل نفس فلسفة صفحات ASP فهى تتيح لصفحاتك الوصول الى قواعد البيانات المختلفة ايضا بالأضافة الى وضعها كامل قوة لغة الجافا البرمجية فى ذلك.

لمزيد من المعلومات حول المصطلحات المختلفة راجع هذا المقال: مصطلحات الجافا

#3

Just to add to brother Khaled's reply:

JavaBeans are any object that has properties which you can access using set and get accessor.In other word,if you have an object called Student then in order for this object to be called a JavaBean ,it SHOULD have a get and set access for each data member it has.For example a student has a name,id,and address.So we can have a bean like

Class Student {

private String id;
private String name;
private String address;

public Student()
{

}

public String getId()

{
return id;
}

public String setId(String id)
{
this.id=id;
}

now write getName,setName,getAddress,setAddress using the same logic

One of the convention of JavaBeans is that the accessor method must be setXXX and getXXX where XXX is the member name.

Beans are two types Visual and Non Visual.Non visual beans are objects that do not appear in IDE like JBuilder or JDeveloper becuase they do not extend visual component.This type of Beans are usually used in JSP,Servlet and web development where you model your business objects using Beans.

The other type is visual Beans which has interface and can be plugged in any IDE like JBuilder.Once you add your bean to the IDE ,it (example Jbuilder) will recognize your bean properties and allow you to edit them using the property window.You can test that by making the class student extend a Swing component like JPanel and then drop it inside Jbuilder or JDeveloper.

If you want to learn developping visual JavaBeans then download the Bean Builder and try to explore it.

http://java.sun.com/products/javabeans/bea...lder/index.html

If you are interested in web and component development(Non Visual Beans) ,you better learn the JavaBeans convention,how to use them from JSP and servlets and finally you arrive at Enterprise JavaBeans

http://java.sun.com/products/ejb/index.html

http://java.sun.com/products/jsp/

Madani

#4

الشكر لكم

لقد استفدت من كلا الإجابتين وشكراً

هذا الموضوع مغلق.

مواضيع مشابهة