Skip to main content

Posts

Working natively with JavaScript in iOS and Android without WebView

Using JavaScript code from native code without using a WebView (sic!) can be really useful to

introduce dynamic functionality that was updatable without need of updating the appshorter iteration cyclesshare code between backend and native iOS and Android apps You can have business logic provided by a JavaScript that then controls the app that inject native functionality in the JavaScript context. You could even write an A/B testing framework based on this approach.

iOS
iOS offers the native JavaScriptCore:
Evaluate JavaScript programs from within an app, and support JavaScript scripting of your app.

So you can evaluate a script and read its return value natively:

context.evaluateScript(myLib);
let result = context.evaluateScript("myFunction();")
let myFunction = context.objectForKeyedSubscription("myFunction");
let parametrizedResult = myFunction.invokeMethod(...)

Or you can inject a native object into the JavaScript engine:
@objc protocol MyJSProtocol: JSExport {
    var …
Recent posts

Harvard: Open Plan Offices Are Now the Dumbest Management Fad of All Time

It's Official: Open Plan Offices Are Now the Dumbest Management Fad of All Time

A new study from Harvard showed that when employees move from a traditional office to an open plan office, it doesn't cause them to interact more socially or more frequently.

Instead, the opposite happens. They start using email and messaging with much greater frequency than before. In other words, even if collaboration were a great idea (it's a questionable notion), open plan offices are the worst possible way to make it happen.

Previous studies of open plan offices have shown that they make people less productive, but most of those studies gave lip service to the notion that open plan offices would increase collaboration, thereby offsetting the damage.

The Harvard study, by contrast, undercuts the entire premise that justifies the fad. And that leaves companies with only one justification for moving to an open plan office: less floor space, and therefore a lower rent.

Inc.com
Research Digest
The…

Clean your GIT history from huge blobs and password files

BFG Repo-Cleaner The BFG is a simpler, faster alternative to git-filter-branch for cleansing bad data out of your Git repository history: Removing Crazy Big FilesRemoving Passwords, Credentials & other Private data The git-filter-branch command is enormously powerful and can do things that the BFG can't - but the BFG is much better for the tasks above, because: Faster : 10 - 720x fasterSimpler : The BFG isn't particularily clever, but is focused on making the above tasks easyBeautiful : If you need to, you can use the beautiful Scala language to customise the BFG. Which has got to be better than Bash scripting at least some of the time.Links rtyleyGitHubUsing BFG Repo Cleaner tool to remove sensitive files from your git repo IBMgit-filter-branch details on git-scm.com

TechLead: React Native vs Flutter vs WebView - Hybrid Mobile App Development for 2018

Topics covered:

Xamarin, Cordova, Flutter, Titanium, React Native, FlutterReact NativeWeb ViewsNative Development: iOS and Android Types of apps: Fully native high interactivityexpensive: iOS and Androidhigh interactivity, personalization, performanceworth for top 50 appsless and less apps are installedyou need to shine to be discovereduser picks only best app among similar featured appsHybrid TechnologiesXamarin, Cordova, Flutter, Titanium, React Native, FlutterBe aware of thematuritylock-in effectinfrastructure and tooling requiredmight get worst of both worldshould be incrementable updatablecheck where it makes senseWebViews onlyNative App shells: Amazon App, Apple App Store, WeChatMainly for smaller companiesTrending on Google
Links: AirBnB is sunsetting its React Native developmentWhat’s Next for Mobile at AirbnbServer-Driven RenderingEven though we’re not using React Native, we still see the value in writing product code once. We still heavily rely on our universal design language…

iOS: LLVM based mutation testing to check your unit test reliability, Android and Kotlin: JVM based mutation testing

LLVM-BASED MUTATION TESTING SYSTEM

Several years ago I discovered very powerful technique - Mutation Testing. Since then I was (and still am) dreaming to have a tool which will do the job for languages like C, Objective-C and C++.

Now I have confidence in that it can be implemented using LLVM.

Outline for this article:

overview of mutation testingmutation testing system - proof of conceptthoughts on potential implementation of MT system using LLVM
LowLevelBits
Mutation testing system built on top of LLVM on GitHub.
mull-project / mull


JVM-BASED MUTATION TESTING

PIT is a state of the art mutation testing system, providing gold standard test coverage for Java and the jvm. It's fast, scalable and integrates with modern test and build tooling.

PIT Mutation Testing

How to keep apps and a microservice based backend in sync? Read about Pact and consumer-driven-contracts

7 Reasons to Choose Consumer-Driven Contract Tests Over End-to-End Tests

In a distributed system, testing the successful integration between
distributed services is essential for ensuring that the services won’t fail in production just because they’re not speaking the same language. This article discusses three approaches to implementing integration tests between distributed services and shows the advantages of Consumer-Driven Contract tests.

Reflectoring.io


Testing a Spring Boot REST API against a Consumer-Driven Contract with Pact

Consumer-driven contract tests are a technique to test integration points between API providers and API consumers without the hassle of end-to-end tests. A common use case for consumer-driven contract tests is testing interfaces between services in a microservice architecture. In the Java ecosystem, Spring Boot is a widely used technology for implementing microservices. Pact is a framework that facilitates consumer-driven contract tests. So let’s have a look…

Team building: "Meme-Your-Colleague"

Lately we were hiring a lot of developers and had to integrate them in our team. So we decided to do an infotainment team event, targeting both: getting to know each other on a personal level and learning about the business and technical state, challenges and visions.

Usually a meeting like this starts with everybody telling a few words about themselves... one... after... each... other... and after third speaker latest everybody gets bored.
So we came up with the "Meme-Your-Colleague" game: Build teams of two personsGive them half an hour to get to know each otherBoth have to assemble a five minute presentation of five slides of each otherEach slide consists of exactly one meme telling a (fun) fact of that person You may want to use a meme generator and a presentation tool like Keynote or PowerPoint.
It ended up with the whole team having a lot of fun: a perfect ice breaker! Give it a shot!

Deeplinks in apps

Deeplinks in apps are essential to offer a seamless, interleaved experience of the app with

E-MailsWebsitesPush messagesMessengers (iMessage, Whatsapp, ...) Supporting external deeplinks prove very useful for OnboardingMarketingSalesRe-activation of users ...that all can independently work on their subjects without having to be supported by the developers (after they created the deeplinks!).
Checkout: AirBnB DeepLinkDispatch (Android, 2,862 stars!)joeldev/JLRoutes (iOS, 4,300 stars!)dudego/DeepLinkHandler (iOS, 28 stars...)Google Firebase Dynamic LinksiOS: How to open Deep Links, Notifications and Shortcuts

Serverless

Serverless

The serverless application framework. Over 21,000 GitHub stars and counting.

Medium.com


How we migrated our startup to serverless

The team decided to ditch all of our EC2 containers and instances in favor of using AWS Lambda within a serverless architecture. To help us orchestrate all of our AWS Lambda functions, we selected the Serverless Framework.

A cloud guru

iOS and Android native App Install Banner

Android Native App install banners are similar to Web app install banners, but instead of adding to the home screen, they will let the user install your native app without leaving your site.

Developer Google
iOS Promoting Apps with Smart App Banners: Safari has a new Smart App Banner feature in iOS 6 and later that provides a standardized method of promoting apps on the App Store from a website.


Developer Apple

AWS Lambda lifecycle and in-memory caching

The ephemeral nature of AWS Lambda functions might have you believe that techniques like in-memory caching cannot be utilized like you would with a conventional server, but that’s not the case! Let’s check out why.

TJ Holowaychuk on Medium.com

Even though you can't fully rely on them, our experimentation has shown that global variables can be used for some opportunistic caching. Amazon Lambda launches a number of computer instances to run function invocations, and keeps them alive for an unspecified period of time, which may be several hours. During this time, Lambda functions can access cached data previously stored in global variables. When a function invocation happens to run on a fresh instance, data has to be fetched from a more persistent source again.

Amazon AWS Lambda data caching solutions compared

Learn Swift 4 with Bob

Very nice, focussed reference!

Purpose

As a developer whose first programming language is Swift, I've taken online courses from major platforms. However, I have been frustrated by a lack of detailed explanations from instructors. They tend to focus on final products, thus missing out the fundamentals. I was confused by which design principles to follow, and why. After I've been blogging for the last 5 months, I've discovered this isn't the only problem of mine. I've received hundreds of emails and questions regarding how to write code that does not violate principles such as DRY, modularity, and readability. As a result, I've decided to create this course dedicated for my younger self. I believe it all comes down to the fundamentals which I lacked in the beginning.

Learn Swift with Bob