the world of model driven development

Epic Mendix 4 Release

May the 4th be with you came and went, and though it seemed to be a fitting date for the announcement of the next version of the Mendix modeler, it came today none the sooner and promises to be yet another smashing release.

We were provisioned with a courtesy copy of the beta, and it is absolutely packed with features. It hallmarks an array of productivity enhancements and new technology, including the ability to develop mobile-based web forms. Its one of the major highlights of the new release but in no way overshadows the countless other tweaks, enhancements and new features included with the new modeler. We find the new additions very welcome and timely, since we’re already benefitting by it in a big way.

It’s epic feature discovery and has the same kind of excitement that accompanies a new release of a Star Wars episode; for those who are fans. We won’t be covering everything in a single post, its too much to cover, so we will attempt to uncover some, if not all of the new features, in the weeks to come.

Grab some popcorn and enjoy our little fan “film introduction” we made for the Beta and go grab the Modeler and see what you can find out!

Today was a lot like when the Apple Online Store is down and the famous yellow “We’ll be Back Soon” sticky gets some web-time. It was a morning of click refresh until at last the site was back up.

After snapping out of the hypnotic effect that the new Mendix website had on us, we managed to log in and notice a huge overhaul of pretty much everything. The Public Facing website’s change is welcome. It looks inspiring and takes the game up a notch. Its not just a pretty face though; there are a lot of substantial changes inside too.

It boasts a unified platform, integrating Sprintr™ and the cloud portal into 1 unified experience. The forum still seems to be a separate entity though, but all the other portal bits and pieces are being fused together. The first thing that caught my eye after I logged in was an IM chat widget in the right bottom corner of the portal and an improvement to the layout. It feels more like an app now and looking for “the old stuff” is feels a bit like finding easter eggs.

Most importantly is the new platform. Mendix 4 has a lot of new offerings which we’ll introduce a bit later today.

Here are some of the highlights in the new release:

  • Mobile for the Enterprise
  • One Platform for All
  • Social Productivity
  • Enterprise Integration
  • App Mash-up
  • Improved Performance
  • Non-persisting entities
  • Overall enhancements, tweaks and improvements

Click here to view the official release notes.

This morning I tried to acquire a Mendix license for a project we are working on, when curiously enough the website had this message displayed. I wonder whats in store?

I know I’ll be refreshing my page the whole day, or I’ll just use that monitoring tool I wrote in Mendix to email me when they go live, or see if Mendix emails an announcement before that.

There is exactly one universal rule about all development environments, that they are all different.

In my previous incarnations I worked in a medium sized development group split into smaller teams per project, often consisiting of one developer and one analyst/tester. Working as the development management team, we investigated what methodologies we could use within the environment. After examinations of project management, agile methodologies, various other literature and the preferred management, team personalities and development styles, we ended on a project orientated, agile method. This was obviously not a formal style and will start many hearts palpatating with the risks and inconsistencies this fr-agile approach takes, but lets not go into the details of this now.

This approach worked with its own hiccups, projects were delivered and of course there was always debate on improving delivery, issues. But what this did lead me to was the world of PMI project management.

From that starting point I then got to experience some more tantalizing environments ranging from very formal waterfall to very formal scrum environments to single man teams and throw numbers at the problem development environments. And slowly my framework, as everyones does, grew.

Now where is this all going? Well, debate within an environment is always good particularly when people are open to it. One thing I have always found when discussing development methodologies though is much fear and loathing of project plans, the dreaded GANTT chart and in turn project management. Furthermore for development teams it brings back often scarring memories of waterfall.

Personally I believe the first plan of any project should be burnt just after it has been saved and only looked at when reminiscing about the past. Although not important to the actual workers involved in a project, it is a valuable tool in visualising the work which is to be performed across a company not just a single development team and in communication with the management and greater business unit.

