473,499 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript building blocks

Are there any simple javascript building blocks available? Like,
Google web toolkit. But, I don't want to write code in java and then
compiled into javascript. I am just looking for portable ajax/
javascript libraries. Thanks in advance.

Oct 16 '07 #1
11 1540
On Oct 16, 5:03 am, v4vijayakumar wrote:
Are there any simple javascript building blocks available?
Like, Google web toolkit. But, I don't want to write code
in java and then compiled into javascript.
That may no be a wise direction to go in regardless. The obvious
problem would be that no matter how good you may be at Java, and how
well you wrote the Java code, the javascript that it would be compiled
into would never be better than what Google is capable of. And you
don't have to do any more than use 'view source' on a Google groups
page to see that Google's javascript authoring is so bad as to be
laughable. An impression that is rapidly re-enforced by hading IE pop
up its error dialog whenever an error happens and then using Google
groups for more than a few minutes.
I am just looking for portable ajax/
javascript libraries. Thanks in advance.
Do you mean AJAX (the thing involving the handling of multiple
asynchronous sources of input) or do you just mean an XML HTTP request
library?

Oct 16 '07 #2
v4vijayakumar wrote:
Are there any simple javascript building blocks available? Like,
Google web toolkit. But, I don't want to write code in java and then
compiled into javascript. I am just looking for portable ajax/
javascript libraries. Thanks in advance.
Java does not "compile into javascript". They are quite different
languages and have no real relationship.
Oct 16 '07 #3
On Oct 16, 9:55 am, The Magpie <use...@pigsinspace.co.ukwrote:
v4vijayakumar wrote:
Are there any simple javascript building blocks available? Like,
Google web toolkit. But, I don't want to write code in java and then
compiled into javascript. I am just looking for portable ajax/
javascript libraries. Thanks in advance.
Java does not "compile into javascript". They are quite different
languages and have no real relationship.
You should first understand what the Google Web Toolkit is before
making such a statement.

Matt Kruse

Oct 16 '07 #4
On Oct 16, 9:55 am, The Magpie <use...@pigsinspace.co.ukwrote:
v4vijayakumar wrote:
Are there any simple javascript building blocks available? Like,
Google web toolkit. But, I don't want to write code in java and then
compiled into javascript. I am just looking for portable ajax/
javascript libraries. Thanks in advance.
Java does not "compile into javascript". They are quite different
languages and have no real relationship.
You should first understand what the Google Web Toolkit is before
making such a statement.

Matt Kruse

Oct 16 '07 #5
In comp.lang.javascript message <11*********************@q5g2000prf.goog
legroups.com>, Tue, 16 Oct 2007 16:22:39, Peter Michaux
<pe**********@gmail.composted:
>
If you do not aggregate your JavaScript code into files (aka
libraries) then you will be asking the client to make many downloads
for even a moderately complex page. That is far slower than
downloading a single file with all the functions you need in it. You
should bundle your functions into libraries even if those libraries
are specific to a particular page.
IMHO a Library (in computing) is something from which the relevant parts
are extracted at the authoring stage. In Pascal/Delphi, for example,
one can include many Units in the program source set, but only the
necessary routines will be included in the distributed EXE (approximate
statement).

A Javascript Library should be treated similarly; but the task is not
normally automated. The author should repackage what is appropriate, so
that no more than is reasonable is downloaded to each user.

So an author must neither put all possible routines in one vast file,
not put each routine in its own file; but must strike a happy mean :
that is an art.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Oct 16 '07 #6
Matt Kruse wrote:
On Oct 16, 9:55 am, The Magpie <use...@pigsinspace.co.ukwrote:
>v4vijayakumar wrote:
>>Are there any simple javascript building blocks available? Like,
Google web toolkit. But, I don't want to write code in java and then
compiled into javascript. I am just looking for portable ajax/
javascript libraries. Thanks in advance.
Java does not "compile into javascript". They are quite different
languages and have no real relationship.

You should first understand what the Google Web Toolkit is before
making such a statement.
Not really Matt - its simple fact.

