Question about client-side

M

MPA

Hi,

I am a newbee. All our applications so far were traditional client-server
database applications. We are considering now writing our main application
with Visual Studio .NET. Basically we want to be able to install each
version of our software on one or two machines without having to meddle with
typically several hundred client computers. We understand that using the new
architecture we write server side code in C# or Visual Basic, but what about
the client side (JavaScript)? Does our client side also reside on the server
and is transmitted, compiled and executed on client machines by the web
browser or do we have to write some applets and install them on client
machines?

Thanks,

Miroslaw
 
L

Laurent Bugnion

Hi,
Hi,

I am a newbee. All our applications so far were traditional client-server
database applications. We are considering now writing our main application
with Visual Studio .NET. Basically we want to be able to install each
version of our software on one or two machines without having to meddle with
typically several hundred client computers. We understand that using the new
architecture we write server side code in C# or Visual Basic, but what about
the client side (JavaScript)? Does our client side also reside on the server
and is transmitted, compiled and executed on client machines by the web
browser or do we have to write some applets and install them on client
machines?

Thanks,

Miroslaw

First of all, JavaScript doesn't have applets. You're confusing with
Java. JavaScript is a totally different animal, nothing to do with Java
even though some clever marketing people at Sun tried to make the public
think otherwise. Only the syntax is similar, but not more than C# or C++.

JavaScript can be placed inline in the HTML code, or in external files.
These files reside on the web server and are delivered to the client on
request. You include an external file using this HTML code:

<script type="text/javascript" src="urlOfFile.js"></script>

Inline code is added to the HTML file using this:

<script type="text/javascript">
// code here
</script>

When the HTML page is parsed by the HTML engine, any script section will
be passed to the JavaScript engine, which will parse and interprete it.
Immediate code (i.e. code which has immediate actions, like
document.write or other calls not enclosed in functions) will be
executed sequentially. Finally, when the HTML document is fully parsed,
the onload event handler will be fired, which can be handled by JavaScript.

Typically, modern JavaScript works with events. An action by the user
fires an event which is handled by a script function.

JavaScript is very powerful, but can also be confusing for a
"traditional" programmer. For example, JavaScript variables are not
typed. A variable can contain a string one moment, and a number the
next. Also, JavaScript is very dynamic. Functions can be added to
classes during runtime, or variables to objects, etc... I strongly
recommend to specify guidelines if you use JavaScript for anything else
than your personal webpage (and even then...)

ASP.NET has a few nice features allowing each control on a page to add
scripts to the page. Check the Page.ClientScript property for example.

I could write much more about JavaScript (a truly fascinating language),
but I think I'd better stop now and let you read that. Feel free to ask
more if you need.

BTW, you should also check comp.lang.javascript for JavaScript related
questions.

HTH,
Laurent
 
E

Eliyahu Goldin

Miroslaw,

Regular client side code arrives to the client browser ready to use. No
special installation is required. If you want to achieve some special
functionality, for example, scanning documents on client machine or advanced
image features like zooming and panning, you will likely want to deploy 3rd
party ActiveX components. They also arrive to client from your site, but the
user will have to take some actions to install them. Sometimes the user will
need to customize his/her browser security setting to allow your code to
run.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top