Geeks With Blogs
Scott Kuhl Warning: I may have no idea what I am talking about!

All Microsoft Office applications are built on top of an object model that supports automation. Any developer can use the 0bject model to drive the application UI and add, edit, and delete content, just as a real user interacts with the application. The rich object model, together with automation support, makes Office applications truly extensible and pluggable. Anyone can write a powerful add-in within a very short time in order to extend the behavior of Microsoft Word according to their own need. As good object-oriented (OO) developers, we develop our applications with rich architecture and with a reasonably good object model following the Model-View-Controller (MVC) design pattern.

However, until recently, very few applications have been developed that offer automation similar to Microsoft Office applications. As a result, we cannot extend our applications the same way we can extend and customize Office applications using the .NET Framework and Microsoft Visual Basic for Applications (VBA). This article shows you a way to implement a Microsoft Word-like object model for your own .NET application. We will be following the Model-View-Controller design pattern and also .NET Framework events and delegates heavily. The object model we will develop here will add infinite extensibility to our application. It will give us the opportunity to add plug-in and scripting capability to our applications as designed, without writing additional code for them. The plug-in and scripting feature will have the same power as the core application. The design will also produce a very clean code base that truly decouples business logic from the UI logic. Best of all, we will be able to write code to drive the UI and thus create test scripts that not only test business logic but also test the UI behaviors.

The full article can be found here.

Posted on Friday, September 2, 2005 10:06 AM .NET | Back to top


Comments on this post: Implement a Microsoft Word-like Object Model for Your .NET Framework Application

# re: Implement a Microsoft Word-like Object Model for Your .NET Framework Application
Requesting Gravatar...
I found the article misleading.It doesn't show how to implement automation- ability to control application from external program.
Left by Michael Friedgeim on Oct 06, 2005 6:14 PM

# re: Implement a Microsoft Word-like Object Model for Your .NET Framework Application
Requesting Gravatar...
it atually does show you... if you look in the end of the app, it shows you how to invoke .net code via a plugin to control the application. If you just use your brain power a lil bit, I bet you can figure out a way to call the .net dll/library from an external app and expose the application object in just the same way you would a plugin and you can manipulate it... just think of a class library... for example... like the .NET base class library... ;)
Left by bbqchickenrobot on May 03, 2006 8:00 PM

Your comment:
 (will show your gravatar)


Copyright © Scott Kuhl | Powered by: GeeksWithBlogs.net