Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts

Thursday, March 29, 2012

PERFORMANCE QUESTION

I want to built a web page which is gonna have multiple languages. Which one
is the best way ? Using a Xml file to store languages and their
corresponding fields or Using a MS-SQL Database ?
What do you recommend me to have best performance about multilanguage
web-sites?if you are worried about performance, the localized content should be stored
in the cache, which means whether you use XML or a database, the performance
will be excellent.
Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Savas Ates" <in da club> wrote in message
news:OsYNsoBVGHA.5500@.TK2MSFTNGP12.phx.gbl...
>I want to built a web page which is gonna have multiple languages. Which
>one is the best way ? Using a Xml file to store languages and their
>corresponding fields or Using a MS-SQL Database ?
> What do you recommend me to have best performance about multilanguage
> web-sites?
>
It really depends. For large numbers of records, SQL will far outperform
XML. Parsing XML is a relatively slow thing. If you are going to have 10K
records with information regarding different words in different languages,
XML is going to be slow, and so will XPath.
If you have 200 records, well, maybe it doesn't matter as much.
Also, you can use Access as your database, which is file based, so similar
to an XML file in that regard.
You should look at your situation, and see what works best for you. The key
is to box up all the translation code into some methods, so if you switch
implementations, only those few methods have to change.
"Savas Ates" <in da club> wrote in message
news:OsYNsoBVGHA.5500@.TK2MSFTNGP12.phx.gbl...
>I want to built a web page which is gonna have multiple languages. Which
>one is the best way ? Using a Xml file to store languages and their
>corresponding fields or Using a MS-SQL Database ?
> What do you recommend me to have best performance about multilanguage
> web-sites?
>
File I/O is simple and no network operation needed... But again if you are
delpoying to a server, will it be easy to get deployed and get read access
or read-write for the XMLfile?
personally i will go with DB, if your application is already using a
Database for other purposes.. the reason is updating is easy... or else you
have to find ways to deploy the new XML file to the server... might be
painful sometimes..
if you don't have a DB in the app... do a XML file...
VJ
"Savas Ates" <in da club> wrote in message
news:OsYNsoBVGHA.5500@.TK2MSFTNGP12.phx.gbl...
>I want to built a web page which is gonna have multiple languages. Which
>one is the best way ? Using a Xml file to store languages and their
>corresponding fields or Using a MS-SQL Database ?
> What do you recommend me to have best performance about multilanguage
> web-sites?
>
There is a standardized feature in ASP.NET for binding the text properties
of web controls with alternate content, stored in XML based "resource
files", keyed on the language settings of the user's browser.
http://msdn2.microsoft.com/en-us/library/ms227427(VS.80).aspx
"Savas Ates" <in da club> wrote in message
news:OsYNsoBVGHA.5500@.TK2MSFTNGP12.phx.gbl...
>I want to built a web page which is gonna have multiple languages. Which
>one is the best way ? Using a Xml file to store languages and their
>corresponding fields or Using a MS-SQL Database ?
> What do you recommend me to have best performance about multilanguage
> web-sites?
>
Savas,
Is this real a question. Whatever system your choose is the only moment that
it can be from importance be as the user changes the language. As most use
the by IE returned standard information in what is the language and than a
Cookie if that changes, what is a one time operation. For the rest it is
equal to getting all kind of information.
Just my thought,
Cor
On Thu, 30 Mar 2006 20:22:04 +0200, "Cor Ligthert [MVP]"
<notmyfirstname@.planet.nl> wrote:
in <Okh2caCVGHA.5580@.TK2MSFTNGP11.phx.gbl>

>Savas,
>Is this real a question. Whatever system your choose is the only moment tha
t
>it can be from importance be as the user changes the language. As most use
>the by IE returned standard information in what is the language and than a
>Cookie if that changes, what is a one time operation. For the rest it is
>equal to getting all kind of information.
>Just my thought,
>Cor
>
Well, good that we cleared that one up a bit.
This posting is provided "AS IS" with no warranties, no guarantees, and no c
onferred rights.
Stefan Berglund
Yep, clear as mud (as Cor's posts usually are, from memory).
*mike hodgson*
http://sqlnerd.blogspot.com
Stefan Berglund wrote:

>On Thu, 30 Mar 2006 20:22:04 +0200, "Cor Ligthert [MVP]"
><notmyfirstname@.planet.nl> wrote:
> in <Okh2caCVGHA.5580@.TK2MSFTNGP11.phx.gbl>
>
>
>Well, good that we cleared that one up a bit.
>--
>This posting is provided "AS IS" with no warranties, no guarantees, and no
conferred rights.
>Stefan Berglund
>

Monday, March 26, 2012

Perhaps an XML file might do this trick?

I've got an application that many supervisors are going to use. However,
each one needs to see a different part of the information. Some supervisors
will all have the same view of the information with the same fields showing.
Others have variations on those fields to see.

The idea is that when an error is made in a certain business process, a log
entry of it would be made. The department responsible would have its
supervisor notified by e-mail. So, in our database, we have a list of all
the departments, but no easy association from the Department to its
supervisor. (Perhaps that's something I'll need to work on)

Anyways, what I want to do is to store an XML file of the department ID's
and the ID of the supervisor to send an e-mail to. Not only that, but I'd
like to use an XML file to control which fields a person needs to see. But
I'm no XML guru by any means. With only 2.5 days to do this, I'm open to
suggestions on how to best implement these requirements.

--
Stephajn CraigThis is a start...

The information I'm "protecting" and at the same time showing is coming out
of a database. The output is a datagrid bound to a datatable. The thought
occurs to me to pass the datatable through an XML transformation (perhaps
using an XSD file?) for whatever user is currently looking at it. And, to
use another XML file for determining the type of transformation to take
place. This way, no changes would have to be made to the underlying code of
the application, but rather to an XML file.

But while I may have a bit of theoretical design in mind,
1. I don't know if it's correct.
2. I don't have any idea how to implement this theory if I AM right.

--
Stephajn Craig
"Marty McDonald" <mcdonama@.wsdot.wa.gov> wrote in message
news:u#G3fIAPDHA.1624@.tk2msftngp13.phx.gbl...
> I'm just learning XML myself. Concerning the information you're trying to
> protect, is it an XML file too? If so, you can use namespace prefixes
> throughout that XML document. Each prefix would represent the kind of
role
> a person requires to view that particular information. From there, you can
> use whatever method you'd like (such as XML transforms?) to get only those
> fields a particular person is allowed to view. I know this might be
vague,
> but maybe someone can elaborate further.
> Marty
> "Stephajn Craig" <s.craig@.NOSPAMfunsunvacations.com> wrote in message
> news:#eMssBAPDHA.3192@.TK2MSFTNGP10.phx.gbl...
> > I've got an application that many supervisors are going to use.
However,
> > each one needs to see a different part of the information. Some
> supervisors
> > will all have the same view of the information with the same fields
> showing.
> > Others have variations on those fields to see.
> > The idea is that when an error is made in a certain business process, a
> log
> > entry of it would be made. The department responsible would have its
> > supervisor notified by e-mail. So, in our database, we have a list of
all
> > the departments, but no easy association from the Department to its
> > supervisor. (Perhaps that's something I'll need to work on)
> > Anyways, what I want to do is to store an XML file of the department
ID's
> > and the ID of the supervisor to send an e-mail to. Not only that, but
I'd
> > like to use an XML file to control which fields a person needs to see.
> But
> > I'm no XML guru by any means. With only 2.5 days to do this, I'm open
to
> > suggestions on how to best implement these requirements.
> > --
> > Stephajn Craig

Saturday, March 24, 2012

Permission to write a file

Hi all
I'm coding a Web application which requires to write an XML file into a
folder. I'm wondering other than account Everyone which else I can set
permission so that my application can have the rights to write the file.You have to set permissions on the user that asp.net is working on.
By default it is ASPNET
Regards
Martin
"Hai Nguyen" <haiaggie@.neo.tamu.edu> wrote in message
news:ueILnPGVEHA.1048@.tk2msftngp13.phx.gbl...
> Hi all
> I'm coding a Web application which requires to write an XML file into a
> folder. I'm wondering other than account Everyone which else I can set
> permission so that my application can have the rights to write the file.
>
>

Permission to write a file

Hi all

I'm coding a Web application which requires to write an XML file into a
folder. I'm wondering other than account Everyone which else I can set
permission so that my application can have the rights to write the file.You have to set permissions on the user that asp.net is working on.
By default it is ASPNET

Regards
Martin

"Hai Nguyen" <haiaggie@.neo.tamu.edu> wrote in message
news:ueILnPGVEHA.1048@.tk2msftngp13.phx.gbl...
> Hi all
> I'm coding a Web application which requires to write an XML file into a
> folder. I'm wondering other than account Everyone which else I can set
> permission so that my application can have the rights to write the file.
>

Friday, March 16, 2012

Persist data in XML data island

I want to use an XML data island to display editable records to a user
on the cleint side. The user should be able to scroll through the
records, modify any or all fields in any or all records, add records,
and delete records.

As far as I can see, there are a couple of ways to implement this. I
could persist the original data island and create a duplicate data
island that the user would modify. When the modifications were
complete, I could post back both XML snippets and compare them to see
what has changed.

Alternatively, I was thinking about using the DiffGram idea, where
each change would add an xml element to an xml snippet that would
indicate what item was changed, added, deleted, etc.

I know that I am not the first person to want to use this type of
technique, so I was hoping that there is something built into the .Net
framework to help with the management of the data. Ideally, I would
like to do something like serialize a dataset to XML, send it to the
client as an XML data island, have them manipulate it, repost it, and
then turn it "magically" into a batch update to the dataset on the
server side. Is that possible, or do I have to roll my own solution?

Thanks.

PatIf you read the XML back into a dataset, then you can use .getchanges on the
datatable to get only the changed rows. Send this back to the server in a
dataset. One easy way to do this is to use web services on the server.

"Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
news:5de67752.0405250947.7f526dc4@.posting.google.c om...
> I want to use an XML data island to display editable records to a user
> on the cleint side. The user should be able to scroll through the
> records, modify any or all fields in any or all records, add records,
> and delete records.
> As far as I can see, there are a couple of ways to implement this. I
> could persist the original data island and create a duplicate data
> island that the user would modify. When the modifications were
> complete, I could post back both XML snippets and compare them to see
> what has changed.
> Alternatively, I was thinking about using the DiffGram idea, where
> each change would add an xml element to an xml snippet that would
> indicate what item was changed, added, deleted, etc.
> I know that I am not the first person to want to use this type of
> technique, so I was hoping that there is something built into the .Net
> framework to help with the management of the data. Ideally, I would
> like to do something like serialize a dataset to XML, send it to the
> client as an XML data island, have them manipulate it, repost it, and
> then turn it "magically" into a batch update to the dataset on the
> server side. Is that possible, or do I have to roll my own solution?
> Thanks.
> Pat
So, I could create a dataset, serialize it and send it down to the
client. Then, on the client side, I could bind it to some controls,
let the user add, delete, and modify records. Then, on repost, I
should convert the data back into a dataset, and call .getchanges? I
don't see how getchanges would work without having the original
dataset to compare the new dataset to?

How could I implement this with web services without posting the
information back to the server for every change?

Pat

"Rick Spiewak" <rickspiewak@.mindspring.com> wrote in message news:<#BJ7SftQEHA.3420@.TK2MSFTNGP11.phx.gbl>...
> If you read the XML back into a dataset, then you can use .getchanges on the
> datatable to get only the changed rows. Send this back to the server in a
> dataset. One easy way to do this is to use web services on the server.
> "Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
> news:5de67752.0405250947.7f526dc4@.posting.google.c om...
> > I want to use an XML data island to display editable records to a user
> > on the cleint side. The user should be able to scroll through the
> > records, modify any or all fields in any or all records, add records,
> > and delete records.
> > As far as I can see, there are a couple of ways to implement this. I
> > could persist the original data island and create a duplicate data
> > island that the user would modify. When the modifications were
> > complete, I could post back both XML snippets and compare them to see
> > what has changed.
> > Alternatively, I was thinking about using the DiffGram idea, where
> > each change would add an xml element to an xml snippet that would
> > indicate what item was changed, added, deleted, etc.
> > I know that I am not the first person to want to use this type of
> > technique, so I was hoping that there is something built into the .Net
> > framework to help with the management of the data. Ideally, I would
> > like to do something like serialize a dataset to XML, send it to the
> > client as an XML data island, have them manipulate it, repost it, and
> > then turn it "magically" into a batch update to the dataset on the
> > server side. Is that possible, or do I have to roll my own solution?
> > Thanks.
> > Pat
Don't bind to the XML, re-create the dataset. Then you can do getchanges
against the modified table, re-create a dataset with just the changes,
and send that back up to the server.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Persist data in XML data island

I want to use an XML data island to display editable records to a user
on the cleint side. The user should be able to scroll through the
records, modify any or all fields in any or all records, add records,
and delete records.
As far as I can see, there are a couple of ways to implement this. I
could persist the original data island and create a duplicate data
island that the user would modify. When the modifications were
complete, I could post back both XML snippets and compare them to see
what has changed.
Alternatively, I was thinking about using the DiffGram idea, where
each change would add an xml element to an xml snippet that would
indicate what item was changed, added, deleted, etc.
I know that I am not the first person to want to use this type of
technique, so I was hoping that there is something built into the .Net
framework to help with the management of the data. Ideally, I would
like to do something like serialize a dataset to XML, send it to the
client as an XML data island, have them manipulate it, repost it, and
then turn it "magically" into a batch update to the dataset on the
server side. Is that possible, or do I have to roll my own solution?
Thanks.
PatIf you read the XML back into a dataset, then you can use .getchanges on the
datatable to get only the changed rows. Send this back to the server in a
dataset. One easy way to do this is to use web services on the server.
"Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
news:5de67752.0405250947.7f526dc4@.posting.google.com...
> I want to use an XML data island to display editable records to a user
> on the cleint side. The user should be able to scroll through the
> records, modify any or all fields in any or all records, add records,
> and delete records.
> As far as I can see, there are a couple of ways to implement this. I
> could persist the original data island and create a duplicate data
> island that the user would modify. When the modifications were
> complete, I could post back both XML snippets and compare them to see
> what has changed.
> Alternatively, I was thinking about using the DiffGram idea, where
> each change would add an xml element to an xml snippet that would
> indicate what item was changed, added, deleted, etc.
> I know that I am not the first person to want to use this type of
> technique, so I was hoping that there is something built into the .Net
> framework to help with the management of the data. Ideally, I would
> like to do something like serialize a dataset to XML, send it to the
> client as an XML data island, have them manipulate it, repost it, and
> then turn it "magically" into a batch update to the dataset on the
> server side. Is that possible, or do I have to roll my own solution?
> Thanks.
> Pat
So, I could create a dataset, serialize it and send it down to the
client. Then, on the client side, I could bind it to some controls,
let the user add, delete, and modify records. Then, on repost, I
should convert the data back into a dataset, and call .getchanges? I
don't see how getchanges would work without having the original
dataset to compare the new dataset to?
How could I implement this with web services without posting the
information back to the server for every change?
Pat
"Rick Spiewak" <rickspiewak@.mindspring.com> wrote in message news:<#BJ7SftQEHA.3420@.TK2MSFT
NGP11.phx.gbl>...
> If you read the XML back into a dataset, then you can use .getchanges on t
he
> datatable to get only the changed rows. Send this back to the server in a
> dataset. One easy way to do this is to use web services on the server.
> "Pat Alessi" <pwalessi1@.hotmail.com> wrote in message
> news:5de67752.0405250947.7f526dc4@.posting.google.com...
Don't bind to the XML, re-create the dataset. Then you can do getchanges
against the modified table, re-create a dataset with just the changes,
and send that back up to the server.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

persist xml in class referenced in asp.net page

hello I am putting together a web form which builds an xml file.
I have another class which is referenced in the asp.net page.
The first page load creates an instance of the class. In the class
are various methods which build up an xml file...ie create method
builds the
first root element, and other calls add elements and attributes to
this base root node.
The webpage has various buttons, dropdowns, and other controls which
when clicked on perform the various methods.
Now I could write the current XML to a filestore after each method in
my separate class file ie, Create root node, add elements, add
attributes, but I would rather persist an xmldocument object in the
class somehow.
However my asp.net page doesn't hold the properties of the first call
to the separate class into the second call. So if I instanciate my
class on the first page load, and don't recreate it on postback, if in
after CreateRoot() method called after the first button click, I call
an AddElement() method after another event, the xmldocument object
doesn't have its root node anymore.
Is there anyway a class can do this for an asp.net page, persist xml
between multiple postbacks, or is this by nature not possible due to
the fact that asp.net destroys all objects when it unloads?
Any clarification appreciated, I am attempting to build some
EnterpriseServices around the generation of Xml Template based
system...
Thanks,
yurpsIn article <984bebc3.0406220557.1044e41f@.posting.google.com>,
yurps@.yahoo.co.uk says...
> Is there anyway a class can do this for an asp.net page, persist xml
> between multiple postbacks, or is this by nature not possible due to
> the fact that asp.net destroys all objects when it unloads?
Look into the ViewState:
"Saving Web Forms Page Values Using View State"
http://tinyurl.com/2a8ns
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele

persist xml in class referenced in asp.net page

hello I am putting together a web form which builds an xml file.

I have another class which is referenced in the asp.net page.
The first page load creates an instance of the class. In the class
are various methods which build up an xml file...ie create method
builds the
first root element, and other calls add elements and attributes to
this base root node.

The webpage has various buttons, dropdowns, and other controls which
when clicked on perform the various methods.

Now I could write the current XML to a filestore after each method in
my separate class file ie, Create root node, add elements, add
attributes, but I would rather persist an xmldocument object in the
class somehow.

However my asp.net page doesn't hold the properties of the first call
to the separate class into the second call. So if I instanciate my
class on the first page load, and don't recreate it on postback, if in
after CreateRoot() method called after the first button click, I call
an AddElement() method after another event, the xmldocument object
doesn't have its root node anymore.

Is there anyway a class can do this for an asp.net page, persist xml
between multiple postbacks, or is this by nature not possible due to
the fact that asp.net destroys all objects when it unloads?

Any clarification appreciated, I am attempting to build some
EnterpriseServices around the generation of Xml Template based
system...

Thanks,
yurpsIn article <984bebc3.0406220557.1044e41f@.posting.google.com>,
yurps@.yahoo.co.uk says...
> Is there anyway a class can do this for an asp.net page, persist xml
> between multiple postbacks, or is this by nature not possible due to
> the fact that asp.net destroys all objects when it unloads?

Look into the ViewState:

"Saving Web Forms Page Values Using View State"
http://tinyurl.com/2a8ns

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele