|
This is a general question about the size of the DOM and garbage collection of released objects.
I find myself in the position of referee between some opposing designs and would like to ask if anyone has experience with object disposal in the DOM.
Basically the two approaches are to re-post the page whenever there is a request for a new component or build a monolithic page that keeps being dynamically refashioned by disposing of existing DOM objects and attaching new ones.
It sounds complicated because it is and I know in theory that it can work but I have concerns about trying to put 10 Kg of stuff in a 5 Kg system.
I don’t want to dismiss the monolithic design out of hand for two reasons; first, I need to work with the person who proposed it for the next year and don’t want to make an enemy, and, second, she is an employee and I am a contractor so I don’t want to make an enemy and have to watch out for hidden daggers, a point the project manager cautioned me about.
When I confronted the person in a head on confrontation the PM said that she liked that I broke the grip on power in the team but to beware that this person holds a grudge and probably will try to get back at me in the future. I don’t need this drama but here I am dealing with it every day.
I am personally leaning towards post a new page whenever a major change is requested like working on a completely different component and using AJAX to service minor changes in the page like requesting details of the component that is currently being worked on but I want to be diplomatic because of what I mentioned above.
Do any of you have any horror stories, or success stories, about implementing a monolithic system where the initial page is served up and major revisions to the DOM are happening for an extended period of time?
|
|
|
|
|
JimmyRopes wrote: beware that this person holds a grudge and probably will try to get back at me in the future.
That's a tough one. Because even if there was a solid technical reason not to do what she's suggesting, you'll still need to deal with the drama. Can you take this gal aside, get her in a situation where she doesn't feel like she needs to be defensive about her suggestion, and together hash out aspects of each strategy that you can agree on?
As for the technical aspects...
I can tell you that the IE DOM will be a constant thorn in your side for the monolithic system - slow, memory intensive, and buggy garbage collector. You can side-step a lot of the issues with the latter when you're reloading the page periodically. You can avoid some of this by utilizing optimized 3rd-party libraries like jQuery and ExtJS to do the heavy lifting for you. With IE8 looking to launch as the slowest major browser on the market, you're not going to see relief any time soon. Rarely a week goes by where i don't curse IE due to some such problem.
Monolithic pages have a bad tendency to reinvent the wheel, badly. In a traditional web application, you just link or redirect to the page that implements the tool your user needs next; in a monolithic app, you must provide most of the functionality the browser would normally give you for free: identifying the tool, loading the code and data, refreshing the screen... And while browsers continue to improve and refine their navigational UIs, you won't benefit. You'll have to jump through hoops just to get features that most browsers have provided for years, even to static HTML pages, like as bookmarking. And you'll have to figure out what you want to happen should the user accidentally hit the "refresh" button after performing extensive in-page navigation... I occasionally use a bug tracking system with a monolithic web UI (intended to closely mimic the desktop version), and it's a huge PitA - what's more natural than bookmarking a bug report, or pasting the link into an email?
If you want to support clients without client-side scripting, or with a very different set of capabilities from the average desktop browser, you'll have to write a completely separate UI. If you're planning a separate "mobile" version anyway, this may make sense.
Testing and debugging will be more difficult when you can't just request a page and examine the response. This can be mitigated somewhat by using a good, RESTful, API for your AJAX requests under the hood. It probably goes without saying that you'll want a browser that provides a good DOM inspector for debugging update and layout problems.
OTOH, a monolithic design can make sense if you're working with a system that really does not make much sense as a web app. An app that maintains state in a way fundamentally incompatible with the REST architecture. Where navigation between meaningful URIs is impossible or at least very undesirable. Where you would spend a lot of time and effort effectively subverting the normal operation of the browser anyway.
|
|
|
|
|
Thanks Shog9 you have confirmed my suspicions.
Shog9 wrote: Can you take this gal aside, get her in a situation where she doesn't feel like she needs to be defensive about her suggestion, and together hash out aspects of each strategy that you can agree on?
This person doesn't take suggestions. I tried on Friday evening, after everyone else left the office, to tell some stories of prior projects I have worked on that went bust because they were bloated and/or didn’t address a customer need to which I received the reply, "This is my baby. I have been working on this design for the past two years".
I will just have to figure a diplomatic way to get the point across that we are asking for trouble if we are doing extraordinary things to accomplish ordinary results.
Then when that fails we will just have to slug it out in a metaphorical sense. I did it once before and that is when the project leader congratulated me for not being rolled over as the others on the team have and cautioned me about dotting my “i”s and crossing my “t”s because this person will try to get back at me.
I really hate drama like this but it seems it is an integral part of this contract.
|
|
|
|
|
Hi All,
I am stuck with a very strange kind of situation.(Or it might be that I am just ignoring some very basic stuff)
Well, the scenario is that where I have a html table and a onmouseup event is attached to this table and every table cell(basically, I need to show a menu and pass the cell/table information).
Now, the point where I am stuck is that even if I click on the cell; I am getting two events, first by the cell and later by the table.
Anybody having a clue to restrict the second event.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
The event bubbles up from the child to the parent. You'll want to call stopPropagation()[^] (for normal browsers; for IE set the cancelBubble[^] property) in the cell event handler to prevent it from reaching the parent table.
|
|
|
|
|
Guys,
We've been wrecking our brains over this and nothing's working! After searching every page on the net and trying all solutions we decided to post here so maybe you can come up with an answer...
So, we've got multiple clients each of them having their own domains. We want to give them one line of script which will in turn render a box with details in their website. These details are stored on our own domain.
The problem is, when using an iFrame is not flexible enough so we went for an XMLHTTPREQUEST in Javascript to render the result from a URI into a div on their own website. Problem is we're getting permission issues with domains (since the URI of the data that will be included is not the same as the URI of the page no which it will be included).
Does anybody have any idea or solution on how this should be solved?
Thank you very much for your time...
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
|
|
|
|
|
Try JSONP[^]. Script requests, unlike XMLHttp, can be made across domains.
|
|
|
|
|
Hi, all
I am using a JS for validation of HTML Tags in textboxes. I have 15 textbox control to validate.. can someone tell me how can i use a common JS for all textboxes, because giving textboxid of all controls to "getElementById()"is not possible..
I am using the following JS.
function tagValidate()
{
str=(document.getElementById ('htmltag')).value;
if(str.match(/([\<])([^\>]{1,})*([\>])/i)==null)
alert("There is no HTML Tags Found");
else
alert("HTML Tags Found");
}
Regards.
|
|
|
|
|
ketan bader wrote: because giving textboxid of all controls to "getElementById()"is not possible..
Why not..? Can't you call them textbox1, textbox2.. etc and then loop through and call your function on each one..?
If you don't do this, you could assign the textboxes in question a class name that no other element on your page has, then do something like:
var inputs = document.getElementsByTagName("input");
for(var i=0;i<inputs.length;++i) {
if(inputs[i].type=="text"&&inputs[i].className=="validatetextbox") {
}
}
Regards,
--Perspx
"A refund for defective software might be nice, except it would bankrupt the entire software industry in the first year." -Andrew Tanenbaum
"Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer." -Fred Brooks
|
|
|
|
|
I am creating a business website for the first time. So, I am looking for Business Image libraries for my website. Any suggestions for reasonable prices for Business Images?
|
|
|
|
|
looking for images?
i use istockphoto, it can be a bit $$, but if you get a coupon code (there is always some about)
its quiet good.
|
|
|
|
|
I have a web application running on IIS7 Server 2008 (obviously ) My web app is accessed AFTER the user logs in from a global login page that passes the user's user name in the http header. I have an app running on IIS6 that reads this information just fine, unfortunately my app running on IIS7 doesn't. I've examined the http header for the apps running on each site and the IIS7 site is definitely not passing any of the header info generated by the login server. Has anyone seen this before? I'm hoping it's just a minor configuration issue on IIS7.
Thanks!!!!
|
|
|
|
|
Hi Guys,
I hope some of you already encountered this scenario when placing the GridView inside the Panel.
I actually place my GridView inside the Panel to have a scrollbar. I used the panel in order for me to control the height of gridview through the Panel.
But my problem is whenever I edited something on the gridview, let's say editing the row# 50, the row will refresh and always back to row# 1, which is incorrect.
How can I maintain the gridview row# when I click on the "Edit" (Edit mode)?
I actually tried using the MaintainScrollPositionOnPostback=true, but it won't stop the problem.
Any idea, how to correct it?
By the way I am using ASP.Net 2.0/Ajax (vb.net coding)
hifiger2004
|
|
|
|
|
Hi
I have a 2 radio buttons (not radio button list) and 1 label and 1 textbox in the page.
On pageload, i made label visible and textbox invisible. when clicking the other radio button,
on selected_index change i made the textbox visible and label invisible.
But i want the same using javascript as i dont the postback to happen.
Could somebody provide me the code for this.
Thanks in advance
Naina
|
|
|
|
|
function showControl(id)
{
var ctrl = document.getElementById(id);
ctrl.style.visibility = "visible";
}
function hideControl(id)
{
var ctrl = document.getElementById(id);
ctrl.style.visibility = "hidden";
}
See this[^] for more help.
Be careful, there is no Undo Button(Ctrl+Z) in life.
|
|
|
|
|
hi,,
But document.getElementbyId(id) -->> returns the null value.
how it will work..
Plz help me.....
|
|
|
|
|
hi i am trying to open a pdf from a sql database using vbscript, the problem that i'm having it that if the pdfs contain images and more that 1 page, it throws an error, pdfs containg text works fine
your help will be much appreciated................what am i doing wrong?
this is my code:
<![CDATA[<%@Language=VBScript%>]]>
<![CDATA[<%
Response.Buffer = false
Response.Expires = -1
%>]]>
<![CDATA[<%
' ID of the file to retrieve
Dim fileID
fileID = Request("idf")
if isnumeric(fileID) then
'ok
else
Response.Write "Service is temporary unavailable<br>Please try again later."
Response.end
end if
' get file from database ...
if rs.EOF then
else
Response.AddHeader "Content-Disposition", "filename=" & rs("FileName")
Response.ContentType = rs("ContentType")
Response.BinaryWrite RS("FileData")
End If
Response.End
%>]]>
|
|
|
|
|
Hi,
could you post the error message? Just thinking about this ContentType-stuff, do you use the same content-type ('application/pdf') for all?
Regards
Sebastian
|
|
|
|
|
Hi
we have a data object that is used in WindowsForm applications and should now be used also in a webservice. The data object has fields that have the attribute DefaultValue. With this attribute, accessing the web service fails with an error. Without the attribute it works.
This is the code (example code that causes the same problem):
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service ()
{
}
[WebMethod]
public Foo Test1(Foo foo)
{
return foo;
}
}
public class Foo
{
private char bar;
[System.ComponentModel.DefaultValue(',')]
public char Bar
{
get { return bar; }
set { bar = value; }
}
}
And this is the error:
Server Error in '/TestWebService1' Application.<br />
--------------------------------------------------------------------------------<br />
<br />
The default value type, System.Char, is unsupported. <br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: System.Exception: The default value type, System.Char, is unsupported.<br />
<br />
Source Error: <br />
<br />
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
How can I fix this without removing the attrribute, as it is used for changing the properties of a Control that is using this data object in the Visual Studio.
Thanks and greets
Roland
Additional Note:
The XmlIgnore attribute should not be used as it should be still serializable to an xml file.
modified on Thursday, February 5, 2009 8:26 AM
|
|
|
|
|
I want to learn how to create a forum for discussion for internal use in the company using DotNet.
Please provide me an appropriate link.
Please advice on what are the prerequisites required before starting to develop.
I have just now started learning ASP .Net.
|
|
|
|
|
Before you spend time creating a Forum, take a look at DotNetNuke which is an Open Source Web Application Framework that is built around ASP.NET technologies. Out of the box it has a good forum system, but there are plenty of "for purchase" modules that have better forums that plug right into the DNN (dot net nuke) framework. I've implemented it as a company intranet portal and it is really amazing. Free!
http://www.dotnetnuke.com/[^]
|
|
|
|
|
Thanks David ... I shall refer the website you mentioned and get back to you.
|
|
|
|
|
Dave, Are there books on the same topic that I can purchase and refer?
|
|
|
|
|
ASP.NET 2.0 Website Programming by Marco Bellinaso is a book I came across while searching the web.
It has a chapter on Forums.
Please do let me know if this chapter would be sufficient?
|
|
|
|
|
hi
I have a datagrid and in it i have put a textbox using the template items and i assign the value of the item ID to the textbox and its working fine, but i want to do a double click on a row and would like to return the value in the text box. I have added an attribute in the itemdatabound event as shown below. My problem is, if i double click my javascript alert function keeps returning the same value.
Does anyone know what im doing wrong.
protected void rdgAccounts_ItemDataBound1(object sender, DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item)
{
string text = ((System.Web.UI.WebControls.TextBox)e.Item.FindControl("txt")).Text;
rdgAccounts.Attributes.Add("ondblclick", "return OpenGrid('" + text + "');");
}
}
function OpenGrid(txt2)
{
alert(txt2);
}
|
|
|
|