Showing posts with label Dojo. Show all posts
Showing posts with label Dojo. Show all posts

Monday, July 17, 2017

What is a Single Page Application?

It is exactly what it says. Single Page Applications (SPAs) are web applications with a single web page that uses AJAX for its dynamic interactions. As page refresh is on the client side the SPAs can have downside of performance degradation if they are not properly designed and SEO optimized.

There are many JavaScript frameworks to write SPAs. There are lots of JavaScript frameworks that you can use to build SPAs. Lots of them are Open Source. Here are some:

WinJS
Angular
React
Ember
Aurelia
Dojo
Vue.js
Cycle.js
Backbone
Dojo


I hear a lot about Angular and Aurelia, perhaps more people are using them.
Intel XDK had both Angular and Backbone templates, but they are not supporting them anymore.

AngularJS is in Version 2.

I have a large number of posts on Intel XDK here.

Monday, September 26, 2016

What is meant by JavaScript Lint?


JavaScript Lint is designed to check JavaScript and helps you prevent making coding mistakes in the JavaScript code you write. Many JavaScript implementations do not have warning mechanisms built-in to check the code for errors and that is where JavaScript Lint beocmes very useful. Using JavaScript Lint you need not actually run the code and you need not even open a web page which has JavaScript code.

Where do you get it?

You can download it from this site: javascriptlint.com. You also find documentation there.

JavaScript Lint is based on the Javascript engine for Firefox browser which makes it possible not only to check JavaScript syntax but also warn about quesitonable code.

To get started with JavaScript Lint, download the appropriate package and extract its contents.
JavaScript Lint 0.3.0 for Windows (jsl-0.3.0-win32.zip)
JavaScript Lint 0.3.0 for Mac OS X Intel (jsl-0.3.0-mac.tar.gz)
JavaScript Lint 0.3.0 Source (jsl-0.3.0-src.tar.gz)


JavaScript Lint can be run in different ways:
Integrate it into Visual Studio
From Windows Explorer
Using command line


Developers can also integrate them into their Windows programs or from a PHP site.
More on Forums, Wiki etc here:
https://sourceforge.net/p/javascriptlint/wiki/Home/

Wednesday, September 21, 2016

What is jsFiddle?

jsFiddle a nice tool to have, especially for web developers. It is a 'What you see is what you get tool that can do HTML, CSS and JavaScript. It can also access great many script libraries like, jQuery, Dojo, etc.

This is a must have tool if you are working on web pages. If you are a beginner or, one trying to learn web page authoring this is a great tool.

This is an online tool and therefore you do not need to install anything on your computer. You should have internet connection, though. .

You access this site https://jsfiddle.net/ and you get this displayed. All set and ready to go.


jsFiddle_00

You can test your HTML, CSS and JavaScript online with this tool

Test HTML:
In the HTML pane, just type this:

Welcome to jsFiddle

and click Run at the top.
Immediately you will see the result in the Result pane as shown.



jsFiddle_01



Add CSS and Test again:

Now I will style the text we  just wrote by adding the style rule in the CSS pane (right of HTML). This is the rule I am going to add:

h1{color: Magenta;
   text-align: center;
  font-family: verdana;}


After typing in click Run and you will immediately see the change as shown:


js_fiidle_02

Add HTML fragment to place a button with the text 'Click me' as shown.
You should see the button on the document.




 Write script for the button click:
Write the javascript code as shown which does the following:
When you click the button, the function test is run which should bring up the alert message.
The jsFiddle with button and JavaScript is as shown.


jsFiddle_03

When you click the button, you should see this: