-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Nasdanika Foundation Server (NFS) is a collection of OSGi/Equinox bundles providing a full stack for building Java Web applications which operate on domain models residing in CDO repositories. NFS is a framework for Domain-Driven Web development. It leverages orthogonal persistence provided by CDO, ECORE model metadata and annotations to route HTTP requests to repository objects' operations and to dynamically generate JavaScript modules facading repository objects. It also provides a documentation route which makes model documentation easily accessible through a web browser.
NFS-based applications are built with Maven/Tycho and output of the build is an Eclipse product - executable and ready for deployment.
Working on an NFS-based application developers stay focused on the domain instead of infrastructure plumbing - it reduces cognitive load and context switching, facilitates rapid experimentation and model evolution, and shortens the cycle between an idea and usable software.
In NSF-based applications Web UI is associated with model elements instead of "traditional" way of data being associated with UI through query parameters or path elements. The difference is rather profound! The "traditional" way conceptually corresponds to functional programming - application is a bunch of functions to which data is passed as parameters. The NSF approach corresponds to object-oriented programming - model elements "own" web behavior. In particular it allows to build polymorphic user interfaces, e.g. checking and credit cards account may have the same URL which renders a list of transactions, but rendering might be different.
The value of the NFS is demonstrated through the user stories of the innovator persona Pablo in which he uses NFS to help him to achieve his goals.
Disclaimer - I have good enough understanding of Spring MVC, but in no way an expert.
Criteria | Spring MVC | Nasdanika Foundation Server |
---|---|---|
Paradigm | Functional - controllers are mapped to fixed URL's and get entity ID as a parameter. Similar to functional programming - function(argument) . |
Object-oriented - entities have base URL's. Controllers (routes) are matched to entities by type and are mapped "under" entity url's. Similar to Object-Oriented programming - object.method() . |
Number of Entity Types | Single-digits or low double digits serving a particular business function. E.g. Customer, Phone, Address. Typically limited use of polymorphism. | Double digits serving the entire application. E.g. the security model alone defines 17 types. Highly polymorpic. |
Number of instances | Focuses on serving large amounts of instances - millions of customers placing millions of orders - to a large number of clients. | Focuses on serving rich models to a relatively small number of clients (workgroups, intranet applications). Number of objects in thousands and low millions. |
Repositories | Repository per entity type, e.g. Customer repository. | Typically a single repository for Connected Data Object objects. It is possible to have multiple cross-referencing repositories. |
Entities | Contain only data, e.g. Customer first name. | Contain data and behavior - EOperations. |
Controllers | POJO's identified by annotations or defined in xml files. | Java classes implementing Route interface registered as extensions or OSGi services. |
Services | POJO's identified by annotations or defined in xml files. | Model objects living in the repository and responsible for hosting behavior which doesn't naturally belong to domain objects. In the case of service objects their data is used as configuration. POJO's and OSGi services can also play a role of service. |
Security | Role-based. | Action-based because it might be difficult to define a particular set of roles for an application with a large number of entity types. Similar to OS ACL's which are kept at a file/directory level - read, write, execute... Actions can be grouped (imply relationship) and granted to users or groups. Different model classes in the model can define different actions and groupings. |
- Watch videos:
- Application Workspace Wizard- 6 minutes.
- Create and document a model - 11 minutes.
- Add web functionality by creating a route operation - 10 minutes.
- Convert the application into a single page Bootstrap/Backbone router application with 3 route operations - 11 minutes.
- Install Nasdanika Application Workspace Wizard:
- Optionally open Eclipse help and read the Wizard documentation describing how to generate application projects.
- Generate application projects.
- Start the application, open documentation in a web browser.
- Create models.
- Document models.
- Add web functionality by creating route operations.
GitHub repository of the demo application used in the videos
The bulk of the documentation is available through the documentation route of a NFS-based application.
Online documentation:
- Architecture
- WebTest - a Web UI automated testing and documentation generation framework built on Selenium WebDriver and JUnit. Take a look at a sample report.
- Server-side Java Development for Innovators - online book, work in progress.
- p2 repository -
http://www.nasdanika.org/server/repository
- Model documentation
- Archived repository
- Docker images for the Nasdanika Bank application built on the NFS.