DDD
From JRapid
Contents |
Domain Driven Design with JRapid
JRapid IDE is a tool that supports domain driven design (DDD), as it offers a modeling language to represent the basic elements.
It also provides a drag and drop UI that helps non expert users making their way through the business modeling activity.
Other terms like 4GL (Fourth generation programming language) or CASE (Computer aided software engineering) tool suit the platform too.
JRapid Elements
JRapid applications are modeled through the use of entities which are compound by properties.
| An Entity represents an object. In general, entities are the nouns found in the definition of a system: products, employees, subjects, sales. | |
| Properties hold all the information for the entities and their relations with other entities. | |
| Panels are flat HTML pages that merge specific components of the application (like listings, forms, plain HTML and reports). |
Entities can either represent database tables or be just transient entities -not persisted in the database- and are usually for obtaining the front layers. Afterwards, they are used to model use cases like login, changepassword, etc.
JRapid applications can turn into real systems instead of just plain CRUDs by the use of special JRapid elements like:
Each entity can be empowered defining:
| Use Listings to list entities instances stored in the databse. | |
| A listing can specify a Subset in order to list only a restricted collection of instances. | |
| Actions link entities and properties to elements of the system: other entities, listings, javascript calls, reports, etc. | |
| Filters allow end users specify restrictions to listings. They provide all the necessary programming structure (UI elements, server side code and web services). | |
| Defaultsets assign a set of dynamic default values when initializing an entity. | |
| Listings can be embedded inside forms through Embeddedlisting. |
There are also other elements:
| Reports help JRapid developers including Jasper Report files, generating the connection to the applications database and an associated web service for easy access. | |
| Enumsets are named lists of fixed values that can be used to restrict the values of a property. |
JRapid Spec:
Learn about JRapid XML language from the JRapid Modeling Language Specification.
JRapid IDE Development Process
1. Create
The initial phase is the creative stage of the application development.
Basically, this process consists in adding entities to the model.
These entities can come from different sources:
- New Entity: Add new entity, created from scratch. User defines entity name and other attributes, as properties and other elements.
- Import from CSV/ MS Excel: Lets the user upload a CSV (Comma-separated-values) file or MS Excel spreadsheet, discovering the columns and generating the necessary entity for the underlying data model. It also imports the information stored in the file.
- Reverse Engineering DB: This tool accesses an existing database, analyzes its schema and quickly provides a JRapid model to be customized.
- Import template (from Community site): JRapid provides several pre-built modules that represent the building blocks for a quick development process: email, invoices, user authentication and login screens, and more options that grow every day through JRapid's community website.
2. Generate
The next step immediately after modifying the business model, is to regenerate the application
Regenerating the application means that all the necessary files are rewritten (although changes made by users are always preserved)
The user may choose to either generate just the presentation layer (UI generation) or to generate everything (All layers generation). The difference is very simple:
- UI generation: Generates just HTML files, so the user can quickly preview visual changes in the application.
- All layers generation: Generates all files, from Java to HTML. Invokes a project build and a context restart to reflect changes in server side code. Obviously, this option takes a little more time.
3. Manage
Each JRapid project runs in a JRapid Development Cloud
Management of this cloud is provided through a series of shortcuts available through the IDE.
Some of the actions that can be executed are:
- Preview the application in this context: Preview the current application running in JRapid Dev Cloud.
- Clean Project: Clean output directory for project and rebuild all Java classes.
- Build Project: Invoke a compilation of all Java classes.
- Refresh Context: Refresh application context in Dev Cloud's application server.
4. Deploy
JRapid also provides a JRapid Production Cloud where projects are placed once in production level.
This environment, based on a cluster of servers over Amazon EC2, represents a secure and easy way of deploying JRapid applications instantly to the cloud.
Anyway, users may prefer to download their sources or WAR's locally and deploy them manually to their own servers.
