Thursday, December 31, 2020

7 Things To Consider While Choosing Best Functional Testing Tool

 

7 Things To Consider While Choosing Best Functional Testing Tool

Choosing the right functional testing tool is important for any testing team as it impacts the overall software testing process. If your selection goes wrong it could be a massive impact on the testing process. When you try to search “functional testing tools”, there will be a long list of tools and might get confused about choosing the best one. Some of them might have great capabilities but they also have limitations that could impact daily flow. So here we came with the considerations that will help you to choose the best functional tool. Before that, let’s see what functional testing is.

What Is Functional Testing?

It is a type of software testing that validates the software system against functional requirements/specifications. It’s tests are conducted on each feature of the software to determine its behavior by using input combinations simulating normal operating conditions and deliberate errors and anomalies. Functional testing is a type of black-box testing where it checks user interface, APIs, database, security, client/server communication and other functionality of app. 

Know the difference between Unit Testing and Functional Testing at- Unit Testing Vs Functional Testing – Know The Comparison

Considerations To Choose Best Functional Testing Tool-

1. Platform Support And Tagging-

If the test tool is unable to run on all the platforms that the team needs support for(mobile web, iOS native, web, Android native, API, unit and so on) then the team has to cover that risk in a different way. Many platforms have similar use cases: search, login, display product page, tag, checkout and so on. One basic practice for end to end tools is to create a “page object,” with the basic features expressed as functions. Automated checks call those functions. At the runtime page objects are created to make it possible to reuse a path-to-purchase check on each device. Simply, you can rerun the same test against different page objects. Some kind of features exist only on the full-sized web version of product.

Tagging is a way to track which tests run in which browsers. With the help of tagging, it is possible to instruct the tool to “run all tests for the edge browser full size”, or for this, just front-end tests, only back-end tests, only tests that hit a certain API, only profile tests and so on. If tool has various levels of platform support and teams support various platforms, then tool will have to keep track and run the subset that is supported. While speed up the delivery process Tagging tests by feature and return all tests for feature quickly, at the desktop right before a check-in can be a powerful way to reduce risk. 

2. Programming Language And Development Environment-

In a case where a tool has a programming language, there are two approaches: write in the same language as production programmers or use powerful high-level language like Ruby.  If the test is written in the same language as production code and runs during the continuous integration (CI), it might fail the commit and get programmers to fix the bug.

The tool can run as a plug-in inside the developer’s integrated development environment (IDE), by minimizing the switching amount. If tool uses a different programming language and runs outside of the IDE, programmers will learn new tool or do the work to support the tool when it reports “failure”.

3. CI And Version Control-

Many teams that want to avoid automation delay put the tool run into the CI process. Means, CI system checks the code, performs a build, runs unit tests and creates an actual server and a client, possibly putting the software on a mobile device. Then CI system starts end to end tests running with the functional tool. Tests that runs under CI creates a new requirement. When new branches are created, you have to create a new branch of tests. In this way, many CI pipelines can run at the same time. This means the tool have to run from the command line and generate output that CI system can interpret. At least it should capture the output and transform it into something that CI system can read.

To use the CI system’s dashboards and pie charts, data needs to get out of the tool and into the CI system. When the device runs under CI, the power is in getting it to report failures to the offending programmer. This occurs by tracking and then debug naad “green” the test or fix the code. This can be easy to do if the programmers know and support the language if tests are stored as plain text. When stored in version control, it is hard to tell the differences among files in binary format.

4. Insightful Report-

Test reports should help diagnose and analyze defects and root causes, test coverage, test effectiveness and other analysis. So, choose the functional testing tool whose charts and dashboards have a customizable degree of detail concerning the intended audience. These reports are necessary for managers to make informed decisions about the quality of their products.

5. Bug Area-

Recognize the areas where rigorous is required and choose the tool that can accommodate all. By using defect tracker, you can get idea. Such research can find various bugs in business logic, database layer or GUI. Depending on that select a tool which facilitates for all issues but focuses on main areas where bugs are mostly spotted.

Know more at- https://solaceinfotech.com/blog/7-things-to-consider-while-choosing-best-functional-testing-tool/


Tuesday, December 29, 2020

10 Best Functional Testing Tools For 2021

 

10 Best Functional Testing Tools For 2021

Software development practices change over the long run, so do the tools and technologies. Main aim of these changes is to improve productivity, quality, customer satisfaction, tackle ever-shorter delivery time and deploy successful products and services. Software testing plays an integral role to achieve these objectives. Each type of testing tests the product in a different way and  functional testing is one of them and it should be done with the right tools. Before digging to the functional testing tools, let us see what is Functional testing.  

