OptimalJ开发的关键概念

原创 2003年12月29日 17:28:00

Key OptimalJ development concepts

Professional, Enterprise and Architecture

To accelerate and simplify the application delivery, OptimalJ implements the Model Driven Architecture (MDA) defined by the Object Management Group (OMG). OptimalJ's model driven architecture hides the complexity of the J2EE platform and allows you to concentrate on your business application. To help you understand the key concept driving the development process in OptimalJ, read the documentation in this section Developing an application with MDA

The following sections get you started developing by understanding the key development concepts.

Setting up a project and mounting file systems

By organizing your work in the IDE into projects, you can operate on the files as a whole. For example, when you compile a project, you compile all of the Java source files in it. When you have created a project you must mount a local directory to hold the project models and source code. For more information, see the tutorial Creating a new project.

Note: When you generate code, OptimalJ prompts you to mount a directory in which to store code for your Web model. For more information, see the section below 'Generating and compiling code'.

Creating a model package structure

Model packages are used to structure a model. When you create a root model package, select a file system (a mounted directory on disk) where your models and code are to be stored. OptimalJ can generate an initial structure for your model packages resulting in the creation of a default set of child model packages. Model packages created as children from other model packages allow you to define a contentFilter property to indicate which model elements can be created within the model package. For more information, see Model package structure.

Creating model elements

You can create model elements in the Explorer window or using the graphical editors using context-sensitive pop-up menus. To add model elements, right-click a model element and choose New Child to display a list of valid object that can be added at that point. Wizards guide you through the creation process. The graphical editors also have toolbars in which you can create model elements by dragging and dropping the model elements icons onto the appropriate location on the diagram canvas.

Generating and updating models

The Model—>Generate Model and Update All Models menus allow you to generate and regenerate your models. Technology patterns are used to (re)generate the contents of a model package to transform the OptimalJ domain model to the application EJB, Web and DBMS models. Technology patterns link a source model package(s) from which you want to (re)generate a target model package. The generate wizards prompt you to select either a target or a source model package or model element.

When you choose the menu item Model—>Update All Models a wizard appears in which you must choose a model package. The model copiers are activated for the model package you choose and all its child model packages. Therefore, in the default tier structure you must choose the application node to generate the application, dbms, web, and ejb models. If you also want to (re)generate the service model, you must select a level higher. You can also select individual model packages for generation, or for example the integration model packages webservices, corba and jca.

You can also select a pattern icon, for example WEBEJBFromClassPattern, and choose Update Model in the pop-up menu to activate individual patterns. For more information, see Synchronizing model elements and Pattern nodes.

Default application model patterns

Generating and compiling code

Generate all the source code for your application using the Model—>Generate All Code menu. Code is generated into the same mounted directory folders containing your model files, except for the Web tier code. When the generator comes to generating code for the Web tier, it prompts you to mount a directory which allows you to separate the generated code files from the model repository files.

Note: In future releases of OptimalJ, you will also be able to mount a separate directory for each model to contain code.

When you update your models, you can regenerate code at model package and model element level using the Generate Codeoption in the context-sensitive pop-up menu. The generated code contains free and guarded blocks. Free blocks containing developer code do not get regenerated, thus preserving changes. The model element pop-up menu options Edit Generated Files and Edit Free Blocks in Generated Files allow you to navigate easily through the files generated for each model element.

All generated code needs to be compiled before you can run and test your application. Compile your code by selecting a folder in the Explorer [Code Model]—typically your /application folder for ejb and dbms code and the top-level folder for your mounted Web code—and choosing Compile All in the pop-up menu.

Testing your application

OptimalJ features an integrated deployment environment to test your application. Testing involves:

  1. Setting up your SOLID database. For more information, see the tutorialSetting up a SOLID database
  2. Starting your EJB server. Choose Test—>Start EJB server and select your application/ejb folder in the dialog box as the location of your deployment descriptors.
  3. Starting your Web server. Choose Test—>Start Web server and select your MainMenu.jsp (the start page of your OptimalJ application) as the main class to execute which is located in the folder where the code generated for the web model is saved.

    The MainMenu.jsp is executed and your Web application runs in your Web browser.

Elasticsearch 关键字:索引,类型,字段,索引状态,mapping,文档,白话文说

1. 索引 索引(index)是Elasticsearch对逻辑数据的逻辑存储,所以它可以分为更小的部分。你可以把索引看成关系型数据库的表。然而,索引的结构是为快速有效的全文索引准备的,特别是它不存储...
  • qq_27093465
  • qq_27093465
  • 2016年12月09日 21:35
  • 2324

web服务器 并发 基本概念

序:     这里指的服务器是指提供HTTP服务的服务器,人们通常衡量一台web服务器能力的大小为其在单位时间内能处理的请求数的多少。 3.1 吞吐率     Web服务器的吞吐率是...
  • hou512504317
  • hou512504317
  • 2016年04月10日 20:17
  • 1558

nodejs的一些核心概念

本文参考这里1. 事件循环java的同步执行模式:System.out.println("Step: 1"); System.out.println("Step: 2"); Thread.sleep(...
  • bdss58
  • bdss58
  • 2016年05月16日 22:20
  • 1526

android 蓝牙ble app开发(二) -- 关键概念,连接参数,连接请求

android  蓝牙ble app开发中 经常会遇到很多问题,这个时候就需要用到抓包软件进行分析,单单从现象上很难鉴定是设备固件端的问题,还是我们自己app写的不对的问题。这一点是做android的...
  • lckj686
  • lckj686
  • 2015年01月26日 16:29
  • 10897

Objective-C开发——OOP的一个关键概念:间接

在编程行业有句老话,大意是:“只要多添加一个间接层,计算机科学中就没有解决不了的问题。”间接这个词的含义很简单——不在代码中直接使用某个值,而是使用指向该值的指针。下面是一个真是的例子:你可能不知道自...
  • yangbo_hbzjk
  • yangbo_hbzjk
  • 2012年02月21日 16:39
  • 818

XMPP关键概念

  • 2013年08月03日 19:17
  • 27KB
  • 下载

.骆安迈-TDD-LTE关键技术及基本原理概念

  • 2014年08月26日 11:17
  • 3.94MB
  • 下载

软件工程关键概念

  • 2013年02月09日 14:44
  • 26KB
  • 下载

云计算概念_模型和关键技术

  • 2011年05月17日 10:10
  • 933KB
  • 下载

物联网_概念_架构与关键技术研究综述

  • 2011年03月15日 12:41
  • 1.09MB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:OptimalJ开发的关键概念
举报原因:
原因补充:

(最多只允许输入30个字)