mendix application Archives - Indium https://www.indiumsoftware.com/blog/tag/mendix-application/ Make Technology Work Wed, 12 Jun 2024 09:03:51 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 https://www.indiumsoftware.com/wp-content/uploads/2023/10/cropped-logo_fixed-32x32.png mendix application Archives - Indium https://www.indiumsoftware.com/blog/tag/mendix-application/ 32 32 How Mendix can work with your Existing Database https://www.indiumsoftware.com/blog/how-mendix-can-work-with-your-existing-database/ Mon, 15 Apr 2024 11:34:00 +0000 https://www.indiumsoftware.com/?p=14884 Problem Statement In some cases, the solution needs to work with organizations who want to keep the Database separately from Mendix or want to use the existing database. 1. Solution First, it is possible to build a Mendix application and to bring your own database. But the question is how your Mendix application can work

The post How Mendix can work with your Existing Database appeared first on Indium.

]]>
Problem Statement

In some cases, the solution needs to work with organizations who want to keep the Database separately from Mendix or want to use the existing database.

1. Solution

First, it is possible to build a Mendix application and to bring your own database. But the question is how your Mendix application can work seamlessly with your existing database tables & data. The solution(s) we are discussing and elaborating here is not applicable in case the existing application is being developed with a Microservices or Service Oriented Architecture, with this architecture mostly the database operations are handled using APIs.

There are ways Mendix can work with existing database tables, but how? Each of our problem statements is different, but it can be broadly classified and sectioned into a few questions that we need to answer and identify the right approach for our problem statement(s)

1.1 Questions

1. How do we want to provide access to the database?

  • Full Control to Mendix
  • Limited access to user roles, e.g. Read only
  • Whether the production needs database administrator intervention to approve the DML statements before the application installation?

2. Are we going to share this database with other applications?

3. Are we migrating the application, which uses your current database, to Mendix?

4. Do you want to migrate Mendix database but a different database like MSSQL to Postgres using Mendix?

1.2 Indium Matrix for using Existing Database in Mendix

Below are the tools and techniques to choose from

1. Database Replication

2. Database Connector

3. Mendix Modeller Configuration

4. Database as a Web Service – REST, OData, SOAP

5. Mendix Platform SDK (Programmatic solution)

We at Indium Software put together our knowledge and experience with the simple matrix to choose the right option at given point in time based on the problem the customer faces.

 

2. Tools

Read our success story on: Diagnostics Management Application Development Using Mendix

Click here

2.1  Database Replication

Database Supported Type Category Company Support Link
RDMS Module Modules Mendix Platform DB Replication

2.1.1 About

You can use the Database Replication module to import data from existing databases into your Mendix application. You have the ability to specify the mapping for each table, column, and relationship to your Mendix domain model. Even complex mappings involving multiple table joins can be achieved. The configuration can be done either in the client or using Java.

2.1.2 Typical Use Cases

  • Convert an existing database to a Mendix domain model.
  • Integrate your programme with a database used by another programme.
  • Create mappings between database columns and object attributes
  • Map database references to Mendix object references
  • Map object attributes based on multiple joined tables

2.1.3 Features

  • Support for custom queries for object attributes
  • Compatibility with SQL Server 2005 or later, Oracle, AS400, DB2, PostgreSQL, DMS2, and Informix database systems.
  • Assistance with non-persistent objects
  • Automatic query generation for object attribute values
  • Object events are executed when importing

https://marketplace.mendix.com/link/component/160

2.1.4 Advantages

  • You can configure how you want to import the data using multiple options which gives the flexibility.
  • Easy to use.
  • Reduce the efforts of migration.

2.1.5 Limitation

  • If  you are using the Excel Importer, then  you will need Excel Importer 3.0 or higher when using this module
  • Consumes lots of memory, since all the values need to be remembered to keep the track of all the key changes
  • It commits the object even though there are no changes to trigger the events, which can overburden the app.

2.1.6 Database Sync Process (Optional)

The data is updated in both systems thanks to scheduled synchronization between your application and a database used by another application.

Typical use case, during the phases of migration of the application. We do not recommend keeping two copies of the same data. This will cause the data to be inconsistent. So, choose wisely.

2.2  Database Connector

Database Supported Type Category Sub Category Company Support Link
Mendix Guide Module Addons Connectors Mendix Platform DB Connectors

 

 

GitHub Link: https://github.com/mendix/database-connector

2.2.1 About

The Database Connector allows for a quick connection to external DBs (databases), offering you the freedom to choose from a wide range of databases and SQL dialects. This enables you to integrate your external data directly into your Mendix application without any limitations.

The connector supports below functionality to execute queries at your databases: 

  • Run (Execute) query – For executing SELECT queries and obtaining a list of objects as a result
  • Run(Execute)  statement – For executing other DML commands and obtaining either an integer or long value indicating the number of rows affected.
  • Run(Execute)  parameterized query – For executing SELECT queries with input parameters, resulting in a list of objects.
  • Run(Execute)  parameterized statement – For executing other DML commands with input parameters and getting either an integer or long value representing the number of rows impacted.
  • Execute callable statement – For executing a callable statement.

2.2.2 Prerequisites

These are the prerequisites for using this connector:

  • A database connection URL address that points to your database
  • The username for logging into the database, with respect to the database connection url address
  • The password for logging into the database, with respect to the database connection url address
  • Add necessary JDBC driver libraries (.jar files) in the userlib directory of Mendix application
    • For e.g., if Mendix app needs to establish the connection to the Cloud PostgreSQL database (jdbc:postgresql://<instance URL>:5432/postgres), we need to put the corresponding PostgreSQL JDBC driver .jar inside the userlib folder.
  • Relevant to the Execute Query action: a domain model entity that can be utilized to hold the results of the executed query
    • For instance, if you have a query such as “select name, number from stock”, which has two columns (of string and integer data types respectively), to use the Execute Query action, you must add an entity in the domain model with attributes that match the columns in the query.

2.2.3 Advantages

  • Database connector is maintained with single threaded, avoiding memory leakages
  • Ability to connect to multiple databases in a single application (a composite microservices)

2.2.4 Limitation

  • The parameterized actions are only available with Database Connector versions 3.0.0 and above. For these, it is necessary to use Mendix 8.6.0 and above.            
  • You can face memory issues for large data sets.
  • Doesn’t have any configurations on thread pool size, connection timeout, etc.

2.3  Mendix Modeller Configuration

These settings can be configured as follows:

  • Studio Pro – To access the option to connect to a database in Studio Pro, go to the App Explorer, view the App, open Settings, edit a configuration, and check the Configuration tab. select either the Default Configuration or Active Configuration to display the option.

2.3.1 Prerequisites

    • Type: Currently supported RDMS databases
    • URL:  Database URL that points to your Database with the port. For example, if you want to connect to the Cloud PostgreSQL database, :
    • Database Name: Your Initial Database
    • Use Integrated Security, Applicable only for MSSQL (Microsoft SQL Server) Database
    • The username and password for logging into the database, relative to the database URL address
    • If the database connection requires a self-signed certificate to establish the connection, then add a Certificate in Certificates Tab

    2.3.2 Advantages

    • Easy to use connection can be achieved easily by proving the details.       

    2.3.3 Limitation

    • You can connect to the databases which are available in the list, else you need to use connectors.
    • For Production in Mendix Cloud, only PostgreSQL is available.
    • To use Integrated Security with MSSQL, the Mendix application should be deployed in Windows Server(IIS)

    2.4  Database as a Webservice

    2.4.1 About

    Web Services provide a solution to the interoperability issue by enabling different applications to connect their data. With Web Services, you can transfer data between diverse applications and platforms. To allow Mendix to use an existing database, you can expose the required functionality as a Service, making it easily accessible by Mendix.

    Mendix supports the most widely used web service standards, including SOAP, REST, and OData. However, creating a wrapper for an existing database to connect with Mendix may require additional effort. The recent trend towards Service-Oriented Architecture or Microservices promotes API-based connectivity, which is effortless and efficient in Mendix.

    On the other hand, if the database is not being utilized by any other applications, it is recommended to use the Data Connector or Data Replication to fully leverage the capabilities of Mendix.

    2.4.2 Mendix Data Hub

    There are few advantages when using Database as a web service when it is exposed as OData. Mendix provides a premium service called Data Hub.

    The Mendix Data Hub Catalog is a comprehensive and open metadata repository that is based on industry standards, allowing developers and business experts to find and explore data resources within their interconnected ecosystem.

    Data Hub Connectors enable organizations to integrate their data sources with Data Hub, thereby enhancing the catalog and making the data available to developers. Connecting to data from Mendix applications, Siemens Teamcenter, SAP, and numerous other commonly used enterprise data sources can be done with ease.

    Refer: https://www.mendix.com/data-hub/

    With Mendix Data Hub you find all data that is available across your Company’s software landscape and use it in your Mendix projects.

    To learn more about Indium’s experience with low code services

    Click Here

    Share Data between Mendix Apps – Use and edit Data Assets from one Mendix app in another.

    Connect to Non-Mendix Apps – Build an OData wrapper around your non-Mendix App to connect.

    Integrated in Studio (Pro) – Use the Data Hub Panel in Studio Pro to search and use for Data Assets.

    2.4.2.1  How to use Data Hub

    Search – Finding Connectable Data Sources

    Users can find shared datasets by searching the Data Hub Catalog

    Register – Sharing Datasets

    To make the data from your apps accessible to others, you can publish the datasets as an OData service and register it in Data Hub. In a Mendix application, the datasets correspond to the Entity sets for a specified Entity

    Consume – Using Registered Datasets

    Assets that have been registered in the Data Hub Catalog can be utilized in the Mendix Studio Pro for app development. These external data sources are displayed in the domain model as external entities, which can be combined with local entities.

    Curate – Maintaining Registered Assets

    To make sure the right people find your service, you can edit app owners, add tags and descriptions, and toggle discoverability.

    2.4.2.2  Advantages
    • DataHub has versioning, so you can stick to a specific version of the data and it is not required to change after structure is changed in the parent.
      • Latest Mendix  version supports CRUD operations in DataHub, which helps to maintain a single source of truth.
    2.4.2.3  Considerations
    • There will be some rework when DataHub data version is changed. 

    The post How Mendix can work with your Existing Database appeared first on Indium.

    ]]>
    Custom Widgets and React in Mendix Platform Development https://www.indiumsoftware.com/blog/custom-widgets-and-react-in-mendix-platform-development/ Wed, 08 Feb 2023 07:56:42 +0000 https://www.indiumsoftware.com/?p=14524 Introduction Mendix is a low-code platform that enables users to create and deploy custom applications without extensive programming knowledge. It includes a visual modeler for designing and implementing business logic, as well as several pre-built modules and integrations to help speed up development. One of the technologies that Mendix uses is React, which is a

    The post Custom Widgets and React in Mendix Platform Development appeared first on Indium.

    ]]>
    Introduction

    Mendix is a low-code platform that enables users to create and deploy custom applications without extensive programming knowledge. It includes a visual modeler for designing and implementing business logic, as well as several pre-built modules and integrations to help speed up development.

    One of the technologies that Mendix uses is React, which is a JavaScript library for building user interfaces. It is often used in conjunction with other JavaScript libraries or frameworks, such as Mendix, to build modern, interactive web applications. With React, developers can create reusable components that represent the UI of a web application and manage the state of those components in a declarative and efficient way. React is well-suited for use in Mendix because it allows developers to build reusable, interactive components that can be easily incorporated into Mendix applications. These components can be used to create dynamic and responsive user interfaces that can be easily customized and updated as needed.

    Read this interesting Blog to learn more about Low-Code development: Top 10 Skill Sets for Low-Code Developers

    To do this, you can create a custom widget that wraps a React component and integrates it into the Mendix platform. You can then use the custom widget in your Mendix application just like any other Mendix widget.

    Indium offers a comprehensive set of Mendix services backed by more than 5 years of development expertise and experience in a variety of industries.

    Contact us today

    Widgets that can be plugged

    The Dojo framework was previously used to create custom widgets. Without going into specifics, I am happy to report that it has now changed. Mendix Studio Pro 8.0.0 includes a new custom widget creation method.

    The React library is used to build what are now referred to as pluggable widgets. Mendix claims that these widgets make use of Mendix APIs that are both simpler and more powerful. This includes the powerful ability to use external dependencies and instal them with npm.

    React

    Another significant advantage is React which has a lower learning curve than the Dojo guideline. React has a small API to gain knowledge, and everything else is just Java. Writing a personalised widget is comparable to writing any other React aspect. Because Mendix now uses the React under the hood, learning React is a worthwhile choice for any low-code front-end developer. Furthermore, React is well-known for its performance and scalability, making it well-suited for use in enterprise-level applications such as those built on the Mendix platform.

    How React is used in Mendix

    There are several potential use cases for using React in a Mendix application:

    1. Building custom UI components: You can use React to create custom UI components that can be used in your Mendix application. This can be useful if you need to create a specific look and feel that is not possible with the built-in Mendix widgets.
    2. Enhancing the performance of your application: React is known for its performance and efficient rendering of UI elements. If you have a Mendix application with a lot of dynamic content that needs to be displayed and updated frequently, using React components can help improve the performance of your application.
    3. Integrating third-party libraries or services: React has a large ecosystem of libraries and tools that can be used to add additional functionality to your application. You can use React components to integrate these third-party libraries or services into your Mendix application.
    4. Creating reusable components: Reacts component-based architecture makes it easy to create reusable components that can be shared across multiple Mendix applications. This can save development time and improve the consistency of your applications.
    5. Adding interactivity to your application: Reacts declarative approach to UI development makes it easy to add interactive features to your Mendix application, such as drop-down menus, modal windows, and more.

    Use cases

    In this blog we are going to see the use case of how react date picker helps in filling up the various short comings from the default in built Mendix date picker widget.

    Before we begin learning how to make a custom widget, we must first complete the following installation, which includes Mendix widget generator and yeoman:

    • Open the NodeJS command prompt from the start menu. 
    • Install the Yeoman with the following command in the command prompt. 
      • $ npm install -g yo 
    • Install the Mendix Pluggable Widget Generator with the following command: 
      • $ npm install -g @mendix/generator-widget. 

    In addition, you’ll need Visual Studio Code, a JavaScript/TypeScript IDE.

    Following the creation of the widget, we must instal the react packages for the date picker. After installing the packages, we must create a date picker with features that are not available in the Mendix default date picker. These characteristics are as follows:

    1. To disable weekdays and weekends of the calendar.
    2. To disable the past or future days of the calendar.
    3. To disable a custom list of days (for example holidays of the year) on top of the default Mendix Date picker features.

    In addition to the above features, we have implemented the on-change activity will trigger the action items in Mendix. So, whenever a date is selected the event will be triggered and based on your requirements you can call either a microflow or nanoflow.

    Still confused on Low-code or Mendix, get in touch we are happy to assist you

    Get in touch

    Conclusion

    Overall, the use of React in Mendix allows developers to build rich and interactive UIs that can be easily customized and updated as needed, helping to streamline the development process and make it easier for users to build custom applications that meet their specific needs.

    The post Custom Widgets and React in Mendix Platform Development appeared first on Indium.

    ]]>
    Third Party API’s Mendix Integration https://www.indiumsoftware.com/blog/third-party-apis-mendix-integration/ Mon, 10 May 2021 07:23:00 +0000 https://www.indiumsoftware.com/blog/?p=431 1. What is API in general? API generally stands for Application Program Interface. It creates a bridge / medium for two different software programs / units. 2. What is Third Party API’s? Let’s say that the business leaders are planning for increasing the efficiency and proficiency of their business in terms of growth. So they

    The post Third Party API’s Mendix Integration appeared first on Indium.

    ]]>
    1. What is API in general?

    API generally stands for Application Program Interface. It creates a bridge / medium for two different software programs / units.

    2. What is Third Party API’s?

    Let’s say that the business leaders are planning for increasing the efficiency and proficiency of their business in terms of growth.

    So they would create the set of processes or software programs (Server) which then it provides the service to their clients (Client) with the help of API.

    Producer:- An Entity who produces the API’s to serve their clients.

    Consumer:-  An Entity who consumes the produced API’s from their Service Provider.

    3. Advantages of Thrid Party API integration in Mendix:

    It takes more time and cost while Integrating third-party API’s in Traditional Application.

    For Instance, Implementing SSO Single Sign-On Mechanism in traditional app development ( Angular / React as a client-side scripting with NodeJS / Java / Ruby as a server-side scripting ).

    In general, to implement SSO, we need to create an application in IdP – Identity Protocol ( Like OktaLastpass, OpenIDConnectKeycloak ).

    Next Gen Product Development at your fingertips!

    Read More

    To implement SSO in the traditional application, it would hardly take 6 – 8 hours, since we need to configure those IdP credentials in SP’s – Serivice Provider’s with the help of SAML Module.

    SAML stands for Security Assertion Markup Language is an open standard for exchanging authentication and authorization data between parties, in particular, between an identity provider and a service provider.

    Whereas in mendix, implementing an SSO Mechanism is a low-code platform, so by integrating MxModelReflection, SAML Mendix App Store modules and Mendix defaults actions and java actions.

    By making use of SAML Module we would be easily able to configure the IdP details.

    4. Processes and Challenges while implementing OKTA Third-party  API in Mendix:

    1. Scalability of Mendix application always rely on the service team and quite frustrating to get in touch with the Mendix providers
    2. Frequency of updating the modelers
    3. One needs to get always touch with the technology in order to standardize your collaboration with the API

    Let’s see the sample Mendix – SSO Application creation with the help of OKTA Third party API.

    Required Modules:

    1. Mx Model Reflection
    2. SAML 2.0
    3. Okta account https://www.okta.com/

    SSO Process flow diagram:

    Mx Model Reflection setup

    1. Create a mendix application.
    2. Add “Mx Model Reflection” from mendix app store

    (Note: Mx model reflection is necessary for SAML to operate)

    SAML Module setup:

    1. Add Mx model reflection module.
    2. Add “SAML 2.0” module from app store.
    3. At this point 2 errors will be displayed.
    4. Click on the first error and go to the page -> right click -> properties -> master layout -> Change to (Model pop Layout).
    5. Drag the “Main” to the Main sector and delete the content header.
    6. Goto Navigation -> new item -> On click -> Call a micro flow ( select the micro flow SAML20 / _USE ME  / Examples / Open configuration) this is where the saml can be configured.

    Check out our articles on Mendix

    Read More

    SAML Configuration at Runtime:

    1. Run the application
    2. From the navigation select   “Open Configuration” tab
    3. Click “SP Configuration” tab and  Enter the details as per the Organization information. Eg: Organization Url: http:localhost:8080/
    4. Copy the Entity id .
    5. Click Save button to save the details.

    Okta – App creation:

    1. Sign in to okta.com as developer.
    2. Go to Admin section   -> Click “Applications” tab
    3. Click Add Applications – > Create new Application -> Select   SAML 2.0 application
    4. Provide an application name and logo
    5. In SAML settings Provide the following details
      1. Single sign on url: Organization Url.
      2. Audience URI (SP Entity ID) :  Paste the Entity id copied from SAML Configuration.
      3. Provide the attribute details as

    FirstName and select user.firstName from drop down.

    LastName and select user.lastName from drop down.

    Email and select user.email from drop down.

    1. Click the radio “I’m an Okta Customer adding an integrated app
    2. Select APP type as “This is an Internal app that we have created “
    3. Click finish to save the details.

    Settings:

    1. Now, the new page would be opened which would have four tabs such GeneralSign onImport and Assignments.
    2. Under Sign on tab, there would be a link for identity provider metadata and copy the url.
    3. Click Assignments tab, select people from assign dropdown.
    4. Click assign and save, then go back.
    5. Click done.
    6. Example of Identity Provider Metadata URL

    https://dev-804898.oktapreview.com/app/exkh2rs4qvdWFSItr0h7/sso/saml/metadata

    IdP Configuration:

    1. Run the Mendix application
    2. Click Open Configuration
    3. Click new in IdP Configuration
    4.  Click ok for the information pop up displayed and click next button.
    5.  Enter any name as alias name
    6.  Paste the metadata URL in the textbox click next
    7. Check “Allow Idp Initiated Authentication and click next
    8. Leave the IdP attributes as “IdP Provided ” and click next
    9.   No need to select anything click next
    10. Click Submit.
    11. Select the IdP and press “toggle active” tab.

    That’s it. Here we go, save and run the application.

    and check the url : https://localhost:8080/sso/

    It just takes hardly 45 minutes to 1 hour, and it saves around 5 – 7 hours approximately when comparing to traditional app development. That’s the beauty and impact of Mendix.

    Tools for Mendix integration

    To handle integrations, Mendix offers a wide array of tools:

    Message definition – Specify the messages that are being exchanged with external systems.

    Mappings – Leverage visual specifications on how to translate external messages from and to entities in Mendix applications.

    Web services – Microflows should be published as web service operations, with external web services called from microflows.

    REST services – Microflows and entities should be published as REST resources and operations, with external REST APIs called from microflows.

    Database integration – Database connector in Mendix enables to configure direct JDBC connections to your chosen database to execute stored procedures and SQL queries.

    Leverge your Biggest Asset Data

    Read More

    Conclusion

    This blog post covers implementing 3rd Party API’s Mendix Integration. This offer’s a number of unique advantages over more traditional development.

    Furthermore, we have demonstrated that Mendix application deployments could be much simpler than ever expected

    The post Third Party API’s Mendix Integration appeared first on Indium.

    ]]>