473,396 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Resource file vs. regular Xml file

TS
i have a need to possibly enable mutli language support. What benefit do i
get by using a resource file instead of a custom xml solution?

thanks!
Nov 14 '07 #1
12 5230
TS wrote:
i have a need to possibly enable mutli language support. What benefit do i
get by using a resource file instead of a custom xml solution?

thanks!

I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a regular
xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you
either need a multi languages or not, you should use Resource Feature in
your ASP.NET.
Nov 14 '07 #2
TS
yes.

do you know of the actual benefits of resource file instead of regular xml
file?

"Duy Lam" <du**********@gmail.comwrote in message
news:eA**************@TK2MSFTNGP05.phx.gbl...
TS wrote:
>i have a need to possibly enable mutli language support. What benefit do
i get by using a resource file instead of a custom xml solution?

thanks!

I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a regular
xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you either
need a multi languages or not, you should use Resource Feature in your
ASP.NET.

Nov 14 '07 #3
Hi TS,

I think the main advantage of using .NET resource file(or resx file) is
that you can make full use of the built-in API or coding syntax support.
For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file. Also,
..net resource file can be embeded into assembly. If you're using custom
xml solution, you'll need to define your own xml file format and use raw
XML API to manipulate them. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>Subject: Re: Resource file vs. regular Xml file
Date: Wed, 14 Nov 2007 12:00:41 -0600

yes.

do you know of the actual benefits of resource file instead of regular xml
file?

"Duy Lam" <du**********@gmail.comwrote in message
news:eA**************@TK2MSFTNGP05.phx.gbl...
>TS wrote:
>>i have a need to possibly enable mutli language support. What benefit
do
>>i get by using a resource file instead of a custom xml solution?

thanks!

I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a regular
xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you
either
>need a multi languages or not, you should use Resource Feature in your
ASP.NET.


Nov 15 '07 #4
do you know of the actual benefits of resource file instead of regular xml
file?
First, what is the benefit of your own XML files?
The standard resources are, well, standard.
Most translation tools will know about them, some translators might know
about them, and so on.
Many people used them successfully, so it is a tried solution, working,
with some known problems and known work-arounds.
Which is probably not the case with a proprietary format.
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Nov 15 '07 #5
TS
thank you.

One concern i never asked was caching. currently i am caching my custom xml
files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there was a
spelling mistake, I imaging we could manually update the resource file? In
this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl...
Hi TS,

I think the main advantage of using .NET resource file(or resx file) is
that you can make full use of the built-in API or coding syntax support.
For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using custom
xml solution, you'll need to define your own xml file format and use raw
XML API to manipulate them. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>>Subject: Re: Resource file vs. regular Xml file
Date: Wed, 14 Nov 2007 12:00:41 -0600

yes.

do you know of the actual benefits of resource file instead of regular xml
file?

"Duy Lam" <du**********@gmail.comwrote in message
news:eA**************@TK2MSFTNGP05.phx.gbl...
>>TS wrote:
i have a need to possibly enable mutli language support. What benefit
do
>>>i get by using a resource file instead of a custom xml solution?

thanks!

I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a regular
xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you
either
>>need a multi languages or not, you should use Resource Feature in your
ASP.NET.



Nov 15 '07 #6
Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in assembly),
then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be loaded
into memory after it is used, just like it load the required assemblies.
Therefore, it won't let you to flexibly update and refresh it immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component, maybe
you can havea look at the following article which introducing extending the
.NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Resource file vs. regular Xml file
Date: Thu, 15 Nov 2007 08:15:57 -0600
>
thank you.

One concern i never asked was caching. currently i am caching my custom
xml
>files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there was
a
>spelling mistake, I imaging we could manually update the resource file? In
this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl...
>Hi TS,

I think the main advantage of using .NET resource file(or resx file) is
that you can make full use of the built-in API or coding syntax support.
For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using custom
xml solution, you'll need to define your own xml file format and use raw
XML API to manipulate them. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>>>Subject: Re: Resource file vs. regular Xml file
Date: Wed, 14 Nov 2007 12:00:41 -0600

yes.

do you know of the actual benefits of resource file instead of regular
xml
>>>file?

"Duy Lam" <du**********@gmail.comwrote in message
news:eA**************@TK2MSFTNGP05.phx.gbl...
TS wrote:
i have a need to possibly enable mutli language support. What benefit
do
>>>>i get by using a resource file instead of a custom xml solution?
>
thanks!

