Altabel Group's Blog

Posts Tagged ‘JavaScript

The IT sector is flourishing. If you’ve used a computer for at least a couple of times in the last few years, you’ve probably noticed this. I’ve noticed it myself even more after a business trip to Stockholm where I was lucky to attend some conferences and learnt more about Swedish IT industry tendencies. These tendencies reflect our life in general. Life changes rapidly with new technologies bursting into it. And when it comes to programming languages, we get a chance to see very different trendy styles. Programming languages which were popular some years ago are not useful today. And no one can exactly predict which programming language will be popular in future. That’s why a programmer who wants to stay in developer fields has to adopt the right programming language from time to time.

As the Swedish software maker Erik Starck pointed out, “programming is about managing complexities”. And it’s really so. An understanding of at least one programming language makes an impressive addition to any CV nowadays.

It is also very difficult to get the exact number of users for any programming language. Many of us use multiple programming languages. The more experience you have, the more programming languages you use. The more programs you write or work with, the chances of using more languages rise. The larger the company, the more languages you’re likely to use.

There are a number of ways to measure the popularity of a programming language, for example, based on the number of: 1) new applications written in the language; 2) existing applications written in the language; 3) developers that use the language primarily; 4) developers that use the language ever; 5) web searches; 6) available jobs that require skills in the language; 7) developers’ favorites, etc.

My survey attempts to rank which programming languages are most popular in Sweden, each using a different measure. So, they are the following:

1) Python

Python is an object-oriented programming language which allows developers to work quickly while integrating their systems more efficiently and effectively. Designed by Guido van Rossum in 1991, Python is one of the most easy to use programming languages.

Python is characterized by its use of indentation for readability, and its encouragement for elegant code by making developers do similar things in similar ways.

Top Employers: Amazon, Dell, Google, eBay, Instagram, Yahoo

2) Java

Java is a class-based, object-oriented programming language founded by Sun Microsystems in 1995. Java is one of the most in-demand programming languages today for many reasons. First of all, it is a well-organized language with a strong library of reusable software components. Secondly, programs written in Java can run on many different computer architectures and operating systems because of the use of the JVM (Java virtual machine).

Top Employers: Amazon, Deloitte, Sun, eBay, Symantec Corporation, Cisco Systems, Samsung

3) C++

C++ is a compiled, multi-paradigm language written as an update to C in 1979 by Bjarne Stroustrup.

Due to its high-level compatibility and object-orientation, C++ is used for developing a wide-range of applications and games which makes it a popular and sought after programming language by the employers.

Top Employers: Intel, the Math Works, Microsoft, Qualcomm, Amazon, Mozilla, Adobe, Volvo

4) Ruby

Ruby is an open source, dynamic programming language designed by Yukihiro Matsumoto in 1995 with a key focus on productivity and simplicity .It is one of the most object-oriented languages in the world.

Ruby is a mix of elegant syntax which is easy to read and write and hence it has attracted many organizations and developers.

Top Employers: Spokes, VMware, Accenture, Cap Gemini, Siemens, BBC, NASA

5) JavaScript

JavaScript is an object-oriented scripting language founded in 1995 by Netscape.

Being a client-side language, it runs in the web browser on the client-side with a simplified set of commands, easier code and no need for compilation.  JavaScript is simple to learn and it is used in millions of web pages to authenticate forms, detect browsers and improve design.

Top Employers: Microsoft, Sales Force, IBM, Yahoo, Dell

6) C#

C# is a compiled, object-oriented language developed by Microsoft.

It is highly used on Windows platform and labelled as the premium language for Microsoft .NET framework. C# is known for strong typing, procedural and functional programming discipline which is the reason it has acquired so much popularity.

Top Employers: Microsoft, HP, Digi-Key Corporation, Allscripts, Intel

Those are the top 6 programming languages which are in great demand among Swedish developers.

And one more thing: remember that opinions are like noses, everyone has one and they all smell ;) If you disagree, please feel free to email me or write your own opinions in the comments.

Katerina Kviatkovskaya

Katerina Kviatkovskaya
Kate.Kviatkovskaya@altabel.com
Skype ID: kate.kviatkovskaya
Business Development Manager (LI page)
Altabel Group – Professional Software Development

Developers use JavaScript for a number of different web applications. If you continue adding more code to make it work in multiple browsers and use cases, it can quickly become a big mess. Hence you’d better use a framework to avoid this.

Frameworks like Angular, Backbone and Ember make your JavaScript code structured and keep it organized. Being all open source, they’re constantly improved by the community. They also save your time as they’re built on top of JQuery, a fast and powerful library that makes some of JavaScript’s complex operations easier to perform and more readable.

However, choosing your JavaScript framework isn’t such easy and could be challenging. Let’s try to understand how Angular, Backbone and Ember are different from each other and what their strengths and weaknesses are.

AngularJS

AngularJS is an open-source web application framework, maintained by Google and community, that assists with creating single-page applications, one-page web applications that only require HTML, CSS, and JavaScript on the client side. Its goal is to augment web applications with model–view–controller (MVC) capability, in an effort to make both development and testing easier.

AngularJS was originally developed in 2009, and it is the oldest of the three frameworks. It also has the largest community. In 2013, Angular was fourth in number of project contributors on GitHub and third in number of stars gain which testifies to its huge popularity. Moreover such well-known companies as Amazon, Google and Nike credit AngularJS as JavaScript framework. There are also a lot of news sites using AngularJS on their front pages, including the Guardian, the Huffington Post, and MSNBC. You may also check https://builtwith.angularjs.org/ to have a look at good examples of Angular apps and experiments.

Pros

  • Ideal for complex “client-side” applications, where the complexity is more in a way “components” of an application interacts with each other than in a way they synchronise and/or interact with backend
  • Very clear separation of concerns
  • Uses concepts that kind of look like the future of HTML/DOM (DOM templates, binding attributes).

Cons

  • A bit complicated to grasp. A lot of new concepts
  • jQuery or another dom parsing framework in directives may be painful to use because of the way angular compiles templates
  • Good for application with a big level of complexity on the client side, but you’ll have to learn a lot of new stuff.

On the whole, AngularJS is a robust and viable framework for building generic web apps. Whether it lives up to the expectations of being the most dominant JS framework for web development is yet to be seen.

Backbone.js

Backbone.js  is a JavaScript library with a RESTful JSON interface and is based on the model–view–presenter (MVP) application design paradigm. Backbone is known for being lightweight, as its only dependency is on one JavaScript library, Underscore.js. It is designed for developing single-page web applications and for keeping various parts of web applications (e.g. multiple clients and the server) synchronized.

Backbone came out in June 2010, and its community is nearly as large as Angular’s. Many popular applications such as Twitter, LinkedIn Mobile and Foursquare use Backbone framework. Also a number of music apps were built with Backbone, including well-known Pandora, Soundcloud and Pitchfork.

The download size of Backbone is very small compared to other frameworks which is its biggest advantage, since it only depends on one JavaScript library instead of several. Moreover, this framework is remarkably hands-off. This means experienced JavaScript developers can quickly get started. However less experienced developers might find themselves writing a lot of “boilerplate” (repetitive) code. If you’re having trouble Backbone has an especially active community rife where you could find free tutorials for getting started with the framework.

If you’re working on a single-page application or widget and you’re comfortable with being a self-starter—Backbone is likely the right choice for you.

Pros

  • Very easy to start with
  • Very small
  • Free to use any templating engine
  • A lot of excellent documentation
  • Good Community Support
  • Very popular (According to Github, Stackoverflow statistics)
  • Very flexible in how you may want to use it
  • Minimalist library
  • Easy to learn

Cons

  • No two way data-binding
  • Dependency on different frameworks like jQuery and Underscore
  • No provision for handling nested views
  • More work required to build large scale applications as compared to Angular or Ember
  • Code can become messy
  • DOM manipulations are left to the developer
  • Performs slower than AngularJS

Ember

Ember.js is an open-source client-side JavaScript web application framework based on the model-view-controller (MVC) software architectural pattern. It allows developers to create scalable single-page applications by incorporating common idioms and best practices into a framework that provides a rich object model, declarative two-way data binding, computed properties, automatically-updating templates powered by Handlebars.js, and a router for managing application state.