What Is Functional Testing?

This is a type of testing that validates the software system against functional requirements/ specifications. Main purpose of functional tests is to test each function of software by providing appropriate input, verifying the output against functional requirements. It involves black box testing and checks user interface, APIs, Database, Security, Client/Server communication and other functionality of application under test. Functional testing can be done either manually or using automation.

Test result is just an observation of output compared with a requirement. Generally it can be expressed as a simple “pass” or “fail”. Functional testing tools may be triggered manually, but for quality assurance at speed, advanced functional testing tools provide automated testing.

Know the comparison of unit testing and functional testing at- Unit Testing Vs Functional Testing – Know The Comparison.

Types Of Functional Testing-

  • Unit testing of small unit code or single task within a software code. Generally Unit tests are automated.
  • Smoke testing or Sanity testing uncovers the failures that might  make more detailed or advanced process testing impossible.
  • System testing works in concert within an integrated system to ensure together they behave in compliance with requirements. 
  • Interface testing tests a product’s graphical user interface to ensure it meets specifications or that navigation works as designed.
  • Regression testing uncovers new bugs after patches or configuration changes have been made to a system.

Top 10 Functional Testing Tools-

1. UFT-

UFT(Unified Functional Testing) is a popular commercial testing tool for functional testing which provides a feature set for API, web services, and GUI testing of desktop, mobile and web applications across platforms. This tool has advanced image based object recognition feature, reusable test components and automated documentation. It makes use of a Visual Basic Scripting Edition to register testing process and object control. UTF is integrated with Mercury Business Process Testing and Mercury Quality Center. This tool supports CI through integration with CI tools like Jenkins. UFT  got the highest views and followers on IT Central Station in the functional testing tools category.

2. Selenium-

It is a popular open-source automated testing suite for web apps. Selenium includes several components with which each performing a specific role in aiding the test automation. It supports various system environments and browsers. Also it provides a test domain-specific language to write tests in programming languages like PHP, Java, Perl, Groovy, Python, Ruby, Scala, C#. Testers have flexibility with Selenium and they can write complex and advanced test scripts to meet different level of complexity, it needs advanced programming skills and effort to build automation frameworks and libraries for particular testing needs.

3. Tricentis Tosca Testsuite-

It is an effective end to end functional testing tool with Latest version v9.0. It makes use of a modern model-based approach that is tested in Agiles method development. This tool creates test cases that are independent of software technologies and provides it in a business language that anyone can easily understand. So the test cases are created within less time and can be used as manual tests or automated test scripts. It has an effective approach in maintaining tests with recurring changes throughout the sprint cycles of Agile methods. It covers maximum business risks and can be easily maintained by non-technical users. Test module can be used for different technologies and platforms.

4. TestComplete-

This is a good testing tool for web, mobile and desktop testing. It supports scripting languages like VBScript, Python, Javascript, and C++Script. Testers can perform data-driven and keyword-driven testing with TestComplete. TestComplete offers easy-to-use record and playback features. GUI object recognition capability can automatically detect and update UI objects. This reduces the effort to maintain test scripts when the AUT is changed.

5. Telerik Test Studio-

It is a simple and user friendly testing tool that provides functional, exploratory, performance and load testing solutions. This tool comes with a Visual Studio plug-in, so one must know the visual script so as to bring the best out of this tool. It supports various browsers and test maintenance cost very less. All the locators are inbuilt and centralized, and its test scripts can be used again.

6. Ranorex-

It is a commercial Windows GUI test automation tool and supports functional UI testing on desktop, web and mobile apps. Ranorex is easy to use for beginners with codeless click and go interface and helpful wizard. It is powerful for automation experts with full IDE. This tool supports reliable object identification for web elements with dynamics IDs too. It has shareable object repository and reusable code modules for efficient test creation and less maintenance. It can integrate with tools like Jira, Jenkins, TestRail, Git, travis CI and so on.

Know more at- https://solaceinfotech.com/blog/10-best-functional-testing-tools-for-2021/


Saturday, December 26, 2020

Unit Testing Vs Functional Testing – Know The Comparison

 


Main aim of any application or software testing is to build a high quality product. Functional testing and unit testing are the foundation of the testing process. Both software testing types have their own importance in software development. Functional testing is performed by the tester during system testing whereas unit testing is performed by the developer during the development cycle. Utility of functional testing is understood by users, developers and QA alike. Here we will understand the various aspects of unit testing vs functional testing. Before digging to the comparison, let us see what is unit testing and what is functional testing.

What Is Unit Testing?

