Environment Badges


Blog_image_Environment_Badges
I’m sure you have, or at least know of somebody who has, accidentally done something in a production environment while thinking he was on acceptance or development. It is that kind of event that precedes the “oh-no” moment. The damage has been done and theres nothing left to do but come out with it and confess your sin. You already feel like a dingbat and the scum of the earth and if there was only a way of avoiding it you would do it.

Human error is a resilient thing and no matter how hard we try to prevent it its unreasonable to absolutely escape its interfering menace. Its wherever we go, yet sometimes a simple nudge can dodge the blow. Its the difference between a “q” and a “p” (QA and Production).

This is why we’ve created the Environment Badges widget available in the Appstore. It gives you a visual cue for what environment you are currently working in.

Its simple to install and very useful. It dresses your page with a badge on the top right corner of  your Mendix app in different colours for each environment, namely Development, Testing, Acceptance and Production with a bright red badge. Now you know when to mind your p’s and q’s.

Incase you want to see how we developed this widget, here is a sneak peek.

[jwplayer mediaid="895"]

Tagged , , , , ,

5 Friends of Mendix and Beyond


Interview

Mendix World 2012 was a defining moment in my life. Using one of the hottest delivery platforms out there is one thing. It is even far more enriching to engage the culture behind it. Behind the Business Modeler are the inspiring young individuals and minds who make it their work and duty to craft the kind of tools and methodologies that make being a business engineer a pioneering and pleasant experience.

At the Mendix World 2012 conference we chatted with various members of the Mendix community, corporate professionals, business men and technologists from all over the world. The conference had a TED-Talk flair about it with close to a 1000 attendees. We loved the keynotes delivered by Derek Roos, Johan den Haan, Arjen Hoekstra, Jouke Waleson and Arjan.

After hearing about all the amazing milestones on the roadmap for Mendix 5, Derek and I had a chance to sit down with 5 Mendix R&D wizards to interview them. That was the proverbial cherry on the cake. We walked away with some insights and the history behind developing the modeler. Personally, I don’t believe there is enough space to cover everything in a single blog post, so I will venture for the sake of brevity to give a synopsis from what we took away from the interview.

Arjan – The Taoist of modeling

Father and an idealist, Arjan joined Mendix during 2007. He drinks tea, has a sense of humor and is an Apple fan. He is the eldest of the business modeler triumvirate and is known as the weeping developer, whose tears wipe away bad design and makes the world a better place. He helped progress Mendix from a Java system to the Microflows we know and love today. Since then, Arjan has moved on and is currently developing the Ajax-stack of Mendix and hope he will apply some of his magic there too.

Benny – He who smiles

Yes, Benny wins the award for smiling. Maybe he knows something we don’t but Benny is a positive guy, and is Arjan’s old Modeler partner.  He sees himself as a realist and also joined Mendix during 2007 and loves the book “Wheel of Time”. I cannot overstate his good attitude and his willingness to be helpful.

Remy – Best Dave Grohl look alike

Remy is a youngster, but if you think he’s wet behind the ears you’ll be surprised. Remy has some experience at Google is a sound Agile Methodology purist. He advocates by the book practices and helps offset some pragmatic members in the dynamic. He is the 3rd Modeler man, and since he has worked at Google he is what we call an anti-Apple fan-boy. We still like you Remy.

Edit: I didn’t have my facts quite right. Remy received a job opportunity from Google, but decided it would be cooler to work for Mendix. Sorry about that Remy.

Sjoerd – The Rocket Scientist

Yes, you heard right. Sjoerd is a Rocket Scientist who decided he would rather apply his rocket-building skills in taking business engineers to the moon rather than astronauts. Thanks Sjoerd. He is an interesting individual who once he gets going makes you wonder if he isn’t plugged directly into the internet. A realist who is able to converse on a million topics to incredible detail and depth, you can’t say he doesn’t have an opinion.

Robert van ‘t Hof – A tall order

No, not the tennis player. As far as I could judge, Robert was the tallest of our company. A lot of people in Netherlands are, but some are taller than others. Some say he is so tall that he experiences his own weather system up there. Robert is a reserved guy and works as the Community manager for Mendix in the Hague. Joined Mendix round about 2009/10 and sees himself as a realist too.

