Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #5465

Re: How to name class which will read and write configuration to file

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.datemas.de!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From August Karlstrom <fusionfile@gmail.com>
Newsgroups comp.programming
Subject Re: How to name class which will read and write configuration to file
Date Thu, 28 May 2015 08:32:54 +0200
Organization Aioe.org NNTP Server
Lines 23
Message-ID <mk6cql$u99$1@speranza.aioe.org> (permalink)
References <4253758a-484a-424f-ac42-6fa2c2cffad4@googlegroups.com> <mk4ipq$24r$1@speranza.aioe.org> <9ux9x.13412$HS4.2372@fx07.iad>
NNTP-Posting-Host VtNNDKiWmkVGbjcdWdoChg.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.programming:5465

Show key headers only | View raw


On 2015-05-28 07:13, Daniel Pitts wrote:
> On 5/27/15 7:02 AM, August Karlstrom wrote:
>> On 2015-05-26 23:39, pavelkastornii@gmail.com wrote:
>>> I have a Configuration class and conf.xml file which contains
>>> configuration data. I am thinking about naming class, that will read
>>> data from xml-> java and write data java-> xml. ConfigProvider is not
>>> good way as it suitable onlt for xml->java. ConfigReaderWriter is a
>>> better, but maybe someone will suggest another variants?
>>>
>>
>> Why not simply add the read and write methods to the Configuration class?
> That is a terrible idea if this is a long-lived project.  What happens
> when they want to support yml too? Or json? Or something else.

If you try to anticipate every possible future change to the 
requirements your application will indeed be very complex. In this 
(unlikely) case I would rather let a separate tool handle the conversion 
to XML.

http://www.manageability.org/blog/stuff/over-abstraction-java-achilles-heel/view


-- August

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to name class which will read and write configuration to file pavelkastornii@gmail.com - 2015-05-26 14:39 -0700
  Re: How to name class which will read and write configuration to file August Karlstrom <fusionfile@gmail.com> - 2015-05-27 16:02 +0200
    Re: How to name class which will read and write configuration to file Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2015-05-27 22:13 -0700
      Re: How to name class which will read and write configuration to file August Karlstrom <fusionfile@gmail.com> - 2015-05-28 08:32 +0200
        Re: How to name class which will read and write configuration to file Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2015-05-28 09:23 -0700
          Re: How to name class which will read and write configuration to file August Karlstrom <fusionfile@gmail.com> - 2015-05-28 21:25 +0200
            Re: How to name class which will read and write configuration to file Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2015-05-28 21:28 -0700

csiph-web