SlideServe
Menu
Préférences
© SlideServe · v2026

Introduction to WebObjects: Building Database-Driven Web Applications

zayit avatar
12 diapositives · 243 Views · Oct 03, 2014

WebObjects is a powerful framework for developing database-driven web applications and services. With its multi-tier architecture, it allows you to build applications in various languages, such as Java, AppleScript, and Perl. This platform supports XML, SOAP, and dynamic GUI generation, enabling robust web services. Key features include clustering, a database handling tool, and a comprehensive development environment compatible with J2EE technologies. Whether you are deploying on Windows or Mac OS X, WebObjects offers scalability and faster deployment for modern web architectures.

Introduction to WebObjects: Building Database-Driven Web Applications - slide 1
01 / 12Introduction to WebObjects: Building Database-Driven Web Applications
1 / 17

Télécharger la présentation

Introduction to WebObjects: Building Database-Driven Web Applications
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. WebObjects 5 Speaker Peter Beran peedomator@gmx.net Alexis R. Rondeau alexis@veritaspuris.com Martin Köhler m_koehler@gmx.at Teaching Staff Siegfried Benkner Gerhard Engelbrecht

  2. WebService Framework • software producer • Apple • Costs • USD 699 (525 EUR) • Site: • http://www.apple.com/webobjects/

  3. Application Area • Database-Driven Web Applications • Web Services • JavaBeans Web Applications • Java Client Web Applications • JavaServer Pages and Servlets

  4. Features • Development • develop your client in different languages: Java, AppleScript, Perl and DotNet • 3-layer oriented architecture (user interface, business logic, data access) • database handling tool (creation, configuration, reverse-engineering, testing) • dynamically generated GUIs (HTML, SMIL, Swing - data-driven, multi-lingual) • XML Support • Deployment and Usage • faster deployment on J2EE and J2SE compatible server • scalability with clustering support

  5. Technologies • EJB • ORB (for example Java RMI-IIOP) • JTA/JTS (J2EE technologies) • JDBC and JNDI data sources • JSP and Servlet Support • JNDL • SOAP (WSDL generator and XML support, based on the AXIS Framework)

  6. Requirements • Operating System • Mac OS X Server v10 • Windows 2000 Professional SP3 • Database Server • Microsoft SQL Server 2000 • MySQL 3.23.51 • OpenBase 7.0.8 • Oracle 8.1.7 und 9.2.0.1 • Sybase ASE 12.5 • Applikation Server • Apache Tomcat 3.2.4 and 4.0.5 • BEA WenLogic 7.0 • IBM WebSphere 4.0.4 • Web Server • Sun ONE Web Server 6.0 SP2 • Apache 1.3.9 und 1.3.26 • Microsoft Internet Information Server 5.0

  7. Development Workflow in WO

  8. Code Examples – Web Service publicclass Calculator extends Object { publicstatic double add(double addend1, double addend2) { double sum = addend1 + addend2; return sum; } publicstaticdouble subtract(double minuend, double subtrahend) { double difference = minuend - subtrahend; return difference; } publicstaticdouble multiply(double multiplicand1, double multiplicand2) { double product = multiplicand1 * multiplicand2; return product; } publicstaticdouble divide(double dividend, double divisor) { double quotient = dividend / divisor; return quotient; } } Deploy this web service with: WOWebServiceRegistrar.registerWebService(Calculator.class, true);

  9. Code Example – Client (1) import com.webobjects.foundation.*; import com.webobjects.webservices.client.*; publicclass CalculatorClient extends Object { /** Object through which the Web service's operations are invoked. */ private WOWebServiceClient _serviceClient = null; /** Address for the Web service's WSDL document. */ private String _service_address = "http://localhost:4210/cgi-bin/WebObjects/Calculator.woa/ws/Calculator?wsdl"; public CalculatorClient() { super(); } /** * Obtains the Web service's operation names. * @return the Web service's operation names. */ public NSArray operations() { NSArray operations = (serviceClient().operationsDictionaryForService(serviceName())).allValues(); NSMutableArray operation_names = new NSMutableArray(); Enumeration operations_enumerator = operations.objectEnumerator(); while (operations_enumerator.hasMoreElements()) { WOClientOperation operation = (WOClientOperation)operations_enumerator.nextElement(); operation_names.addObject((String)operation.name()); } return operation_names; }

  10. Code Example – Client (2) /** Invokes the Web service's operations. * @param operation operation to invoke; * @param arguments argument list; * @return value returned by the operation. */ public Double invoke(String operation, Object[] arguments) { Object result = serviceClient().invoke(serviceName(), operation, arguments); return (Double)result; } /** Obtains the Web service name. * Normally one WSDL file describes one Web service, * but it could describe one or more services. * @return Web service name. */ public String serviceName() { return (String)serviceClient().serviceNames().objectAtIndex(0); } /** * Obtains an WOWebServiceClient through which service operations are invoked. * @return Web service-client object. */ private WOWebServiceClient serviceClient() { if (_serviceClient == null) { _serviceClient = clientFromAddress(_service_address); } return _serviceClient; }

  11. Code Example – Client (3) /** * Obtains a Web service-client object through which * service operations can be invoked. * @return Web service-client object. */ private static WOWebServiceClient clientFromAddress(String address) { WOWebServiceClient service_client = null; // Create the Web service's URL. URL url; try { url = new URL(address); } catch (MalformedURLException e) { url = null; } // Get a service-client object. service_client = new WOWebServiceClient(url); return service_client; } }

  12. Code Example – ClientApp import com.webobjects.appserver.WOContext; import org.apache.axis.MessageContext; ... MessageContext message_context = MessageContext.getCurrentContext(); WOContext context = (WOContext)message_context.getProperty("com.webobjects.appserver.WOContext");