I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a
regular
>>>xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you
either
>>>need a multi languages or not, you should use Resource Feature in your
ASP.NET.


Nov 16 '07 #7
TS
steven, are resource files 1 per application or can they be split up to have
many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl...
Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in assembly),
then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be loaded
into memory after it is used, just like it load the required assemblies.
Therefore, it won't let you to flexibly update and refresh it immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component, maybe
you can havea look at the following article which introducing extending
the
NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
>>Subject: Re: Resource file vs. regular Xml file
Date: Thu, 15 Nov 2007 08:15:57 -0600
>>
thank you.

One concern i never asked was caching. currently i am caching my custom
xml
>>files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there was
a
>>spelling mistake, I imaging we could manually update the resource file? In
this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl.. .
>>Hi TS,

I think the main advantage of using .NET resource file(or resx file) is
that you can make full use of the built-in API or coding syntax support.
For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using custom
xml solution, you'll need to define your own xml file format and use raw
XML API to manipulate them. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
Subject: Re: Resource file vs. regular Xml file
Date: Wed, 14 Nov 2007 12:00:41 -0600

yes.

do you know of the actual benefits of resource file instead of regular
xml
>>>>file?

"Duy Lam" <du**********@gmail.comwrote in message
news:eA**************@TK2MSFTNGP05.phx.gbl.. .
TS wrote:
>i have a need to possibly enable mutli language support. What benefit
do
>i get by using a resource file instead of a custom xml solution?
>>
>thanks!
>
I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a
regular
>>>>xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you
either
need a multi languages or not, you should use Resource Feature in your
ASP.NET.




Nov 19 '07 #8
Thanks for your reply TS,

For resource file, normally you will add them into project through the
following means:

** You add a resource xml file(resx file) which can contain different kind
of resource objects(string, image, file .....). So you can add multiple
such resx files in a project. When you build the project, they will be
compiled(as embeded resource) into your assembly(or separate satellite
assemlies that contains resource for specific cultures).

For these kinds of resource, you'll use API to get resource item from
it(from assembly).

#Introduction to Resources and Localization
http://msdn2.microsoft.com/en-us/lib...93(VS.71).aspx

#Resources in Applications
http://msdn2.microsoft.com/en-us/lib...5x(vs.71).aspx
** For ASP.NET application, it has some further encapsulated functionality.
You can provide a local resource file for each aspx page or serveral global
resource files for the entire application. These resource items are easy
to reference in your aspx page(both through declarative syntax or
programatic code):

#using localization resource in ASP.NET:
http://quickstarts.asp.net/QuickStar...on/localizatio
n.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Mon, 19 Nov 2007 16:42:09 -0600

steven, are resource files 1 per application or can they be split up to
have
>many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl...
>Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in
assembly),
>then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be loaded
into memory after it is used, just like it load the required assemblies.
Therefore, it won't let you to flexibly update and refresh it immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component,
maybe
>you can havea look at the following article which introducing extending
the
NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
>>>Subject: Re: Resource file vs. regular Xml file
Date: Thu, 15 Nov 2007 08:15:57 -0600
>>>
thank you.

One concern i never asked was caching. currently i am caching my custom
xml
>>>files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there
was
>a
>>>spelling mistake, I imaging we could manually update the resource file?
In
>>>this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl. ..
Hi TS,

