Status of StrataCode features
Status of various StrataCode components based on current testing:
- Note: some names and interfaces may change based on feedback
code-processor
- beta: parselets, java support, sc, sct, schtml formats
- alpha: modelCache (may need to clear modelCache directory from time to time)
- pre-alpha: incremental compilation (beyond using it to run an app with no file changes)
frameworks
- beta: data binding, components, properties, sync (although it's missing large collection support), java-to-js web framework (although missing some apis you might need, they are easy to add)
- alpha/pre-alpha: cross-scope bindings for collaboration, web security, request scope, server tags, merging layers of schtml
management ui:
- alpha support for existing features
- missing 'find' page, delete, more refinement overall and more customizability
intellij plugin:
- beta except for: find-usages/refactoring (feature missing inheritance, field to getX/setX mapping). Editing of layer definition files (sometimes requires an IDE restart or flush caches), debugger sometimes breaks in generated code and messes up for some block transitions, and anonymous class breakpoints only work when setting in the generated code, editing scr files
Java to Javascript
The Java to Javascript converter is a healthy beta. Because most Java code depends on runtime libraries that may not be available, it's not a seamless way to run any Java code in the browser. The test suite contains over 200K lines of Java that's converted without workarounds, JDK classes added as needed. Currently it uses the Apache java utilities which support only Java 1.6. Java 1.8 Lambdas have been implemented in the code-gen by converting to inner classes, but that conversion has not been tested due to the missing libraries.
The converter uses a relatively high level of emulation of native Java classes to keep download size manageable. It's easy to replace any class with a native version using an annotation. Right now, the code is still readable and no optimizations to remove unused code so lots of future optimization potential even though performance is not bad.
All number types in Java (int, float, Integer, etc) are converted to Javascript's single number type. A cast to an int type will insert a call to Math.floor, some features of BigDecimal are supported and it's possible to wrap those integers that really need to be integers but that works is not complete.
Currently, the entire JS app is downloaded after the page is rendered but the layered organization would be a perfect way to separate subsets of layers to be progressively loaded. Just mark layers in your stack as 'download layers' and the rest could be automated. For large client applications, you'll be able to start interacting with the app with the base layers, while successive layers are downloaded. The static type system would help manage the dependencies to be sure each individual stack defined a valid application and framework hooks installed to help provide a smooth transition from one to the next.
Futures
These are a few future ideas we have for ways to leverage StrataCode and layers:
Management UI customization for editing HTML UIs - navigate from UI to form view and code view, new tag, new attribute, resize for fixed position elements, etc. Direct manipulation of UI controls - e.g. setting styles, alignment rules, etc. right from the widget.
Layered persistence framework - plugin persistence, layer-by-layer, using code-gen to provide static type bindings with declarative and reconfigurable backends that handle the full data base lifecycle - i.e. refresh turns into a way to apply any schema changes or update data required to make that change. Use expression syntax to form 'where' clauses using the most expressive query language with best attempt to join across data stores. Leverage data binding logic for customizable aspects of queries, using a 'query template' that provides available inputs, then push that up through the management UI so it's a customizable query engine. Use this in the 'find' panel which will have options for all, matching, query-methods, and this new customizable query generator.
Built-in clustering by generating router processes, such as load balancers, request routers, load limiters with additional framework layers added to the stack. They will manage the initialization, and update of the servers necessary to support the entire system, then monitor the config files and support incremental updates and restarts for all processes. These framework layers can leverage the management UI framework to provide a holistic view of the current system that adapts as additional features are added. Unlike existing systems, no current solution can manage the overlapping concerns the way layers and StrataCode can - multiple formats, heterogeneous systems means overlapping configuration. Existing systems don't handle the refresh all the way from application code to deployment, and aren't built on frameworks that support synchronization between systems. Framework layers can leverage the best plumbing, and parallel implementations for resilience. By properly managing the complexity that exists in the overlapping concerns between application code and it's configuration, and the dev-ops code and it's configuration, and supporting the full lifecycle of code - run, update, restart and the mix of dynamic and compiled configuration support with layers this one system can change the game.
Provide a marketplace for businesses to have access to more configurable, customizable, reliable, secure software on inexpensive monthly subscriptions, rolled up amongst all the layers they use. Either deployed on-prem on any providers. Supported not by a company but by a community of trusted developers who are fairly compensated from the subscription revenue they earn by building code, and supporting layers they contribute to.