NakeDObjects framework: The fastest and most resident Java program

zhaozj2021-02-16  47

NakeDObjects framework: The fastest and most resident Java program

1. Description: Based on nakedObjects.6.6 framework on nakedobjects.org. The idea is to manipulate the class and its instance to the user, not hidden after the traditional user interface. Excerpts: 'Naked objects' are core business objects, such as Customer, Product, and Order, that show directly through to the user, rather than being hidden behind the menus, forms, process-scripts and dialogue boxes that make up most user . interfaces In a naked object system, all operations are performed either by invoking a business behaviour on a particular object, editing the attributes of an object, or specifying an association between objects and download specific information can be found Framework http:. // www .nakedObjects.org / 2, compile operation example:> javac -classpath ..jar ;../lib/log4j.jar;../lib/lib/xerces.jar Classes ;. run.java 3, sample program (address book): // address.javaimport org.nakedObjects.Object. *;

public class Address extends NakedObject {private final TextString name = new TextString (); private final TextString address = new TextString (); private final TextString telephone = new TextString (); private final TextString mobile = new TextString (); private final TextString email = new textstring ();

Public textstring getname () {return name;} public textstring getaddress () {return address;} public text4tring gettelephone () {return telephone;}

Public textstring getMobile () {return mobile;}

Public textstring getemail () {return email;}

Public title title () {return name.title ();}}

// Run.javaimport org.nakedobjects *;. Import org.nakedobjects.object.ClassSet; import org.nakedobjects.utility.ConfigurationException; import org.nakedobjects.object.ObjectStore; import org.nakedobjects.xmlpersistence.XMLObjectStore; import org. Apache.log4j.category; import org.apache.log4j.priority; public class run extends defaultApplication {public static void main (string args []) {new run ();

public void classSet (ClassSet set) {set.addClass (Address.class);} protected void configureLogging () throws ConfigurationException {super.configureLogging ();. Category.getDefaultHierarchy () disable (Priority.INFO);} protected ObjectStore installObjectStore ( "throws configurationException {return new xmlobjectStore ();}}

转载请注明原文地址:https://www.9cbs.com/read-26321.html

New Post(0)