many people use the words java and javascript interchangeably, or confuse the two. the javascript language resembles java, but without java's static typing and strong type checking. javascript supports most of java's expression syntax and basic control flow constructs. in contrast to java's compile-time system of classes built by declarations, javascript supports a run-time system based on a small number of data types representing numeric, boolean, and string values. javascript has a simple instance-based object model that still provides significant capabilities.
javascript also supports functions, again without any special declarative requirements. functions can be properties of objects, executing as loosely typed methods.
javascript complements java by exposing useful properties of java applets to script authors. javascript statements can get and set exposed properties to query the state or alter the performance of an applet or plug-in.
java is an extension language designed, in particular, for fast execution and type safety. type safety is reflected by being unable to cast a java int into an object reference or to get at private memory by corrupting java bytecodes.
java programs consist exclusively of classes and their methods. java's requirements for declaring classes, writing methods, and ensuring type safety make programming more complex than javascript authoring. java's inheritance and strong typing also tend to require tightly coupled object hierarchies.
in contrast, javascript descends in spirit from a line of smaller, dynamically typed languages like hypertalk and dbase. these scripting languages offer programming tools to a much wider audience because of their easier syntax, specialized built-in functionality, and minimal requirements for object creation.
the following table compares and contrasts javascript and java.
JavaScript
-Interpreted (not compiled) by client
-Object-based. Code uses built-in, extensible objects, but no classes or inheritance
-Code integrated with, and embedded in, HTML
-Variable data types not declared (loose typing).
-Dynamic binding. Object references checked at run-time.
-Cannot automatically write to hard disk.
Java
-Compiled on server before execution on client.
-Object-oriented. Applets consist of object classes with inheritance
-Applets distinct from HTML (accessed from HTML pages).
-Variable data types must be declared (strong typing).
-Static binding. Object references must exist at compile-time.
-Cannot automatically write to hard disk.
Friday, May 23, 2008
the differences between java and javascript
Thursday, May 22, 2008
Overview: What CSS or simply known as style sheets?
Who invented it? I don't know, but whoever did a million thanks to him or her or them. But i do know what it can do, and how to use it. CSS or customized style sheets allow us to change the appearance of hundreds of web pages by changing just one file.
In short, css is mainly for presentation. Giving instruction to the browser on how it want to present a certain data like font, background color, border style, border color...etc. It makes the life of the author easier, because he can apply the same set of instructions on several web pages, by just maintaining a single file! And all he needs to do, is link those web pages to that css file.
Sounds great?! Yes! Its really a great technology. Now the next question is...how to use it?! That is what I working out now, and will be available real soon :-)
Making HTML page – what is the best tool to use?
For sure a lot will recommend for dreamweaver if you want to be like a pro. And for beginner you go for ms frontpage. The truth is professional web developer don't use any of them, instead a pure text editor. I've been a web developer for several years now. And I've never use any of WYSIWYG (what you see what you get) editor like the ones mentioned above. It had and will always be a pure text editor. And in my case – notepad++. Highly recommended!!
What are the advantages, why text editor?! For tools like dreamweaver, everything are done easily...it has tips, help, etc! All i need to is draw, and code will automatically generated. Simple!
Actually, making it on text editor will give you complete control of your codes. No codes will be generated that you don't know how the hell it came out!! Later, it will save you time and effort when you do editing. Not to mention, text editor are super light compared to WYSIWYG tools...and FREE!!. And the most important part. As you go along, your programming skill will improve. So if you really want to be a professional web developer...text editor is the way to go.