Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Session State Question
Message
De
16/07/2004 13:43:23
 
 
À
16/07/2004 10:39:33
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00924697
Message ID:
00925272
Vues:
17
Terry,

Unfortunately, I am pretty new myself, so someone else might be able to provide a recommendation with more experience behind it. I have bought a few books that I would pan, however. If anyone more experienced is still reading this thread, please weigh in.

Although I like O'Reilly's books, I am disappointed by "Programming ASP.NET" by Liberty & Hurwitz. Their examples put a lot of code directly in the .ASPX page, intermixed with HTML, rather than the code behind, and from an object-oriented perspective, this is really sloppy, hard to maintain, and hard to reuse. It would probably be okay for programmers who, like the authors, come from a background in plain ASP, PHP, JSP, etc. but I hate writing pages that way, so it is being resold.

I need to code a few custom server controls and have been looking for a good book on the subject. "Developing .NET Custom Controls & Designers Using C#" by James Henry is really bad. Besides being badly bound and printed (falling apart after one reading), it isn't well written. The author really needed an editor: there are mispellings, bad grammar, and it is incohesive.

The latest book that I got is Microsoft Press' "Developing Microsoft ASP.NET Server Controls and Components" by Nikhil Kothari and Vandana Datye. Microsoft paid them to write it, so I am hoping it is a good introduction to the subject. Skimming through, it looks good.

I like O'Reilly's "Definitive Guides and References": "JavaScript" by Flanagan, "HTML & XHTML" by Musciano & Kennedy, "Cascading Style Sheets" by Meyer, and "Dynamic HTML" by Goodman. They are the books I used in my web design classes in college, and I keep buying the updated versions as they release them.

I have heard that integrating Java applets into ASPX pages may be difficult. At the very least, you have to deal with variances between different Virtual Machines and ensuring that they are downloaded, installed, and up-to-date. Communicating between Java applets and an ASP server is probably pretty complicated.

You can spawn a second window using JavaScript. I have been to sites where two browser windows were synchronized, so that doing something in one forces another, already existing browser window to update, I just don't know what the underlying code is. I have done something similar between frames, so you probably just need to poke around in the browser object model. The drag about JavaScript is targeting multiple browsers if you aren't lucky enough to be coding for a captive, internal audience.

David

>David,
>
>I think we agree on the idea of separate data session being of value when a user wants to be editing a customer record then want to leave that screen before saving and open a new browser to lookup another customer record or related record.
>
>The only time I think I would want to open another browser is the same session would be to open it as a modal window. I’m new to ASP.Net and web dev in general but I have read there are several methods to open a modal instance of a browser. One method requires IE 5+ and another is pure java code. I will be exploring these techniques soon.
>
>I’m exploring options available to make the user experiences as rich as possible. Have you seen a book that deals specifically with Web UT techniques and tricks for .NET?
>
>Regards,
>
>Terry
>
>
>
>
>>Terry,
>>
>>If you have two browser windows accessing the same session, you are going to have data synchonization issues. If a user opens Window1 with DataX, then opens Window2 with the same DataX, changes DataX in Window2, submits the form in Window2, then returns to Window1, they probably expect the DataX to be current like it would be in a Windows app.
>>
>>Even if Window2 only presented read-only data in a different form, most users would assume that DataX edits in Window1 would update DataX in Window2.
>>
>>If you wanted to "clone" a session, you could just open another window and pass along the same query string. The problem is that most users don't realize the difference between data synchronization in a Windows app and a web app.
>>
>>Maybe I am misunderstanding your question.
>>
>>David
>>
>>>David,
>>>
>>>Thanks for the reply.
>>>
>>>I tested setting cookieless="true" in the Web.config and then opened a second web browser and I did get two separate sessions. Doing this encapsulates the state to one browser.
>>>
>>>However it just occurred to me that there may be a time when I would want a second window to participate in the same session as the parent window. I wonder if there is a way to capture the session state key and programmatically add it to the URL before opening the new window? If this would be possible we could share state when desired. I will try to explore this more. Do you have any thoughts?
>>>
>>>Terry Carroll
>>>
>>>
>>>
>>>
>>>>Morgan,
>>>>
>>>>I know at least one way. By default, the server keeps track of Session IDs using cookies which pass it in on every request to the server.
>>>>
>>>>If you turn off cookies to store Session IDs, the session ID is passed on the query string, so if someone opens up a second browser instance, they aren't passing a query string in, so the server should assign them a new session. You should implement something in your App to open a new browser window without the old URL.
>>>>
>>>>In IE, if you press Control+N or choose File>New>Window, your new Window contains the old browser's URL (which would have the session ID in it). By training users how to create a second, distinct session and supporting it in the interface, you should be able to do it. I haven't done it yet, but am planning to do it later on my current project, once I get to the interface. If you try it, I would like to hear about any problems you encounter.
>>>>
>>>>David
David S. Alexander
Kettley Publishing
20271 SW Birch Street, 2nd Floor
Newport Beach, CA 92660-1752
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform