|Anonymous | Login | Signup for a new account||2018-09-26 02:45 UTC|
|Main | My View | View Issues | Roadmap | Repositories|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000903||Amarillo||Deployment||public||2014-06-15 22:03||2014-06-19 10:50|
|Target Version||0.1||Fixed in Version||0.1|
|Summary||0000903: Move away from static setup to IOC|
|Description||Using the main method for all setup, though easy, is a bit ugly in the context of a deployable web app. Change away from this to use some type of IOC.|
|Tags||No tags attached.|
|Some work done toward this issue in 463a3f27192c6af98315761e51afcf14a48910d8|
|Better in 95cb76de350b70c081e375b234f9643fa4319b8d, may not go to IOC at all. We'll see. This can stay open until further decisions are made either way.|
Changed back to two static methods in 66154bf21c9a58f588590d3f622fe721e5fc1ae6 and formed a game plan.
The plan is:
When moving from stubs to actual code that does something, create actual classes that extend Route and supply an instance of these classes during the setup. This will keep the static setup concise and separate the code for different functionalities. The down side will remain having to create and distribute objects in this init location.
What may be able to be done is add a second init param to the annotation in SparkServlet, whereby an IOC container could be called first, let it spread the objects around, then call into the init routine. We'll cross that bridge when we come to it, though.
|No IOC added, however the setup code is now pretty clean as of 9c7fc8b29acf19f76c0f9bd7280b76eb5b3c0167, or a bit earlier. Closing.|
|Copyright © 2000 - 2011 MantisBT Group|