Search code examples
javajakarta-eespring-mvcstrutsmoqui

what is the difference between moqui framework vs other frameworks



Hi Can you share what is the difference between Moqui framework vs other frameworks.Am the New of Moqui Framework.



Solution

  • As was pointed out, this is a very general question. In one of the responses it narrows the scope to a comparison with Struts, so I'll make some general comments about how Moqui is different from other Java enterprise application frameworks (and similar frameworks on other languages) and then some specific points comparing Moqui to Struts.

    Some of the general design guidelines for Moqui include:

    • No object mapping: The various tools use dynamic APIs that behave differently depending on artifacts such as entities, services, and screens. This means there is no redundant code for object-relational mapping, object-service mapping, and the various objects typically involved with defining web user interfaces.
    • No code generation: rather than having low-level tools that require verbose code and then generating that code based on some sort of artifact defining higher level constructs, Moqui just uses those higher level artifacts with flexible definitions and related API objects/methods to keep code size compact and reduce code complexity.
    • Full 3 tier architecture with a strong logic layer in addition to the UI and data layers that are common in most frameworks (or framework stacks).
    • Various advanced tools based on the artifacts for UI, service, and data elements including artifact-aware authorization (in addition to more generic authc and authz), enterprise integration connectors, rule and workflow engines (using Drools/jBPM), search based on ElasticSearch with relational data combined into documents and fed to indexes through configuration only, and much more.
    • Configuration is in files and not in the database as is the case for the frameworks of many ERP systems. This makes it more flexible, easier to expand functionality (through additional macros to interpret XML elements), and allow for template and code injection points anywhere in the artifacts (and without generating and then modifying code).

    On the page referenced in the answer from Thrash Bean there is a section comparing Moqui to Apache OFBiz, which is the project many of the concepts in Moqui came from. I am the author of Moqui Framework, and started the OFBiz project in 2001 and drove much of the OFBiz framework design.

    http://www.moqui.org/framework/index.html

    Comparing Moqui to something like Struts results in more significant differences, although they are SO different that the list isn't so long because it has to stay at a high level for compare similar concepts in the two tools.

    First, Apache Struts is a web UI framework to coordinate web requests, input processing, and ties into other tools for HTML and other (JSON, etc) responses. It is only a small part of the overall functionality that Moqui offers, as the intent of Moqui is to include everything commonly needed in enterprise automation apps (i.e. ERP, CRM, eCommerce, etc).

    Struts is commonly used with Hibernate or some sort of JPA implementation for persistent, and Moqui uses a very different approach with no object-relational mapping for persistence (the Entity Facade).

    The part of Moqui that corresponds to Struts is the XML Screens and the "transitions" within those screens that process input from requests and redirect the browser to the configured screen to respond.

    For examples of what screens and transitions look like see the Tutorial on the moqui.org site:

    http://www.moqui.org/framework/docs/Tutorial.html

    The various concepts related to screen and transition definitions start in the "Add a Screen" section and are expanded on in the "Automatic Find Form", "Add a Create Form", and "Custom Create Service" sections.

    Apologies for the long answer... it may have been better to close this question and request more specific questions. Anyway, feel free to ask more specific questions...