Quick Start: End-to-End Testing With Protractor

See the original posting on DZone Python

As AngularJS applications become more complex, manual testing becomes unreliable and repetitive. Unit Testing is a great start for testing the code, but eventually, End-to-End testing is needed for better coverage.

A great tool to use for this is Protractor, which is an end-to-end test framework for AngularJS applications. In this blog, we’ll introduce the benefits of Protractor and give you the steps needed to get started.

Using Dependency Injection in Multiple .NET Core Projects

See the original posting on DZone Python

One of my last posts was about Dependency Injection (DI) in .NET Core Console Applications. Some days after that post was published, I got a question about how to use the IServiceCollection in multiple projects. In this post, I’m going to try to explain just that. 

Setup

To demonstrate that, I created solutions with two .NET Core Console apps and two .NET Standard libraries. One of the console apps uses two of the libraries, and the other one is just using one. Each library provides some services which need to be registered to the DI container. Also, the console apps provide some services to add.

The Basics of Package.json in Node.js and npm

See the original posting on DZone Python

The package.json file is core to the Node.js ecosystem and is a basic part of understanding and working with Node.js, npm, and even modern JavaScript. The package.json is used as what equates to a manifest about applications, modules, packages, and more – it’s a tool to that’s used to make modern development streamlined, modular, and efficient.

As a developer in the Node.js ecosystem, understanding the basics of package.json is one of the first steps to really kicking off your development experience with Node.js.

Building Angular2 Single Page Applications with Crafter CMS

See the original posting on DZone Python

Single Page Applications (SPA) are quickly becoming the industry standard for HTML5 based applications and responsive websites because they tend to be more user-friendly, feel faster, and are more responsive.

As with most applications today, SPA’s frequently contain a lot of content and related digital media, such as images and videos.  Often times, content and digital media are deployed statically along with the application. This approach creates unwanted dependencies for content updates on the developers and requires heavy deployment processes.

ChartistJSF: A Responsive Chart Library for Java Server Faces (JSF) Apps

See the original posting on DZone Python

ChartistJSF is a responsive and simple chart library forJava Server Faces (JSF) applications. ChartistJSF is based on Chartist.js, which is a lightweight and responsive JavaScript-based chart library. To be compatible with Java Server Pages applications, ChartistJSF is built on the top of PrimeFaces.

ChartistJSF offers several benefits when compared to other chart libraries. In ChartistJSF, styles and functionalities are separated, so there is a great deal of flexibility in maintaining charts. Another note about ChartistJSF is the use of SVG instead of canvas-based graphics. SVG graphics are more lightweight, have good presentation quality and, because of their XML-based structure, their elements can be easily manipulated using JavaScript and CSS. Moreover, by using the @media query of CSS (thanks to the separation of styles and functionality), charts are responsive and more controllable. Last but not least, ChartistJSF supports AJAX updates.

Best Tools For Developers To Minify Javascript

See the original posting on DZone Python

Put succinctly, minifying is the technique of removing the unnecessary characters from the source code. This is also known as code compression and minimization. A lot of production websites are using JavaScript minification, but it has its own technique to compress scripts into smaller tracks. In order to execute different difficult tasks successfully, web developers get tremendous benefits from great JavaScript minifying tools. In the development tasks, these enhanced JavaScript minifying tools assist developers and help in improving the code. Minifying your source code will improve load time and also the performance of web applications. Here are some of my favorite:

YUI Compressor

This is a command line tool printed in Java and expanded by Yahoo. If you want to minify quickly, the YUI compressor is a great fit for your needs. It is 100% secure and gives an elevated compression ratio as compared to other tools.

Create a Docker Dashboard with TypeScript, React, and Socket.io

See the original posting on DZone Python

In this article, we are going to use a few different technologies together to build something which, after a bit more elaboration, might actually be useful! We will be creating a web-based dashboard for a Docker installation using a number of different frameworks and technologies, both front-end and server-side, enabling some administrator to monitor running containers, start and stop existing containers, and create new containers based on existing Docker images. There is a wide scope for elaboration here, of course, but I’ll leave that as an exercise for you, the reader. Hopefully, this article will set you off on the right foot with a good overview of the relevant technologies, enabling you to add even more value to the product!

The App

This is a quick preview of what the app looks like when it’s finished. It’s essentially a page that displays two lists of Docker containers: those that are currently running, and those that are stopped. It allows the user to start and stop these containers, as well as start a new container from an existing image by clicking the ‘New container’ button.

Applied Rails: Customizable Text

See the original posting on DZone Python

The other day, I was assigned the task of making a Rails application in which the user could add a set of "Terms and Conditions" in the Offer screen. These documents are typically standard, but the business guys wanted the user to be able to customize the individual clauses. It sounded oxymoronic at first, but, after remembering Scott Meyers’ words, "pretty this ain’t, but sometimes a programmer’s just gotta do what a programmer’s gotta do," I set out in earnest to figure out what could be done.

From our business analyst, I got the typical standard clauses for these types of documents. To illustrate, here is an example — "Offer shall be valid for 45 days." My first thought was that I should identify the parts that vary and take them as input data from the user.

Top 10 Major Benefits of HTML 5

See the original posting on DZone Python

What is the most preferred technology framework for front-end development? The advent of the mobile-first era has led more and more developers to develop mobile friendly websites with HTML5. The major benefits of HTML5 are evolving each day to provide functionalities on par with native technologies. 

