Best Practise for the Web and Strataframe


Author
Message
StrataFrame Team
S
StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
There is already a way to save the BOs to XML.  You can use bo.CurrentDataTable.WriteXml(filename) to save the file and bo.CurrentDataTable.ReadXml(filename) to read it back in.  The only sticky point you may have to work with is determining the folder for your user.  You could create a folder with a GUID for it's name and store the path in a SQL table with the username and the time when the session was created.  When the user loads a page, check SQL to see if there is an existing session for them and then load the XML file from disk.  For that matter, you could also store the raw XML in a VARCHAR(MAX) field in SQL.  Then you only have to do one lookup.  Take the raw XML string, put it into an XmlReader and call bo.CurrentDataTable.ReadXml(reader).
Olivier
Olivier
StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 805
Hello Ben,

Thanks for this approach ! it can help a little for the starting.

I have a question , if my app has 40 min time session.

My user start to fill the textbox , in new record, so i put StateAdding on strataframe,

if my user left his computer to go outdoor to see a customer, or take a call,
when he restart his input , the session are ended.

He push validate button, and he lose his customer form.

Can i save the state of bo with the fill textbox when he click on the validate button ?

How can save the state ?

i think, if i load editing state or adding state only on push validate button, i lose my binding field.

I don't know if you can see what i mean, with my poor english.

thanks for your help
i appreciate that.

Olivier

==============================================
Asp.net C# - Strataframe - telerik
==============================================
Edited 11 Years Ago by Olivier
StrataFrame Team
S
StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You can probably set the AutoPostBack="True" on each of your textboxes that collects data.  This will cause the form to post back to the web server each time one of the text boxes loses control.  That way, the user would only lose the last text box they were typing in when their session times out.  Each time the user tabs to a new textbox, the postback will copy the value back into the business object.  There's definitely a way to do it, we just need to find the right combination of properties on the UI controls.
Olivier
Olivier
StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)StrataFrame User (196 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 805
Hello ben,


You don't need to do postback on each textbox, cause it's heavy way for the server process.
(i have 600 users , and 30 variable session (bo ) by user)
On the web app, we must save the transfer between server and client, it's for the reason, that ajax was create.

Strataframe is made for the winform concept, i try to find a way to work in the web form.
I'm sorry to see that no other develop web who saw this problem. May be they made only website not web app,
or more developer for the winform. i don't know.

The session variable is not the solution to save the state cause they are not permanent because of the number
of resource user
, and the other bo like entity or hibernate, not refresh the binding field when i postback on the server
 with expired session.

is It possible to desactivate the binding field refresh during an Editing or Adding state ?

If we found a solution, we have the best Bo all over the world, cause the other on the web work there are a web approach not fox approach !

thanks again for your help
Olivier

==============================================
Asp.net C# - Strataframe - telerik
==============================================
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search