The Nuclear core

The R&D department is small, but is steadily growing larger. So far the core could remain small, but as is expected with a growing business, the core of devs are growing but they are growing organically. We asked them a few questions around leadership and they believe that heated confrontations with merit-based arguments are good. Between the mix of idealists and realists you’ll find that ideas are bigger than egos and everybody respects that.

XKCD, Eric Lippert and Fabulous adventures of Coding are amongst the literature they enjoy. Some even read South African novels, which makes us proud. They are a mix of C# and Java developers, but use far more than that.

Our overall impressions were that this core group of geeks, are sound and solid. Their focus is on a polish and product; not short-term gains. They really are passionate about what they do and learn from their own past mistakes, and more importantly from others’ experience, like Apple, Amazon and Google. They gave us an account of  when its time to “kill your darlings“; the story about the original Mendix 3-Beta and how Agile Methodologies require more discipline than Waterfall and why focussed targeted releases are paramount.

Johan Den Haan expressed his faith in R&D team and told us afterwards that he feels very confident and proud in them. His engineers take a lot of initiative and are highly innovative individuals.

Special thanks to Dexx for my MxGeek T-Shirt, Michel a fellow Chesterton-fan, Dennis the DJ, Martjin, Jornt, Fedor and everybody else we met at MendixWorld’12. Hope to see you all this year again.

Tagged , , , , , , ,

reCaptcha the glory – The reCaptcha widget

8a957f42804b11e2bb0f22000a1fbc94_7Over a year ago, we developed an online application that needed to validate internet users as human beings. We used the Captcha widget from the Mendix Appstore, developed by Mansystems. It was a straight forward Captcha widget and was very simple to implement.

Unfortunately, the widget wasn’t secure enough as it only presented a fixed sequence of images for every challenge. This meant that our application could easily be exploited by gargoyles and goblins and other things that go bump on the internet.

 

What to do?

For the first time we had to dig into code for a long while. What was interesting however was how relatively easy it was to develop a widget to replace the old one, allowing me to reCaptcha some of the glory of  the Javascript writing days. It was my very first Mendix widget, and if you have some Javascript skills you would find it easy enough to figure out.

reCaptcha’s purpose is to prevent unlawful or opportunistic access to your applications on the internet by other computer programs like scripts or bots. reCaptcha for Mendix is secure, because Mendix does the challenge request on the server-side using a servlet handler over a secure connection.

There is a Gotcha

One thing to keep in mind is that during the latest versions of the Modeler 4, some Cloud-ready security features have been introduced that will prevent you from accessing external links server’s side, rendering the Mendix servlet handler incapable of contacting reCaptcha.net to validate your input.

Give your Mendix app access to on port 442 for secure connections to the reCaptcha services by entering the following line in your .policy file, either in your deployment folder or Mendix installation:

permission java.net.SocketPermission "api-verify.recaptcha.net:443", "connect";
Tagged , , , , ,

The little things are infinitely the most important

The_little_things_are_infinitely_the_most_important

On Nudging

In UX-design there is a movement which I like to call the Nudge Philosophers. Nudgers believe that utilitarian interfaces are bad, like a police state or an anti-virus application. Software should impose as little forced workflow and restrictions as possible. It frustrates end-users. Rather invest in building hints or guides that make sense and make life easier.

A real-life example. Think about the lines painted on floors, walls or even ceilings of subways and parking basements. They help us reach a destination without imposing physical restrictions on where you can go. It merely nudges us on and sometimes has the side-effect of prettifying our environment in the process.

Metadata images on entities

Craftsmen are often overlooked in the fine detail of their craft, and its not until one day in a leisurely mode that you stop to notice it. The domain model editor inside Mendix has an overlooked feature, called Image. It is found on the entity itself. Images serve no functional purpose other than it being an aid to business engineers.

Screenshot_2013_02_23_7_02_AM

Adding images to your entities not only makes your entity unique, but the real magic comes out the moment you retrieve entities in microflow actions. Having visual cues are extremely useful. They help our eyes find and map the implicit logic in our heads much faster than having to map it out by reading what is in front of us. Especially with entities that are either spelled the same, or look similar.

Proof of the pudding

Lets take a domain model with 3 entities as a simplified example:

Screenshot_2013_02_22_2_26_PM-3

 

Now, see an example of selecting an entity:

Screenshot_2013_02_22_2_30_PM-2

 

Or searching within associations:

Screenshot_2013_02_22_2_31_PM-2

 

It has long been an axiom of mine that the little things are infinitely the most important. –Sherlock Holmes

Notice how quickly your eyes are guided to the right entity. It is the small things that, though not necessarily adding business value, that make us WANT to use software systems. Thats why we have an affinity to which phones we choose, or which applications we want buy. Interfaces matter, and nudging is an aesthetic opportunity to add value without being imposing or controlling. It is the “I want to” factor that makes or breaks our product.

We care about how something works, because we can appreciate the care invested in them; and not merely what it does. As Peter Thiel puts it ”there are two types of secrets: those about nature and those about people.” Thiel dismisses the former as less interesting because they are less practical. “No one really cares about superstring theory. It wouldn’t really change our daily lives if it turned out to be true.” If my day-to-day job on the other hand was made better by a small change, that would make a huge difference.

The modeler inspires me to think differently. Try thinking about nudging when you develop your next UX.

Tagged , , ,

Model Driven Development, a brief introduction

attribution:ParkeHarrison Architects

This article appeared first in ITWeb late 2011

 
Over the years, I have been an evangelist for new development languages and approaches to attain the holy grail of development.  One aspect of this was to create tailor made solutions that are agile with an architecture that allows changes in one place, validated and checked, able to respond to the dynamic nature of the business. However, the dominant software development paradigms today are designed to create software with a robust and scalable architecture.
The current mainstream paradigms do not distinguish on the dynamic nature of business but are designed to produce the likes of Microsoft Word, Apple Keynote and other pieces of software we use daily.  The Object Oriented approach with its Model View Controller pattern is widespread in both the .NET and Java and form the backbone of most software developed today.  This paradigm has its strengths in its structure and architecture but has its limitations to respond to the dynamic nature of business. The time for the next wave is long overdue, the mainstream OO paradigm has been with us from the early 90′s and the time is ripe for the next reformation and renaissance, to build something new that uses the best of the older established approaches.
Innovators that understand where to use the new will reap rich benefits of happy clients and increased profits.  Correctly applied, model driven development promises reduced time to market, reduces key man dependencies and should provide all the buzzword compliant advantages touted in total cost of ownership, reduced risks, return on investment etc.

The past decades have seen many new advances in programming paradigms, namely structured programming, procedural development, object oriented development and with that the Model View Controller pattern. A few new upcoming paradigms finding its way into commercial software development includes Functional Programming (FP), and now Model Driven Development (MDD). These also correlate with either a declarative or imperative approach.
We believe that the move for business software is towards declarative development where we specify “what” has to happen and leave the “how” to models and best practices.  For instance, in FP, matrix multiplication is “parallelized” without the developer having to specify how it is done (the locking, partitioning, threading and transaction management etc.)  Another example: In a process flow, we specify that an entity has to be updated, how the transaction management does that with data base connection pooling, thread management, locking, rollback, security etc. is of little concern to the business engineer albeit critical for IT.  MDD delivers the methodology and technology required to attain that though a set of Domain Specific Languages (DSL), each tailored to the problem they solve.

Our research shows that currently, most business owners are frustrated at the speed IT can deliver solutions.  Surveys show that IT/development departments are typically late and over budget to deliver systems that do not quite meet the need.  Currently typical implementations are measured in months and still follow an inherently water fall approach (mixed in with Agile and iterative “speak” rather than action).  We change that to bring implementation down to days and weeks and fully implement a truly agile pipeline through implementing the Scrum methodology as part of MDD.

I strongly believe that MDD will be the wave of the future and progressive systems will be developed this way between two to five years from now.  With “progressive systems” we imply systems suited to the approach, which is varied and many but excludes embedded systems and complex modeling engines as these domains still have to be packaged in models with DSL’s.  Systems that fit are those that tie a number of systems together to provide the interfaces, work flow, process flow, security and delivery via the web.  Model driven development provides a number of Domain Specific Languages to rapidly deliver solutions at a speed of two to fifty times quicker than the current mainstream methodology.  Other notable advantages of MDD are:

