Jump to content

AutoIt programming pattern


amokoura
 Share

Recommended Posts

Do you use any programming pattern with AutoIt?

My recent GUI application reached couple thousand lines. Therefore some organization would be appreciated ;)

I stumbled upon MVC (Model-View-Controller) and it was interesting. The GUI is easy to link to the "View" part, but separating the other two isn't so clear. If it's even smart in AutoIt.

Any suggestions or experiences on these topics?

Link to comment
Share on other sites

You have your raw data, you have your display of the data, and you have your input. Your view and data sections don't know or care about how the data is input (even if that input is via the same GUI that lets the data be viewed). The view doesn't care about the data or the input, it's just there to display data. And the data doesn't care how it's input or displayed.

For example, imagine displaying a list of street names. Initially, you will have no data. You will thus have nothing to display. But you can input, so enter a few street names. These will make their way down to the data layer, but the data layer doesn't know where it came from. Now the data can be passed off to the view layer. Save the data and restart the application. Now there's some data that can be read off disk, but again, the data layer doesn't really care that it's coming from disk. It just gets handed some data which it does it's thing to and then the data is passed off to the view layer.

My observation is that most design patterns can be used in virtually any language, it's just that certain languages - usually object-oriented - tend to lend themselves to easier implementation of patterns. It's pretty trivial to implement most patterns as a series of objects in object-oriented languages. You can do them in other languages as well it just takes a little more work (in general).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...