473,480 Members | 1,711 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need Help with an ASP.NET 2 application organisation !

Hello i would like to have advices on an ASP.NET 2 application that i
must develop.
I'm new to ASP.NET, i am more of WinApp developper, so if there is some
experienced folks out there all advices are welcome.

So there it is, i'm developping an asp application that will be
accessed by many workers in a company. The app is basically dealing
with parts and customers (we sell pieces off all kind and we have lot's
of customers). My database will be SQL SERVER 2005 running on a
dedicated server. User's of this application will be devided in 3
groups, which one having some previleges and access to different parts
of the application.

Now all users will have access to parts,customers and some other
tables. So i am wondering if there is a way of sharing my dataset
containing for example(parts, customers and misc tables) with all users
of the application, so that i can cache this dataset and maintain state
(update, insert, delete) of those data in a global way. And if so how
can i achieve this behavior?

My database schema is almost done, i've use the asp_regsql tool to
create my users table in the database, but i've noticed that a user is
identified with a GUID. In my schema customers and users are identified
with a BigInt. What is the best way to link GUID to BigInt? I was
thinking of adding a table which would make the relation between a user
connecting to the app with a GUID and a user or customer represented by
a BigInt. Is this a good way of doing things?

Thanks in advance
Mateo

Mar 3 '06 #1
3 1352
hi,
there are plenty of different ways of managing groups of users. the
simplest one to implement is just to have a UserType field in the
database, and then when the user logs in, you check their type and show
or hide links or information accordingly.
you can go more high powered then and have multiple group membership,
using a binary syntax, with each group having an identifier which is a
power of 2. then the membership 'value' can be defined as an OR-ing of
each of the group identifiers. to check membership, simply AND the
value with a group identifier, and if you get the group identifier back
then the user is a member.

in terms of your user interface then, you can have a page for each user
type if the displayed information is totally different. or you can
show or hide panels on a single page for each type of user.

for your data access, you can certainly implement a caching mechanism
such as you suggest. or you could use output caching based on a value
in Session["UserType"] or something like that. or you could just send
your commands straight to the database and skip the whole caching
thing, this may be worth considering if your dataset could get very
large and drag down the server. if the aspnet_wp.exe process takes up
too much memory, windows will recycle it regularly, which will really
degrade performance.

so many options... feel free to ask further questions.
tim

Mar 3 '06 #2
Hi and thanks for your advice.

I was thinking of managing users with the provided mecanism of asp.net
(role, membership,..) and related tables created.
To manage what users can see or not in the website i'll rely on groups
and the Web.Sitemap.

I saw that there's a file global.asax (i think) that allows me to
declare some variables global to the application and some to sessions.
Would it be a good place to instantiate my DataSet that i want to share
?

Is there a way i can cache different size of data by session or user
accessing the application ?

I'm kinda lost here, time to go !
thanks tim
mateo

Mar 3 '06 #3
hi mateo

you can declare application or session variables at any place in a web
application: global.asax, code behind for a page, direclty in an aspx
page etc. but it does make sense to set up application variables in
the Application_Start event, and Session variables in the Session_Start
event, which are both in global.asax

you probably don't want to put the dataset in the session state,
because you will have so many copies of it in memory if you have lots
of concurrent users, unless of course each user needs a custom dataset?
when you say different size of data, do you mean you want to cache a
dataset differently depending on how big it is?

i might suggest one thing and that is not to be totally sold out on the
idea of keeping all your data as an in-memory dataset, and managing the
consistency throughout. it can be a lot of work, and may not be
necessary. as you will know, SQL is extremely fast, and there are many
cases where you do not need to use caching at all. it all depends on
how intensive your data requirements are.

i know myself from building winforms applications you typically work
with a local copy of all relevant data in whatever object form (dataset
or otherwise) and make sure to copy changes to the database at all
times. but the web application model is very different. web pages are
single units that may only need a tiny piece of information to complete
their task.

tim

Mar 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1055
by: importantEmail | last post by:
hi i have pasted page_load, my bindgrid, sort and itemdatabound event. my sorting in not working properly...i tried a couple of ways but there is something i am missing. pls suggest me on this...
15
2286
by: Kapil Jain | last post by:
Dear All, What i need to achieve is : I am generating dynamic text boxes thru dhtml coding, i need onChange event of oragnistation text box i.e dynamically generated on click of "More" button in...
2
2940
by: DC | last post by:
The Code <%@ import namespace="System" %> <%@ import namespace="System.Web" %> <%@ import namespace="System.Web.UI" %> <%@ import namespace="System.Web.UI.HtmlControls" %> <%@ import...
0
3540
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
1
541
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
0
6905
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7041
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6736
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5331
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4772
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
561
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
178
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.