Click here to Skip to main content
15,912,977 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more: (untagged)
Hello there everybody!
I'm creating my own "web shop" using .NET ( + JS, AJAX, SQL, CSS ) but i'm not quite familiar with the "ASP.NET web development stategies" (actually i'm a software developer, but i'm familiar only with the "desktop standarts and some business logic"). In my free time i've read some "big ass books" about ASP.NET but i've some questions which i don't think any books examplain (at least some of them).

Can i please ask you for some help ? If you can spare some business logic or advice i would be very greatful! Now i'm gonna do something "not so standart for an ordinary thread". I'm gonna explain some of my business logic and i would like you to correct me if you see something wrong ( well .... if you want to ... i cant force you )

1) SQL, JS, AJAX, CSS
My experience has thought me that, the maximum logic exported in the SQL Server, the better. I'm quite familiar that stored procedures must be used for many reasons ( performance, security ) and so on. ( If you disagree , please correct me.) I dont have any questions here and none for the other technologies too ( JS should be used for client validation, some other operations which don't require server processing but are not dangerous ( for example you should not validate password on the client ) but maximum logic should be exported in the client and the SQL server, AJAX should be used for "partial updates of the page" and soooo on.

2) ASP.NET
My logic about:
1) Creating the web store was first to make a base form which has only the logos and backgrounds.
2) Create forms which inherit the base form and define the "cells that the controls are gonna aligned in"
Question 1: In Windows Forms when you want to put a control on your form (using the VS.NET form designer ) you simply drag and drop it from the toolbox and you edit it by positioning it, anchoring, setting other properties and so on. But i read in many articles that its NOT a good way to do that in web forms ( i'm talking especilly about the positioning ... ). However .... i actually never read a good way of doing so! What is the right way to position a control in yout web form? ( I saw video lessons in which they places a 1row, 1 column table on the form and inside it they palced the control. I really, really dont think thats right )
3) After the "second base forms inheriting the first base form" ( for example two forms .... two types). Than we create web controls needed ( i would personally store them in another assembly if i was developing a windows app. Question 2: is there a problem doing so in web apps, is it a good way? )
Question 3: There is a "logic" that i'm quite curious about. For example we have a search form in which by special criteria the records are listed. For example a query is executed and 1000 results are returned. Its natureal that only 20 records can be displayed and the other are calculated as "number of pages" ( 1,2,3 .... 50). When the user wants to click on page "3" is another query executed or are the results chached when the first query is executed ( in the current Session ) and the "page 3" displayed records taken from the chached data ?

I have one last question:
If i have defines access rights "administrator", "moderator", "user" the control ponals for each of this user types must be different ( or ... the administrator must have the admin + moder + user panels, the moderator must have the moder + user and the user can have only user panel ). That means that "the page must be different for each of this types".
There are two ways of doing this ( in my point of view ). First is to develope pages that inherit the base page, set "special access" ( authorization ) to those pages and implement the panels (and other logic). I really don't like that way.
The second is simply to generate different control panels based on the "special access" ( no pages are created for each type )
Is there another approach ? Please give me some advice.
I have many other questions , but the thread is going to become really big. I would like you to comment on the things so far
Posted

1 solution

Hristiyan wrote:
I'm creating my own "web shop" using .NET ( + JS, AJAX, SQL, CSS )


It would be very helpful to learn the basics of HTML. While you can build web application with out knowing too much about it, but getting the basics will help a lot.


Hristiyan wrote:
My experience has thought me that, the maximum logic exported in the SQL Server, the better


I agree. But you may also have some business logic that do not belong at the db layer. I like to create business logic layer and database layer.


Hristiyan wrote:
AJAX should be used for "partial updates of the page" and soooo on.


you could do a whole lot more with AJAX than partial page updates.


Hristiyan wrote:
.... i actually never read a good way of doing so! What is the right way to position a control in yout web form? ( I saw video lessons in which they places a 1row, 1 column table on the form and inside it they palced the control. I really, really dont think thats right )


Like I said, learning about HTML will help you clarify this sort of issues. you can use tables to position your controls. If you look into some of the web controls, like grid control, they get rendered as table.


Hristiyan wrote:
Than we create web controls needed


what do you meant by this? There are a number of web controls provided to you out of the box. If none sasifies your need, you can create your own web control.


Hristiyan wrote:
Question 3: There is a "logic" that i'm quite curious about. For example we have a search form in which by special criteria the records are listed. For example a query is executed and 1000 results are returned. Its natureal that only 20 records can be displayed and the other are calculated as "number of pages" ( 1,2,3 .... 50). When the user wants to click on page "3" is another query executed or are the results chached when the first query is executed ( in the current Session ) and the "page 3" displayed records taken from the chached data ?


Look at GridView. It can do all what you said. ;-)

Hristiyan wrote:
If i have defines access rights "administrator", "moderator", "user" the control ponals for each of this user types must be different ( or ... the administrator must have the admin + moder + user panels, the moderator must have the moder + user and the user can have only user panel ). That means that "the page must be different for each of this types".
There are two ways of doing this ( in my point of view ). First is to develope pages that inherit the base page, set "special access" ( authorization ) to those pages and implement the panels (and other logic). I really don't like that way.
The second is simply to generate different control panels based on the "special access" ( no pages are created for each type )
Is there another approach ? Please give me some advice.


Look at asp.net membership.

I think you are in a right track. you may want to pick good asp.net book and you will find most of your questions answered.

 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900