[progress Communities] [progress Openedge Abl] Forum Post: Re: What Classes Would You Make...

  • Thread starter Thread starter Matt Baker
  • Start date Start date
Status
Not open for further replies.
M

Matt Baker

Guest
Since you're dealing with UI, think "MVC". To start with something simple, you'll need 3 (possibly 4, if you want to go MVVC). Start with your Model (MenuItem class) It has a label, an icon, a unique id, and an optional set of children MenuItems. Maybe some other properties for things like toggle state, and what not. Then you need a View (MenuViewer) class to interact with your rendering technology (.NET, ABL, HTML...). Then you need controller (MenuController) class. This handles activation state, event callbacks and what-not. Then you can add in other features like fill-ins and combo boxes, as search fields in your toolbar. You can then go a step further and split the active menu items (e.g. what is supposed to be on the screen), vs the "what are the full set of possibilities". This full set of possibilities gets stripped down based on user preferences, security options, and active context (i.e. what is currently selected in your UI). Take a look at someone else's (Eclipse), to gather some ideas. wiki.eclipse.org/Menu_Contributions and www.vogella.com/.../article.html

Continue reading...
 
Status
Not open for further replies.
Back
Top