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 section section section
.
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 TUTORIAL CREANG A NEW Project.
Note: WHEN YOUERATE CODE, OPTIMALJ PROMPTS You to Store for your Web Model. For more information, see the section Below 'generating and compling 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 ...................................... ..
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 Compiableing 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 RELESES 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.