This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently there isn't really any division between Model and Controller in the control panel. Views are _mostly_ separate into html/Mako templates. This means the big thing we need to do is create that division of Model and Controller. For the most part, CherryPy and its linking of method names to urls is basically doing most of the Controller-like heavy lifting. We are going to want to create Models of the different things (interfaces, webapps, etc) and have a way of letting them access and update their state. | |
In an ideal world we would break out and refactor files into different directories following a standard MVC setup: | |
models/ | |
models/wired_network.py | |
models/wireless_network.py | |
models/mesh.py | |
models/daemon.py | |
models/webapp.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tuple < Array | |
def initialize(*args) | |
@array = args.dup.freeze | |
end | |
def each(&block) | |
@array.each(&block) | |
end | |
def first |