Owing to its new and powerful features for both developers and end users, it is already used to code websites around the world.HTML5 is enabled by all new modern desktops and mobile browsers, or for mobile app web development.

Python Never Gives Up: The tenacity Library

See the original posting on DZone Python

A couple of years ago, I wrote about the Python retrying library. This library was designed to retry the execution of a task when a failure occurred.

I’ve started to spread usage of this library in various projects, such as Gnocchi, these last few years. Unfortunately, it started to get very hard to contribute and send patches to the upstream retrying project. I spent several months trying to work with the original author. But after a while, I had to come to the conclusion that I would be unable to fix bugs and enhance it at the pace I would like to. Therefore, I had to make a difficult decision and decided to fork the library.

Serverless Swift on OpenWhisk

See the original posting on DZone Python

I’m interested in serverless computing and as I write Swift, the OpenWhisk platform comes up high when you Google. This turns out to be a really good choice as OpenWhisk is Open Source so I can read the source code (and have done!). In principle, I can also run my own instance of it if I need to for regulatory reasons, or just to avoid vendor lock-in.

Commercially, the whole point of Serverless (aka Functions as a Service) is that it deals with everything infrastructure related other than the function I am writing. So I actually host my OpenWhisk functions with IBM’s Bluemix.

Connecting a GWT EventBus to a Vert.X EventBus

See the original posting on DZone Python

What We’re Aiming For

In this tutorial, we’re first going to create a Vert.X service. This service has a verticle that is exposing a topic on the Vert.X EventBus to a (CORS-enabled SockJS) EventBus bridge.

After that, we’ll wire a GWT application’s EventBus up to this EventBus stream, and display all these received messages. We’ll be using JsInterop annotated classes to use the Vert.X client JavaScript libraries.

WordPress vs Magento – Which One is a Better Option for Your New Online Store?

See the original posting on DZone Python

You may be feeling a little bit overwhelmed by the wide range of options that are available to your business if you are presently operating a website, and looking to incorporate some e-commerce functionalities into it.

In this article, we are going to accentuate some of the pros and cons of the two most popular solutions – Magento and WordPress.

Lessons Learned from Teaching JavaScript, Pt.1

See the original posting on DZone Python

Recently I was assigned to a training task where I needed to train one of my colleagues who is totally new to the programming field. After the training, I got the idea to create a series of articles related to JavaScript, out of what I had covered in my training sessions. As this is the first part of the series, we are going to cover some basics of JavaScript which you may have forgotten, or you may not be aware of it. You can always see my other posts related to JavaScript here. We will be using Visual Studio for our development. I hope you will like this. Now let’s begin.

Download Source Code

  • Do you know JavaScript – Part 1
  • Introduction to KnockoutJS

    Basically, JavaScript is a programming language used in conjunction with HTML and the web. Nowadays, we can create any kind of application using JavaScript. If you are totally new to JavaScript, I strongly recommend you to read some basics here.

    The Modern Application Stack – Part 5: Using ReactJS, ES6, and JSX to Build a UI (the Rise of MERN)

    See the original posting on DZone Python

    Modern Application Stack – Part 1: Introducing The MEAN Stack introduced the technologies making up the MEAN (MongoDB, Express, Angular, Node.js) and MERN (MongoDB, Express, React, Node.js) Stacks, why you might want to use them, and how to combine them to build your web application (or your native mobile or desktop app).

    The remainder of the series is focussed on working through the end to end steps of building a real (albeit simple) application – Mongopop. Part 2: Using MongoDB With Node.js created an environment where we could work with a MongoDB database from Node.js; it also created a simplified interface to the MongoDB Node.js Driver. Part 3: Building a REST API with Express.js built on Part 2 by using Express.js to add a REST API which will be used by the clients that we implement in the final posts. Part 4: Building a Client UI Using Angular 2 (formerly AngularJS) & TypeScript completed the MEAN stack by adding an Angular 2 client.

    Installing Node.js Tutorial: Using nvm

    See the original posting on DZone Python

    As with any programming language, platform, or tool, the first step to using it is getting it installed. Many of them typically come with a speedy way to upgrade when a new version is available.

    By default, there’s not a way to upgrade the version of Node.js you’ve got from within Node.js itself. That said, there’s a fantastic tool for the community called nvm that allows you to manage the versions of Node.js that you’ve got installed locally.

    Write Practical Shell Scripts

    See the original posting on DZone Python

    In the last post, we talked about regex, and see how to use them in sed and awk for text processing. Additionally, we discussed Linux sed commands and awk commands. During the series, we’ve written small shell scripts, but we didn’t mix things up. I think we should take a small step and write a shell script that can be somewhat useful.

    The main reason for learning to write a shell script is to be able to create your own Linux utilities. Understanding how to write useful and practical scripts is important. Sometimes, however, it helps to do something fun to learn a concept or skill. The scripts in this post can be lots of fun! And they help empower the concepts behind the script.

    How Simple a Todo Backend App Can Be

    See the original posting on DZone Python

    The Todo-Backend project provides an arena to showcase backend tech stacks. It defines a simple web API in the form of a to-do list and users can create their own identical APIs using various tech stacks.

    As for now, there are over 80 Todo-Backend projects implemented in a wide range of tech/framework combinations, including JVM (Java/Scala/Kotlin/Closure), C#/.Net, Ruby, Python, PHP, Golang, Haskell, and a lot more. On each language/platform, there are one or more implementations based on different framework/data persist solution combinations.

    1 2 3 4 73