I will give you every credit and presume that you are referring to
cross-compilation features I understand are in Google Toolkit, but
even so that is no more relevant than to presume BBC Basic can be
"compiled" into PL/1 or Fortan into Cobol.

Maybe they can - its what cross-compilers are for, after all - but it
does not change the facts that the languages are unrelated.
Oct 17 '07 #7
On Oct 17, 11:10 am, The Magpie <use...@pigsinspace.co.ukwrote:
Matt Kruse wrote:
On Oct 16, 9:55 am, The Magpie <use...@pigsinspace.co.ukwrote:
v4vijayakumar wrote:
Are there any simple javascript building blocks available? Like,
Google web toolkit. But, I don't want to write code in java and then
compiled into javascript. I am just looking for portable ajax/
javascript libraries. Thanks in advance.
Java does not "compile into javascript". They are quite different
languages and have no real relationship.
You should first understand what the Google Web Toolkit is before
making such a statement.

Not really Matt - its simple fact.

I will give you every credit and presume that you are referring to
cross-compilation features I understand are in Google Toolkit, but
even so that is no more relevant than to presume BBC Basic can be
"compiled" into PL/1 or Fortan into Cobol.
I think your definitions of compiler does not line up with the
majority of programmers.

"A compiler is a computer program (or set of programs) that translates
text written in a computer language (the source language) into another
computer language (the target language)." - http://en.wikipedia.org/wiki/Compiler

So GWT is a perfect example of a compiler because it translates Java
to JavaScript.

Peter

Oct 17 '07 #8
On Oct 17, 11:10 am, The Magpie <use...@pigsinspace.co.ukwrote:
Matt Kruse wrote:
On Oct 16, 9:55 am, The Magpie <use...@pigsinspace.co.ukwrote:
v4vijayakumar wrote:
Are there any simple javascript building blocks available? Like,
Google web toolkit. But, I don't want to write code in java and then
compiled into javascript. I am just looking for portable ajax/
javascript libraries. Thanks in advance.
Java does not "compile into javascript". They are quite different
languages and have no real relationship.
You should first understand what the Google Web Toolkit is before
making such a statement.

Not really Matt - its simple fact.

I will give you every credit and presume that you are referring to
cross-compilation features I understand are in Google Toolkit, but
even so that is no more relevant than to presume BBC Basic can be
"compiled" into PL/1 or Fortan into Cobol.
I think your definitions of compiler does not line up with the
majority of programmers.

"A compiler is a computer program (or set of programs) that translates
text written in a computer language (the source language) into another
computer language (the target language)." - http://en.wikipedia.org/wiki/Compiler

So GWT is a perfect example of a compiler because it translates Java
to JavaScript.

Peter

Oct 18 '07 #9
On Oct 16, 3:36 pm, Dr J R Stockton <j...@merlyn.demon.co.ukwrote:
In comp.lang.javascript message <1192551759.809434.28...@q5g2000prf.goog
legroups.com>, Tue, 16 Oct 2007 16:22:39, Peter Michaux
<petermich...@gmail.composted:
If you do not aggregate your JavaScript code into files (aka
libraries) then you will be asking the client to make many downloads
for even a moderately complex page. That is far slower than
downloading a single file with all the functions you need in it. You
should bundle your functions into libraries even if those libraries
are specific to a particular page.

IMHO a Library (in computing) is something from which the relevant parts
are extracted at the authoring stage. In Pascal/Delphi, for example,
one can include many Units in the program source set, but only the
necessary routines will be included in the distributed EXE (approximate
statement).

A Javascript Library should be treated similarly; but the task is not
normally automated. The author should repackage what is appropriate, so
that no more than is reasonable is downloaded to each user.

So an author must neither put all possible routines in one vast file,
not put each routine in its own file; but must strike a happy mean :
that is an art.
Bundling up your scripts into a file without too many excess files is
a perfectly valid way to approach. Scripts that require no extra
dependencies are attractive because they can be optimized for the
intended purpose. The result is a small, self-contained script.

On the other hand...

Large apps that have the functionality distributed in various ways can
benefit from reuse of components. Things like DOM utilities, Event
Registry, Ajax Transport, Data Structures, Plain old Objects (POJSO?)
like URLBuilder or Color, Widgets, et c. With this approach, code
maintenance becomes an unavoidable issue. Breaking things down into
cohesive units makes testing and maintenance easier; you don't have to
worry about a failure case in one page, then changing the code to
create another failure case on another page. Instead, you just write
isolated tests for all uses of the bit of code.

With the "small objects" approach, an automated task can be used to
"build" to "compile" the scripts into one. That way, you can maximize
cohesion and avoid the headaches associated with copy-paste
maintenance.

--
(c) John Stockton, Surrey, UK. ?...@merlyn.demon.co.uk Turnpike v6.05 IE 6


Oct 18 '07 #10
Randy Webb wrote:
>
And that is, precisely, why Matt wrote what he wrote.
I believe I made that point, Randy. Please do not presume criticism
where there is none.
>
And the fact that the languages are unrelated isn't what Matt was
referring to.
I know, and as I said I mentioned that. However, my point was to the
OP who, unlike Matt, did seem to be confused on that point.
Oct 20 '07 #11
Peter Michaux wrote:
>
I think your definitions of compiler does not line up with the
majority of programmers.

"A compiler is a computer program (or set of programs) that translates
text written in a computer language (the source language) into another
computer language (the target language)." - http://en.wikipedia.org/wiki/Compiler
Peter, there are a number of definitions and sub-definitions of
"compiler" and it is often important to distinguish between them to
avoid confusion. It was to avoid such possible confusion, if there was
any, in the mind of the OP that I commented as I did.

If I may quote - from your own source - a section of the same article
which makes the same point that I made, but in a rather more
long-winded way:-

<<The name "compiler" is primarily used for programs that translate
source code from a high-level programming language to a lower level
language (e.g., assembly language or machine language). A program that
translates from a low level language to a higher level one is a
decompiler. A program that translates between high-level languages is
usually called a language translator, source to source translator, or
language converter. A language rewriter is usually a program that
translates the form of expressions without a change of language.>>
<<<http://en.wikipedia.org/wiki/Compiler>>>
Oct 20 '07 #12

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

Similar topics

53
5654
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
2
1111
by: Jonathan Dodds | last post by:
In "VBScript and JScript Don't Mix, at least in ASP" <http://blogs.msdn.com/ericlippert/contact.aspx> Eric Lippert wrote: Ideally you want the server side <SCRIPT> blocks to contain only global...
1
1811
by: Joze Dedic | last post by:
Hi! I'm starting to build environment with schematic like gui. Some features I need are: - building blocks - connections between blocks - zoom in/out capability - grid (sheet showable, snap...
16
2827
by: Java script Dude | last post by:
To all Mozilla JS Guru's (IE dudes welcome), I have spent the last three years developing complex DHTML applications that must work in IE 5.5sp2+ but I use Mozilla 1.3+** to do all my...
3
1530
by: Arjen | last post by:
Hello, Are the ASP.NET 2.0 "Building Block's" the same this as the Enterprise Library Application Blocks? Thanks! Arjen
104
16845
by: Leszek | last post by:
Hi. Is it possible in javascript to operate on an array without knowing how mamy elements it has? What i want to do is sending an array to a script, and this script should add all values from...
22
2272
by: Christopher Nelson | last post by:
I have a little menu system which essentially takes HTML like: <div id='foo'></div> and retrieves foo.shtml from the server and inserts it inside the <div>. But sometimes I'd like foo.shtml...
5
9279
by: Tomislav | last post by:
Hello, I tried to use "javascript:return confirm();" function in following manner ( triggered by form onSubmit event ): ** <form method="post" action="mail.php" onSubmit="javascript:return...
5
1379
by: david | last post by:
I have a picture and it has onclick event, with invokes JavaScript function called ModuleManager(); Then it saves a copy of Node (Blocks, which is DIV) it tmp_blocks with all children elements. And...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
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
7174
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
7220
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
6894
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
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5470
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,...
0
1427
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 ...
0
297
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.