Unit testing is a popular testing that helps to eliminate the risk of having bugs in codes. And so it is adopted by many organizations. In this type of testing all individual units or components are tested. Main purpose is to validate each unit of software code and check whether they are performing as expected or not. It isolates the code section, verifies correctness of code, test each function and procedure, finds early bugs and fixes in the development cycle to save costs, helps developers to understand the code base and enable them to make changes quickly, and helps for code reuse.

What Is Functional Testing?

This software testing process validates software systems against functional requirements. Main goal of functional testing is to test functionality of software application by providing input, output verification according to the functional requirements. It finds defects that programmer may have ignored while developing software, provides information about the level of quality, prevents defects, and ensures that the result meets the business and user’s requirements.

You can also know the difference between Alpha, Beta and Gamma Testing at- Alpha, Beta and Gamma Testing- What is the difference?

Unit Testing Vs Functional Testing-

1. Purpose-

Unit Testing-

Individual units of code are tested separately with unit testing. Main purpose of unit testing is to separate the smallest testable parts of API and verify if it functions properly in isolation. This testing verifies the different behavioral aspects of system under testing, whereas mainly it verifies whether the system under testing produces the correct results or not. From the developer’s point of view, the goal of unit testing is to create strong codebase with less cost. Also the important purpose of unit testing is to provide documentation for high-level testing like integration testing and functional testing.

Functional Testing-

Main goal of functional testing is to check the functionalities of a system. In this type of testing, a tester is not worried about the core code, rather they have to verify the output based on the user requirements with expected output. Functional tests check the whole software, its software, and networking infrastructure – from the front end to the back end database systems. It is form of integration testing which ensures that all components are working together as needed. Functional testing don’t enlighten you about the errors or its location. It just notifies you that something is broken, it can be the browser, test or race condition. As it follows end-to-end testing, there is no way to tell.

2. When To Perform?

Unit Testing-

Unit tests are a solid foundation on which the rest of the testing process should be built. It is good to write tests from the start of code writing. A popular software development practice Test Driven Development advocates writing tests before coding. You can refactor your code and unit tests will tell you if you broke anything. 

Functional Testing-

It starts when two modules interact with each other and then testers perform functional testing on the feature. You can use unit test to test an individual function and integration test to verify how two parts performing nicely. Functional test are on a complete another level, however you can have hundreds of unit tests, you usually want to have just a small amount of functional tests.

3. Software Quality Improvement-

Unit Testing-

Through writing a test to drive your new code, you essentially capture that work. For instance, if in six months the programmer breaks the code, you can use that test to fix the code. Defects in objects are identified very quickly, so it needs less re-work and re-test dependency on other code. Generally complex apps has many variables to clearly test practically. Breaking it into manageable unit tests is less expensive to develop and maintain. It generates decent bug report with the answer of questions like- What is the expected behavior?, What was the actual result?, What is expected result, which component is under test?

Functional Testing-

It verifies whether the app or system works as expected or not.  Generally have detailed tests for “happy paths”- that ensures the critical app capabilities like signups, purchase workflows, logins etc. and all the critical user workflows all behave as expected. There are lots of functional testing types and each has its own set of advantages. For instance, Smoke testing checks the critical feature of build and saves time and reduce regressions, integration testing verifies that all the integration are working together, system testing validates the whole software/application with regards to real user scenarios. End to End tests increase test coverage and reduces the risk with integrating new code into an app.

4. Purpose Of Text Coverage –

Unit Testing-

Test coverage is important in software testing and it serves different purpose for unit testing and functional testing. Test coverage tool tracks which code is executed or which is not. In case of unit testing, we can call it a code coverage. There’s a belief that high code coverage improves the code quality. If unit tests are poorly written with high test coverage, then it can’t assure the better code quality. 

Functional Testing-

For this testing, test converge can establish traceability between  test cases and requirements. Functional test coverage must indicate what features are done and what are still in progress. Such information is more accessible to product owners than exercised code lines. 

5. Complexity To Write Test Cases-

In TDD, you have to write unit tests prior to production code writing. Here you have to think about design of code upfront according to the requirements. Sometimes at starting, design is not clear and expands as you go further – at such cases you need to redo your test and this is very time consuming. For instance, frequently changing algorithms takes more time. It will be better to postponed unit cases until you get clear design idea. In some of the cases, you have to deal with other dependencies and integrations like database, user interface etc. Here TDD becomes hard and it includes many abstractions like mock objects, programming to an interface, MVC/MVP patterns etc. It needs detailed knowledge and developers have to write many unit tests, some of the times, more than actual code.

Regardless of dependencies, unit testing becomes very complex when you test trivial code. With unit testing, we can mock out all dependencies, however for functional testing it is different. A good example is-  testing a simple screen that loads network data – it will fail every time you run it while disconnected. Such scenarios make functional testing complex.

Most of the time, developers divide their time of developing new features and fixing defects. Some part of release is spent on functionality testing that was already released and used. While the main effort of designing and writing test plans for this functionality is investing in past releases, each new feature developed requires a test plan and a maintenance effort for tests that are existing. Main objective of QA managers is to reduce efforts. Teams that succeed to create clear and reusable tests simplify the maintenance and can optimize the test registration time.

Comparison Table Of Unit Testing Vs Functional Testing-

Unit TestingFunctional Testing
1. It is performed by developer while coding1. It is performed by Functional tester in lined with user/business document
2. Testing happens within system structure2. No System Structure Assumptions.
3. This testing happens while coding, one code at a time.3. This testing happens after the development is complete.
4. White Box testing method4. Black box testing method
5. Third-party tool or created within the development group.5. Test conditions created from business requirements
6. Helps in Debugging-process simplification by isolation the code that’s bad.6. Helps to eliminate functional errors

Wednesday, December 23, 2020

All About React Security Vulnerabilities That You Must Know


React is a popular front-end web library for app development. Though React is considered to be quite secure, there are some vulnerabilities that you should know while developing an application. React.js vulnerabilities can occur when you think that you’re using protective mechanisms of this library. It is necessary to remember what React can and can’t handle for you. 

Why You Should Not Ignore React Security Vulnerabilities?

If React.js is an important component of your tech stack, then there can be risk and implications  for your business regarding security leak. Developing react apps for web platforms and single page applications connects business with various information. This allows business to become competitive in the market. Nearly two out of three apps cause security flaws and sometimes developers ignore them which results in security issues with the app. A security breach in web apps could lead to unexpected consequences. So no one should ignore the react security vulnerabilities.

Common Security Issues In React Applications-

1. Securing React Application Against DDoS Attacks-

DDoS (Distributed Denial of Service) can be a malicious attacks launched by unauthorized users who make certain services of an application unavailable or inaccessible to users. It is essential to keep protection  against DDoS attacks under control. Generally this security issue occurs due to your insecure web app or it had loopholes in masking the IPs of all application services it provides. 

DDoS attacks restricts the application from interacting with the host server leading to the suspension of the targeted online services. With some cases, DDoS attacks might flood your React project with malicious traffic rather than spending an existing service. Know the common DDoS React security attacks and their damages:

  • HTTP flooding- Spoofing online services that leads to the permanent shutdown of app services 
  • SYN flooding- misuse of the application services 
  • ICMP flooding- Slowing down of the React application
  • UDP flooding- It leads to inaccessibility of host services
  • Ping of Death (POD)- Overflow of memory buffers

How To Handle DDoS Attacks?

  • To capture all multi-type DDoS attacks, scrub the react application during development and post full development. 
  • Install visitor identification to block malicious traffic from racing the internal codes.
  • Captcha or JS tests helps to secure web app layer

2. Securing React’s HTTP Basic Authentication-

Securing the connection between the web client and the server ensures the security of HTTP and its authentication protocols. When you build an application it is necessary to check if the domain www header has a realm attribute. This attribute connects User ID and password. One of the most common security pitfall that many people forget  is providing a realm attribute which authenticates various users with separate code variables to avoid mismatch in authentication of various IDs and passwords.

A small mismatch between server response mechanism and the realm attribute will result in unauthorized users accessing any authentication information. It is necessary that if an authorized user makes a server request, the authentication of the web app should display a 401 status error page.

3. Investigating React’s API Security Concerns-

React APIs set up connections between the application and other platforms. These APIs allows controlling of other devices or the particular device in which the application has been installed.

Generally, these APIs automatically document information and self-implement them to execute necessary commands within the application.  Lack of authentication or business logic issues leads to React API vulnerability. MITM(Man In The Middle) or Cross-Site Scripting (XSS) and SQL injection( SQLi) are common React API attacks. Know, how to reduce or eliminate React API security failure:

  • Execute timely schema validations to prevent malicious code injections and security parser attacks
  • Ensure that your application is secured with SSL/TLS encryptions
  • Validate API call commands against respective API schemas

Know the optimization techniques in react development at- 6 optimization techniques in React.

How To Secure React Web Application?

1. Injection-

React security issue occurs because of the untrusted data transmission between user and server as a part of the command line in your application. One of the common injection flaws is SQLi. Prevent injection related security flaws by using command queries in parametrized format and write customized whitelisted validation codes.

2. Sensitive Data Exposure-

Sensitive data exposure from react web app and mismatch of APIs with app can prompt to unintended decryption of stored data. Know the following ways to secure app from data exposure:

  • Ensure the encrypted algorithms version
  • Disable automated form caching and auto-filling features which may get data from users

3. Broken Access Control-

Inadequate limitations on authenticated users lead to access and misuse of unauthorized data and functionality of your React web application. In most of the cases of access control failures, unauthorized users might even be able to change the primary key of any functionality or app data. You can control back full access by-

  • Developing role-based authentication mechanisms
  • Disabling functionality access to secure app.

4. Cross-Site Scripting-

This vulnerability can lead to serious problems. XSS attacks occur when an attacker  can trick a website and force it to execute arbitrary JavaScript code in users browsers. You can overcome XSS by creating automated overseeing features that can sanitize user input and avoiding invalid and malicious user input from being rendered into browser.

5. Insufficient Logging & Monitoring-

Common React security failure which results as a reason for the monitor lacking the application periodically ignoring upgrades, and security issues that might be existing. You must ensure all server-side validation data input failures are logged with sufficient identification, and provide trail to all data within the app to avoid suspicious data access or data deletion.


Know more at- https://solaceinfotech.com/blog/all-about-react-security-vulnerabilities-that-you-must-know/

Tuesday, December 22, 2020

Flutter Vs NativeScript- Comparison You Must Know

 



These days, people are looking to develop apps more rapidly with less cost and so searching which framework best fits their app idea. Selecting a framework with best features and understandable architecture is not that much easy as it seems. In 2020,  Flutter is a popular framework among the developer community and it offers many pre-configured widgets and modules for native apps. Whereas, NativeScript is a JavaScript-Based framework which offers complete native-like functionality with multi-platform compatibility options. Despite the fact that NativeScript and Flutter are similar in some aspects, they are diverse in terms of system components, architecture, size, cost of development, and so on. You might wonder which framework to choose, so before choosing the best framework, you must know the comparison Flutter Vs NativeScript.

Before digging to the comparison, know the basics of flutter and NativeScript.

Flutter-

It is an open-source framework which functions with a language called Dart(created by google). Generally it is addressed as an enhanced UI toolkit used to build cross-platform applications with a single codebase. It provides accessibility to develop expressive and flexible UI with native performance. Also, it is supported and contributed by Google team and the entire flutter community. This framework is used to build Apps with material design, advanced OS plugins with simple logic, high performance apps with Skia rendering engine, flexible UI with high-level widgets, Reactive applications with vast data integration.

Google Ads, Alibaba, eBay, BMW, Reflectly are some of the popular apps built with Flutter framework.

NativeScript-

It is an open-source framework to build cross-platform apps for iOS and Android using JavaScript. It transpiles programming language to another another, building native apps using Angular, Vue JS and TypeScript. Dissimilar to other frameworks that makes use of Cordova for delivering a WebView-driven application UI, NativeScript has a rendering engine that provides native performance and user experience. It can be used to build real-time apps, music or video streaming apps, geolocation apps, apps with massive server connectivity.

Airbnb Design, MDBootstrap, Portable North Pole (PNP), SAP are some of the popular apps built with Flutter framework.

Flutter Vs NativeScript-

1. Architecture-

Flutter-

It has a layered architecture. Flutter app’s hierarchy starts with a top-level root function or platform-specific widgets. It is followed by basic widgets which interact with rendering layers and platforms. Beyond the rendering layer exists the animation gestures that transfer API calls to the app’s foundation. It is also called Scaffold that is run by a C/C++ engine and a platform-specific embedder. If you want to separate the presentation layer from business logic, you can consider implementing Flutter BLoC. This architecture eases the development of complex applications with small and simple components.

NativeScript-

It follows the MVC or MVVM architectural pattern. And it is widely functions on Modules, CLI, and plugins. It’s structure includes various modules and each of them is responsible to enable certain features. Root module and page module together form an application module comprising CSS style code, actual business logic and XML based UI codes. Because of MVC friendliness it manages module dialogs.

2. Learning Curve-

Flutter-

Flutter is easy to learn, it just needs basic knowledge of native android or iOS development. It’s documentation is easier to understand as compared to React Native. 

NativeScript-

It provides an extensive learning as developers can switch between TypeScript, JavaScript or angular according to the need, feasibility and comfortability. Declarative coding style eases the development for experts and beginners. A thorough understanding of native performance accompanies development experience in Core Modules and design patterns. 

3. Development-

Futter-

Frankly, Flutter is not good to handle complex projects. It is a good solution to build MVP and faster prototypes when you’re destined to experiment with it and cut costs to see your thoughts in reality. You can invest more and take your thought from simple to complex. 

Know the reasons to choose flutter for cross platform app development at- Why choose flutter for cross platform app development?

NativeScript-

Complex or advanced apps with high performance work smoothly with Nativescript. Full-packaged complex app development needs additional XML and UI support. This framework follows a bundle workflow process which develops optimized and complex apps with tree-shaking mechanisms, that improves the build time. Also, the Hot Module Replacement feature replaces, updates and upgrades modules without restart of existing apps.

4. UI-

Flutter-

It offers a great UI with elements, simplified tools and customized widgets. Generational garbage collection features help to create UI frames for object codes that may be temporary. Dart allocated objects within single pointer bump avoids UI clutter, junk and shutter of animation lag during development process.

NativeScript-

It is the best solution to build enterprise-level business apps. Also you can customize the free, professional-grade UI elements that native offers. It provides improved user experience due to its features that are supported by native functionality and native controls.  NativeScript tests its libraries, templates and UI elements before implementation to achieve the desired user-interface. You can improve user experience by using methods like getFrameByld, classes like Frame, and properties like navigationContext.

5. Size Of Application-

Flutter-

Simple hello world app size was 7.5 MB. With flutter the app size is influenced by Virtual Machine of Dart and C/C++ engine. To avoid size concerts, flutter can contain all codes and assets. Split-debug-info tag reduces the code size.

NativeScript-

Simple app built by using NativeScript is more than 12MB. Self containing multiple APKs in one package with single codebase targets different device configurations and reduces the app size. ABI mechanism of NativeScript allows device to automatically extract machine code and scan for shared library during development. 

6. Testing-

Flutter-

It offers extensive support for automated testing, a large number of testing features to test apps at unit, widget and integration level. Also flutter provides robust documentation to build and release Android and iOS apps on play store and app store resp. 

NativeScript-

Nativescript follows its own QA workflow which improves an app’s default testing capacities. It supports testing tools like Jasmine, Mocha and QUnit by integrating unit testing directly into default CLI. Also the Appium (external provider) can be used for functional testing.


Monday, December 21, 2020

Azure Functions Vs AWS Lambda Vs Google Cloud Functions

 


Serverless computing has been gaining popularity. According to the report, it is the fastest growing extended cloud service, at 75% rate year over year. And so led to more curiosity and the use of serverless architecture. The days of storing information over an in-house database are far gone. Serverless is one of the trending technologies today. There are some serverless platforms to store data, some of these are, AWS Lambda, Google Cloud Functions and Microsoft azure. Selecting the best platform depends on factors like performance, functionality, pricing etc. Because of the availability of lots of platforms, you should know the clear difference between those so let us compare AWS Lambda vs Azure Functions vs Google Cloud Functions.

Azure Functions Vs AWS Lambda Vs Google Cloud Functions-

1. Language Support & Deployment-

Azure Functions

Azure provides 2 levels of language support- Generally Available (GA) level and Preview level. It supports C#, JavaScript, Python, Powershell, F#, Java version 8 and 11, and Typescript based on the runtime versions 1.x, 2.x and 3.x. Azure also supports direct deployment from .zip file packages. It promotes deployment through FTP, Cloud sync, Local Git, JSON templates and Continuous deployment. 

AWS Lambda

AWS Lambda provides native support for Golang, Java, PowerShell, Node.js, C#, Python and Ruby. It’s runtime API allows the use of any programming language to develop customized functions. Simple, lambda supports various languages by creating container images through the said Runtime APIs. Simply creating .zip file archives of functional code and dependencies, eases the deployment of Lambda package. Integrating Amazon Storage Services, you can deploy libraries other than AWS SDK with Lambda.

Google Cloud Functions

Google Cloud Functions eases writing in Node.js, Golang, Java, Python, and .NET frameworks like C#, F#, and Visual Basic. In cloud functions, runtime plays an important role as it does in AWS Lambda. The main difference is that the environment executions of Cloud Functions vary based on the runtime model chosen. Packages from cloud functions are deployed from Cloud Source Repos, Local machine, source control and APIs.

2. Persistent Storage-

Azure Functions

With advanced programming, handling storage gets a little overwhelming with Azure, but it has upgraded the storage services. One can get about 40 TB to 500 TB of offline data storage transfer through its cloud solution Data Box.

AWS Lambda

AWS Lambda sets limits for computing and persistent storage resources. This method is applied to all functional layers, deployment packages, container images, execution processes, test events among others. By default, it provides 1k concurrency executions, 75 GB storage for functions and layer storage. In spite of the limit, the storage quota is expanded to a few terabytes upon submitting a manual request to AWS Console support for functional scaling. Lambda provides storage options as Amazon’s S3, EFS, and DynamoDB.

Google Cloud Functions

Google cloud functions provides simple control over the storage through their in-house Cloud Storage while it also offers the possibility to use Firebase. 

3. Dependencies Management-

Azure Functions

Azure employs an extensible application performance management service to measure, control and manage dependencies. The SDK of APM services permits azure to automatically track dependency calls for Http/Https, WCF, SQL, Cosmos DB etc.

AWS Lambda

Lambda’s execution environment has various libraries like AWS SDK that includes new packages and functions. Code organization and use of Dependency injections methods and Inversion of Control(IoC) frameworks like Dagger, Guice, Spring reduces the complexity of dependencies.

Google Cloud Functions

Monitoring, handling and accessing dependencies in Google Cloud functions depends on the language chosen and the runtime module integrated.  Whereas, with cloud functions, you could request and include any system package to handle the dependency via Go modules’ execution environment conveniently. 

4. Identity & Access Management-

Identity & Access Management system enables authorization layer to exercise fine-grained access management for functions. With Aws Lambda you can create your own custom IAM policies and assigns specific roles as per the user behavior. IAM of lambda has 3 policies: Role, Read-Only Access, Full-Access. Whereas, for IAM computing services, Lambda allows only partial access to service-linkedin roles and doesn’t give authorization-based tags. One can control your function policies through Resource Based Access Control. Now it provides three essential services, IAM for cloud and hybrid-based environment, Consumer Cloud IAM, and Virtual Machines for effective IAM.

GCF provides enterprise-grade level access control and it uses Google’s cloud resources to create security policy according to your requirement and compliance processes. Also, it offers a granular level of IAM via context-aware access, protecting attributes in each resource and IP address with continuous update on security status.

5. Scalability & Availability-

Azure Functions

Azure function is available with two different plans- Consumption plan and App service plan. Consumption plan scales your function automatically when a function execution times out after a configurable interval. App service plan runs functions on a dedicated VMs allotted to each function app, that implies the host of functions are always up and running.

AWS Lambda

AWS Lambda supports dynamic scalability according to the increased traffic. To effectively manage traffic increase, AWS Lambda predetermines the number of functions to be carried out according to the region on which it is executed. Near about 500 to 3K functions executed per region.

Google Cloud Functions

With Google Functions, the background functions scale gradually, and it relies upon the function duration. Likewise, most extreme adaptability depends on as far as possible. Maximum scalability is based on the traffic limits.

6. Concurrency And Execution Time-

Concurrent execution count varies according to the type of event source you have used. Based on the incoming request rate, functions scale automatically, but not all resources in your application’s architecture work the similar way. So concurrency depends on downstream resources.

Azure Functions

Azure supports various functions simultaneously provided operations take place simultaneously within a single data partition. The number of simultaneous activity and executions is covered at 10X depending on the number of cores in the VM level. The execution time limit is 600 seconds or 10 minutes.

AWS Lambda

AWS Lambda limits the total concurrent executions across the functions to 1000. One can limits the concurrency in two ways: account level or individual functional level. Functional execution timeout is 900 seconds or 15 min.

Google Cloud Functions

Google cloud function receives only upto 80 concurrency executions and the execution time between 60seconds and 540 seconds. 

7. Logging And Monitoring-

Azure Functions

Azure has in-built Azure Application insights which monitors functions. It is generally replaced by built-in lagging system.

AWS Lambda

AWS lambda monitors functions by reporting metrics through Amazon CloudWatch which includes various requests, latency per request and number of requests resulting in an error. It integrates with Amazon CloudWatch Logs and pushes them from code to a CloudWatch group with Lambda function. One can make use of AWS X-Ray to provide end-to-end monitoring for functions. 

Google Cloud Functions

Google Stackdriver is a suite of monitoring tools which helps you to understand what’s happening in the Cloud Functions. It has in-built tools for logging, reporting errors and monitoring. One can see execution counts, execution times and memory usage in GCP Console also.


Friday, December 18, 2020

What’s New In React 17?

 


React is one of the most popular Javascript library and it is an efficient, declarative and flexible Javascript library used to build user interfaces. It has more than 156000 starts on GitHub and is one of the vibrant frontend communities building great applications. React has taken some important steps to improve the developer experience and efficiency of react-built applications. Here we’ll see changes in react v17. 

Know the most common mistakes that you must avoid in react development at- Most Common Mistakes To Avoid In React Development

What’s New In React 17?

1. v17 Allows Gradual React Upgrades-

When you update your entire application from React 16 to 17, the application may work well. But if the codebase was written more than few years ago and is not maintained regularly, it may cause difficulty for you. Although two versions of React can be utilized on the website, it was not stable and caused event issues until react v17 came into the focus. Some improvements have been made to the React event system so as to allow gradual upgrades. React 17 is an essential release because the changes could break down.

2. No Event Pooling-

Starting from this new version, event pooling optimization has been removed from React because of confusion and the simple fact that doesn’t improve modern browser performance.

function handleChange(e) {
  setData(data => ({
    ...data,
    // This crashes in React 16 and earlier:
    text: e.target.value
  }));
}

The team of React calls this a behavior change and has labeled it breaking, although they have not seen it break anything at Facebook, so the chances are very low. Also, e.persist() is still available on event objects, in spite of the fact that it does not do anything.

3. Changes To Event Delegation-

In react components, usually you write event handlers inline:

<button onClick={handleClick}>

The vanilla DOM equivalent to this code is like:

myButton.addEventListener('click', handleClick);

React does not connect them to the DOM nodes you declare on most events. Instead, it adds one handler per event type directly at the document node. This is called a delegation for event. It makes it simple to add new features like replaying events, apart from its efficiency advantages for large apps. From its initial release, React has done event delegation automatically. When DOM event initiates on a document, React understands which component to call and then the React event goes upwards through components. Whereas, in reality, the native event has already bubbled up to document level where React installs its event handlers. 

4. Effect Cleanup Timing-

New version makes the useEffect Hook cleanup function timing more consistent.

useEffect(() => {
  // This is the effect itself.
  return () => {    // This is its cleanup.  };});

In the previous version React 16, the effect cleanup function is run synchronously, that don’t delay screen updates and which React runs asynchronously by default. The React team has discovered that this synchronous process is not so ideal, just like it is not with componentWillMount for large applications when the user switches tabs.

This new version of react brings some new changes. The effect cleanup function will work asynchronously like others and if component is un-mounting, the cleanup will only run after updates are shown on screen.

5. Removing Private Exports-

For web, react native used to rely on specific internals of the system, but this dependency became weak and used to clash. These private exports ended in React 17. We know that React native for web was the only project that used them and that migration to new method has been already completed which doesn’t rely on these private exports. This means that old React Native Web version won’t be compatible with React 17 but still work with updated versions. In reality, it don’t affect because React Native had to release new versions to adjust to changes in its internal react.  

6. New Lifecycle Methods-

Two new lifecycle methods are switched with deprecated lifecycle methods- getDerivedStateFromProps and getSnapShotBeforeUpdateSome processes are replaced by these new lifecycle methods. For example, componentWillUpdate can be replaced by getDerivedStateFromPropstogether with shouldComponentUpdatecomponentWillMount should be removed altogether for async rendering.

getDerivedStateFromProps

This method is bound to replace componentWillReceiveProps and componentWillUpdate and will be called after a component is created and when it received new props.

This returns an object to update state when props change or null when there is not change in state.

state = { cachedSomeProp: null };
static getDerivedStateFromProps(nextProps, prevState) {
return {
cachedSomeProp: nextProps.someProp,
..
};
}

getSnapshotBeforeUpdate-

It manages the component changes and replaces componentWillUpdate efficiently and operates with componentDidUpdate. This is called and returns the value to the componentDidUpdate that handles the changes before DOM updates:

class ScrollingList extends React.Component {
listRef = null;
getSnapshotBeforeUpdate(prevProps, prevState) {
if (prevProps.list.length < this.props.list.length) {
  return (
    this.listRef.scrollHeight - this.listRef.scrollTop
  );
}
return null;
}
componentDidUpdate(prevProps, prevState, snapshot) {
if (snapshot !== null) {
  this.listRef.scrollTop =
    this.listRef.scrollHeight - snapshot;
}
}
render() {
return (
{/* …contents… */}
);
}
setListRef = ref => {
this.listRef = ref;
};
}

7. Browser Alignment-

Some changes have been made to event system in React, which includes:

  • To avoid confusions like firing when scrolling through child elements, the onScroll event no longer bubbles.
  • The events React onBlur and onFocus have now switched to using native focusin and focusout events internally, better matching react’s existing behavior and even providing more information.
  • Capture phrases events like onClickCapture now use actual browser capture phrase listeners

These changes align React more closely with how browsers behave and improve interoperability.

You can also know the reasons to render React on server side at- Why You Should Render React On Server Side?