• Home
  • Contact Us
  • Guest Blogging
  • Privacy Policy
  •  

    Weighing the Pros and Cons of Javascript and Micro-Frameworks For Startups

    By itself, HTML code doesn’t do much for the modern Internet user. To bring the code to life with interaction and animation, Web developers often use JavaScript. Unfortunately, using JavaScript to improve a site increases load times, which in turn decreases user engagement. Website creators who want to use JavaScript without sacrificing speed have turned to several solutions, including jQuery, asynchronous loading tools and micro-frameworks (e.g. MicroJS).

    Looking at jQuery and Asynchronous Loading Tools

    Perhaps the most common method of lessoning JavaScript load times is the use of jQuery. This program currently exists on approximately 44 percent of websites, according to Award-Winning Fjords. However, because browsers cache jQuery based on its source domain, users must download a new copy of the program for every website they visit. Furthermore, websites must use the entire program (130K), regardless of whether they need all the pieces.

    Asynchronous loading tools are another popular solution, but they are not without problems. The tools themselves are written in JavaScript, so they must be loaded before they can be used to bring in additional JavaScript. Most of the tools are small, so not much time will be lost. However, these tools do add a certain amount of complexity to JavaScript loading.

    Micro-Frameworks

    The micro-framework seeks to solve the problem of JavaScript loading in a different way. Instead of offering websites an entire packaged program such as JQuery, options like MicroJS allow developers to pick and choose from several micro libraries based on the features they need.

    The structure is similar to that of many popular Web-hosting sites and VPS hosting, which typically allow a website owner to choose the applications that will run on a specific domain. This customization allows Web developers to customize their loading package and reduce the amount of space it takes up, which in turn reduces loading times for end users.

    Pros:

    • Micro-frameworks eliminate useless and unnecessary code that often increases load times.
    • A micro-framework structure is easier for developers to understand and implement than more complex options, such as asynchronous loading tools.
    • If a developer needs a new solution, he or she can simply add an additional micro-framework. With other options, such as JQuery, a new micro-framework must be worked in to the walls of a large, all-encompassing framework, which can be tricky and time-consuming.

    Cons:

    • Micro-frameworks have not undergone the same volume of testing as larger libraries. For this reason, they may be unreliable.
    • Because micro-frameworks contain several separate parts, centralized bug tracking and documentation isn’t usually feasible.
    • Modules in micro-frameworks aren’t usually interoperable. Because each module must be able to stand on its own, it cannot depend on code from any other module. This structure often causes redundancy.
    • Micro-framework modules may not work with all browsers.

    At this point, it’s difficult to say whether micro-frameworks are the better option. Though there are clear benefits to using these smaller modules to load JavaScript, they are a relatively new development. As they undergo more testing and tweaking, however, it is likely that they will become more-widely used.

    About the author: Alan Bryan Born and raised near Silicon Valley, Alan’s parent’s had high hopes for him. Those hopes did not include gaming. Fortunately, Alan was able to channel his love of gaming into a career as a journalist…focusing on gaming. Both Alan and his parents have accepted this compromise.