07-25-2010 06:36 PM
Hi Guys
Since it looks like you all like design patterns, I’ll give you a preview of the features I’ll like to show you at NI-week. It’s an easy way of adding design patterns to LabVIEW using the UML modeller.
In the example below I ‘m made a RTF-document reader class, which needs to be able to convert the text to different types, but the number of types I need to support is open-ended.
So I’ve heard of the design pattern called builder that solves this, so I right click on my class and selects “Apply Design patterns…”
I select the GoF’s Builder pattern, press OK, update the UML diagram with what names I like to call the Builder and ConcreteBuilder classes.
See you next week guys.
Cheers,
Mikael
07-25-2010 06:43 PM
Mikael, I'm very interested to see this in person! I don't suppose you could share what the code that it generates look like?
07-25-2010 09:13 PM
So far the UML modeller creates only classes accordingly to the UML class diagram with its attributes and methods.
It supports 4 different class templates so far (3 reference based, and one by value based=lvoop).
I’ve attached the project after a Class creation. These classes are all based on a reference DVR class template.
Currently the design patterns in the UML modeller is based on simple XML files, that describes the design. But it doesn’t support more advanced feature of how to implement the methods to get the pattern fully working right away.
But we have another feature that can do this, it’s a right click function GDS provides from the Project Explorer Windows when you selects a class. This is using a plug in architecture and anyone can implement these plug-ins.
These design patterns plug-ins have a user interface to configure the pattern needed and then they can modify the class accordingly.
E.g. We have the active object design pattern that give the user the option to create a spawning VI and it also create the start and stop VI to handle the spawning VI.
I'm looking forward to meet you all next week to discuss new things we need in LabVIEW to make our day to day job easier (and more fun).
Cheers,
Mikael
08-18-2010 07:02 AM
Darn that I didn't catchup on this thread before NIWeek..
I think a book about Design Patterns especialy catered to LV is an awesome idea!
I'd be happy to contribute some stuff. My special interest lies in Active Object, Command and Factory pattern, but I'd be happy to take the deeper dive into other patterns as well. In the interest of the community and just because it's fun.
08-18-2010 01:54 PM
I am interested in contributing too. Please keep me in mind.
Also, if you decide to create a new community for this, please let us know, so we can suscribe.
Fab
08-18-2010 02:15 PM
It is great to see such a high level of interest regarding the definition of design patterns. We've actually formed a cross-department group of internal LabVIEW experts at NI to begin looking at publishing some of our ideas to this group. We want to use the /largeapps domain as a forum for this discussion and collaboration with the community, as we want to foster feedback and new ideas. Look for those soon!