Now this is where the biggest dangers come in, in many cases an initial single project plan is presented to management and presented as a series of static milestones, often as a static pdf. Which is ofcourse how the management interprets it and this then gets filtered through the entire company and down to the development and other teams to implement with disregard to changes. Now this is where real project management is meant to step in. A project plan, schedule or GANTT chart should be an evolving document as scope, time, cost and risks change, and should never be provided without the details of the variance which can be expected. But importantly it is the project managers responsibility to ensure the management team understands the pan and variances.

Now in the scrum environment it is very important to know where the responsiblities of the project manager fit in with the product owner, scrum master and development team. In many environments the project manager often becomes the scrum master, however, this causes a major conflict of interest as the project manager is on the line to deliver the project and can start manipulating the team based on pressure of the project to deliver rather than faciliate delivery. The project manager as a product owner doesn’t work  as the project manager cares only for the product in the terms of the project. As such any other projects or company requirements will be removed for the sake of the project. This is often no problem in a new product or single project product, but where the product services a larger company audience this will cause conflicts of interest.

This then leads many down the lines of saying a project manager doesn’t belong at all. However, these projects are not oten limited to a single product development but include multiple team coordination, budgetting, preparing a physical operations environment (call centres, marketting, retailing) as well as other legal and reporting requirements. These responsiblities are very different to the product owner as they are of limited time and scope.

With the above concerns I would say that a project manager still belongs in the environment, working very closely with the product manager and only interacting with the development team with the product managers involvement. This allows the product manager to maintain their product and team while the project manager can do their job on the project. Of course this all relies on the close relationship of these two people.

And with that here are some interesting articles for food for thought:

http://www.goodproductmanager.com/2007/09/24/product-management-vs-project-management/

Browsers can be like squirrels in winter. During theming exercises, they horde your pages and this can drive engineers nuts. Expecting your error in the obvious places isn’t always that obvious.

There was an interesting post on the Mendix Forum yesterday, that caught me out. We suspected that the designer was making an error, while back at the ranch the issue was under the nose of the engineer trying out the new theme. Caching.

When working with new themes/skins, its best practice to clear your browser’s cache before using your new Mendix theme.

Alternatively, some browsers have a feature called incognito or private browsing. This separates your browsing session’s cache from your historical cache. It is a useful feature, not only when skinning, but when you accessing secure sites, like banking or using your friend’s browser while accessing your facebook account, but don’t want to leave any private data behind in his browser’s history and cache.

Enumerations as Entities

Enumerations within most normal languages are annoying to maintain and build logic off of. In most cases I have seen String variables or manually mapped integers being used. My experiences within the system analysis, database and business intelligence combination always led me to using database table entries with business logic attributes, although convincing the developers of their benefit was not always an easy battle. But, more on that transition in another post. So in comes Mendix with a more formal, easier-to-combine into business enumeration. But as we all use them on a daily basis (or at least should be) I won’t go into diatribes about their benefits, proper usages and so on. Instead this article will revolve around a Java function entity combination we use to get around the two issues we have had with enumerations.

The first common issue we faced was associating attributes with an enumeration. Creating an entity with the enumeration as a unique attribute solves the issue. However, the problem comes in maintaining this entity when creating new enumeration values particularly across multiple environments.

The second issue we are commonly faced with is mapping web service string results into enumerations (A nightmare for anyone who has ever tried). Creating a microflow to map these manually is a terrible solution but unfortunately the one we tend towards. Not only does it create clunky technical microflows but it also creates maintenance issues.

So what do we do make our lives simpler? Well fortunately the team from Mendix have provided the reflection module a perfect spot to get inspiration from. So using this starting point we construct a Java function to be called during the start-up microflows which using code inspired liberally from the reflection module runs through an enumeration set and populates an entity and voila we have a self-building entity to run our business logic and web service mappings off of.