1) Fast skilling up of competent staff to take over maintenance of systems developed
2) Reduce key man dependency and decreases dependence on highly technical resources that know everything about AJAX, HTML, CSS, XML, SOAP, data base connection pooling, transaction management, security etc.  and changes this to a dependence on people that understand the business.
3) MDD provides documentation implicitly i.e. modeling is the basis of the solution and we do not have to update a set of documents at large costs that tend to be outdated as soon as they are printed.
4) Deliver solutions at the speed of business.
5) Provide skills transfer to client’s team to allow them to maintain their systems

As with any approach, benefits will only realize if the whole philosophy is implemented with the tools.  A MDD development environment is the enabler but the success lies in the way it is implemented holistically and will not yield the benefits if the same rules and methodology of the status quo are applied.  MDD provides an organization with the opportunity to reform, regroup and create winning teams with business ownership and understanding and delivery at its heart.

Tagged , ,

I’m giving her all she’s got captain

scotty

Version 4.3 of the modeler has been out for a while, and if you are like me, you cant wait to test drive some of the really cool features and improvements, like the new the debugger, version selector and mobile image uploader. For some of you however, there is a small caveat to take note of before you warp off at light speed.

If you are running both server and browser strictly on your local Windows machine, you should have no care or concern. However, if you are running your Mendix app from another computer than your browser, or on a host machine, you might notice that your app no longer works and it wont matter how hard you hit that refresh button Scotty, that dog aint gonna bark.

My environment is setup running the Mendix modeler inside a Windows guest host via Parallels  on my Mac, yet I browse my Mendix project from my Mac’s local native browser. If you have a similar setup, you’ll need the following tweak to restore sanity.

 

Screenshot 2012:12:27 10:27 PM-3

There is a new setting added to the server configuration in System Settings called “Runtime port security”. Both this setting and “Admin port security” are new features added to run the development server more securely on your computer. I’m not sure if it was part of a previous release, but if your application no longer responds after the upgrade, just switch your setting from “Open on current machine” to “Open to other machines”. This allows you to run your application from your browser’s machine.

Screenshot 2012:12:27 10:33 PM-3

You can now afford to breath normally again.

Side note: Notice from the first screenshot that I’m still running my Mendix App from my Mac on localhost. This is because I use the following Apache entry on my Mac that does the reverse proxying for me in /etc/apache2/other/localhost.conf so that I don’t have to enter the guest host’s IP address:

Listen 8080
NameVirtualHost *:8080
<Proxy *>
   Order deny,allow
   Allow from all
</Proxy>
<VirtualHost *:8080>
   ServerName numenor.local:8080
    ServerAlias localhost:8080
    ErrorLog /var/log/apache2/numenor8080-error.log
    CustomLog /var/log/apache2/numenor8080-access.log common
    ProxyPass / http://win7.local:8080/
    ProxyPassReverse / http://win7.local:8080/
</VirtualHost>

This allows me, after setting my Mac’s browser as the default Windows web browser, to launch my native browser from within the Mendix modeler using the “Open Browser” button or the F9 shortcut. The rational behind this configuration is, that I have more productive tools installed on the Mac while doing more technical development.

Tagged , , , , , , ,

One small step

I love my job, and I feel super blessed in what I do. My 5-day working week is as, if not more, important than my weekends. My motive for doing what I do, is to cultivate the digital landscape of the enterprise world, to turn ugly and tiring things into usable and beautiful things that really add value. There is a lot of work out there. There are a lot of challenges too, and sometimes they are big challenges and inspiration help us get through them. I always like to think of speeches before battle or in the face of adversary as a source of inspiration.

A mentor of mine once explained that motive and inspiration are 2 separate things. Motive is what drives you, like the motor-engine of a motor-car; it motivates. Inspiration is like fuel injection, something that does not necessarily give you a motive for what you do, but boosts your motive in short bursts of energy until the fuel is spent. Its short-lived but promotes a forward momentum. Motive is your long-term drive and vision your direction or steering component. Direction & drive get us from point A to point B, and inspiration help us get there quicker.

