Home » JavaScript (page 30)

JavaScript

Ionic Framework – Mobile Hybrid Application Development

When I was developing our wedding application back in February, I was also trying to learn the ropes in AngularJS. It didn’t make sense for me to go with JQuery Mobile since, well I am learning angularjs. So I think through my options and ask, “Jquery mobile is essentially built in a javascript framework, is there an angularjs alternative?”. Luckily ...

Read More »

JavaScript Tutorial – Part 4: Object Creation and Prototype Chains

The term “Object-Oriented programming (OOP)” has been greatly overused, and JavaScript is not one of the exceptions. For someone who comes from many years programming in Java, learning JavaScript made me realize that the correct name for the paradigm used by programming languages like Java, C++, and C# (to name a few) is not Object-Oriented but Class-Oriented programming. Because in ...

Read More »

Migrating Spring Web MVC from JSP to AngularJS

Target Audience This article is written for Spring Web MVC developers who are familiar with JSP development and who would like to understand how to migrate to a client side Javascript framework like AngularJS. Sample Pet Clinic for reference An example of a Spring Pet clinic application that we have tried to revamp as an AngularJS app with an updated ...

Read More »

Javascript Typeof Example

When writing code in whatever programming language, you will inevitably have to deal with different types of variables and treat them accordingly. What happens when you are not the one who defines your variables type? Let’s have a look! Typeof syntax typeOf can be used in two ways: as a function and as an operator. Though the syntax changes a ...

Read More »

JavaScript Objects from a Java Developer Perspective

One of the challenges for Java developers learning and applying JavaScript is the very different interpretations each language has of “objects.” I find it much easier to context switch between Java and languages such as Groovy, Ruby, Python, C#, and C++ than switching context between Java and JavaScript. The other languages’ class-based approach to object-orientation is similar enough that their ...

Read More »

JavaScript Tutorial – Part 3: Variable Scope and Closures

Previous Tutorial: JavaScript Tutorial – Part 2: Variables, Functions, and Objects Naming is one of the hardest problems in programming. Since there are many things to decide when creating a program, programmers tend to use the same name for variables in many places. And because JavaScript is a very “promiscuous” language, this can cause serious bugs that can be very ...

Read More »

Javascript forEach example

Very often we run in cases when we just have a collection of elements and a necessity to loop through it. EcmaScript5 suggests a simple forEach() method for such purpose. So, if you’re tired of writing countless for (var i = 0; i < arr.length; ++i) loops, let’s look how it works. For example, we have an array of numbers ...

Read More »

Javascript String Length Example

When writing code that has to do with strings and you need to know it’s length, or even find out if your variable is an empty one, you can get this information by finding out how long exactly this string is. Here’s how: String length One of the most important built-in properties for string variables in Javascript (and also other ...

Read More »

Choosing a JavaScript framework for my side project

I started looking at JavaScript frameworks to see if I could find something interesting for my event scheduling project. I’m looking to use them to help me show the schedule itself: when a session of an event is modified, it must be updated in two places on the page since the list of sessions for a room is collapsible. I ...

Read More »