Now words are great but let’s not recreate work for everyone and get to an example. So here we have a module (I will work on adding it to the store soon) EnumEntityBuilder with a simple entity FruitEnumEntity add it to a play project and link the FruitEnumEntity-Overview form from the navigation. I have provided 3 buttons to play with “Build”, “Clear” and “Find a fruit”. Build runs the Java function which populates the enumeration entity, the grid on the page will provide them. The second function clears the entities so knock yourself out adding new and removing new fruits. “Find a fruit” pops up a text search dialog to emulate a web service mapping to find that elusive enumeration.

Well I hope this can help you in future projects to save time and build more robust logic. And once more here is that example module: EnumEntityBuilder.mpk.

Alerce trees live to be some of the oldest trees in their world and are considered a constant and unchanging entity within their environments. Animals and locals in the area use the older, taller trees as a mapping tool to identifying where they are located within the environment.

When modeling often functional needs might arise within the application whereby modellers need to restrict a Microflows to run on Dev or QA environments only. Some examples of cases like this might be when information or functionality needs to be stubbed, test data created or unit test Microflows run on restricted environments. In order to achieve this the application logic needs to know if it is on a Local, Dev or QA environment or not.

What seems to be the best practice so far is to create an “Current Environment” constant. This constant stores the name of the environment that the application is deployed upon. Practically it means modellers need to remember to change this constant when deploying to pre-prod or production (just as they would when changing web service address variables etc).

Essentially the current environment constant means nothing unless the following modeling disciplines are followed:

1. Creating the Constant

A single constant String “currentEnvironment” is created and placed within the downloaded community commons module simply because it’s a good place to put something common that many Microflows over the entire application will use. The String “Dev” is saved as the default value as a safe practice.

2. String Discipline

The following restricted String terms (terms defined and decided upon by the team) are used to define the environments respectively:

  • Dev
  • QA
  • Preprod
  • Prod

3. Adding logic into each Microflow 

Lastly the environment variable can then be used within Microflows as illustrated above. Here the constant can be used to check that the application is in fact deployed on a Dev box before creating test data on it.

Just like Alerce tree environment variables can give Microflows valuable information about which environment they’re on. By following these set of modeling disciplines the team ensures a higher level of quality by ensuring that Microflows are executed upon the exact environments they are supposed to be executed  upon.

To many Mendix Business Engineers branching must be a new concept since it was introduced only the other day. Under the hood though, we find a well known piece of technology familiar to people who have used some flavor of revision control before. Subversion.

In short, it helps engineers develop on their own timelines in parallel with other engineers, and allows you to go back in time when your application was in different state. Its no time machine, but its just as exciting.

If you have encountered the practice of branching and merging, you will undoubtably know that there is no magical unicorns nor silver bullet solutions when it comes to how you approach your branch/merge strategy. It depends on the composition of your team and state of the tasks at hand. There is no one size fits all, only guiding principles. Perfection is impossible, but we strive for it nontheless.

Branching

At our current client, we use a very disciplined yet agile strategy for branching. Its a combination of 1 branch per User Story, a QA branch, and a Sprint branch since we follow Scrum practices. It helps with selective rollouts in relatively short sprints. Thats alot of branches, and before you think “Great Scott!” we don’t treat it as a rule that covers all instances. Its a guideline, although conventional wisdom dictates that one stay as close to the mainline as possible. In reality Business often decides what goes into production after UAT, since they have the habit of changing course in mid flight. When this happens its harder to dissect your changes in the model from other changes, the longer time goes by.

Always begin with the end in mind. Deciding on when to branch is during sprint planning 2. The technical nature of our user stories help dictate our delivery strategy. This ceremony is where discipline and mindfulness should be exercised. In our experience, when the tyres hit the road, working with the modeler takes least of our time, planning takes time. Planning helps you to think about your delivery and gives you a realistic reference with which you can manage a client’s expectation when it comes to timelines.

Being busy does not always mean real work. The object of all work is production or accomplishment and to either of these ends there must be forethought, system, planning, intelligence, and honest purpose, as well as perspiration. Seeming to do is not doing. — Thomas Edison

Merging

