Using JRapid with Eclipse
27/08/2009. Simon Aberg Cobo
Prerequisites
In order to start using JRapid with the Eclipse IDE, you need to install Eclipse and the JRapid Plugin
- Eclipse 3.2+ http://www.eclipse.org/downloads/ (in mode Java 5+)+
- JRapid Plugin for Eclipse.(Go to http://www.jrapid.com/43--Installation--Instructions.html for instructions)
- Be registered at www.jrapid.com
Creating the project
To start working, you can choose the New JRapid project
1. Create a new project
2. Select JRapid project
Now complete your user name and password (to get a user name and password please register at www.jrapid.com). Once you do this, your projects should appear in ?Your projects? combo box. If you don?t have any created projects yet, you must go to www.jrapid.com and create a new project after logging in. Finally, choose a local name for your project.
3. Fill up the form with your JRapid username and password
When you click ?Finish? your JRapid project will be created and automatically synchronized with JRapid?s cloud. As a result, the following tree will be created in your workspace.
4. Initial structure
Building the project JRapid builds applications following Domain Driven Design. In the JRapid world, every application is made up of Entities with Properties (there are also many other advanced constructs too).
So, if you want to build and application for managing your contacts you will write in the Main.xml file of your project?s root folder the following code:.
5. Modifying your Main.xml with Eclipse
Then, save your file and generate by right-clicking Main.xml and selecting ?Generate JRapid? in the pop-up menu
6. Generating in the cloud
JRapid will generate this directory structure
- JavaSource
- Com.eclipsedemo
- Controller
- Entitities
- Services
- Dao
- Xml
- Com.eclipsedemo
- WebContent
- Forms.Main
- Help.Main
7. Generated files in Javasource and WebContent
Your application is now running on http://dev2.jrapid.com/eclipsedemo/jrapid/ide
8. Taking a look at the generated application through Jrapid?s IDE
You can also check your Person form at http://dev2.jrapid.com/eclipsedemo/forms.Main/Person_form.html
9. Your first application
More
That's the basis. JRapid gives you the power to create transient properties, conditionals, business logic and much more. Please visit www.jrapid.com for further documentation.
Conclusion
In this article we followed a short step-by-step guide for creating a JRapid project with JRapid?s Eclipse plugin. We also created two simple entities with their properties, and generated in the cloud. As a result, we got a typical JRapid directory structure. Finally, we only needed to override a Java method to add some business logic to our application.