Ember is the newest of the three, but it’s already making waves. LivingSocial, Groupon, Zendesk, Discourse and Square are some of the most well-known applications that have adopted Ember. Ember’s creators say it’s easy to see when a site is using Ember because of its loading speed.

At 69K minified and zipped, Ember is the largest framework of the three. Ember’s larger library size partly explains why it’s the largest download of the three Javascript frameworks. Another reason for it is that Ember comes with a lot of built-in support for standard code features.

Ember’s library size and support network are its two greatest strengths, but if you’re only trying to create a small widget or single-page app, it might be overkill for you. If you’re working on a multipage, navigational, long-term project, Ember might be the right choice for you.

Pros

  • Good for long running and complex applications with deep nested view hierarchies
  • Aggregates model data changes and update the DOM late in the RunLoop
  • Well defined models and computed properties
  • Use HandleBars as templating which is flexible
  • Provides auto updating computed properties
  • Test driven

Cons

  • Relatively new framework
  • Steepest learning curve out of the three
  • Payload is the largest out of all three
  • Dependency on jQuery and Handlebars
  • Poor performance as compared to AngularJS
  • Documentation is not very good
  • Two way bindings are not implemented well

As I could see from a number of forums about JavaScript frameworks, many love AngularJS. What about you? Which one framework is your favorite one and why? Please feel free to share your thoughts/experience in the comments below :)

Yuliya Tolkach

Yuliya Tolkach
Yulia.Tolkach@altabel.com
Skype ID: yuliya_tolkach
Business Development Manager (LI page)
Altabel Group – Professional Software Development

Even if you only build websites using CMSs, you’ve probably heard the word “framework” before. You’ve probably also heard of a few famous web frameworks, including Ruby on Rails, Django and Bootstrap. Many experienced web developers build websites using frameworks and often find them easier and enjoyable to use.

In this article, we’re going to explain what a framework is, and when you might use a framework.

If you are currently doing one of the  Coding Training classes, this information will prove especially useful to you. If you are just using a CMS, this post will still contain some valuable insights, as many CMS systems can and are built using frameworks. For example, Drupal 8 is currently being built on Symfony and Joomla 3 is using the CSS framework Bootstrap.

What is Framework?

The goal of a framework is to allow designers and developers to focus on building the unique features for their project, rather than re-inventing the wheel by coding common, familiar features found across many websites and web applications.

A framework can be considered a pre-built that handles most of the repetitive or common features. As a result, unlike a CMS, a framework will probably not have a template/structure user interface (although this is not always the case, as Django provides an administration interface). Most of the activity will be done by writing code and interacting with different parts of the framework itself through code.

Often frameworks take a while to learn, but once you’re familiar with them, they should speed up your development time.

5 advantages to using a framework:

  1. Open-source: Most of the popular frameworks in many languages are open-source (or available to use for free). They also come with licensing that isn’t restrictive and allows you to build commercial products using such frameworks
  2. Documentation and support: Although this can vary (if the language being used is popular and the framework has a lot of developers using it), you can expect that the framework will either have good documentation, good support or both at the same time. It is worth mentioning that “good support” is a subjective issue at times. Typically, paid support will almost always be faster and more concise, but this also depends on the level of activity within the framework – as a framework like Ruby on Rails demonstrates with a massive community, which is renowned for its welcoming nature and good support too.
  3. Efficiency: This could be considered the most vital reason why frameworks exist. They eliminate the need to write a lot of repetitive code that you will find being used in many different applications. These include, for example, user-authentication and commenting systems. On average (if you have sufficient knowledge using a certain framework) you can expect to build a project in much less time than would be achieved writing code without a framework
  4. Security: Typically, a framework is developed and tested by many different developers. It is extremely likely that many security risks are addressed and tested when the framework is being built. New security risks can also be addressed and fixed quickly. However, security can also be considered a con, as will be mentioned in that section
  5. Integration: If you are building almost any type of application (including a website) and you want to store some data, you will typically use a database. Just like a database, there also exists many other tools that link to web development. Many frameworks will thus make it easier to link to these tools and also communicate with them (for example, when “talking to” a database is abstracted away in a certain framework, making communication with the database much easier)

