Anonymous | Login | Signup for a new account | 2019-02-20 01:10 UTC | ![]() |
Main | My View | View Issues | Roadmap | Repositories |
View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000903 | Amarillo | Deployment | public | 2014-06-15 22:03 | 2014-06-19 10:50 | ||||
Reporter | Fred | ||||||||
Assigned To | Fred | ||||||||
Priority | normal | Severity | major | Reproducibility | N/A | ||||
Status | closed | Resolution | fixed | ||||||
Platform | All | OS | All | OS Version | All | ||||
Product Version | 0.1-SNAPSHOT | ||||||||
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. | ||||||||
Attached Files | |||||||||
![]() |
|
![]() Fred (administrator) 2014-06-16 04:58 |
Some work done toward this issue in 463a3f27192c6af98315761e51afcf14a48910d8 |
![]() Fred (administrator) 2014-06-16 10:29 |
Better in 95cb76de350b70c081e375b234f9643fa4319b8d, may not go to IOC at all. We'll see. This can stay open until further decisions are made either way. |
![]() Fred (administrator) 2014-06-16 22:40 |
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. |
![]() Fred (administrator) 2014-06-19 10:50 |
No IOC added, however the setup code is now pretty clean as of 9c7fc8b29acf19f76c0f9bd7280b76eb5b3c0167, or a bit earlier. Closing. |
Copyright © 2000 - 2011 MantisBT Group |