29,99 €
Low-code is a visual approach to application development. It enables developers of varying experience levels to create web and mobile apps using drag-and-drop components and model-driven logic through a graphic user interface. Mendix is among the fastest-growing platforms that enable low-code enthusiasts to put their software ideas into practice without having to write much code, and Building Low-Code Applications with Mendix will help you get up and running with the process using examples and practice projects.
The book starts with an introduction to Mendix, along with the reasons for using this platform and its tools for creating your first app. As you progress, you’ll explore Mendix Studio Pro, the visual environment that will help you learn Mendix app creation. Once you have your working app ready, you’ll understand how to enhance it with custom business logic and rules. Next, you’ll find out how to defend your app against bad data, troubleshoot and debug it, and finally, connect it with real-world business platforms. You’ll build practical skills as the book is filled with examples, real-world scenarios, and explanations of the tools needed to help you build low-code apps successfully.
By the end of this book, you’ll have understood the concept of low-code development, learned how to use Mendix effectively, and developed a working app.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 292
Veröffentlichungsjahr: 2021
Discover best practices and expert techniques to simplify enterprise web development
Bryan Kenneweg
Imran Kasam
Micah McMullen
BIRMINGHAM—MUMBAI
Copyright © 2021 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author(s), nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Group Product Manager: Ashwin Nair
Publishing Product Manager: Pavan Ramchandani
Senior Editor: Senior Editor
Content Development Editor: Rakhi Patel
Technical Editor: Deepesh Patel
Copy Editor: Safis Editing
Project Coordinator: Kinjal Bari
Proofreader: Safis Editing
Indexer: Pratik Shirodkar
Production Designer: Vijay Kamble
First published: February 2021
Production reference: 2120822
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-80020-142-2
www.packt.com
To my darling, lovely wife, Ashley, the smartest, funniest best friend I have in this world, who picks me up when I need it, as well as keeping my feet on the ground when I deserve it, thank you for your endless love and motivation. To those who took a chance on me, giving me the opportunity to grow to where I am in life, thank you.
– Bryan Kenneweg
To my beautiful and supportive wife, Clarissa, thank you for being my sounding board, my idea consultant, and my hype woman. Your love keeps me striving to be a better person. To my mentor and co-host, Stephen Ledwith, thank you for the opportunities to learn and grow from my mistakes and for constantly guiding me up to the next level. To everyone who forced me to question my current position in life, which gave me the wherewithal to take the risk to move forward, thank you.
– Imran Kasam
To my incredible wife, Elizabeth, thank you for your unending support and love. Your joy and passion for life make me a better, happier person every day. Thank you for all that you do! To my boys, thank you for challenging me every day to be a kinder, more patient, and loving father and human. Your ability to provide an unending amount of craziness and pure joy is what keeps me going. Love you!
– Micah McMullen
I would be lying if I told you I discovered low-code in 2014. The truth is, low-code discovered me. After spending countless hours in the traditional software development life cycle (SDLC), I knew there had to be a better way. Fortunately, the convergence of three undeniable emerging trends sent me on a journey that is still unraveling. The trends are 1) the cloud, 2) mobile, and 3) low-/no-code. My world has never been the same. Amazon released AWS in 2006, Apple announced the iPhone in 2007, and Mendix announced the first low-code app platform in 2005.
The authors of this book have collectively worked on some of the largest ongoing low-code implementations in the world. From banking to insurance, government to manufacturing, construction to logistics, real estate to manufacturing, and everything in between. Our paths have crossed traversing the globe to assist customers, attend Mendix World, and share best practices. With Building Low-Code Applications with Mendix, you will receive a crash course in modeling high-quality, scalable, and reliable applications. This book covers the essence of what you need to get familiar with low-code and how to use it in practice.
In their presentations and examples, Imran, Micah, and Bryan demonstrate how easy it is to create an account, get familiar with the development tools, understand the core components of low-code, and how to extend solutions via REST integrations. After you complete Imran, Micah, and Bryan's book, you'll understand how to architect a data model, build reusable microflows, and extend your applications with REST services. Mastering this material transforms the recipient of the knowledge from a casually informed to a capable full-stack rapid application developer.
Mastery of these powerful tools will unlock a wide range of cloud-native, device-agnostic applications.
Beyond developing solutions for desktops and smartphones, you'll begin to appreciate how to leverage the Mendix platform to transform the way your organization thinks about IT projects and innovation. The Mendix community is an ever-growing ecosystem, and this is a great book to get you up to speed with low-code in 2021 and beyond.
Michael Guido
Chief Executive Officer, Kinetech
Michael Guido is the CEO of Kinetech, a low-code pioneer and Mendix partner. Michael is passionate about value creation, advising/collaborating with clients, architecting solutions, and leading teams to solve strategic and operational challenges across a range of industries in both the public and private sector. Prior to cofounding Kinetech, Michael worked as a strategy and systems integration consultant at Accenture before becoming the #2 USA business engineering consultant at Mendix. Michael holds a Bachelor of Science in systems engineering and a double minor in mathematics and business from the University of Virginia.
Bryan Kenneweg is a Mendix Expert certified developer, as well as a software engineer team lead at eXp Realty. He has worked as a consultant at TimeSeries and as a freelance developer. Bryan enjoys finding solutions for organizations to be more successful, a nice pint, and his family.
Imran Kasam is an independent Mendix architecture consultant who has been working with the platform since 2012. He is a Mendix Expert certified developer and Mendix MVP. Imran likes to help companies mature their engineering teams and software delivery practices. In his spare time, Imran records and produces a podcast with his mentor, called The Architect and The Executive.
Micah McMullen is a software engineer and team lead at eXp Realty. He has been working with Mendix since 2013 and is Expert certified. He enjoys solving complex business requirements with simple solutions. Outside of the office, Micah enjoys hiking, cycling, and spending time with his family.
After joining Mendix in 2010 in the Mendix project department, Rene van Hofwegen worked as a consultant on several Mendix projects. Rene shifted his focus to Mendix Academy at the start of 2011, starting with hosting and developing Mendix training courses, which extended toward the overall management of Mendix Academy.
In 2017, Rene left Mendix, leaving behind the Mendix training and certification program, as it still exists. After leaving Mendix, Rene kept contributing to the Mendix community as a Mendix trainer and coaching Mendix developers in Europe. In 2018, he was appointed Mendix MVP and received the Mendix Trainer certification.
In 2021, Rene founded the Low-Code Academy. He collaborates with Mendix, Mendix Academy, and several Mendix partners to provide the best low-code training and coaching.
Thank you for taking a look at Building Low-Code Applications with Mendix. You will take the first step in discovering what low-code is, the differences between platforms, the benefits, and what Mendix is all about. First off, low-code is exactly what it sounds like. It uses a visual platform instead of a traditional one, which allows you to build applications more rapidly by reducing the need for traditional code. Mendix is one of the leaders in this field, which we will be using throughout this book. We will take you through the basics of account creation and breaking down the interface. From there, you will be guided through app creation, all the way to storing data and creating REST services. By the end, you will have a strong understanding of Mendix basics, as well as a fully functioning application.
This book is intended for anyone excited to learn more about low-code and the Mendix platform. The content of the book will appeal to students learning about software development and computer science as well as seasoned software engineers looking to broaden their knowledge and learn a new tool. While it would be helpful for the reader to have at least minimal knowledge of computer science and software development, it is certainly not a requirement. Anyone with passion and curiosity can build applications with Mendix and we're hoping to help you get started on that journey!
Chapter 1, Introducing Mendix, goes through what low-code is and introduces Mendix and its history.
Chapter 2, Getting to Know the Mendix Platform, walks you through the Mendix account creation process, as well as the features of the Mendix platform once created.
Chapter 3, Getting to Know Mendix Studio, concentrates on Mendix Studio, Mendix's low-code web platform.
Chapter 4, Getting to Know Studio Pro, deep dives into what Studio Pro is, how to use it, as well as understanding the interface.
Chapter 5, Getting Started with Your Baseline App, helps you familiarize yourself with the Developer Portal and build a baseline app in Mendix Studio Pro.
Chapter 6, Understanding Domain Model Basics, covers the Mendix domain model and starts you building one in Mendix Studio Pro.
Chapter 7, Understanding the Basics of Page Design, introduces pages, widgets, layouts, and the Atlas UI framework to build a user interface in Mendix Studio Pro.
Chapter 8, Getting to Know Microflows, covers microflows and how to use them to create application logic in Mendix Studio Pro.
Chapter 9, Customizing Your App, discusses functions, sub-microflows, and some additional ways to enhance your application and implement custom business logic.
Chapter 10, Error Handling and Troubleshooting, explores ways to be proactive about problems and errors, which are an inevitable part of software development, and arms you with the tools to be able to dig into problems when they do pop up.
Chapter 11, Storing Data, explores how to build out your application's database. We will accomplish this by discussing various ways to associate your entities and create rock-solid domain models.
Chapter 12, Getting Some REST, looks at how connected the world is these days and the importance of understanding how to create integrations with other applications and data sources. In this chapter, you will learn how to pull data from a third-party data source using a REST call.
Chapter 13, A Review and What's Next, wraps it all up by taking a look back at all the subjects and areas we covered throughout the book!
Readers should have a basic understanding of object-oriented programming, either through experience with another language such as Java, PHP, JavaScript, and so on, or advanced usage of scripting in MS Office products or similar. Keep an open mind about the possibilities of low-code programming. Use the low-code platform to better understand and apply the concepts of object-oriented programming. Install Mendix Studio Pro and work along with the exercises in the book.
Any additional frameworks required by Mendix Studio Pro will be automatically installed when installing Mendix Studio Pro.
The screenshots and references used in this book are from version 8.18.1 of Mendix Studio Pro. Later versions of Mendix 8 will most likely be suitable to follow along in. There could be slight differences in UI/UX, but you should be able to still follow the exercises as outlined. Mendix 9 and beyond have a higher likelihood of having different layouts and design, but it is hard to say what those may be at the time of writing this book. Regardless, the principles and best practices described throughout the book do not change.
If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
Log in or register at www.packt.com.Select the Support tab.Click on Code Downloads.Enter the name of the book in the Search box and follow the onscreen instructions.Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
WinRAR/7-Zip for WindowsZipeg/iZip/UnRarX for Mac7-Zip/PeaZip for LinuxThe code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Building-Low-Code-Applications-with-Mendix. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781800201422_ColorImages.pdf.
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Once you have made a successful request to MovieDB, copy the results."
A block of code is set as follows:
length(trim(replaceAll('This is my random string','random string','')))
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Add a new JSON structure by right-clicking on the new module and selecting Add other and then JSON structure:"
Tips or important notes
Appear like this.
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packt.com.
To join the Discord community for this book – where you can share feedback, ask questions to the author, and learn about new releases, please visit http://packt.link/sfdserver.
The objective of this section is to gain a basic knowledge and understanding of what Mendix is, the reasons why you would use Mendix, and the elements within Mendix, as well as the tools you need before you create your first application.
This section comprises the following chapters:
Chapter 1, Introducing MendixChapter 2, Getting to Know the Mendix PlatformChapter 3, Getting to Know Mendix StudioChapter 4, Getting to Know Studio ProFirst off, hello, welcome, and thank you for taking the first step and joining us on this journey. This book has been co-written by current Mendix developers with over 20 years of experience. Low-code is an exciting and fresh field, and we are thrilled that you are taking the first step on your path of low-code, as well as Mendix.
This is what you should expect from this book:
Learn what low-code isLearn what Mendix isUse Mendix features, including its Studio and Studio Pro platformsCreate your own baseline appGain knowledge of domain model basicsWork with microflow basicsLearn effective troubleshootingBecome proficient at error handlingCreate REST APIsUse advanced microflowsLearn what you need, as well as how to prepare for the Mendix Rapid Application Developer Certification examWe will take you from point A all the way to Z, and by the end, you will have a strong understanding of what low-code is, what Mendix is, as well as low-code application development skills and experience. You will have created a functional application, and have all the skills needed to pursue the first level of certification through Mendix.
In this introductory chapter, we'll learn about how Mendix came into existence, and learn why so many companies have made the decision to implement low-code in their business. By the end of this chapter, you'll have learned why low-code is so different from traditional programming and will be prepared to start using Mendix yourself.
This chapter will cover the following topics:
What is low-code?What is Mendix?The term "low-code" or "no-code" did not really exist until a couple of years ago, but the concept is hardly a new one. For a while now, in enterprises as well as in small businesses, there has been the concept of a "power user" or a well-known "citizen developer," or just business users (who usually have little to no traditional developer experience) who take it on themselves to improve processes and even go as far as building whole applications. To do so, they often explore technologies such as Visual Basic for Applications, Microsoft's now legacy, event-driven programming language. Low-code tools such as Mendix expand on that philosophy, from the most tech-savvy of super developers to any average person who sees a business problem or process that a simple app could improve and solve and sets out to build it themselves.
Let's touch base more on the visual aspect of low-code development. The use of visual modeling allows you to build apps more rapidly by reducing the need for traditional code. In addition, the use of the interface to assemble and configure applications enables developers of various degrees of experience to create web and mobile applications using drag-and-drop components as well as model-driven logic. This allows developers to skip all the infrastructure and re-implementation of patterns that can and usually slow them down. The following screenshot shows the difference between visual code and traditional code:
Figure 1.1 – Visual code versus traditional code
Now that we have a clear understanding of what low-code is, as well as how visual modeling plays into it, let's take a look at the platform piece that connects everything together. The growth of low- and no-code platforms has mushroomed exponentially due to a lack of skilled developers and the need to improve the turnaround time for projects so business process problems can be solved quickly. So, generally, a low-code platform is a visual development environment that allows developers, with any degree of experience, to drag and drop application components, connect them together, and create a mobile or web app.
With a platform like this, you don't need to code an application line by line. You get to draw it out, a lot like a flow chart. This makes developing powerful new applications extremely fast. Using this modular approach allows professional developers to quickly build applications by significantly reducing, or even relieving, the need to write traditional line-by-line code.
These platforms have also enabled anyone, from a business analyst (BA) all the way to business owners, to develop and test applications. This is because they have unlocked application development from having to know anything about traditional programming languages. All developers see is a user-friendly interface that allows components and third-party APIs to be hooked together and tested. You can see some examples in the following screenshot:
Figure 1.2 – Platform examples from left to right: Mendix, OutSystems, Appian
You now should be seeing why would you take the low-code route, and that these platforms are extremely powerful. According to Gartner:
"By 2024, low-code application development will be responsible for more than 65% of application development activity."
This is the reason why low-code and these platforms exist, and why there is always going to be the need to be able to rapidly develop low-code applications.
Now that we have established an understanding of what low-code is, let's learn what the Mendix platform is and how it relates to the use of low-code.
Now that you have learned what low-code is, as well as the different platforms there are, we will now go into more detail about the one we will be discussing in this book, Mendix. This is how the Mendix logo looks:
Figure 1.3 – Mendix logo
Mendix is a low-code platform, as well as being the leader in low-code development. It provides tools to build, test, and deploy applications.
A little background into Mendix's history: Founded in Rotterdam, the Netherlands, in 2005, Mendix has been building out the platform so that businesses can go live sooner and attain success faster. In addition, on October 1, 2018, Mendix was acquired by Siemens, the largest industrial manufacturing company in Europe. This allowed integrations and improvements to happen in a short period of time. You can see the entire Mendix team in the following photo:
Figure 1.4 – Original Mendix team members, 2007
I mentioned that Mendix is the leader of low-code. Here are some key points as to why it is used by so many companies:
Cloud-native architectureCollaborative visual developmentMulti-channel user experiencesScale without redesignAble to deploy anywhereThis high-productivity platform allows the development of both mobile and web applications while keeping up the agile (like SCRUM) and DevOps best practices. Mendix even goes above and beyond, allowing business users to give direct feedback to the application, allowing important feedback to be directed to those developers who will be fixing or improving business processes.
While exploring the different low-code platforms and providers, there can be large, critical differences between collaboration and handling application life cycle management. The Gartner 2020 Magic Quadrant beautifully displays how Mendix is leading the way:
Figure 1.5 – Gartner's Magic Quadrant for Multiexperience Development Platforms
Mendix states (https://www.mendix.com/resources/gartner-2020-mq-for-multiexperience-development-platforms/):
"Mendix is the only Leader that supports all four mobile architectures, and the only one that supports the complete suite of mobile deployment options—web, PWA, hybrid, and native mobile apps—which enables our customers to leverage appropriate architecture to deliver the best mobile app for each use case".
You might also be wondering who even uses Mendix. To name a few, ConocoPhillips, Ingersoll Rand, Chubb, Canada Post, New Balance, as well as eXp Realty. These businesses saw the need to transition to a low-code environment, as well as seeing how Mendix would help them achieve their goals – goals to modernize, to engage at an unprecedented level, to innovate, as well as to automate when possible.
In this chapter, we went into to what to expect from the book. We also then dived into what low-code is, how it differs from traditional programming, as well as low-code platforms. We then explained what Mendix is, the low-code platform that we will be using and discussing further in this book. We gave some details on the history, as well as what makes Mendix different from the other low-code platforms.
In the next chapter, we will further explore Mendix, and the many features it provides. We will take you through account creation and your account overview. We will then go into the Mendix Forum, the place where many developers go to get help or ask questions. Lastly, we will look at the Mendix App Store, where many developers, as well as Mendix itself, share free apps and widgets.
Test your understanding of the concepts that were discussed in this chapter. Answers will be provided at the end of the Knowledge check in the next chapter.
The use of which of the following allows you to build apps more rapidly.a. Code
b. Visual modeling
c. Low-code
d. A calculator
True or false: with Mendix, you don't need to code an application line by line.a. True
b. False
Mendix was founded where?a. Austin, US
b. Tokyo, JP
c. Rotterdam, NL
d. San Diego, US
Which of the following is NOT a reason why Mendix is used.a. Cloud-native architecture
b. Ability to deploy anywhere
c. Scale with redesign
d. Multi-channel user experiences
What is Mendix?a. Mendix is a low-code platform.
b. Mendix is a traditional coding language.
c. Mendix is a code editor.
d. Mendix is a type of fruit.
In the previous chapter, we discussed low-code, as well as Mendix. Now that you have an understanding of both, in this chapter, we will walk you through the Mendix account creation process.
Once your account has been created, we will walk you through the available features. We will be exploring the Mendix community as well as the other options you will use once you create your account.
The main topics covered in this chapter are as follows:
Creating an accountHome page overview and breakdownApps, people, and communityMendix Forum and docsMendix App StoreLet's begin by creating an account.
To get started, go to www.mendix.com. This is the Mendix home page, but as a developer, you won't really be seeing this page; mainly, you will be logged into your developer portal, or even logged in directly to the modeler you are using. The following screenshot shows how the Mendix home page looks:
Figure 2.1 – Click "Start for free" to create your account on the Mendix home page
Now let's dive into registration. From the Mendix home page, we will start at the top right and click on Start for free. After clicking this, you will see the following page:
Figure 2.2 – First registration page
Once you land on this page, you will be asked for several pieces of information. Mendix asks for a company email. If you have a company email, school email, or even certain free emails (such as Zoho), that will be all that you need to meet the email requirements. This is because, based on the extension @exampleemail.com, you will be added to a company on the platform. Within this company collaboration, the sharing of company-related development assets and app node security rights can be managed. This makes it so that IT team within the company can support and control the Mendix app.
Next, you'll receive an email to confirm your signup:
Figure 2.3 – Email that is sent from Mendix to finish up your activation
Once you confirm your signup, there will be several more additional questionnaires and, once completed, you will be presented with the Mendix home page.
Congratulations! You have made it through the registration process, and you are now a part of the Mendix community.
In the next section, we'll break down this entire home page.
Mendix provides a lot of great resources and tools with your registration. In this section, we will take some time to explore what comes with your registration, and how it may benefit you in your future Mendix development. The following screenshot shows how the Mendix home page looks once we are registered:
Figure 2.4 – Mendix home page (after registration)
If we refer to the screenshot of the home page, we can see that we are met with a number of headings in the top section of the page. Let's quickly explore where each of these headings takes you:
People: This is where you can connect with other Mendix developers.Community: This is where you can find blog posts, jobs, leaderboards, the Mendix shop, and more.App Store: Exactly what you think it is, it's a store where Mendix and fellow developers share their widgets and apps. You are also able to connect this to your app!Academy: This is where you can find some additional training and resources provided by Mendix, as well as live classes.Forum: This is where you go if you are having issues. You may search or even post questions to the many developers all over the world. In time, you may even assist new developers with their questions.Docs: In addition to its academy, Mendix also has page upon page of helpful documentation and best practices.Now that you have a general overview of what the main tabs are about, let's take a closer look at each.
Now that you have your account created with Mendix, let's look at our first three tabs. First up, the Apps tab. In the following screenshot, you can see the different options under Apps:
Figure 2.5 – Apps is where you can view your applications, as well as applications tied to your company, and/or alias
You may have noticed that we did not include Apps
