Closed GoogleCodeExporter closed 9 years ago
I agree. The user class is error prone. With the UrlParams only we can have the
defaults there as well in an easier way.
Original comment by mavrikis@gmail.com
on 2 Jul 2012 at 10:05
Yes, we should have default values for each URL parameter, and then each
varaiable only gets set if the input from the URL is not null. Ideally there
would be an XML file also containing default values, so the load functionality
would look as follows:
-If the URL param is not null, the URL value is used.
-If the URL param is null, and the XML file is found and has a value for this
param, the value found in the XML file is used.
-If the URL param is null and the XML file is not found, or the XML file does
not contain this value, the hard-coded value from the code is used.
But this can be implemented incrementally.
Original comment by tdragon1...@gmail.com
on 2 Jul 2012 at 10:22
Has anything be done on this?
About the xml config we have a library in migen that can help a little
especially to deal with the different types of params if needed but there may
be already something to deal with that from your side as well so not sure if
useful. Will investigate though.
But in the meantime I could look at the first bit and just replace the User
completely if you are ok with that. It just gets a little in the way everytime.
Original comment by mavrikis@gmail.com
on 6 Jul 2012 at 5:05
Original comment by tdragon1...@gmail.com
on 14 Sep 2012 at 9:34
Almer, this email thread explains the task, please comment if you have
questions, or 'accept' if this is enough info.
Original comment by tdragon1...@gmail.com
on 12 Dec 2012 at 12:47
I think, I've understood the task. The reference to UrlParameterConfig object
should be kept, instead of have a static class User. I'll delete class User and
replace calls to it with UrlParameterConfig.
Should UrlParameterConfig be a singleton?
Original comment by almer.bo...@gmail.com
on 13 Dec 2012 at 2:21
My 2p in case it helps. Just mind the default values when doing that and I
guess UrlParameterConfig can be a singleton.
Original comment by mavrikis@gmail.com
on 13 Dec 2012 at 3:51
For now, UrlParameterConfig is rewritten as a singleton and calls to User class
are replaced with UrlParameterConfig methods.
Still have questions:
Which default values should be hard coded in UrlParameterConfig?
Where can I find xml file and the class that parses it in order to implement
#comment2?
Original comment by almer.bo...@gmail.com
on 17 Dec 2012 at 10:31
The default values should be the ones that were in User.
Re XML there isn't something already. I think Toby meant that this would be the
ideal to load from XML.
Original comment by mavrikis@gmail.com
on 17 Dec 2012 at 10:34
Original comment by tdragon1...@gmail.com
on 10 Jan 2013 at 11:10
Original issue reported on code.google.com by
tdragon1...@gmail.com
on 2 Jul 2012 at 9:59