Click here to Skip to main content
14,544,008 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi,

I need some guidance on how to store the information in a page for the specific requirement.
There are following steps involved in the process.

1) Web application A has deafult page hosting two frames a)frame for drop downs (dd.aspx) b) frame for forms (form.aspx)
2) default.aspx calls a webservice on page load.
2) webservice returns some information e.g. company name, departments, employees in each department, each employees details to Web application A.

Question 1: which format the webservice should return the information . Dataset or XML or JSON?
3) Web application's default.aspx forms related drop down lists in dd.aspx (Frame 1)
4) When user selects company name, related dept, a specific employee from the drop down list and clicks ok
5) Second frame (form.aspx) gets the information and generates a form dynamically using this information. Here it uses some javascripts which are based on the information recieved from selected Dropdowns and used to create the data etnry form.

Question 2: Should web service be sending the ready made javascripts? (which will be huge information for each object sent) or
Should the webapplication has code to generate the javascript based on the selected drop down lists?

Question 3: How should the default.aspx or dd.aspx should store the information? Should it be session variable or viewstate? should the data be in dataset format? If the javascripts are to be stored then will it cause performance problem in storing the huge information at page level.

regards
Vijay
Posted
Updated 3-Jun-10 7:22am
v2

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Most of that are subjective design decisions that depend on your ability and other requirements. However, I'll give you some initial impressions.

vjvjvjvj wrote:
which format the webservice should return the information .


Look into ASP.Net Web Services. You basically create classes and the serialization is handled for you. Depending what you want to do with the data and some other factors (e.g., amount of data classes), you may or may not want to go that route.

vjvjvjvj wrote:
Should web service be sending the ready made javascripts?


Not unless you need to do that.

vjvjvjvj wrote:
generate the javascript based on the selected drop down lists?


That seems ideal.

vjvjvjvj wrote:
Should it be session variable or viewstate?


If you don't need to pass it back and forth each time or you mostly need it on the server side, then use the session to store the info. That will lead to less traffic.

vjvjvjvj wrote:
should the data be in dataset format?


Use whatever object structure seems most natural to use.

vjvjvjvj wrote:
If the javascripts are to be stored then will it cause performance problem in storing the huge information at page level.


If the JavaScript isn't too dynamic, you can cache it. ASP.Net should be able to cache some JavaScript for you (read the link in previous sentence)... if not, then you should be able to generate the JavaScript for a webpage that has a URL parameter (aka query string) that indicates the ID of the JavaScript to return. That way, that "file" (really a resource that the browser would see as a file) gets generated once then cached on the client side. ASP.Net actually does this sometimes in the background (me and a friend were wondering where all the JavaScript was for the ASP.Net page and we found it was generated dynamically at runtime using a virtual resource).
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100