分享
 
 
 

OptimalJ开发的关键概念

王朝java/jsp·作者佚名  2006-01-08
窄屏简体版  字體: |||超大  

Key OptimalJ development concepts

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:

Setting up your SOLID database. For more information, see the tutorialSetting up a SOLID database

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.

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.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有