Connect with us

Technology

AngularJS VS React Native

Avatar photo

Published

on

angular vs react

Javascript is taking over. The cross-platform apps are trending as people prefer quick solutions while developers rely on the advanced tools and platforms for building complicated apps within a short span of time.


With numerous advantages over hybrid applications, native apps have ruled the game for so many years. It’s due to the ability to embed features brilliantly, to let the app perform functions in a sublime manner and to embrace the hardware in an ideal manner, which still is beyond hybrid framework’s competence. Cross-platform apps face a crucial choice in their development planning phase – should the application be developed as a native app, or should it be developed as a hybrid or web-based application? This question used to impact the amount of work to be done – namely, until recently, choosing to pursue a native approach for your application meant consigning your development team to simultaneously developing functionality in Objective C/Swift (for iOS) or Java (for Android).

However, this is no longer a consideration when it comes to creating a native app experience. Below we’ll look at using JavaScript to create a cross-platform native app experience by examining React Native and the combination of AngularJS 2 and NativeScript.

Native Apps:

Native apps have a number of advantages over hybrid and HTML 5-based apps. First, native applications are closer to the device’s processor, meaning that on average native code will perform better than equivalent code written for a hybrid framework. Additionally, a native app lets you build in some features that may not be available in your hybrid framework of choice, as you can target specific platforms with specific features, integrating with the hardware on a mobile device can be done right in the same set of source code, rather than having to include a custom module or non-web component in a hybrid app. Couple this with being able to provide an idiomatic user experience for a given device, and choosing to develop a native app becomes a much more compelling choice. By using a framework with a native component, we can further mitigate the costs necessary to develop the app natively.

React Native

In March 2015, Facebook introduced React Native, a tool built to allow developers to use the same base JavaScript code on either iOS or Android. As React was a set of functions with minimal external side effects and a tangential dependency on a DOM, Facebook was able to abstract away the use of a DOM as the primary rendering model into a pattern that allows for the easy substitution of native components instead of web views and HTML components. Thus, using the same code, an application can implement alert windows using UIAlertView on iOS and android.app.AlertDialog on Android, all without having to write any extra native code to support the UI views. Further, the capability of the tool enhanced when it was coupled with React’s speed, which allows you to build a super powerful cross-platform mobile application without making you write the entire code again. Couple this with React’s focus on speed and dirty-rendering, and you can build a blazing-fast cross-platform mobile application with only one code base.

AngularJS 2 + NativeScript

Kendo UI, introduced by the team at Telerik was intended to produce magical stuff (in this case hybrid and HTML5 apps) by blending it with the popular Angular framework. When used for hybrid apps and HTML 5 apps, this created a consistent cross-platform UI experience simply by leveraging the tools provided in the framework. When Telerik began working on NativeScript to provide a true cross-platform native experience, the dependence of Angular 1.x on tight coupling with a DOM for rendering posed problems when attempting to create a native UI map for Angular applications. However, with the advent of Angular 2, this all changed. Angular 2’s looser coupling with a DOM for rendering allowed the developers of NativeScript to perform similar tasks to those performed by Facebook when genericizing React Native – abstracting away view rendering and components so that a DOM was no longer necessary. As a result, Angular 2 integrates easily with NativeScript, allowing you to code your native app in a declarative style that can run on any mobile device platform.

Comparison:

The fundamental difference between the two, lies in the approach they follow in creating mobile applications with the help of the same written code base. Both of them have their advantages and disadvantages, which can’t overlap to dismiss the other. Let’s see what they have to offer. NativeScript takes a holistic approach, working to be a true “Write it once, run it anywhere” framework. This means that a lot of the UI elements used will be decidedly lower-level, as NativeScript is attempting to manage the UI in a transparent and repeatable way between the multiple platforms it supports. Add in the coupling with Angular 2, and you can create cross-platform applications that, through the virtue of Angular’s declarative UI focus, are more conceptually consistent than an application having to interpret between multiple UI paradigms.
On the other side of the debate is React Native, which chooses to embrace – rather than hide – its multi-platform nature. This means that while you can write React Native code in a platform-agnostic manner, you can also get down to the platform-specific UI layer. Stated another way, React’s goal is to abstract the business logic while supporting the differences inherent in UI rendering between each platform, while NativeScript has a focus on creating a singular development experience regardless of platform. Couple this with React’s focus on speed of rendering and execution, and you can easily create performance-focused cross-platform apps that can both run on the same code base, and leverage platform-specific components at will.
Which approach you prefer will ultimately be dependent upon the needs of your application – relatively generic database-powered apps will likely favor NativeScript as the UI is not typically resource-intesive enough to warrant a more platform-focused approach. And even in that case, the use of Angular 2 to drive the application’s architecture negates a lot of the speed benefit that React Native brings to the table. However, the use of Angular 2 with NativeScript requires adopting a traditional Angular architecture for your application’s code, something which React’s library approach doesn’t require. Additionally, with NativeScript being a separate project from Angular 2, this introduces additional dependencies into your application’s pipeline – a problem not as pronounced with React Native, which handles all of the cross-platform functionality in the React framework itself.

Conclusion:

Cross-platform app development has levelled up big time, be it NativeScript app development or React Native app development. Choosing between React Native and a combination of Angular 2 and NativeScript is, in many ways, similar to choosing between React and Angular themselves. React is designed as a blazing-fast lightweight rendering framework to be leveraged within the context of a larger application, and React Native continues this pattern of providing tools instead of patterns. Angular, on the other hand, is an opinionated application development framework that has a “right way” of developing applications in mind, something that the integration of Angular 2 and NativeScript carries further at the slight expense of deeper native device integration.
Thus the choice between the two is largely the same. Is you application focused on complex UI with lots of rendering and custom elements? If so, React Native might be the right choice for you. However, if having a single cross-platform code base with a declarative UI paradigm is more in-line with what you envision for your application’s architecture, then combining Angular 2 and NativeScript can help you realize the same gains you’d see in adopting Angular for a web application, all while maintaining similar development patterns and program architecture.