I think the main advantage of using .NET resource file(or resx file) is
that you can make full use of the built-in API or coding syntax
support.
>>>For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using custom
xml solution, you'll need to define your own xml file format and use
raw
>>>XML API to manipulate them. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>From: "TS" <ma**********@nospam.nospam>
>References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>Subject: Re: Resource file vs. regular Xml file
>Date: Wed, 14 Nov 2007 12:00:41 -0600
>
>yes.
>
>do you know of the actual benefits of resource file instead of regular
xml
>>>>>file?
>
>"Duy Lam" <du**********@gmail.comwrote in message
>news:eA**************@TK2MSFTNGP05.phx.gbl. ..
>TS wrote:
>>i have a need to possibly enable mutli language support. What
benefit
>>>do
>>i get by using a resource file instead of a custom xml solution?
>>>
>>thanks!
>>
>I don't know what your "customer xml solution" is ? You store all
>information of controls such as text, color value (#aabbcc) in a
regular
>>>>>xml file, doesn't you ?
>As far as I know, ASP.NET support resource file very well. So you
either
>need a multi languages or not, you should use Resource Feature in
your
>>>>>ASP.NET.
>
>
>



Nov 20 '07 #9
TS
thanks steven

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:YO**************@TK2MSFTNGHUB02.phx.gbl...
Thanks for your reply TS,

For resource file, normally you will add them into project through the
following means:

** You add a resource xml file(resx file) which can contain different kind
of resource objects(string, image, file .....). So you can add multiple
such resx files in a project. When you build the project, they will be
compiled(as embeded resource) into your assembly(or separate satellite
assemlies that contains resource for specific cultures).

For these kinds of resource, you'll use API to get resource item from
it(from assembly).

#Introduction to Resources and Localization
http://msdn2.microsoft.com/en-us/lib...93(VS.71).aspx

#Resources in Applications
http://msdn2.microsoft.com/en-us/lib...5x(vs.71).aspx
** For ASP.NET application, it has some further encapsulated
functionality.
You can provide a local resource file for each aspx page or serveral
global
resource files for the entire application. These resource items are easy
to reference in your aspx page(both through declarative syntax or
programatic code):

#using localization resource in ASP.NET:
http://quickstarts.asp.net/QuickStar...on/localizatio
n.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
>>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Mon, 19 Nov 2007 16:42:09 -0600

steven, are resource files 1 per application or can they be split up to
have
>>many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl.. .
>>Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in
assembly),
>>then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be loaded
into memory after it is used, just like it load the required assemblies.
Therefore, it won't let you to flexibly update and refresh it
immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component,
maybe
>>you can havea look at the following article which introducing extending
the
NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
Subject: Re: Resource file vs. regular Xml file
Date: Thu, 15 Nov 2007 08:15:57 -0600
thank you.

One concern i never asked was caching. currently i am caching my custom
xml
files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there
was
>>a
spelling mistake, I imaging we could manually update the resource file?
In
>>>>this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl.. .
Hi TS,
>
I think the main advantage of using .NET resource file(or resx file)
is
that you can make full use of the built-in API or coding syntax
support.
>>>>For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using
custom
xml solution, you'll need to define your own xml file format and use
raw
>>>>XML API to manipulate them. How do you think?
>
Sincerely,
>
Steven Cheng
>
Microsoft MSDN Online Support Lead
>
>
This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
--------------------
>>From: "TS" <ma**********@nospam.nospam>
>>References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>>Subject: Re: Resource file vs. regular Xml file
>>Date: Wed, 14 Nov 2007 12:00:41 -0600
>>
>>yes.
>>
>>do you know of the actual benefits of resource file instead of regular
xml
>>file?
>>
>>"Duy Lam" <du**********@gmail.comwrote in message
>>news:eA**************@TK2MSFTNGP05.phx.gbl.. .
>>TS wrote:
>>>i have a need to possibly enable mutli language support. What
benefit
>>>>do
>>>i get by using a resource file instead of a custom xml solution?
>>>>
>>>thanks!
>>>
>>I don't know what your "customer xml solution" is ? You store all
>>information of controls such as text, color value (#aabbcc) in a
regular
>>xml file, doesn't you ?
>>As far as I know, ASP.NET support resource file very well. So you
either
>>need a multi languages or not, you should use Resource Feature in
your
>>>>>>ASP.NET.
>>
>>
>>
>




Nov 20 '07 #10
TS
i see that you can add resources to a resource file at runtime. My question
is, is that persisted to the file system or only in memory in which case a
server reboot would flush?

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:YO**************@TK2MSFTNGHUB02.phx.gbl...
Thanks for your reply TS,

For resource file, normally you will add them into project through the
following means:

** You add a resource xml file(resx file) which can contain different kind
of resource objects(string, image, file .....). So you can add multiple
such resx files in a project. When you build the project, they will be
compiled(as embeded resource) into your assembly(or separate satellite
assemlies that contains resource for specific cultures).

For these kinds of resource, you'll use API to get resource item from
it(from assembly).

#Introduction to Resources and Localization
http://msdn2.microsoft.com/en-us/lib...93(VS.71).aspx

#Resources in Applications
http://msdn2.microsoft.com/en-us/lib...5x(vs.71).aspx
** For ASP.NET application, it has some further encapsulated
functionality.
You can provide a local resource file for each aspx page or serveral
global
resource files for the entire application. These resource items are easy
to reference in your aspx page(both through declarative syntax or
programatic code):

#using localization resource in ASP.NET:
http://quickstarts.asp.net/QuickStar...on/localizatio
n.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
>>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Mon, 19 Nov 2007 16:42:09 -0600

steven, are resource files 1 per application or can they be split up to
have
>>many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl.. .
>>Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in
assembly),
>>then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be loaded
into memory after it is used, just like it load the required assemblies.
Therefore, it won't let you to flexibly update and refresh it
immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component,
maybe
>>you can havea look at the following article which introducing extending
the
NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
Subject: Re: Resource file vs. regular Xml file
Date: Thu, 15 Nov 2007 08:15:57 -0600
thank you.