Mendix is a means that suits my motive. It is a tool to cultivate the enterprise world. The activity of the people I work with, the team behind Mendix, DVT my Employer and my colleagues are the things that inspire me everyday and I owe them all a huge thanks and I salute them. DVT had vision of sending us to Mendix World this year where we had the privilege of meeting some of Mendix community members as well as be present at the finals of the Mendix mobile app competition. In addition they have endorsed this blog in the form of hosting fee sponsorship. They continue to play an involved role in the development of Mendix in South Africa. This blog is grateful to their contributions to us as authors and their commitment to their core values. The level of synergy and autonomy is humbling and encouraging.

Our blog received unprecedented exposure this last year and its amazing to witness the community interacting. A big thanks to the authors but above all you, our readers! We delight in presenting content that you find useful and are eager to interact with you more at any time. Thanks to everyone who contribute, you are a constant source of inspiration to us.

I wish you all success in your endeavours and the best for 2013 – hold on to your seats, 2013 will be massive for Mendix and DVT.

Tagged , , , ,

Interview with Mendix CTO Johan Den Haan

Johan Den Haan and Mendix 5 and Mendix World 2012

This year’s Mendix World was a fantastic conference. Not only could we get to see how Mendix is changing companies across the globe but we also got to see some of the new features planned for upcoming releases! Johan Den Haan (@JohanDenHaan), the companies CTO, was obviously very busy throughout the conference giving his keynote presentation and providing face time with clients. He was kind enough to spend some quality time with us after the conference had ended. We gathered with some members of his R&D team, reclining on some air couches, in an empty conference hall where I aimed to ask him some specific technology questions.

 

After some discussion it became apparent that Johan isn’t an autocratic leader. He’s a collaborative social leader. He embraces the social enterprise and tries to inspire solutions to come from his team, a bottom up approach so evident that he actually had the interview about himself with some of his R&D and Web team members there. He gave examples of how he consults his team on a daily basis and how they provide irreplaceable collaborative input into the company’s direction.
After some time of reflection I can sum our meeting up into 3 points:

Focus

When I asked him what the most significant tech technical challenge they have made in the past, he answered that is was to move away from a big bang strategy, a temptation for any technologist. Instead they, as a team, have decided to humbly focus on the small delivery chunks that provide the most value to their users combined with a strong long-term vision to guide day-to-day decisions. The team chuckled a bit as they spoke about the road they’ve taken to some good decisions made. The open team is encouraged to raise their views when decisions need to be made. Having members of the web team there to give their input even in this interview cemented the openness of their company. It was inspiring to see a team that is collaborative, even on a strategic level.

Positioning Mendix

Mendix is a business tool focused on providing a competitive advantage to companies through quick to market and high quality development of solutions. Being a Mendix fan I challenged Johan to give us an example of software that you couldn’t use Mendix for. He immediately joked with the example of how Mendix would never be used to build a RPG Shooter game. He then went, with more seriousness, into the detail of explaining part of where Mendix fits in well in the world today: Mendix is an excellent tool to deliver business solutions for so-called “differentiating” processes. Mendix excels in places where business agility is needed. That, combined with a way for the IT department to control the app jungle, creates a compelling platform for enterprises.  It’s a socially focused product dedicated to providing a holistic solution to software development. Given my experience with Sprintr, the cloud deployment processes and the modeller I couldn’t agree more.

Leading

Johan spoke from the heart describing how the thing he enjoys most is when his team is working well together, loving what they do and changing the world through Mendix. In the end we ran out of time, we didn’t get to ask the technology questions but it didn’t matter because most of the technology questions have been answered on the company’s tech blog. Instead we got a lot more – a picture into the inner workings of the Mendix team and an idea of the values they carry. Johan reminded me, in his approach to leadership, of our South African leader Nelson Mandella in his book The Long Walk to Freedom where he says:

I always remember the regent’s axiom: a leader, he said, is like a shepherd. He stays behind the flock, letting the most nimble go out ahead, whereupon the others follow, not realizing that all along they are being directed from behind.

Even though we had been sitting almost 2.5 hours we had run out of time. Talking about Mendix, the app world and how to build good software was an uplifting experience. All I can say is that I can’t wait for next year’s Mendix World conference!

Tagged

The Hitch Hikers Guide to “Delete Create”