5 disadvantages to using a framework:

  1. Limitations: Generally, you will not be able to do almost anything with a single framework. They are all restricted in some way, from coding paradigms to database designs and everything in between. A good way to work around this is to see what the framework is being used for by other developers in the community, as this will give you an idea of what you can achieve
  2. Performance: With the popularity of client-side JavaScript MVC frameworks like AngularJS, EmberJS and BackboneJS growing since 2012, performance can also be considered a factor. Although performance issues did exist before, they weren’t as relevant as today, where an entire application is loaded through JavaScript, using a framework as the tool for building that application. Whereas you might not feel the impact of loading a 75kb compressed-framework .js file on your PC (with high speeds), this .js file will definitely impact mobile users (who may have slower speeds on their smartphones or tablets)
  3. Learning bias: If you decide to learn how to use any framework from some programming language you are familiar with, chances are that what you learn will be somewhat different to the language itself. This is due to the fact that a lot of those repetitive tasks have been created in custom functions and other parts, which is why you will learn such things that may not have existed in the language lessons itself. Apart from that, you may also learn a lot of things that may be irrelevant to you whilst using the framework in real-life, but are necessary to grasp how the framework works
  4. Steep learning curve: Although this isn’t always the case, most frameworks can be difficult to learn and even more difficult to master. After some simple research into this matter, a university professor said that it will take about 2 years (with no programming background) to become familiar and comfortable using a language (Ruby) combined with a framework (Rails). This may not be the case when being self-taught or having years of programming experience, but I would say that even with experience, at least 3-6 months will be needed to become confident using any framework (based on continuous learning and practice)
  5. Cost: Frameworks require more development expertise and experience than most CMSs. As a result, it can be more costly to hire reliable framework developers than reliable CMS developers. As the experience shows, the average project built with a framework is more expensive than a similar project built with a CMS.

Examples of popular frameworks

Below are some popular web frameworks (in no particular order) for different web languages. This is not an extensive list, as there exists many more options out there.

PHP: 1.Yii; 2.CodeIgniter; 3.CakePHP; 4.Zend; 5.Symfony; 6. Laravel

Ruby: 1.Rails; 2.Sinatra; 3.Padrino;

Python: 1.Django; 2.Web2py; 3.TurboGears; 4.Flask

JavaScript: 1.AngularJS; 2.EmberJS; 3.BackboneJS;4.KnockoutJS

Design/CSS frameworks: 1.Bootstrap; 2.Foundation

Over to you?

Have you built any websites using a framework instead of a CMS?

What were the advantages and disadvantages of going with a framework?

Share your feedback or any other experiences below.

Polina Mikhan

Polina Mikhan
Polina.Mikhan@altabel.com 
Skype ID: poly1020
Business Development Manager (LI page)
Altabel Group – Professional Software Development

Almost everyone involved in web development knows jQuery or at least heard of it. Being simple and concise, it makes web developers’ life much simpler. But could it be a solution to every problem? Unfortunately not.  Once you decided to create more complex web apps, you are to face a problem, as there is no easy way to make your UI and data communicate with each other dynamically. And you need a library which will provide you with a more sophisticated way of communication between your UI and the underlying data model. And here is where Knockout (KO) could help.

What is Knockout?
Knockout is a JavaScript library which helps to create rich, desktop-like web UIs. It was developed and is maintained by Steve Sanderson, a Microsoft employee. KO simplifies user interactions and makes interfaces fully responsive to any data source changes. It provides a simple two-way binding mechanism to link a data model to an UI, thus making synchronization between them very easy.

 Pros:

-     Dependency Tracking
 The right parts of your UI are automatically updated whenever your data model changes. This is achieved by the two way bindings and a special type of variables called observables. You don’t have to worry about adding event handlers and listeners for dependency tracking.

-     Declarative Bindings
 This allows you to bind the elements of UI to the data model in a simple and convenient way. When you use JavaScript to manipulate DOM, this may cause broken code if you later change the DOM hierarchy or element IDs. But with declarative bindings even if you change the DOM – then all bound elements stay connected. You can bind data to a DOM by simply including a data-bind attribute to any DOM element.

-     Templating
 This becomes useful when your application becomes more complex and you need a way to display a rich structure of view model data, thus keeping your code simple. Knockout can use alternative template engines for its template binding. It has a native, built-in template engine which can be used right away.

-     Compatibility and Extensibility
 Knockout is compatible with any back-end technology and on the front-end it does as much or as little as you decide. It leaves many decisions to you to make, thus letting pick the best tool to meet your specific needs. Knockout doesn’t care about how you communicate with the server or how you choose to do routing, but there are several third party libraries that do a fine job of these things (like sammy.js for routing and upshot.js for data-access). It goes without mentioning that it works fine next to jQuery. Knockout is also easily extensible. To modify or extend the default functionality, it offers features like custom bindings, and custom functions. There are also several plugins already written for KO.

-     Ease of Learning and Use
 The documentation for knockout is probably the best have ever been seen. It has an amazing interactive tutorial system, live examples, and the documentation is extremely comprehensive and easy to understand. For most developers already familiar with JavaScript it should not take more than a few days to pick it up and start using.

Some additional benefits are the following:
•          KO is a pure JavaScript library – so it works with any server or client-side technology
•          It can be added on top of your existing web application without requiring major architectural changes
•          It’s compact – around 13kb after gzipping
•          It works on any mainstream browser (IE 6+, Firefox 2+, Chrome, Safari, others)
•          Comprehensive suite of specifications (developed BDD-style) means its correct functioning can easily be verified on new browsers and platforms

Cons
 -              All JavaScript variables and arrays are functions (also known as KO observables) as opposed to Angular. This can be a little confusing at first for some people. But it should be noted that all native JavaScript array functions like splice(), indexOf(), push() etc. are implemented by Knockout and may be used on KO observables.
–              HTML views can get messy as declarative bindings increase. This can be weakened to some extent through the use of custom bindings, computed observables and by attaching events to the DOM using jQuery instead of using the data-bind attribute.
–              Additional functionality like data-access and url-routing are not included. If you are looking for an end to end solution that offers a complete toolbox of common web-app functionality, you should probably check out such frameworks as Angular or Ember.

Knockout VS jQuery

Knockout.js is not a replacement of jQuery (as well as of Prototype, or MooTools). It doesn’t attempt to provide animation, generic event handling, or AJAX functionality (however, Knockout.js can parse the data received from an AJAX call). Knockout.js is focused only on designing scalable and data-driven UI.

Moreover Knockout.js is compatible with any other client-side and server-side technology. It also acts as a supplement to the other web technologies like jQuery and MooTools.

Although you will need to use Knockout with jQuery at the same time, in some cases like animated transitions, Knockout itself doesn’t depend on it. Another thing you need to understand is that Knockout doesn’t compete with jQuery – they both do excellent job; each one in its own direction. And if you want to get the most benefits you should use them together.

Knockout is the simplest of all the frameworks as well as one of the smallest. It does not claim to be able to solve all your problems, but it does claim to do a few useful things and do it better than the alternatives. In the words of Knockout creator Steve Sanderson, it is “low risk” because its uses are focused and it is compatible with any other technologies you are using and you can use it in a very small part of your application or your entire application. For someone who wants to take their project to the next level without too much risk, knockout is a great choice.

Hope you found the information in this article useful. Your valuable feedback, question, or comments about this article are always welcome! :)

Yuliya Tolkach

Yuliya Tolkach
Yulia.Tolkach@altabel.com
Skype ID: yuliya_tolkach
Business Development Manager (LI page)
Altabel Group – Professional Software Development

There is no doubt that mobile industry is one of the most intensely growing nowadays. Any product that earlier used to be desktop or web is moving towards going mobile. Everyone is taking designing experiences for smaller screens seriously. As for the web, we’re seeing swarms of recently updated sites that are employing responsive design or more mobile-friendly layouts. This is quite critical, especially when you consider that accessing the web from mobile devices is on track to surpass desktop usage in a just a year or two.

With so many mobile apps/sites out there you have to do all it takes to deliver a good mobile product that will be competitive on the market. The key input for success here often is conditioned by the convenience of mobile services. You have to start predicting what the customer wants to see when they try a mobile application or website. The use of mobile context in delivering mobile experience is just one of the big challenges that application developers face. Here’s a number of the most important challenges we see.

