Basically, I'm stumped on how to translate something I wrote in PHP to
ASP.NET, and I'm having a hard time figuring out what is right way to do it
now...
The scenario in PHP was as follows:
I wrote a Discussion forum that worked client side via JScript that
initiated home-brew RPC calls in XML format (I wrote it pre-soap, or -- more
precisely -- before I knew about SOAP...) something like:
<rpc><command>GetChildren</command><msg_id>1478</msg_id></rpc>
Which was responded to with:
<recordset>
<record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record>
<record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record>
....
</recordset>
Upon receipt I used JScript to insertRow() and manipulate the layout...
As for editing/viewing single records, I simply hide the div that contained
the tree, and showed another div that I also dynamically filled in. Submit
was also done via XML.
Pretty straightforward trying to be Flash within HTML........ ;-)
Other than being a fun challenge of packing lots of JScript into 14k, the
benefit of such an approach was that no vars needed to be held in Session as
each XML call caused only one Query (Select * from Msgs where PID=@...) and
that was that.
The downside of couse was that if you F5, you recollapsed the tree.... But
all in all, it was pretty smooth, very little data on the wire so quick
response times, etc. The only tough part was the wiring across frames or div
hiding/displaying (I used both techniques) for the edit forms...But ok.
Now -- in ASP.NET - and please bear with me, I just started ASP.NET a couple
of months ago, and I'm still 'thinking' in PHP mode it seems, but I really
want to learn -- I'm tried to figure out how to handle this within the DNN
structure.
For one, if I use an EditForum.aspx on another page/url, and then return to
the forum, to not completly lose the layout of the tree, I have to either a)
Query recursively each time someone clicks a leaf to expand its children
(ie, 3 nodes down, we're talking about 3 queries in stead of 1) or b)hold a
proxy tree to which I append the new sub-query, then hold that proxy-tree in
Session or in memory, or in ViewState.
Saving it in ViewState sounds horrible as I would be burying the Client
under 30 records (visible) and 30 records (stuffed in ViewState). And that
was for a small set -- if I had a tree with 1, 1.5, 1.7, 1.5.3, 1.7.4 open,
then we're talking about 5 queries...Lots of time Querying, lots of time
serializing, lots of time and transfer size everywhere...
Saving it in Session via rerouting the ViewState to Session (I had read the
same article you referred to btw) sounds ok for about 200 users, but keel
over after that (100 users * 50k = 100Megs) because -- if I understand
correctly, DNN's Session data is in memory -- not transfered to file/DB) ...
I hadn't even realized that the session stuff was still in memory for
another 20 minutes or so, as your blog made clear!
Or manually saving it to a file by hand -- which (let alone the nightmare of
cleaning up after myself, creating unique names, etc) depends on the
security Write settings of the dir where DNN (the website portal system i am
attempting to write this for) was installed....
Anyway -- this all seems way too difficult to be the correct way to be
approaching this in ASP.NET, so I'm reaching out to see if you have a
suggestion on how to perceive the solution from ASP.NET eyes, to keep a
forum, with some child nodes opened, some not, and yet not require millions
of Queries to rehydrate the tree on each click...
Thanks!
Sky 2 1258
session is the .net solution. you can use sqlserver to store session or the
pagefile (100mb is really not that much).
-- bruce (sqlwork.com)
"Sky" <fo****@xact-solutions.com> wrote in message
news:#L**************@TK2MSFTNGP10.phx.gbl... Basically, I'm stumped on how to translate something I wrote in PHP to ASP.NET, and I'm having a hard time figuring out what is right way to do
it now...
The scenario in PHP was as follows:
I wrote a Discussion forum that worked client side via JScript that initiated home-brew RPC calls in XML format (I wrote it pre-soap, or --
more precisely -- before I knew about SOAP...) something like: <rpc><command>GetChildren</command><msg_id>1478</msg_id></rpc>
Which was responded to with: <recordset> <record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record> <record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record> ... </recordset> Upon receipt I used JScript to insertRow() and manipulate the layout... As for editing/viewing single records, I simply hide the div that
contained the tree, and showed another div that I also dynamically filled in. Submit was also done via XML. Pretty straightforward trying to be Flash within HTML........ ;-)
Other than being a fun challenge of packing lots of JScript into 14k, the benefit of such an approach was that no vars needed to be held in Session
as each XML call caused only one Query (Select * from Msgs where PID=@...)
and that was that. The downside of couse was that if you F5, you recollapsed the tree.... But all in all, it was pretty smooth, very little data on the wire so quick response times, etc. The only tough part was the wiring across frames or
div hiding/displaying (I used both techniques) for the edit forms...But ok.
Now -- in ASP.NET - and please bear with me, I just started ASP.NET a
couple of months ago, and I'm still 'thinking' in PHP mode it seems, but I really want to learn -- I'm tried to figure out how to handle this within the DNN structure.
For one, if I use an EditForum.aspx on another page/url, and then return
to the forum, to not completly lose the layout of the tree, I have to either
a) Query recursively each time someone clicks a leaf to expand its children (ie, 3 nodes down, we're talking about 3 queries in stead of 1) or b)hold
a proxy tree to which I append the new sub-query, then hold that proxy-tree
in Session or in memory, or in ViewState.
Saving it in ViewState sounds horrible as I would be burying the Client under 30 records (visible) and 30 records (stuffed in ViewState). And that was for a small set -- if I had a tree with 1, 1.5, 1.7, 1.5.3, 1.7.4
open, then we're talking about 5 queries...Lots of time Querying, lots of time serializing, lots of time and transfer size everywhere...
Saving it in Session via rerouting the ViewState to Session (I had read
the same article you referred to btw) sounds ok for about 200 users, but keel over after that (100 users * 50k = 100Megs) because -- if I understand correctly, DNN's Session data is in memory -- not transfered to file/DB)
.... I hadn't even realized that the session stuff was still in memory for another 20 minutes or so, as your blog made clear!
Or manually saving it to a file by hand -- which (let alone the nightmare
of cleaning up after myself, creating unique names, etc) depends on the security Write settings of the dir where DNN (the website portal system i
am attempting to write this for) was installed....
Anyway -- this all seems way too difficult to be the correct way to be approaching this in ASP.NET, so I'm reaching out to see if you have a suggestion on how to perceive the solution from ASP.NET eyes, to keep a forum, with some child nodes opened, some not, and yet not require
millions of Queries to rehydrate the tree on each click...
Thanks!
Sky
Thanks bruce.
One question: the module I am designing is suppossed to work within
DotNetNuke's framework -- and they don't cache the Session, and I don't want
to change their core code. Any other suggestions?
Sky
"bruce barker" <no***********@safeco.com> wrote in message
news:uT**************@tk2msftngp13.phx.gbl... session is the .net solution. you can use sqlserver to store session or
the pagefile (100mb is really not that much).
-- bruce (sqlwork.com) "Sky" <fo****@xact-solutions.com> wrote in message news:#L**************@TK2MSFTNGP10.phx.gbl... Basically, I'm stumped on how to translate something I wrote in PHP to ASP.NET, and I'm having a hard time figuring out what is right way to do it now...
The scenario in PHP was as follows:
I wrote a Discussion forum that worked client side via JScript that initiated home-brew RPC calls in XML format (I wrote it pre-soap, or -- more precisely -- before I knew about SOAP...) something like: <rpc><command>GetChildren</command><msg_id>1478</msg_id></rpc>
Which was responded to with: <recordset> <record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record> <record><Subject>aljfaslkfj</Subject><Msg>sdfasdfas</Msg></record> ... </recordset> Upon receipt I used JScript to insertRow() and manipulate the layout... As for editing/viewing single records, I simply hide the div that contained the tree, and showed another div that I also dynamically filled in.
Submit was also done via XML. Pretty straightforward trying to be Flash within HTML........ ;-)
Other than being a fun challenge of packing lots of JScript into 14k,
the benefit of such an approach was that no vars needed to be held in
Session as each XML call caused only one Query (Select * from Msgs where PID=@...) and that was that. The downside of couse was that if you F5, you recollapsed the tree....
But all in all, it was pretty smooth, very little data on the wire so quick response times, etc. The only tough part was the wiring across frames or div hiding/displaying (I used both techniques) for the edit forms...But ok.
Now -- in ASP.NET - and please bear with me, I just started ASP.NET a couple of months ago, and I'm still 'thinking' in PHP mode it seems, but I
really want to learn -- I'm tried to figure out how to handle this within the
DNN structure.
For one, if I use an EditForum.aspx on another page/url, and then return to the forum, to not completly lose the layout of the tree, I have to
either a) Query recursively each time someone clicks a leaf to expand its
children (ie, 3 nodes down, we're talking about 3 queries in stead of 1) or
b)hold a proxy tree to which I append the new sub-query, then hold that
proxy-tree in Session or in memory, or in ViewState.
Saving it in ViewState sounds horrible as I would be burying the Client under 30 records (visible) and 30 records (stuffed in ViewState). And
that was for a small set -- if I had a tree with 1, 1.5, 1.7, 1.5.3, 1.7.4 open, then we're talking about 5 queries...Lots of time Querying, lots of time serializing, lots of time and transfer size everywhere...
Saving it in Session via rerouting the ViewState to Session (I had read the same article you referred to btw) sounds ok for about 200 users, but
keel over after that (100 users * 50k = 100Megs) because -- if I understand correctly, DNN's Session data is in memory -- not transfered to file/DB) ... I hadn't even realized that the session stuff was still in memory for another 20 minutes or so, as your blog made clear!
Or manually saving it to a file by hand -- which (let alone the
nightmare of cleaning up after myself, creating unique names, etc) depends on the security Write settings of the dir where DNN (the website portal system
i am attempting to write this for) was installed....
Anyway -- this all seems way too difficult to be the correct way to be approaching this in ASP.NET, so I'm reaching out to see if you have a suggestion on how to perceive the solution from ASP.NET eyes, to keep a forum, with some child nodes opened, some not, and yet not require millions of Queries to rehydrate the tree on each click...
Thanks!
Sky
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kate |
last post by:
Hi:
I have a picturebox control, and at runtime various usercontrols are
added to it to make a diagram. As dynamically added usercontrols, they
are of type VBExtender.
Is there a way to save...
|
by: lakshmi |
last post by:
Hi all,
I recently rewrote a data intensive C++ program in C#.
The C++ program was traversing 3 recordsets that were all
open at the same time. I replaced those 3 recordsets with
3 .NET data...
|
by: N. Demos |
last post by:
I have a user control with code behind of which two instances are
created/declared in my aspx page. The aspx page has code behind also, as
I need to access methods of the usercontrols on page...
|
by: YYZ |
last post by:
I swear I've done my research, and now I was just hoping someone could
explain this to me.
I've got a base class (usercontrol) that I am using just as an
interface. Meaning, I've defined...
|
by: b747_440 |
last post by:
Dear Newsgroup,
I'm an old VB6.0 developper who switched some time ago to VB.NET 2005.
I really like that new Visual Studio. However, something is going wrong
now and I can't figure out, what it...
|
by: Nathan Sokalski |
last post by:
I have my UserControls in a subdirectory called usercontrols. In the code
for one of my UserControls I have the following:
Public Property adimage() As String
Get
Return...
|
by: rdemyan via AccessMonster.com |
last post by:
Can someone help me with creating code that will look for DAO recordsets in
modules and then check to see if the recordset is also closed in the module.
All of my recordsets are of the form rs*...
|
by: chrisdavis |
last post by:
I'm trying to filter by query or put those values in a distinct query
in a where clause in some sort of list that it goes through but NOT at
the same time. Example:
ROW1
ROW2
ROW3
ROW4 ,...
|
by: Nathan Sokalski |
last post by:
In several of my UserControls I add properties. If I access these properties
in the CodeBehind of the pages that use the controls, I recieve an error
when compiling. The reason for this is because...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |