state

In ASP.NET, is it OK to store user-specific data in profile with a caching mechanism rather than in session?

I have been reading articles about state management in ASP.NET for few days for my web application. In this application, one user can create/save/execute queries, and I need to keep each parameter of a query before the user can save the query. These parameters are string values, but the global size for one user may exceed few megabytes....

EMAIL server FSP model

For my assignment I need to develop FSP model for email server and client. I manage to write simple model which describes one user, server and his mailbox, but I am having problems changing this system into one which have two users with two separate mailboxes. The FSP model that I have developed: USER = (read->USER | write->USER). SERV...

MVC Views and Controllers: Re-instantiate entities when form submitted

We are working with entities in our MVC controllers which are passed to strongly typed views. How do we re-instantiate these entities in the controller with updated data when the form is posted in the view? The form does not contain all the fields of the entity so all of the data needed to re-instantiate the entities won't be there in ...

Can somebody walk me through this Haskell function (State monad related)?

tick :: State Int Int tick = get >>= \n -> put (n+1) >>= \y -> return n I'm confused as to how put (n+1) has any effect on the end result of this function at all. It seems like this function should return the initial state unchanged. I'm trying to run through this in my mind, but I keep running out of room to hold things ...

Is it bad practice to change state inside of an if statement?

I wrote some code that looks similar to the following: String SKIP_FIRST = "foo"; String SKIP_SECOND = "foo/bar"; int skipFooBarIndex(String[] list){ int index; if (list.length >= (index = 1) && list[0].equals(SKIP_FIRST) || list.length >= (index = 2) && (list[0] + "/" + list[1]).equals(SKIP_SECOND)){ r...

How to preserve iPhone application state before terminating the application ?

Hi all, I have developed an iPhone application with tab bar and navigation controllers. It is working fine for now. Now I want the application to save its state before quitting. Suppose I have 6 tabs and If an incoming call comes , so after relaunching the app I should see the tab selected that was lastly selected . I have seen seve...

WCF, Custom Membership Provider and HttpContext

Ok, Im really going to show my stupidity regarding the ASP.NET security model here but here goes. I have a WCF web service and I have managed to hack my way around to having it pipe through my custom membership provider. My membership provider overrides "ValidateUser" in which I attempt to load a user object with data from our SQL se...

Session State with MVP and Application Controller patterns

Hi, I've created an MVP (passive view) framework for development and decided to go for an Application Controller pattern to manage the navigation between views. This is targeted at WinForms, ASP.NET and WPF interfaces. Although I'm not 100% convinced that these view technologies really swappable, that's my aim at the moment so my MVP f...

A better design? Same object, different possible states

Hello, I have a very simple application which consists of an ASP.NET front end site, with a WCF Windows Service doing the heavy lifting back-end logic. The user has one simple page where he selects some parameters and pushes a 'submit' button. The page calls the WCF service and passes it the parameters. The service instantiated an inst...

os x process state UE

I've got process running that can't be killes. It's my EyeTV App and here is what 'ps aux' says: cb0 87583 1,0 3,4 812796 144236 ?? UE 21Nov09 2638:11.45 [.....]/EyeTV The process state is really strange cause I've never seen UE before. The manpage tells me U means Marks a process in uninterruptible wait, and E mea...

State in ASP.net Master Page

We have a bug that we are trying to fix. It looks like one user can see another users data it they hit the same aspx page at the same time. I was wondering: If we store data in a property on the master page, will all pages running at the same time see that data. Have a master page: public class MyMasterBase : System.Web.UI.MasterPage ...

How to maintain state in silverlight?

When I resize my aspx page hosting the silverlight app, I lose state on all silverlight controls. How do I maintain state on silverlight controls? ...

When to use State vs Behavior Verification

In some cases its obvious when one or the other is warranted in other cases its not so clear. Take the following examples: A method which takes two inputs, performs a calculation and returns the result. A method which calls a factory object's Create method, passes the newly created object to the Add method of a collection object and re...

maintain state with spring between requests.

Hi, I am new to spring so sorry if this is a beginners question, but the manual is not clear (at least not for me) My question is: how do I share state between requests in spring? I can send data from the controller to the view by using a ModelMap, but the data in the ModelMap is not sent back to the next controller by the view. How can...

ASP.NET MVC: How to maintain TextBox State when your ViewModel is a Collection/List/IEnumerable

I am using ASP.NET MVC 2 Beta. I can create a wizard like workflow using Steven Sanderson's technique (in his book Pro ASP.NET MVC Framework) except using Session instead of hidden form fields to preserve the data across requests. I can go back and forth between pages and maintain the values in a TextBox without any issue when my model i...

Asynchronously Decoupled Three-Tier Architecture

Maybe I just expected "three-tier architecture" to deliver a little more than just a clean separation of responsibilities in the source code (see here)... My expectations to such a beast that can safely call its self "three-tier architecture" are a lot higher... so, here they are: If you were to build something like a "three tier arc...

Multiple webRole instances at Azure and session state

I have webRole with some data stored in Session. The data is some tens of small variables (strings), and one-two big objects (some megabytes). I need to run this webRole in multiple instances. Since two requests from the single user can go to different instances, Session became useless. So, i am looking for most efficient and simplest me...

PHP, Session State, Redirecting "Home" Link Based on Referrer

Commonly, a website has a menu bar with links to different pages of the site— Home, Page A, Page B, etc.. Let’s say you have a site with address http://www.example.com. 99% when someone types that URL into their browser, they are directed to the page represented by “Home”. It usually has the optional extension of index[.html|.php] (e.g....

When is it OK to use an IORef?

One thing that has always confused me is whether or not it's an okay time to use an IORef. Are there any guidelines that should be followed when deciding whether or not to use an IORef for a task? When is a good time to use the State monad over an IORef? ...

UI Issue - Controlling Control state and focus

I've reached a bit of an impasse when developing a .NET windows forms app. The problem has to do with switching focus between controls, and how it plays with maintaining the form's control's states. There are three main controls in the UI – two combo boxes and a button. Both combo boxes start off with SelectedItem = null. Both combo b...