Blog

Facebook is experimenting with prompts that ask users whether they are concerned that a friend is ‘becoming an extremist.’

Published

on

By

Facebook app

In the United States, some Facebook (FB) users are receiving a prompt asking if they are concerned that someone they know is becoming radical. Others are being alerted about the possibility of being exposed to extremist information.
It’s all part of a test that Facebook is conducting as part of its Redirect Initiative, which tries to tackle violent extremism.

This experiment is part of a wider project to see how we can provide tools and help to people on Facebook who have interacted with or been exposed to extremist content, or who know someone who is.

“Are you concerned that someone you know is becoming an extremist?” one of the notifications reads, a screen grab of which went viral on social media Thursday.

According to a screenshot shared on social media, the alert stated, “We care about avoiding extremism on Facebook.” “Others in your situation have gotten discreet help,” she says.
The user is then directed to a support page by the alert.

Another alert reads, “Violent groups try to use your anger and disillusionment.” “You have the ability to protect yourself and others right now.”
The user is also redirected to a help page as a result of the notice.

Facebook is sending users to a range of resources, including Life After Hate, an advocacy group that helps people quit violent far-right movements.

Over the last few years, Facebook has been blasted by detractors for failing to take sufficient steps to combat extremist content on its platform. For example, in 2020, the firm was chastised for failing to take down a militia group’s Facebook page, which encouraged armed residents to go to the streets of Kenosha, Wisconsin.

The company has also committed to do a better job of preventing the spread of false information and conspiracy theories. In May, Facebook’s independent oversight board encouraged the corporation to look into the role of its platform in the January 6 uprising.

Continue Reading

How To's

YouTube Is Redesigning Its Descriptions for the Web, With a Greater Focus on Comments

Published

on

By

YouTube is reportedly putting a new description section on the Web to the test. The revamp aims to make the comments, video view count, publish date, and video description more prominent. The video description, which presently appears beneath the YouTube channel name, will now appear directly beneath the video title. Other improvements are being tested as well, with the goal of putting a greater emphasis on user comments. When these modifications will be available to all Web users is unknown.

The view counts and published date are much bolder than previously, appearing just below the video title. The video description appears right after the publication date and requires more concise content than before. If the video description is too long, the new design makes it appear tight, and if it spills over to the second line, a “Show More” option emerges. With this makeover, the ability to create connections may be more challenging. Depending on the size of the window, buttons for like, unlike, share, and save show next to the video description. In a barely drawn area below the view count is the channel name. The number of comments and the top comment are both noted in different boxes next to it.

The option to add a new comment will be located just below the channel name, followed by other less popular comments located beneath the video. This redesigned description for YouTube Web users is still in beta and is only visible to a select users at a time. There is no guarantee that it will be commercially available, and Google may decide to scrap it during the development phase. The design is also a little confusing and cluttered, and Google may make some changes before deciding to give it out to everyone.

Continue Reading

General News

These telemedicine companies are transforming the way doctors will treat patients in the future.

Published

on

By

Telemedicine exploded during the pandemic, after years of steadily gaining popularity. Companies are now capitalizing on this momentum to bring in the next wave of remote health, expanding beyond simple doctor consultations to a high-tech world of healthcare access without ever leaving the house.

Dr. John Batsis, an associate professor at the University of North Carolina School of Medicine, remarked that the pandemic “actually promoted new techniques for remote monitoring, production, and development of devices.” “Wherever there is a customer need, there will be startups, equity, and businesses attempting to meet those requirements.”

Tyto Care, an on-demand medical exam company that aspires to duplicate in-person visits with home medical kits, is one company reconsidering televisits. Dedi Gilad, the company’s CEO and co-founder, came up with the idea eight years ago while his daughter was suffering from recurrent ear and throat infections.

Meanwhile, Sanford Health in the Midwest, the country’s largest rural health care organization, has adopted a similar strategy. Rather of adapting devices for remote usage, doctors taught patients how to record their results at home using the same tools they used during in-person appointments.

According to Sanford Health, “home monitoring kits” containing a fetal ultrasound monitor and a blood pressure cuff were distributed to patients with low-risk pregnancies, allowing women to use virtual care for nearly a third of their prenatal care appointments during the pandemic.

Other telemedicine startups, such as Kiira in Los Angeles, are focusing on increasing access to underprivileged areas. The company’s virtual care app, which links women to primary care providers, OB-GYNs, mental health experts, and more through phone, video, and chat 24 hours a day, seven days a week, aims to bridge the healthcare gap for women in college, particularly women of color.

Historically, black and brown people have faced numerous impediments to healthcare, including fees, access to care, and even access to clinicians of color. Students are frequently hesitant to enter because they do not see a provider who looks like them…. One of the things that has been absent for a long time is the ability to see someone who you can relate to and speak with a provider from the comfort of your own home.

Virtual visits can be conducted, prescriptions can be written, and lab tests can be ordered using the app. Kiira’s monthly fee is covered by colleges, so students don’t have to pay for it. It presently serves four universities and approximately 3,000 students, with ambitions to grow to 22,000 students later this year.

Spora Heath, another affordable telemedicine startup, focuses on offering a primary care network for African-Americans. The $10-per-month service compels its physicians, 90 percent of whom are persons of color, to complete “culture-competence training” and workshops in order to better understand and support the communities they serve.

These technologies are going to be integrally important in managing patient’s health now and in the future.

Continue Reading

Trending