In the film “The Hitch Hikers Guide to the Galaxy” the earth gets destroyed and rebuilt afresh. It is along a similar line of thinking that the “DeleteCreate” design pattern was engineered.

The “DeleteCreate” design pattern is used within complex enterprise environments where sourcing data from many other applications happens frequently. These integration environments present the question of data ownership. For example: while a system you’re building might have a version of a dataset the most up to date version of that data sit in another system, the data’s owner system.

As a result a scenario of having to refresh that dataset within your own system often arises.  The modeler needs to decide, on an entity level, how to refresh the entities with the new data. The logic of refreshing the data itself is not the only responsibility a modeler faces – the Mendix Business Engineer needs to add this logic using a practical naming convention as well as build the model in a common, optimized and consistently presentable way. That way other modelers working on the application can recognise the design pattern from the naming convention as well as immediately and efficiently understand exactly how the underlying logic will execute.

The DeleteCreate design pattern has been created to neatly solve that problem.

The Entity Model

In order to illustrate the pattern we’re going to use a customer risking example. In this example we’re collecting some risking data from the customer in the form of bureau data via web service. The important thing to know here is that the bureau data entity is the one we’ll be wanting to refresh – it has to be linked to an owner entity somehow. In this case that entity is the “Customer” entity and, specific to this example, we’ll track that entity down using the customer’s ID number.

 

Delete Create Entity Model Example

Delete Create Entity Model Example

 

The Design Pattern

The design pattern has 4 major steps.

1. Retrieving the owner entity. As mentioned above we do that using the customers ID number.

2. Retrieving the old bureau data linked to that owner entity with a simple retrieve. This data is now old and, according to the business in this example, no longer relevant.

3. Deleting that old bureau data.

4. Creating the new entity and linking it to the owner Customers entity.

As a fifth and final step this design pattern does give you the space to then return the new bureau data should the calling Microflow need it.

"DeleteCreate" Design Pattern

“DeleteCreate” Design Pattern

Calling the Design Pattern

The design pattern will then obviously be called from within a Microflow as illustrated below.

Calling the "DeleteCreate" Design Pattern

Calling the “DeleteCreate” Design Pattern

 

Design patterns achieve 2 great goals. Firstly they efficiently solve common problems and secondly they leave a recognisable trail for any modeler following the original solution.

Tagged

Unit Testing: Challenge Accepted

We have mentioned unit testing on Mendix and Beyond before (Test Driven Modelling) and over the past year we have been experimenting with various methods of unit testing and what exactly to unit test. What to test will be for another day though, today we will discuss our latest method for unit testing.

The main unit testing framework we had used to date was to build a structure of test sets, unit tests and test logs which are built and maintained through other microflows. Now unit tests are meant to be simple to construct and maintain and although this above structure provided the ability to build detailed unit tests, particularly with it’s own log structure, as well as a neat way to categorize the tests into a tree of test sets. It was a rather large hassle to build and maintain these tests manually over the long run.

The original Unit Testing Domain Model

So now obviously we have resolved these issues (otherwise why would I be writing this post…)

Well the newer version wasn’t a dramatic leap, instead what we focused on was on removing as much manual building from adding unit tests to libraries, standardizing the tests and making things as quick and simple to do as possible. So with some magic borrowed from MXModelReflection and some brainpower, we moved to the following 3 standards for unit testing microflows:

  1. start with ut_
  2. take no inputs
  3. output is either a string or a boolean

Unit Tests and UT_BooleanError

From this starting point we could have a  microflow find all microflows which fit the above criteria, execute them (through a java action) and store the response as Passed, Failed or Error. (In the case of a string an empty string is a success.)

The One flow to rule them all

With this solution we could now not worry about manually creating test objects within the microflow for result storage, and not worry about wiring it up to the testing framework. Instead a simple rename, compile and execute and all unit testing has been performed. Add in a viewing location, some timing elements, the ability to fire off single unit tests and our unit testing framework is ready to go :)

Unit Testing in practice: Run showing failed unit tests and responses.

If you are interested you can download the unit testing project (4.0.1) here. Questions or comments welcome

Now of course I have been doing far too many technical posts compared to my colleagues so be aware that the philosophical posts will be approaching soon ;)

Tagged ,