[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-21 Thread drewB
Thanks to everyone for their thoughts. I ended up writing code to do the translation. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototyp

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-20 Thread DJ Mangus
Yes if your roundtrip is slow then doing it clientside can make it seem more responsive. There is the issue though of what happens if the server save fails? Revert your changes? Overall using serverside output is less troublesome, easier to code, and more robust. On 8/20/09, drewB wrote: > >>U

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-20 Thread drewB
>Unlikely. There is very little difference in computation effort >between generating JSON, XML, HTML or delimited text at the server. I will have to take your word for this. I assumed it to be different. >So why put it in two places? Why turn data into say JSON just so you >can later turn it in

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-18 Thread RobG
On Aug 19, 5:30 am, drewB wrote: > As I see it the advantages of doing it client-side are: > - The server can handle more users because less work is done there Unlikely. There is very little difference in computation effort between generating JSON, XML, HTML or delimited text at the server. Th

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-18 Thread drewB
As I see it the advantages of doing it client-side are: - The server can handle more users because less work is done there - Cleaner delineation for presentation layer. If I want to change the way things look, there are fewer places I need to go. - Possibly better user experience because there is

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-18 Thread DJ Mangus
I can't help with the solution but since you need serverside processing anyway why not just do it all serverside? On 8/18/09, drewB wrote: > > Yes, by "javascript" I mean Prototype API. > > A simplified use case is as follows: > > A user has selected X pieces of furniture. On a single page, the

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-18 Thread drewB
Yes, by "javascript" I mean Prototype API. A simplified use case is as follows: A user has selected X pieces of furniture. On a single page, they are shown a list of the furniture items with specific info about each piece. For example, name, dimensions, manufacture, list of parts etc. Much of

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-18 Thread drewB
Interesting suggestion. Unfortunately, the content is more dynamic them just text replacements. For example, there is a list of varying length. Also just using template for 200 lines of text doesn't seem very "tidy" to me. On Aug 18, 3:19 am, Richard Quadling wrote: > 2009/8/18 drewB : > > >

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-18 Thread Richard Quadling
2009/8/18 drewB : > > I have 200 lines of an HTML snippet that I plan to convert to > javascript using Prototypes Elements.  Instead of doing this by hand, > I figure I could write some code that would take any block of HTML and > convert it to javascript.  Then it occurs to me that I couldn't be