Custom widget startup help

We are trying to create our own widget however in the process we noticed that it has a very steep learning curve at the start. We had a look at the custom widget guide but still found that we had trouble with starting to build our own widgets. So we could use some help with building our own first widget preferably one that uses context. Our first question to get us started is: What would be a good example from the appstore that is not to hard to grasp but yet shows more angles than the examples from the tutorial? The second question is aimed more to Mendix rather than the community: Could you provide us with a piece of code from the default widgets (such as the datagrid) in a readable format. Starting from 2.5.1 default widgets are no longer presented in separate javascript file and so has become almost impossible to read them. Furthermore because they have been reduced to 1 line and the variables have all been renamed it is even a more tedious job to fully grasp what is happening. Another important aspect in developing widgets would be to have standard templates or starting points from which certain (types of?) widgets could be developped? Does anyone have such a template or are there any templates available that people are willing to share? Last but not least, how important is it to fully grasp the dojo library? Can one create a Mendix widget by only applying the dojo library or is more knowledge advisable? And would it be wise to first learn the dojo library before developing a mendix widget or can this be done paralel? With kind regards, Pieter
1 answers

First of all, we are working hard on refactoring the client, writing API docs and making it easier to build new widgets. We'll have new widget tutorials up for the 3.0 release as well.

A good example from the AppStore really depends on what sort of widgets you want to build. If you want to use reference sets, the Checkbox Set Selector is a good start. For an input/attribute widget, try the Prefilled Inputbox.

The code for our own internal widgets is not open-source. It's no big secret but it isn't made to be easily readable and has a lot of hooks into our internal libraries. I don't think this would help you very much. I suggest you look at all the widgets on the AppStore, these should cover any situation in a widget concerning the Mendix API.

A good grasp of the dojo library is not neccessary, but it does help. Dojo provides a lot of shortcuts and convenience functions you can implement. Do note that we run Dojo 1.3, so newer functions might not be available. You can easily inspect this using Firebug in a Mendix application and opening the dojo object on the window.