CUBA Platform - an open source Java RAD framework | CUBA.platform

Meet the CUBA Platform: an Open Source Java RAD Framework

Andrey Glaschenko's picture

It has been a year and several important releases since CUBA Platform was presented to the international developers community, so in this article I would like to provide an updated overview, explaining what value it brings to enterprise software developers.

Readers will learn:

  • What is CUBA Platform and its architecture?
  • What types of solutions CUBA Platform is most efficient at?
  • How does the platform cut development time?
  • What environments can CUBA applications be deployed to?
  • How to migrate a legacy solution to CUBA?
  • What is the licensing of the platform and its development tools?

What is CUBA Platform?

To begin with, CUBA Platform is aimed at developing enterprise applications. Such applications will often require complex data models, tens or hundreds of screens, support for running various business processes, strong security requirements and so on.

So, how is CUBA Platform different from tools and frameworks already available out there? The main differentiator is that it is a high level framework. This means that it abstracts developers from underlying technologies — such as Vaadin, Spring and EclipseLink — so they can focus on the business tasks, empowered by a rich set of features and development tools. At the same time, CUBA does not restrict access to low level code, providing the confidence that the framework can be adapted to the needs of a project.

What’s under the hood?

CUBA applications have a standard three-tier architecture. The nexus is metadata — the knowledge of the application data model. First, it makes all visual components data-aware. So, for instance a table knows it is displaying certain attributes of a driver entity, and a label knows that it is displaying a date. Similarly, metadata helps visual components to talk to the data layer via ORM — defining the graph of objects which should be uploaded or updated. The same applies to the security subsystem, report generator and other parts of the platform.

The rich web UI is declarative: you define screens layout in a visual editor or XML choosing from 70+ visual components ranging from all sorts of buttons to Google Maps and dynamic charts. Then you add the initialization and event handling logic in Java controllers. Considering data aware components, you can create a sophisticated UI very quickly and it will remain easy to maintain, thanks to clear separation between code and layout. If the choice of available components is not enough, there is a facility to integrate external JavaScript, GWT or Vaadin components.

An important part of CUBA user interface is the Generic Filter — a component which allows users to create their own search conditions. A developer just needs to drop the component to a browser screen (a screen showing a list of entities) and forget about it. Users or administrators will define conditions they want to search on themselves.

All user actions are controlled by the security subsystem. The role based model controls CRUD access down to entity attributes, and even certain screen components or custom tokens which you can use in your code. Row level security helps to control access to certain data records — for example users from a regional department will only see documents created by this department. The security settings are configured at runtime in the UI of your application, so all changes can be done by system administrators on the fly. Finally, all changes to the data are logged, so you will see who changed what and when — handy for debriefing when something went wrong!

In addition to the above, CUBA provides many features out of the box, including:

  • User management and administration tools
  • Report management
  • Business process management with an integrated visual designer
  • Multilanguage interface and multiple timezones support
  • Full text search
  • Generic REST API

Where can I deploy my application?

When it comes to the deployment stage and environment options, you have a lot of freedom here. CUBA applications can be deployed in a variety of configurations, starting from a single server running everything, to highly available configurations with separate middleware and web clusters. The platform supports PostgreSQL, Oracle Database, Microsoft SQL Server, MySQL and HSQL (typically used for prototyping) out of the box, and you can switch from one to another as your project grows. It is also important that CUBA applications can be deployed to any Java EE Web Profile server, such as Jetty, Tomcat, Glassfish or Websphere. Of course you can encapsulate your application in Docker and/or run it in popular PaaS clouds like CloudFoundry, OpenShift or Jelastic.

Sounds good, so how do I develop CUBA applications?

All you need to develop applications with CUBA Platform is Java SE, XML and JPQL — which makes your application code more uniform and easier to maintain. This also makes your development team more flexible — you don’t really need a subteam of Web developers or Java EE gurus.

You create your business logic in an IDE of your choice like IntelliJ IDEA or Eclipse, but CUBA also features Studio — a supplementary visual tool which automates the whole range of CUBA-specific tasks:

  • sets up project infrastructure
  • enables visual design of UI and data model
  • scaffolds CRUD screens with multiple layout options
  • keeps DB up-to-date by automatically generating and running update scripts
  • generates stubs for handlers, services, etc.

All changes between Studio and the IDE are synchronized, so you have full freedom to choose where to make them. And to boost developer performance even further, Studio automatically hot deploys all your code except for the data model. Thus, Studio eliminates a lot of routine work and boilerplate code without restricting the tools you use to write code.

If you think of upgrading your legacy system to a modern stack, CUBA has an answer for this too. Studio features a migration tool, which will convert a legacy database to CUBA-compliant and automatically generate screens based on the DB schema. Thus you will only need to add custom screens and migrate business logic.

OK I’m almost convinced... what about licensing?

As stated in the title, the core framework is open source, licensed under Apache 2.0 with its source code available on GitHub. This means that there are no license limitations on the software you develop on CUBA. CUBA Studio is available in free and commercial editions. The free version of CUBA Studio is fully functional, but limits the size of the application’s data model. It is ideal to bootstrap a project and explore platform features. Further development may be continued free of any charges purely in a Java IDE, or you can purchase a commercial license subscription, which also includes access to Premium Add-ons: Reporting, Charts and Maps, Full-text Search and BPM. The price of annual per developer subscription starts from just $311 p.a.

Hopefully this overview gives you a good idea of what CUBA Platform is and makes it tempting to try. If so, simply go to website, download free Studio, pass the Quick Start and have your first CUBA application running in a matter of minutes!

Read more

Comments