In simple cases this should be a breeze, but in other cases to avoid time paradoxes and polluted timelines, merging should be a team effort. Together we check whether what we commit is correct and resolve potential conflicts there and then. The modeler details nicely what has changed in a way you can quickly navigate.

Merging to the QA branch helps us with our UAT and merging the User Story branches to the Sprint branch gives us a dry run for merging to the mainline later. The rule of thumb is, only quality code goes into the mainline. And finally before we release, a versioned build is created.

At the end of each sprint, we reflect and adapt and make some minor tweaks to the process. This is in no way an exhaustive description of what goes on behind the scenes, but this its the general drift.

Your needs might differ slightly or completely. What is your strategy? Drop us a comment.

Clicking is sometimes a drag, especially when you are on fire. You don’t want to break your momentum by taking your hands off of the keyboard to invoke some action on the screen. You need hotkeys.

I’ve watched releases of the modeler carefully, and now and then a new hotkey sneaks in without huge fanfare. Here are some that my fingers find most handy.

F5, Run Baby Run

I develop on a Mac, and leverage many of its tools, and the command-line is one of them. Sure not all Business Engineers will be power users, but sometimes you’ll find some Business Engineers need a little more umf now and then. For instance, when designing themes for Mendix, I need to make minor adjustments to my theme and apply it real quick back into the zipfile. After making these changes I cmd-tab to my terminal, hit the “up” key to get my last zip bash command, then cmd-tab back to my Mendix modeler, and hit F5. This gets repeated frequently if my design changes with many little iterations. Better yet, let me just show you 1 iteration. Notice the mouse cursor stays in one place.

Shift-F5, Stop

What goes up, must come down. Use Shift-F5 if you need to stop your server. You’ll probably use this infrequently.

F2, Garden-Variety Rename for Windows

This is a bit redundant, since you can start typing away at captions in your microflows or widgets on your forms. The only time this will be useful, is if your properties pallet has focus on another field than the Caption field.

Ctrl-Left & Ctrl-Right, Moving stuff

This one I absolutely love. Entities with lots of attributes generate grids on forms that contain a horde of columns and search fields. If only there was a way to sort them quickly. Talk is cheap. Lets see it in action.

F11, Maximize and Restore

And as you’ve seen in the previous video, F11 is a must if you work on a screen with little real estate. Use this key to maximize your workspace.

Ctrl-G, Goto Artifact

This one is handy if you know what artifact you want to navigate to within your model, without hunting for it in the Project Explorer.

Another handy trick, is using the Mouse’s middle button on the microflow canvas. Its helps you pan your view, and using the mouse wheel, helps you zoom in and out if you don’t use a Magic Trackpad™.

Productivity is like Formula1 racing. Every little improvement helps, even if it contributes a 1 or 2%. Once you try hotkeys, you will find your ergonomics improve, your fingers do the work and helps you move with incredible ease through your modeling routine letting you focus even more.

I’m burning to see more hotkeys in future versions of Mendix.

Mendix is very practical in the way it enables engineers gather requirements, then build and quickly retrieve feedback from stakeholders. Feedback is best performed through two practices:

1.Through an accelerated “build and demo” process.

2. The use of the feedback module available for free from market which enables actual users of the application to create stories directly within the application that get automatically placed on the backlog.

Use Latin in the Build and Demo Process

Normally within enterprise organizations the marketing/legal department is responsible for the copy on the application but this copy isn’t necessary available or signed off for the quick build and demo sessions (especially early on in the project). Often, if the correct copy hasn’t been delivered to the engineering team then, the stakeholder audience can become fixated on the copy instead of the valuable functionality being demonstrated – not so much when it comes to labels but more so when it comes to actual information or application instructions or messages. In these cases it’s often better to simply use Latin or more specifically Lorem ipsum. It will allow stakeholders to focus more on functionality than getting hooked on text within the application.

Are there any practical ways that you get around the incomplete copy during your demonstrations? We’d love to hear more of your thoughts on the topic.

Follow

Get every new post delivered to your Inbox.

Join 578 other followers