1. Mobile Context

There has always been emphasis on context – the idea of being sensitive to where users might be and what they might be doing at the same time that they’re using your app/site. Is a user in line at the grocery store or on the living-room couch? Is a user connected to the Internet via Wi-Fi access, with fast page loads, or an infuriatingly weak Internet connection? Are both of the user’s hands holding the device in landscape orientation, or is the user using only the right thumb to navigate the interface in portrait mode? We have to think about all of this. Basically the customer’s mobile context consists of:

Preferences: the history and personal decisions the customer has shared with you or with social networks.
Situation: the current location, of course, but other relevant factors could include the altitude, environmental conditions and even speed the customer is experiencing.
Attitude: the feelings or emotions implied by the customer’s actions and logistics.

Getting a good contextual awareness will require collecting information from many sources. For instance it could be mobile device itself, the local context of devices and sensors around them an extended network of things they care about and the historical context of their preferences. Gathering this data is a major challenge because it will be stored on multiple systems of record to which your app will need to connect.

2. Device Proliferation

Another challenge facing mobile developers is device proliferation. It looked like mobile app development process was pretty well defined: build your app, make sure it looks pretty on a 4-inch smartphone and a 10-inch tablet, then submit it to an app store. Most app developers prioritized a few popular devices, such as the iPhone, the Samsung Galaxy S III and the iPad.

It’s not quite that easy now, and it’ll be much tougher in the near future. Picking the most popular devices will become more of a challenge as device types and platforms proliferate. Google and Apple already support tablets of different sizes and, with Windows 8 now shipping, developers can expect to find a whole range of larger touch-sensitive devices, such as Hewlett-Packard’s Envy series.

3. Voice rather than Touch

There are a lot of situations where you would want to build voice input into your app today. For a running or fitness app, a phone is likely to be strapped to a person’s sweaty arm. The same is true while driving. Modern applications are to let people use their devices while keeping their eyes and hands off it.

4. Hybrid Applications

With each release, popular mobile operating systems get better at supporting HTML5 and its attendant APIs. That capability will let companies reuse more code across multiple devices, which will be important in keeping app development costs down taking into account the proliferation of connected devices and form factors.

As a result we could expect that more companies will turn to web technologies with a centralized code base for core components of their connected applications. That centralized code is likely to be a combination of HTML, JavaScript and CSS, because the vast majority of devices will support it. Much of this HTML5 will be delivered as hybrid apps, which mix HTML code into a native container and use native code for navigation and platform specific integration. These hybrid apps will get more sophisticated and capable as a result. We’re already seeing compelling enterprise applications built with the hybrid approach.

5. Cloud Powered Mobile Applications

With the power of the cloud, the mobile application market is about to change radically. Several industry analysts predict that mobile applications will gradually move to the cloud and move away from being installed and run directly from the handsets themselves. Instead, cloud powered mobile applications are accessed and executed directly from the cloud through a mobile web browser interface and several technologies facilitating this change are already available. HTML5, for example, is necessary for enabling caching on the handset, so that users will experience uninterrupted service levels despite fluctuations in network service delivery.

Cloud powered mobile applications are not limiting their choice to one platform. Application developers also have real advantages from mobile cloud computing. The largest benefit is that it allows them to have access to a larger market. This means developers will have a much wider market which means they can bypass the restrictions created by mobile operating systems. But with greater developers’ power comes greater responsibility for security and performance. Expect more developers to be on call for application support in the new model, using triage to handle defects and investigate degradation to production services. Those tasks have traditional been the domain of systems administrators. Expect IT operations personnel to become integrated into development teams and to start their work at the inception of an idea.

I think the challenges mentioned are some of the most important ones. What are the challenges you have already faced in the mobile development? Even more interesting to hear about the challenges you are envisaging for the near future! As usual many thanks for sharing your thoughts!

Aliona Kavalevich

Aliona Kavalevich
Aliona.Kavalevich@altabel.com
Skype ID: aliona_kavalevich
Business Development Manager (LI page)
Altabel Group – Professional Software Development


%d bloggers like this: