Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

planning structure rework for aerial_desktop #14

Closed
MichaelDimmitt opened this issue Jul 30, 2017 · 3 comments
Closed

planning structure rework for aerial_desktop #14

MichaelDimmitt opened this issue Jul 30, 2017 · 3 comments
Assignees
Milestone

Comments

@MichaelDimmitt
Copy link
Member

MichaelDimmitt commented Jul 30, 2017

resolved structure change:

install ... has 2 main controllers
uninstall ... has 2 main controllers
launch_agent, screensaver... have their own files and requisite controllers.
notifications ... has its own controller and methods.
check ... dumb only has methods

Full Program Map

app/install/installer_controller.rb
  app/screensaver/screensaver_controller.rb  
    bin/Aerial.saver
  app/notifications/notification_controller.rb
  app/launch_agent/launch_agent_controller.rb
    app/launch_agent/com.example.hello.plist
    app/launch_agent/.tmp has ... com.example.hello.plist
    bin/screensaver_engine.sh
app/install/start_controller.rb
  app/notifications/notification_controller.rb
    app/check/check_screensaver
    app/check/check_launch_agent
    both.. abstract down to: app/check/check -- passed in as parameters from other files.
  app/launch_agent/launch_agent_controller.rb
    app/launch_agent/com.example.hello.plist
    app/launch_agent/.tmp has ... com.example.hello.plist
    bin/screensaver_engine.sh

app/uninstall/uninstall_controler.rb
  app/launch_agent/unstage_launch_agent.sh
  app/not_sure/remove_aerial.sh     
app/uninstall/stop_controller.rb
  app/launch_agent/unstage_launch_agent 

current structure
bin/screensavers, bin/applications, app/install, app/uninstall, app/images
"bin" contains controllers that use install and uninstall.

proposal structure change 1:
bin/same, app/install, app/uninstall, app/dumb_stage_things_like_LA, app/launch_agent_actions "bin" contains controllers that use install and uninstall that use reusable dumb things.
also separating out: Launch Agent, MenuBar, screensaver engine

proposal structure change 2: (possible alternative?)
controller -> actions using components/controller-> subcontroller -> actions using components

@MichaelDimmitt MichaelDimmitt self-assigned this Jul 30, 2017
@MichaelDimmitt MichaelDimmitt added this to the fix_structure milestone Jul 30, 2017
@MichaelDimmitt
Copy link
Member Author

MichaelDimmitt commented Jul 30, 2017

Time to make some tests

1.0) tell me when nothing happened due to error.
1.1) for filename, tell me path requested from what path location.
1.2) search project for filename.
1.3) suggest path requested be changed to path of found file.
1.4) if not found, tell locations previous programmer felt it belonged.

2.0) Tell me each success for every behavior.

Once again, things that need test coverage.

Handle the case of LaunchAgent improperly named.
additionally, this file flow:

.hide/bin/main/Installer.app/contentes/resources/script
  .hide/app/install/1
    .hide/bin/Aerial.saver
  .hide/app/install/2 .            ----- only works when not installed across all users
  .hide/app/install/3 ... check that this script made .tmp and moved com into tmp.
    .hide/app/launch_agent/com.example.hello.plist
    .hide/app/launch_agent/.tmp has ... com.example.hello.plist
    .hide/bin/screensaver_engine.sh
.hide/bin/main/Start.app/contentes/resources/script
  .hide/app/install/2 .            ----- only works when not installed across all users
  .hide/app/install/3 ... check that this script made .tmp and moved com into tmp.
    .hide/app/launch_agent/com.example.hello.plist
    .hide/app/launch_agent.tmp has ... com.example.hello.plist
    .hide/bin/screensaver_engine.sh  
.hide/bin/main/Uninstall.app/contentes/resources/script
  .hide/app/uninstall/unstage_launch_agent --only works when not installed across all users
  .hide/app/uninstall/remove_aerial.sh     -- checks and changes defaults
.hide/bin/main/Stop.app/contentes/resources/script
  .hide/app/uninstall/unstage_launch_agent --only works when not installed across all users

Advantage in refactoring to ruby

  1. Testing, rspec and cucumber capture two different ways of thinking.
  2. More readable loops and methods. (easier to separate out dumb logic like file system checks.)
  3. easily pass variables down from controller to subcontrollers to files.

Old Program Map Image

image uploaded from ios

@MichaelDimmitt
Copy link
Member Author

MichaelDimmitt commented Aug 3, 2017

Full Program Map, has been copied to the top.

app/install/installer_controller.rb
  app/screensaver/screensaver_controller.rb  
    bin/Aerial.saver
  app/notifications/notification_controller.rb
  app/launch_agent/launch_agent_controller.rb
    app/launch_agent/com.example.hello.plist
    app/launch_agent/.tmp has ... com.example.hello.plist
    bin/screensaver_engine.sh
app/install/start_controller.rb
  app/notifications/notification_controller.rb
    app/check/check_screensaver
    app/check/check_launch_agent
    both.. abstract down to: app/check/check -- passed in as parameters from other files.
  app/launch_agent/launch_agent_controller.rb
    app/launch_agent/com.example.hello.plist
    app/launch_agent/.tmp has ... com.example.hello.plist
    bin/screensaver_engine.sh

app/uninstall/uninstall_controler.rb
  app/launch_agent/unstage_launch_agent.sh
  app/not_sure/remove_aerial.sh     
app/uninstall/stop_controller.rb
  app/launch_agent/unstage_launch_agent 

@MichaelDimmitt
Copy link
Member Author

MichaelDimmitt commented Aug 3, 2017

Image showing Full Program Map Image


ruby_rework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant