Best Practise for the Web and Strataframe


Author
Message
Olivier
Olivier
StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 806
Hi All,

I create some app on the web with c# (asp.net) and strataframe.

I have a lot of user which start a webform to add a new record,
when i click on new , i make : "this.MyBo.add()"

They make other things, during more 20min,  and the get a error when they validate their form.

I know , that i get grow up the session, but it's not recommandate on the web.

Why Strata store in variable Session ? not in the viewstate Session ?

Have you a solution for this problem ?

Thanks
Olivier

==============================================
Asp.net C# - Strataframe - telerik
==============================================
Replies
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
We use the Session because the business objects can get pretty large, and we didn't want to run into the maximum HTTP request size limit.  However, the business objects are serializable, so they can certainly be stored in the ViewState.  

To do this, build your own BasePage and don't use the StrataFrame one.  Create it by copying the one from the StrataFrame source code.  It's only ~300 lines of code, and everything will stay the same except for the InitializeBusinessObjects() method.  There are 2 references in there to the Session, and you can change those to ViewState.  That method is not overridable, otherwise, you could just override it rather than having to re-create the BasePage class.  Which is certainly another option: modify the source to make the InitializeBusinessObjects() method Protected Override and override it to store the BOs in the ViewState rather than the Session.

I'm thinking this is an implicit enhancement request to be able to store the v2 entities in the ViewState, no?
Michel Levy
Michel Levy
Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
Hi Ben,

I'll translate your answer on the French speaking SF forum, and I'll come back here if we need more help.

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Thanks, Michel.  I was thinking about the problem over the weekend.  To store the business objects in the ViewState, you would need to modify the source code or copy out the source code and create your own BasePage class that works similar to the SF one.  If he wants to store the variables in the session, he could increase the session timeout and move the session state storage to SQL Server to preserve resources on the server.
Olivier
Olivier
StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 806
Ben Chase (3/15/2013)


I'm thinking this is an implicit enhancement request to be able to store the v2 entities in the ViewState, no?


Hi,

I make a mistake about viewstate it's too heavy way.  If it's possible to desactivate the variable session
to get a load on each request. (it's the same for entity , how they do ? )

ps : i send to michel this website info.


http://forums.asp.net/t/1579957.aspx/1

http://www.mindscapehq.com/blog/index.php/2008/05/12/using-the-unit-of-work-per-request-pattern-in-aspnet-mvc/


thanks
Olivier,

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

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Olivier - 12 Years Ago
StrataFrame Team - 12 Years Ago
Michel Levy - 12 Years Ago
StrataFrame Team - 12 Years Ago
Olivier - 12 Years Ago
Olivier - 12 Years Ago
Olivier - 12 Years Ago
Olivier - 12 Years Ago
Olivier - 12 Years Ago
Olivier - 12 Years Ago
StrataFrame Team - 12 Years Ago
Olivier - 12 Years Ago
StrataFrame Team - 12 Years Ago
                         Hello ben, You don't need to do postback on each textbox, cause it's...
Olivier - 12 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search