Best Practise for the Web and Strataframe


Author
Message
Olivier
Olivier
StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 805
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
==============================================
StrataFrame Team
S
StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K 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?
Olivier
Olivier
StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 805
Hello Ben,

May be, i explain myself very bad.

I don't know if we store Strata on Session or Viewstate it's better.

But , i don't want to depend the limited time , for my user.

I mean, i want to understand how Entity framework work with asp.net
and if my problem will be resolv with Strata 2.0.

Does Entity depend some variable session ?

If the user add new record and my app can load their session with cookie,
to during more 24 h if i want.

If the user add new record with entity it's work without session or not ?

Strata will be fusion with entities ?

It's possible if the session is expired do not lose the value in textbox , to reload Bo to make an Add() ?

thanks for your help, i have many question about stroke with strata and the web .

ben

==============================================
Asp.net C# - Strataframe - telerik
==============================================
Olivier
Olivier
StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 805
Hello Ben,

It's possible to desactivate the Object Session with Strata , to Load on each demand ?

Without modify the source code?

thanks
Olivier

==============================================
Asp.net C# - Strataframe - telerik
==============================================
Edited 11 Years Ago by Olivier
Michel Levy
Michel Levy
StrataFrame User (227 reputation)StrataFrame User (227 reputation)StrataFrame User (227 reputation)StrataFrame User (227 reputation)StrataFrame User (227 reputation)StrataFrame User (227 reputation)StrataFrame User (227 reputation)StrataFrame User (227 reputation)StrataFrame User (227 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 (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K 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 Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 805
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
==============================================
Olivier
Olivier
StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 805
Hello Ben,

In the version 2.0 , the Bo inherit from Entity ? it's exact ?

Do you know how entity store the Business object during the session ?

==============================================
Asp.net C# - Strataframe - telerik
==============================================
Edited 11 Years Ago by Olivier
Olivier
Olivier
StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 805
Hello

I get a idea about the solution.

It's possible like foxpro and cursor temp to store in Xml (dir temp for each session) or Sql Server,
the state of Bo Stratra. We can set up timeout on parameters Bo, if the temps are too old strat delete this.

It's a real problem, i understand we have plus to save the state session against entity or other bo.

But we need to understand , it's not the best way to work in the app web, only in winform. Please accept my enhancement
to have no problem with my user.

I know we can save on sql server session, but i use the classic session in proc , the problem is only for stratra

http://msdn.microsoft.com/en-us/library/ms178586.aspx

Do you know a simple way to save a Bo in xml file ?

Can you read the third post here ?
http://stackoverflow.com/questions/1725925/how-to-set-session-timeout-more-than-20-min

thanks
Olivier,

==============================================
Asp.net C# - Strataframe - telerik
==============================================
Olivier
Olivier
StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)StrataFrame Novice (114 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 805
Hello

i forget to tell, i have test to use viewstate to save a session bo, but asp.net
say "Out Of Memory"

Thanks
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