One concern i never asked was caching. currently i am caching my custom
xml
files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there
was
>>a
spelling mistake, I imaging we could manually update the resource file?
In
>>>>this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl.. .
Hi TS,
>
I think the main advantage of using .NET resource file(or resx file)
is
that you can make full use of the built-in API or coding syntax
support.
>>>>For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using
custom
xml solution, you'll need to define your own xml file format and use
raw
>>>>XML API to manipulate them. How do you think?
>
Sincerely,
>
Steven Cheng
>
Microsoft MSDN Online Support Lead
>
>
This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
--------------------
>>From: "TS" <ma**********@nospam.nospam>
>>References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>>Subject: Re: Resource file vs. regular Xml file
>>Date: Wed, 14 Nov 2007 12:00:41 -0600
>>
>>yes.
>>
>>do you know of the actual benefits of resource file instead of regular
xml
>>file?
>>
>>"Duy Lam" <du**********@gmail.comwrote in message
>>news:eA**************@TK2MSFTNGP05.phx.gbl.. .
>>TS wrote:
>>>i have a need to possibly enable mutli language support. What
benefit
>>>>do
>>>i get by using a resource file instead of a custom xml solution?
>>>>
>>>thanks!
>>>
>>I don't know what your "customer xml solution" is ? You store all
>>information of controls such as text, color value (#aabbcc) in a
regular
>>xml file, doesn't you ?
>>As far as I know, ASP.NET support resource file very well. So you
either
>>need a multi languages or not, you should use Resource Feature in
your
>>>>>>ASP.NET.
>>
>>
>>
>




Nov 20 '07 #11
Hi TS,

For the following things you mentioned:

==========
i see that you can add resources to a resource file at runtime.
=========

do you mean use "ResourceWriter" class to programmatically add resource
into existing resource file(resx or .resource...)? If so, the modification
only reflect on the resource file on disk and won't make the runtime to
automatically reload the updated resource.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Tue, 20 Nov 2007 10:24:45 -0600
>i see that you can add resources to a resource file at runtime. My
question
>is, is that persisted to the file system or only in memory in which case a
server reboot would flush?

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:YO**************@TK2MSFTNGHUB02.phx.gbl...
>Thanks for your reply TS,

For resource file, normally you will add them into project through the
following means:

** You add a resource xml file(resx file) which can contain different
kind
>of resource objects(string, image, file .....). So you can add multiple
such resx files in a project. When you build the project, they will be
compiled(as embeded resource) into your assembly(or separate satellite
assemlies that contains resource for specific cultures).

For these kinds of resource, you'll use API to get resource item from
it(from assembly).

#Introduction to Resources and Localization
http://msdn2.microsoft.com/en-us/lib...93(VS.71).aspx

#Resources in Applications
http://msdn2.microsoft.com/en-us/lib...5x(vs.71).aspx
** For ASP.NET application, it has some further encapsulated
functionality.
You can provide a local resource file for each aspx page or serveral
global
resource files for the entire application. These resource items are easy
to reference in your aspx page(both through declarative syntax or
programatic code):

#using localization resource in ASP.NET:
http://quickstarts.asp.net/QuickStar...on/localizatio
>n.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
>>>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Mon, 19 Nov 2007 16:42:09 -0600

steven, are resource files 1 per application or can they be split up to
have
>>>many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl. ..
Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in
assembly),
>>>then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be
loaded
>>>into memory after it is used, just like it load the required
assemblies.
>>>Therefore, it won't let you to flexibly update and refresh it
immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component,
maybe
>>>you can havea look at the following article which introducing extending
the
NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>From: "TS" <ma**********@nospam.nospam>
>References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Resource file vs. regular Xml file
>Date: Thu, 15 Nov 2007 08:15:57 -0600

>
>thank you.
>
>One concern i never asked was caching. currently i am caching my custom
xml
>files. Do resource files get cached or need caching?
>
>If for example my application was deployed and then we found out there
was
>>>a
>spelling mistake, I imaging we could manually update the resource file?
In
>>>>>this scenario, how does caching play in?
>
>thanks~!
>
>
>"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
>news:ZR**************@TK2MSFTNGHUB02.phx.gbl. ..
>Hi TS,
>>
>I think the main advantage of using .NET resource file(or resx file)
>is
>that you can make full use of the built-in API or coding syntax
support.
>>>>>For example, .NET provide "ResourceManager Class" to help you
>programmatically load resource keys from resource file or resx file.
>Also,
>net resource file can be embeded into assembly. If you're using
>custom
>xml solution, you'll need to define your own xml file format and use
raw
>>>>>XML API to manipulate them. How do you think?
>>
>Sincerely,
>>
>Steven Cheng
>>
>Microsoft MSDN Online Support Lead
>>
>>
>This posting is provided "AS IS" with no warranties, and confers no
>rights.
>>
>>
>--------------------
>>>From: "TS" <ma**********@nospam.nospam>
>>>References: <OL**************@TK2MSFTNGP03.phx.gbl>
><eA**************@TK2MSFTNGP05.phx.gbl>
>>>Subject: Re: Resource file vs. regular Xml file
>>>Date: Wed, 14 Nov 2007 12:00:41 -0600
>>>
>>>yes.
>>>
>>>do you know of the actual benefits of resource file instead of
regular
>>>xml
>>>file?
>>>
>>>"Duy Lam" <du**********@gmail.comwrote in message
>>>news:eA**************@TK2MSFTNGP05.phx.gbl. ..
>>>TS wrote:
>>>>i have a need to possibly enable mutli language support. What
benefit
>>>>>do
>>>>i get by using a resource file instead of a custom xml solution?
>>>>>
>>>>thanks!
>>>>
>>>I don't know what your "customer xml solution" is ? You store all
>>>information of controls such as text, color value (#aabbcc) in a
regular
>>>xml file, doesn't you ?
>>>As far as I know, ASP.NET support resource file very well. So you
>either
>>>need a multi languages or not, you should use Resource Feature in
your
>>>>>>>ASP.NET.
>>>
>>>
>>>
>>
>
>
>



Nov 21 '07 #12
TS
yes you are correct, thanks!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:tn***************@TK2MSFTNGHUB02.phx.gbl...
Hi TS,

For the following things you mentioned:

==========
i see that you can add resources to a resource file at runtime.
=========

do you mean use "ResourceWriter" class to programmatically add resource
into existing resource file(resx or .resource...)? If so, the modification
only reflect on the resource file on disk and won't make the runtime to
automatically reload the updated resource.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Tue, 20 Nov 2007 10:24:45 -0600
>>i see that you can add resources to a resource file at runtime. My
question
>>is, is that persisted to the file system or only in memory in which case a
server reboot would flush?

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:YO**************@TK2MSFTNGHUB02.phx.gbl.. .
>>Thanks for your reply TS,

For resource file, normally you will add them into project through the
following means:

** You add a resource xml file(resx file) which can contain different
kind
>>of resource objects(string, image, file .....). So you can add multiple
such resx files in a project. When you build the project, they will be
compiled(as embeded resource) into your assembly(or separate satellite
assemlies that contains resource for specific cultures).

For these kinds of resource, you'll use API to get resource item from
it(from assembly).

#Introduction to Resources and Localization
http://msdn2.microsoft.com/en-us/lib...93(VS.71).aspx

#Resources in Applications
http://msdn2.microsoft.com/en-us/lib...5x(vs.71).aspx
** For ASP.NET application, it has some further encapsulated
functionality.
You can provide a local resource file for each aspx page or serveral
global
resource files for the entire application. These resource items are
easy
to reference in your aspx page(both through declarative syntax or
programatic code):

#using localization resource in ASP.NET:
http://quickstarts.asp.net/QuickStar...on/localizatio
>>n.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Mon, 19 Nov 2007 16:42:09 -0600

steven, are resource files 1 per application or can they be split up to
have
many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl.. .
Thanks for your followup TS,
>
If you're using .net resource model(resource file or embeded in
assembly),
then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be
loaded
>>>>into memory after it is used, just like it load the required
assemblies.
>>>>Therefore, it won't let you to flexibly update and refresh it
immediately
if you changed them when the application is running.
>
BTW, if you want to implement your own resource model and component,
maybe
you can havea look at the following article which introducing
extending
the
NET resource provider:
>
#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx
>
Sincerely,
>
Steven Cheng
>
Microsoft MSDN Online Support Lead
>
>
This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
--------------------
>>From: "TS" <ma**********@nospam.nospam>
>>References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
>>Subject: Re: Resource file vs. regular Xml file
>>Date: Thu, 15 Nov 2007 08:15:57 -0600
>
>>
>>thank you.
>>
>>One concern i never asked was caching. currently i am caching my
>>custom
xml
>>files. Do resource files get cached or need caching?
>>
>>If for example my application was deployed and then we found out there
was
a
>>spelling mistake, I imaging we could manually update the resource
>>file?
In
>>this scenario, how does caching play in?
>>
>>thanks~!
>>
>>
>>"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
>>news:ZR**************@TK2MSFTNGHUB02.phx.gbl ...
>>Hi TS,
>>>
>>I think the main advantage of using .NET resource file(or resx file)
>>is
>>that you can make full use of the built-in API or coding syntax
support.
>>For example, .NET provide "ResourceManager Class" to help you
>>programmatically load resource keys from resource file or resx file.
>>Also,
>>net resource file can be embeded into assembly. If you're using
>>custom
>>xml solution, you'll need to define your own xml file format and use
raw
>>XML API to manipulate them. How do you think?
>>>
>>Sincerely,
>>>
>>Steven Cheng
>>>
>>Microsoft MSDN Online Support Lead
>>>
>>>
>>This posting is provided "AS IS" with no warranties, and confers no
>>rights.
>>>
>>>
>>--------------------
>>>>From: "TS" <ma**********@nospam.nospam>
>>>>References: <OL**************@TK2MSFTNGP03.phx.gbl>
>><eA**************@TK2MSFTNGP05.phx.gbl>
>>>>Subject: Re: Resource file vs. regular Xml file
>>>>Date: Wed, 14 Nov 2007 12:00:41 -0600
>>>>
>>>>yes.
>>>>
>>>>do you know of the actual benefits of resource file instead of
regular
>>>>xml
>>>>file?
>>>>
>>>>"Duy Lam" <du**********@gmail.comwrote in message
>>>>news:eA**************@TK2MSFTNGP05.phx.gbl ...
>>>>TS wrote:
>>>>>i have a need to possibly enable mutli language support. What
benefit
>>do
>>>>>i get by using a resource file instead of a custom xml solution?
>>>>>>
>>>>>thanks!
>>>>>
>>>>I don't know what your "customer xml solution" is ? You store all
>>>>information of controls such as text, color value (#aabbcc) in a
regular
>>>>xml file, doesn't you ?
>>>>As far as I know, ASP.NET support resource file very well. So you
>>either
>>>>need a multi languages or not, you should use Resource Feature in
your
>>>>ASP.NET.
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>




Nov 21 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: I Report, You Decide | last post by:
A hosting service lungcapage has banned yabb, because it takes too much CPU/memory, but phpBB is fine. Is that perl/php or the script itself? why perl sucks more resource of a server than php? i...
5
by: Adam Parkin | last post by:
Hello all, I am seeking some help with the following problem. I'm working on an application where I have a resource file, and in this resource file what I want to store is a list of file names...
7
by: Wysiwyg | last post by:
Is there any way to add an embedded resource to a project without copying it to the project's directory? I have shared resources and don't want each project using the images, xml files, etc. to...
1
by: Namratha Shah \(Nasha\) | last post by:
Hi All, This is a resource file generation tool which converts an xml based resource formats to .net resource file i.e. (.resources) and vice-versa. Today we will see how we will generate ...
5
by: Daniel | last post by:
Hey guys When you hook an event (c# 2.0 syntax): myEvent += MyMethodToFire; You need to also unsubscribe it to avoid a resource leak so that the object it is in gets garbage collected like so...
0
by: =?Utf-8?B?Q29saXZpZXI=?= | last post by:
If anyone can help me with this I would really appreciate it: I have an assembly into which I have linked a manifest file as a Win32 resource. This is necessary since I want to use a class in this...
7
by: craig | last post by:
....quick question for anyone who might have some experience with .net resource files in VS 2003. I have an application that is not localized, but I would still like to be able to place all of...
0
by: Sami Rehman | last post by:
Hi, I have got a C# Class library project 'MyCompany.Model.ValidationService' that deals with data validation. In this I have got a resource file 'RegularExpressions' to store regular...
2
by: CSharper | last post by:
I am using VS2008 C#3.0 and I would like to know if some one can help me wiith the following 2 questions; 1. I have a XML file called test.xml file in resource and I would like to how can I read...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.