Hi,

I made an application in classic asp (reservation of books and video stuffs
for students) and want to migrate to asp.net.
The user has to chose a date, then pushung on a submit button. The whole day
is then displayed in cels of a table. The user has then to click in a cel
representing a hour of the day and an object (book ..), and finally click on
the submit button to insert that reservation in the database.

My problem is: there is a lot of javascript client-side code. All onclick
events are executed on client-side.
Have i to change this into server-side code or i can still use that
client-side code?

Is it true that the filosophy of asp.net is: maximum server-side script and
minimum client-side? If so, is there no danger to overload the server,
instead of sharing the execution of the application between client and
server?

Thanks for help
Ben

Re: migration from asp: better client or server-side code? by jan

jan
Sat Mar 25 06:23:26 CST 2006

That depends on what your client side scripts are doing.
If it is buissnies logic then it should defenitly go to the server
code. And there are several reasons for that. For example: you don't
want someone to steal your code do you? And javascript is tricky as
anyone can disable it and then your application will not work.

Javascript should be used for client side validation (which must have
it's server-side equivalent) and for UI. But never for buissnies logic!


Re: migration from asp: better client or server-side code? by Michael

Michael
Sat Mar 25 06:29:29 CST 2006

Hello ben,

b> I made an application in classic asp (reservation of books and video
b> stuffs
b> for students) and want to migrate to asp.net.
b> The user has to chose a date, then pushung on a submit button. The
b> whole day
b> is then displayed in cels of a table. The user has then to click in a
b> cel
b> representing a hour of the day and an object (book ..), and finally
b> click on
b> the submit button to insert that reservation in the database.
b> My problem is: there is a lot of javascript client-side code. All
b> onclick
b> events are executed on client-side.
b> Have i to change this into server-side code or i can still use that
b> client-side code?

Why for doing this? The current schema is normal, needn't to change it

b> Is it true that the filosophy of asp.net is: maximum server-side
b> script and minimum client-side?

It depends on your scripts, functionality and how much compatibility with
other web browsers do you need.
If everything works good now you haven't to change this for asp.net, except
where server-side code is really need

b> If so, is there no danger to overload
b> the server, instead of sharing the execution of the application
b> between client and server?

yes, it's a problem due to big VIEWSTATE (btw that is zipped pretty well)

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche



Re: migration from asp: better client or server-side code? by Bob

Bob
Sat Mar 25 11:03:50 CST 2006

Thanks for replying.
When creating an new application, what do you suggest? Using as much as
possible server-side code or finding a balance between cleint and server?
And how to determine that balance?
Ben
"Michael Nemtsev" <nemtsev@msn.com> wrote in message
news:9cc1c86384b428c81e380ae4a274@msnews.microsoft.com...
> Hello ben,
>
> b> I made an application in classic asp (reservation of books and video
> b> stuffs
> b> for students) and want to migrate to asp.net.
> b> The user has to chose a date, then pushung on a submit button. The
> b> whole day
> b> is then displayed in cels of a table. The user has then to click in a
> b> cel
> b> representing a hour of the day and an object (book ..), and finally
> b> click on
> b> the submit button to insert that reservation in the database.
> b> My problem is: there is a lot of javascript client-side code. All
> b> onclick
> b> events are executed on client-side.
> b> Have i to change this into server-side code or i can still use that
> b> client-side code?
>
> Why for doing this? The current schema is normal, needn't to change it
>
> b> Is it true that the filosophy of asp.net is: maximum server-side
> b> script and minimum client-side?
>
> It depends on your scripts, functionality and how much compatibility
with
> other web browsers do you need.
> If everything works good now you haven't to change this for asp.net,
except
> where server-side code is really need
>
> b> If so, is there no danger to overload
> b> the server, instead of sharing the execution of the application
> b> between client and server?
>
> yes, it's a problem due to big VIEWSTATE (btw that is zipped pretty
well)
>
> ---
> WBR,
> Michael Nemtsev :: blog: http://spaces.msn.com/laflour
>
> "At times one remains faithful to a cause only because its opponents do
not
> cease to be insipid." (c) Friedrich Nietzsche
>
>



Re: migration from asp: better client or server-side code? by jan

jan
Sat Mar 25 13:12:25 CST 2006

Like I said it depends on what you need.

I would tend to stick to server side as much as possible.
Don't get me wrong I love javascript. But anybody can disable it, steal
your code or find a sceurty hole. And with javascript you can't be
shure it will work in every browser...


RE: migration from asp: better client or server-side code? by clickon

clickon
Sun Mar 26 16:56:37 CST 2006

The beuty of ASP.net is that you can write only server side code, yet it
generates a certain amount of client side code, where apropriate. For
examply the validation controls, you don't have to write any code at all,
just ASP.net markup, they then generate a load of client side javascript
automatically that validates the forms acording to your criteria. Also with
ASP.net2 you can use AJAX to create call backs to the server. It's horses
for courses really, i avoid client side code whenever i can, but if you are
comforatable with it or the website gets a lot of hits and you want to
minimise server load then go ahead.

"Ben" wrote:

> Hi,
>
> I made an application in classic asp (reservation of books and video stuffs
> for students) and want to migrate to asp.net.
> The user has to chose a date, then pushung on a submit button. The whole day
> is then displayed in cels of a table. The user has then to click in a cel
> representing a hour of the day and an object (book ..), and finally click on
> the submit button to insert that reservation in the database.
>
> My problem is: there is a lot of javascript client-side code. All onclick
> events are executed on client-side.
> Have i to change this into server-side code or i can still use that
> client-side code?
>
> Is it true that the filosophy of asp.net is: maximum server-side script and
> minimum client-side? If so, is there no danger to overload the server,
> instead of sharing the execution of the application between client and
> server?
>
> Thanks for help
> Ben
>
>
>

Re: migration from asp: better client or server-side code? by Bob

Bob
Mon Mar 27 00:47:59 CST 2006

Thanks

"clickon" <clickon@discussions.microsoft.com> wrote in message
news:3991558B-0801-42D5-A464-F26BCCBF0ACD@microsoft.com...
> The beuty of ASP.net is that you can write only server side code, yet it
> generates a certain amount of client side code, where apropriate. For
> examply the validation controls, you don't have to write any code at all,
> just ASP.net markup, they then generate a load of client side javascript
> automatically that validates the forms acording to your criteria. Also
with
> ASP.net2 you can use AJAX to create call backs to the server. It's horses
> for courses really, i avoid client side code whenever i can, but if you
are
> comforatable with it or the website gets a lot of hits and you want to
> minimise server load then go ahead.
>
> "Ben" wrote:
>
> > Hi,
> >
> > I made an application in classic asp (reservation of books and video
stuffs
> > for students) and want to migrate to asp.net.
> > The user has to chose a date, then pushung on a submit button. The whole
day
> > is then displayed in cels of a table. The user has then to click in a
cel
> > representing a hour of the day and an object (book ..), and finally
click on
> > the submit button to insert that reservation in the database.
> >
> > My problem is: there is a lot of javascript client-side code. All
onclick
> > events are executed on client-side.
> > Have i to change this into server-side code or i can still use that
> > client-side code?
> >
> > Is it true that the filosophy of asp.net is: maximum server-side script
and
> > minimum client-side? If so, is there no danger to overload the server,
> > instead of sharing the execution of the application between client and
> > server?
> >
> > Thanks for help
> > Ben
> >
> >
> >