3 Tips to Improve Efficiency through a Well-Organized Project
3 Tips to Improve Efficiency through a Well-Organized Project by Robert Bond
Retracing steps and finding important components is one of the most frustrating aspects of revisiting old work. This can apply to any type of project: home improvement (where did I leave that hammer?), personal finances (where did I leave that W2?), and even Mendix development (where did I leave that On Change Microflow?). And while I can’t help you organize all aspects of your life, I can help you navigate within the Mendix App Platform.
While it’s easy to start building your data model in Mendix, finding a page in a complex and unfamiliar Mendix app can be frustrating and time consuming. Fortunately, the Mendix platform has tools built in to help with this problem. Here are a few tips that I use to keep my project clean and my mind headache-free.
Tip 1: use the navigation tools
One of the many challenges of dealing with a complex app is knowing how to maneuver within it. This is especially important when you join an existing project—for example, when a colleague asks for assistance on a nearly completed app.
When orienting yourself to a new app in the Business Modeler, the easiest place to start is at the beginning. Navigate to the project navigation window. From there, hit ‘show’ for any menu item. This will then take you directly to the page in question.
1. Go directly to important pages from navigation
Once you have identified the starting point within the app, it’s easy to navigate to subsequent pages. On any page or within any Microflow, you can right click and select ‘Go To Microflow’ or ‘Go to Page’ to navigate to the next step.
2. Jump from page to Microflow
Using these tools, you can follow along with any app workflow or process and you can also ensure that you are following the workflow in the right order. This is especially important for apps that leverage multiple Microflows. Additionally, if you want to find where a specific component is used, right click on the whitespace within the Microflow and select ‘Find Usages.’
3. Find usages for your Microflows
If this action returns no results, it might be time to delete that page or Microflow. Perhaps you don’t need it anymore!
Related blog post: 6 Mendix Shortcuts to Create Apps Instantly
Tip 2: utilize folders for organization
If you’re like most people, myself included, then your project explorer can quickly get out of hand. After starting a new project, Mendix automatically saves your workflows and pages at the Module level, leading to one long, alphabetized, list. Before long you have this:
4. What a mess!
While there is nothing wrong with maintaining your components within a list like this, it can be difficult to find what you need, ultimately costing you time as you search through the list. Instead, try adding folders within your project explorer. What takes a few extra seconds up front to set will save you time in the long run and make it easier for your teammates to quickly ramp up on your project.
Often, I see new Mendix developers start by creating component folders, for example one for Microflows and another for Pages. This is unnecessary as the Mendix resources are already organized by picture, so Microflows and pages are easily identified in that way.
5. The wrong way
Instead, group your project by function. In this example, I have customer, Order, and Products folders further subdivided into sections. If a folder has more than 10 items, it’s probably time to subdivide further.
6. That’s a little better
Now, instead of reading a list of 100 items, you read three lists of eight items. While a small change, this is far from insignificant. Consider the time savings of reviewing this list versus the first, alphabetized list.
Tip 3: name your items
Remember, it’s important to logically name all components within your project. But it’s even more important to maintain the same naming convention across projects so that you and others can easily navigate between apps.
For example, have you ever struggled to remember if the name of the Customer creation page was ‘CUSTnew’ or ‘Customer_New’ or ‘Customer_New_Edit?’ In this scenario, you will still have to go digging through a pile of results to find what you need.
Here are a few conventions that I like to employ:
|<EntityName>_Overview||Pages that present a data grid of entities|
|<EntityName>_List||Overview page for Mobile devices|
|<EntityName>_NewEdit||Data view pages for editing individual entities|
|<Userrole>_HomePage||Starting screens for different user roles|
|<EntityName>_Detail||Page for new & edit functions on Mobile|
|<EntityName>_Select||Page for selecting from a list|
Of course, this will not cover the entire range of pages that you might produce, but it should help you get started with your own naming convention. The important takeaway is that you and the rest of your team are in sync about what to call your pages.
Some helpful conventions for naming Microflows are included in the back of the introduction training course manual, but here they are again:
|IVK_||Invoked: For any button or link|
|GET_||Data Source Microflow|
|BCO_||Before Commit Microflow|