Collective #549

Original Source: http://feedproxy.google.com/~r/tympanus/~3/lZDlhciy82M/

C549_gitaction

Automatically compress images on Pull Requests

Read about how Calibre’s new GitHub Action allows you to compress raster images with minimal setup automatically in this article by Karolina Szczur.

Read it

C537_divi

Our Sponsor
The Ultimate WordPress Page Builder

You’ve never built a WordPress website like this before. Divi is more than just a WordPress theme, it’s a completely new website building platform that replaces the standard WordPress post editor with a vastly superior visual editor.

Try it

C549_googleslinks

How Google’s Nofollow, Sponsored, & UGC Links Impact SEO

Cyrus Shepard clarifies the new Google guidelines for link attributes.

Check it out

C549_augment

augmented-ui

Cyberpunk inspired web design just got a whole lot easier with this augmentation kit.

Check it out

C549_es

ECMAScript-new-features-list

A comprehensive list of new ES features, including ES2015 (ES6), ES2016 (ES7), ES2017 (ES8), ES2018 (ES9) and ES2019 (ES10).

Check it out

C549_doka

Doka: Free Online Image Editor

Quickly edit and crop your images online using this free mobile-friendly image editor. Apply filters, rotate, resize, and flip images, adjust colors, and add markup.

Check it out

C549_housecustomizer

3D House Customizer

An amazing 3D house model customizer built by Kyle Wetton.

Check it out

C549_head

head is locked

Remy Sharp explains why we won’t see new elements added to the head element.

Read it

C549_bolt

Bolt loader animation

Aaron Iker created this awesome loader animation.

Check it out

C549_5g

5G Will Definitely Make the Web Slower, Maybe

Read why 5G just might make web performance worse, not better, for the average person.

Read it

C549_laravel

Laracasts: Laravel 6 From Scratch

In this series you’ll learn, step by step, how to build web applications with Laravel 6.

Check it out

C549_tiler

Tiler

Tiler is a tool to create an image using all kinds of other smaller images (tiles). It is different from other mosaic tools since it can adapt to tiles with multiple shapes and sizes (i.e. not limited to squares).

Check it out

C549_PHP

25 Years of PHP

Join Rasmus Lerdorf, the creator of PHP, for a fun look at the highlights (and lowlights) of an amazing journey.

Watch it

C549_game

Endless Shape Runner of Few Lines

A Geometry Dash-esque game written in 3 lines of HTML, 5 lines of CSS, and only 2 lines of JavaScript. By Jon Kantner.

Check it out

C549_humans

Humans.fyi

Discover the most brilliant personal homepage designs.

Check it out

C549_proposal

Scroll-To-Text using a URL fragment

A proposal to allow specifying a text snippet in a URL fragment.

Check it out

C549_number

MNIST Draw

Draw a digit by hand and have it classified in real time, as you draw, by a machine learning model trained against the MNIST dataset.

Check it out

C549_laptop

laptop.css

Use laptop.css to automatically wrap an HTML image into an ASCII art laptop.

Check it out

C549_3dengine

ROYGBIV

ROYGBIV is a WebGL game engine for motivated programmers who do not have the budget for buying fancy 3D models or licensing a popular engine but still want to make 60 FPS web games for both mobile and desktop.

Check it out

C549_ghostbutton

Ghost Buttons with Directional Awareness in CSS

Learn how to build a direction-aware ghost button in this tutorial by Jhey Tompkins.

Read it

C549_kenburnspaper

3D Ken Burns Effect from a Single Image

Simon Niklaus, Long Mai, Jimei Yang and Feng Liu introduce a framework that synthesizes the 3D Ken Burns effect from a single image, supporting both a fully automatic mode and an interactive mode with the user controlling the camera.

Read it

C549_button

Inconsistent behavior among browsers when clicking on buttons

Zell Liew shares his test and findings on browser inconsistencies when it comes to clicking on buttons.

Read it

C549_v8light

A lighter V8

An article that highlights some of the key optimizations developed for V8.

Check it out

C549_3dtype

3D Floating Typo

A demo of floating typography and cubes made with Three.js.

Check it out

Collective #549 was written by Pedro Botelho and published on Codrops.

20 Freshest Web Designs, September 2019

Original Source: https://www.webdesignerdepot.com/2019/09/20-freshest-web-designs-september-2019/

This month, there’s tons of color, and some elegant transitions. Video is huge this month, with a number of sites opting for video front and center. You’ll also find some delightful animated illustration. Enjoy!

Bon Iver Visualizer

This impressive site, built with Spotify data, visualizes all of the people currently streaming Bon Iver music, including key details of their location like elevation, and weather conditions. It’s a fascinating attempt to make streamed music a collective experience.

Jia Szeto

Paris-based stylist Jia Szeto’s portfolio site is a joy to browse through, with colorful frames that bring out the best in the photography, and stylish transitions that move you from one project to the next. It’s deceptively simple, and very high-class.

Headless Horse

Headless Horse presents a new way to browse through a studio’s portfolio. In this case, move your cursor around the wall of seemingly random thumbnails. It works, because Headless Horse have worked with some huge clients, so recognizable brands leap out at you.

Monastery

This site is a joy to browse around. The exquisite product photography and the luxurious feel of the transitions — note the subtle blur added to the fade — make Monastery’s skincare range highly-desirable before you’ve even tried it.

Hazelbrook Legal

Hazelbrook Legal is a corporate law firm, its site is innovative in its field, using a large video, showing a ball rolling around an Escher-style maze. The ball is solid, and its path is calm and certain. Exactly what you want from this type of company.

Ramus

Ramus is a design collective drawing talent from across the creative industries to produce works of art with light. The scale of its portfolio is truly impressive, and a different showcase video loads each time you visit the site.

Thirst

If you want to be successful in design you need to carve out a niche. Thirst has certainly done that by only designing packaging for drinks. The animated gradients on its homepage calls to mind exotic flavours perfectly.

Near Miss Memorials

Near Miss Memorials is a public safety campaign from New Zealand that’s educating the public about crossing train tracks safely. Scroll along the tracks, and watch videos of people risking their lives for a few extra seconds off their journey. It’s an impactful, and potentially life-saving site.

Seafood From Norway

If like me, you’re hooked on Nordic Noir TV dramas, then the opening video on Seafood From Norway’s site will get your pulse racing. The site is actually a very beautiful advert for the Norwegian fishing industry, showcasing its high standards. The recipes are great too.

Cognito

This awesome illustrated site uses animation and simple illustration to simplify technologically complex solutions. Best of all, the flow of the illustrations lead you through the sections of the site, drawing you into the content brilliantly.

VLNC

French design studio VLNC has a unique approach to the thorny problem of how to layout thumbnails, they turned them into a mouse trail. It’s a surprisingly effective way to make use of one of the web’s oldest clichés.

Fetching Fields

The ingredients on Fetching Fields’ site look good enough to eat, and with its luxury-feel brand you’d expect this to be a fancy new foodie option. But Fetching Fields are selling treats for our dogs. Because our furry friends deserve the best.

Tusk

One of the most difficult aspects of a site to get right is the tone. It’s when user experience, art direction, content, animation, and typography all come together to just feel right. Tusk gets it perfectly.

We Compost

Normally, any delay in getting to a site’s content is a bad thing, but Auckland’s We Compost opens with a delightful animation of earthworms, which ties the concept together instantly. It’s lovely.

Bimble

Who says parallax is dead? This simple site for CBD-based drink is calm, brand appropriate, and makes excellent use of the tried and tested effect that we all love to hate to love.

The Jacky Winter Group

The Jacky Winter Group represents illustrators, artists, animators, lettering designers, and all manner of visually creative professional. The site is almost an assault on your eyes. It’s modern, exciting, and packed with energy.

NYT Food Festival

This great little site for the New York Times’ Food Festival captures our attention with fun, animated typography. There are excellent splashes of color blocking throughout the site, even if the vital information is a little hidden away.

Almond Surfboards

With an innovative range of surfboards, the site for Almond Surfboards captures a retro, West-coast vibe perfectly. The warm off-white colors and all-American typography feel precisely on point. Check out the accessories section for some awesome flag-based lettering work.

Hudson Hemp

Hudson Hemp uses an opening looping video to set the tone of its content. It’s respectable, science-orientated, it could be a feature for National Geographic. All essential characteristics when you’re selling a product about which there is so much misinformation.

Adventure of the Detective’s

I don’t pretend to fully understand Andrew Maruska’s quest-generator for D&D. But what I do understand is the excellent choice of typeface, that levels-up this one-pager. It feels entirely appropriate, and I wish more sites were brave with their font choices.

Source

p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}

Universal Pictures logo gets a prehistoric makeover

Original Source: http://feedproxy.google.com/~r/CreativeBloq/~3/J37_6m5FvPk/battle-at-big-rock-logo

The build up to the next Jurassic World movie kicked off recently as a brand-new short film related to the franchise dropped on YouTube. Titled Battle at Big Rock, the short film is packed with special effects that stand alongside the best 3D movies. But it also contains a frankly genius piece of logo redesign.

Don't worry, Jurassic Park's iconic T Rex skeleton logo, dubbed Logosaurus by fans, hasn't been replaced. However if you look closely, you'll see that it's found its way into the Universal Pictures logo.

We've all seen the Universal Pictures logo so often that it's easy to glaze over and take it for granted. You know the score, the logo sees planet Earth slowly turning through space as the word 'Universal' wraps around it. Lovely.

If you look closely though, you'll see that Earth's land masses have been changed to resemble that iconic Jurassic Park skull logo. Take a look at it in action by watching Battle at Big Rock, below.

According to Battle at Big Rock's YouTube description description: "The short takes place one year after the events of the last Jurassic World film in Big Rock National Park, where dinosaurs are now living in our world. The story follows a family of four whose encounter with these wild animals becomes a terrifying fight for survival."

Director Colin Trevorrow took to Twitter to share his thanks following the enthusiastic reaction from fans. And in his tweet, we get to see a clearer version of the modified Universal Pictures logo with the colours boosted.

We can see where one Twitter user was coming from when they pointed out that it would've been more consistent to use landmasses from the Jurassic period, but come on, a planet-sized T Rex skeleton looks much cooler. Also, it literally ties into the name of the film: Jurassic World!

As far as extra touches go, this is a brilliant bit of design that helps build the hype for Jurassic World III. The film is due to be released on 11 June 2021.

Related articles:

Jurassic World VFX uncagedSpecial effects in movies: 10 stunning examples13 best animated dinosaurs of all time

Check out these incredible posters for movies that never happened

Original Source: http://feedproxy.google.com/~r/CreativeBloq/~3/4SO7DfhzKZg/check-out-these-incredible-posters-for-movies-that-never-happened

To call modern move posters a bit of a mixed bag would be putting it kindly. For every magnificently psychedelic Wonder Woman masterpiece, there are 20 Spider-Man Photoshop aberrations. And while movie poster design is often crippled by the forces of Hollywood, so to do many could-be-great movies bite the dust before they can make it to the big screen. 

Designer Fernando Reza, aka Fro, has created a range of posters for movies that never made it past pre-production, but which we'd definitely like to see if these magnificent designs are anything to go by. The range includes unrealised work from Quentin Tarantino, Guillermo del Toro and Tim Burton. Scroll down to take a look at our favourites, and get ready to mourn for the masterpieces that never made it. 

Movie fans might also want to check out our guide to graphic design in film. 

Click the icon in the top right to enlarge the posters

Alfred Hitchcock's Kaleidoscope was planned as a sequel to the director's earlier film Shadow of a Doubt, and be told from the perspective of the existing film's 'Merry Widow Murderer'. Hitchcock went as far as to photograph and film silent test footage, but the project was deemed too violent and sexually explicit to go ahead. Reza's vibrant poster features the main character (a bodybuilder) and twists the movie's proposed set pieces into a psychedelic world that plays on the film's title.

The Vega Brothers, also known as Double V Vega, was first planned as a followup to Pulp Fiction, and would extend the stories of Vic and Vincent Vega. The movie remained a potential option for some time, but it seems to increasingly unlikely that it'll ever make it to the big screen (and if it does, Tarantino will need to find a way to explain its now considerably older stars). We'll have to console ourselves with this poster, which oozes the same laid back, cool vibe as the brothers themselves.

Click the icon in the top right to enlarge the poster

Tim Burton's Superman Lives is one of the most infamous movies that never was, but we're sold if this poster is anything to go by. Mechanical spiders! Polar bears! A flaming skull! Nicolas Cage! What's not to like?

Click the icon in the top right to enlarge the posters

At The Mountains of Madness would have seen Guillermo Del Toro tackling H.P. Lovecraft's iconic sci-fi horror novella. The story follows an expedition to Antarctica and the discovery of an alien race of creatures. Tom Cruise was to be the hero, James Cameron was lined up as producer, and we're pretty confident it would have been epic. This poster does a great job of weaving an unsettling feeling into the bleak Arctic landscape. 

Another could-have-been sci-fi masterpiece is Clair Noto’s The Tourist. In the plot, modern-day Manhattan is the front for a secret alien world. Sound familiar? This movie has influenced a host of other films, from Blade Runner to Men in Black. The poster might be our favourite of the bunch, overlaying an other-worldly, fiery figure against the city skyline. 

Read more:

From 2017: Are movie posters in a design crisis? How iconic fantasy film posters were made8 appalling CGI fails in modern movies

Pay What You Want for the White Hack Hacker Bundle

Original Source: http://feedproxy.google.com/~r/Designrfix/~3/l7EeOtckTyE/pay-what-you-want-white-hat-hacker-bundle

The news is often full of stories about hackers stealing data from the government and large corporations. Because of this, it’s easy to see why people tend to associate the word hacker with thieves and cybercriminals. But the truth is that, not all hackers are evil. Despite the negative connotation that hackers use their knowledge […]

The post Pay What You Want for the White Hack Hacker Bundle appeared first on designrfix.com.

Why has this shaving startup started making blue wine?

Original Source: http://feedproxy.google.com/~r/CreativeBloq/~3/kNZw716NajE/why-has-this-shaving-startup-started-making-blue-wine

Not only do female employees make significantly less money than their male counterparts, but they are also subject to a ‘pink tax’ on consumer goods. You read that right, female consumers are given less money and then made to pay more. Shaving startup Billie has launched an unexpected marketing campaign that aims to bring extra attention to the issue. Enter blue wine.

The packaging design is nothing to write home about and the drink itself is in a hue more akin to mouthwash than wine (but that's also reminiscent of WKD – a saving grace?), but Château de Blué does make an important statement. It's priced 13 per cent lower than the average bottle of rosé, to represent the difference in the price of a standard razor marketed at women (Billie's own razor subscriptions are actively in line with the male versions). 

Billie founder, Georgina Gooley explains how her company wants to counteract these issues: "We wanted a simple, playful way of showing what the Pink Tax is. Not enough women know that they're overpaying for products marketed to them." She says that Billie wants to "raise awareness around this ridiculous pricing discrimination and encourage women to purchase from companies that are fair to them."

Billie blue wine

We were concerned that this campaign strategy would come across as a little stomach-churning, but Bille has nailed the tone with lighthearted wit. Taglines describing the wine as a 'robust, full-bodied feast for the senses – including the sense of fairness' and 'contains notes of crushed blueberries, oak, and just a hint of gender bias' make the point with a sense of humour. 

People are loving the strategy on Twitter, with April S' thumbs up showing the campaign will definitely be good for business as well as making a great point about equality:

Bille created the wine with KDM Global Partners, a creator of private-label wine based in California – an apt choice of location given California was the first state to ban gendered pricing back in 1995. And given the wine sold out in just eight hours, the message certainly seems to have hit the right note. 

Read more:

Traffic-stopping examples of billboard advertisingAre trends any good for branding?8 brands that rule at social media

UX Principles to Improve your Product Design

Original Source: http://feedproxy.google.com/~r/Designrfix/~3/CMJYfB0YiVk/ux-principles-to-improve-your-product-design

If you are one of the designers that think that UX design is not essential, you are doing it wrong. User Experience (UX) is one of the critical aspects of an app. It defines how the user interacts with the app functionality. No matter how proper the app functionality is — if the UX is […]

The post UX Principles to Improve your Product Design appeared first on designrfix.com.

Create an Offline-first React Native App Using WatermelonDB

Original Source: https://www.sitepoint.com/create-an-offline-first-react-native-app-using-watermelondb/?utm_source=rss

React Native has different database storage mechanisms for different mobile app purposes. Simple structures — such as user settings, app settings, and other key-value pair data — can be handled easily using async storage or secure storage.

Other applications — such as Twitter clones — fetch data from the server and directly show it to the user. They maintain a cache of data, and if a user needs to interact with any document, they call the APIs directly.

So not all the applications require a database.

When We Need a Database

Applications such as the Nozbe (a to-do app), Expense (a tracker), and SplitWise (for in-app purchases), need to work offline. And to do so, they need a way to store data locally and sync it up with the server. This type of application is called an offline first app. Over time, these apps collect a lot of data, and it becomes harder to manage that data directly — so a database is needed to manage it efficiently.

Options in React Native

When developing an app, choose the database that best fits your requirements. If two options are available, then go with the one that has better documentation and quicker response to issues. Below are some of the best known options available for React Native:

WatermelonDB: an open-source reactive database that can be used with any underlying database. By default, it uses SQLite as the underlying database in React Native.
SQLite (React Native, Expo): the oldest, most used, battle-tested and well-known solution. It’s available for most of the platforms, so if you’ve developed an application in another mobile app development framework, you might already be familiar with it.
Realm (React Native): an open-source solution, but it also has an enterprise edition with lots of other features. They have done a great job and many well-known companies use it.
FireBase (React Native, Expo): a Google service specifically for the mobile development platform. It offers lots of functionality, storage being just one of them. But it does require you to stay within their ecosystem to utilize it.
RxDB: a real-time database for the Web. It has good documentation, a good rating on GitHub (> 9K stars), and is also reactive.

Prerequisites

I assume you have knowledge about basic React Native and its build process. We’re going to use react-native-cli to create our application.

I’d also suggest setting up an Android or iOS development environment while setting up the project, as you may face many issues, and the first step in debugging is keeping the IDE (Android Studio or Xcode) opened to see the logs.

Note: you can check out the official guide for installing dependencies here for more information. As the official guidelines are very concise and clear, we won’t be covering that topic here.

To set up a virtual device or physical device, follow these guides:

using a physical device
using a virtual device

Note: there’s a more JavaScript-friendly toolchain named Expo. The React Native community has also started promoting it, but I haven’t come across a large-scale, production-ready application that uses Expo yet, and Expo port isn’t currently available for those using a database such as Realm — or in our case, WatermelonDB.

App Requirements

We’ll create a movie search application with a title, poster image, genre, and release date. Each movie will have many reviews.

The application will have three screens.

Home will show two buttons — one to generate dummy records, and a second to add new movie. Below it, there will be one search input that can be used to query movie titles from the database. It will show the list of movies below the search bar. If any name is searched, the list will only show the searched movies.

home screen view

Clicking on any movie will open a Movie Dashboard, from where all its reviews can be checked. A movie can be edited or deleted, or a new review can be added from this screen.

movie dashboard

The third screen will be Movie Form, which is used to create/update a movie.

movie form

The source code is available on GitHub.

Why We Chose WatermelonDB (features)

We need to create an offline-first application, so a database is a must.

Features of WatermelonDB

Let’s look at some of the features of WatermelonDB.

Fully observable
A great feature of WatermelonDB is its reactive nature. Any object can be observed using observables, and it will automatically rerender our components whenever the data changes. We don’t have to make any extra efforts to use WatermelonDB. We wrap the simple React components and enhance them to make them reactive. In my experience, it just works seamlessly, and we don’t have to care about anything else. We make the changes in the object and our job’s done! It’s persisted and updated at all the places in the application.

SQLite under the hood for React Native
In a modern browser, just-in-time compilation is used to improve speed, but it’s not available in mobile devices. Also, the hardware in mobile devices is slower than in computers. Due to all these factors, JavaScript apps run slower in a mobile application. To overcome this, WatermelonDB doesn’t fetch anything until it’s needed. It uses lazy loading and SQLite as an underlying database on a separate thread to provide a fast response.

Sync primitives and sync adapter
Although WatermelonDB is just a local database, it also provides sync primitives and sync adapters. It makes it pretty easy to use with any of our own back-end databases. We just need to conform to the WatermelonDB sync protocol on the back end and provide the endpoints.

Further features include:

Statically typed using Flow
Available for all platforms

Dev Env and WatermelonDB Setup (v0.0)

We’re going to use react-native-cli to create our application.

Note: you may be able to use it with ExpoKit or Ejecting from Expo.

If you want to skip this part then clone the source repo and checkout the v0.0 branch.

Start a new project:

react-native init MovieDirectory
cd MovieDirectory

Install dependencies:

npm i @nozbe/watermelondb @nozbe/with-observables react-navigation react-native-gesture-handler react-native-fullwidth-image native-base rambdax

Below is the list of installed dependencies and their uses:

native-base: a UI library that will be used for look and feel of our app.
react-native-fullwidth-image: for showing full-screen responsive images. (Sometimes it can be a pain to calculate the width, height and also maintain aspect ratio. So it’s better to use an existing community solution.)
@nozbe/watermelondb: the database we’ll be using.
@nozbe/with-observables: contains the decorators (@) that will be used in our models.
react-navigation: used for Managing routes/screens
react-native-gesture-handler: the dependency for react-navigation.
rambdax: used to generate a random number while creating dummy data.

Open your package.json and replace the scripts with the following code:

"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"start:ios": "react-native run-ios",
"start:android": "react-native run-android",
"test": "jest"
}

This will be used to run our application in the respective device.

Set Up WatermelonDB

We need to add a Babel plugin to convert our decorators, so install it as a dev dependency:

npm install -D @babel/plugin-proposal-decorators

Create a new file .babelrc in the root of the project:

// .babelrc
{
"presets": ["module:metro-react-native-babel-preset"],
"plugins": [["@babel/plugin-proposal-decorators", { "legacy": true }]]
}

Now use the following guides for your target environment:

iOS
Android

Open the android folder in Android Studio and sync the project. Otherwise, it will give you an error when running the application for the first time. Do the same if you’re targeting iOS.

Before we run the application, we need to link the react-native-gesture handler package, a dependency of react-navigation, and react-native-vector-icons, a dependency of native-base. By default, to keep the binary size of the application small, React Native doesn’t contain all the code to support native features. So whenever we need to use a particular feature, we can use the link command to add the native dependencies. So let’s link our dependencies:

react-native link react-native-gesture-handler
react-native link react-native-vector-icons

Run the application:

npm run start:android
# or
npm run start:ios

If you get an error for missing dependencies, run npm i.

The code up to here is available under the v0.0 branch.

version 0

Tutorial

As we’ll be creating a database application, a lot of the code will be back-end only, and we won’t be able to see much on the front end. It might seem a long, but have patience and follow the tutorial till the end. You won’t regret it!

The WatermelonDB workflow can be categorized into three main parts:

Schema: used to define the database table schema.
Models: the ORM mapped object. We’ll interact with these throughout our application.
Actions: used to perform various CRUD operations on our object/row. We can directly perform an action using a database object or we can define functions in our model to perform these actions. Defining them in models is the better practice, and we’re going to use that only.

Let’s get started with our application.

Initialize DB Schema and WatermelonDB (v0.1)

We’ll define our schema, models and database object in our application. We won’t able to see much in the application, but this is the most important step. Here we’ll check that our application works correctly after defining everything. If anything goes wrong, it will be easy to debug it at this stage.

Project Structure

Create a new src folder in the root. This will be the root folder for all of our React Native code. The models folder is used for all of our database-related files. It will behave as our DAO (Data Access Object) folder. This is a term used for an interface to some type of database or other persistence mechanism. The components folder will have all of our React components. The screens folder will have all the screens of our application.

mkdir src && cd src
mkdir models
mkdir components
mkdir screens

Schema

Go to the models folder, create a new file schema.js, and use the following code:

// schema.js
import { appSchema, tableSchema } from "@nozbe/watermelondb";

export const mySchema = appSchema({
version: 2,
tables: [
tableSchema({
name: "movies",
columns: [
{ name: "title", type: "string" },
{ name: "poster_image", type: "string" },
{ name: "genre", type: "string" },
{ name: "description", type: "string" },
{ name: "release_date_at", type: "number" }
]
}),
tableSchema({
name: "reviews",
columns: [
{ name: "body", type: "string" },
{ name: "movie_id", type: "string", isIndexed: true }
]
})
]
});

We’ve defined two tables — one for movies, and another for its reviews. The code itself self-explanatory. Both tables have related columns.

Note that, as per WatermelonDB’s naming convention, all the IDs end with an _id suffix, and the date field ends with the _at suffix.

isIndexed is used to add an index to a column. Indexing makes querying by a column faster, at the slight expense of create/update speed and database size. We’ll be querying all the reviews by movie_id, so we should mark it as indexed. If you want to make frequent queries on any boolean column, you should index it as well. However, you should never index date (_at) columns.

Models

Create a new file models/Movie.js and paste in this code:

// models/Movie.js
import { Model } from "@nozbe/watermelondb";
import { field, date, children } from "@nozbe/watermelondb/decorators";

export default class Movie extends Model {
static table = "movies";

static associations = {
reviews: { type: "has_many", foreignKey: "movie_id" }
};

@field("title") title;
@field("poster_image") posterImage;
@field("genre") genre;
@field("description") description;

@date("release_date_at") releaseDateAt;

@children("reviews") reviews;
}

Here we’ve mapped each column of the movies table with each variable. Note how we’ve mapped reviews with a movie. We’ve defined it in associations and also used @children instead of @field. Each review will have a movie_id foreign key. These review foreign key values are matched with id in the movie table to link the reviews model to the movie model.

For date also, we need to use the @date decorator so that WatermelonDB will give us the Date object instead of a simple number.

Now create a new file models/Review.js. This will be used to map each review of a movie.

// models/Review.js
import { Model } from "@nozbe/watermelondb";
import { field, relation } from "@nozbe/watermelondb/decorators";

export default class Review extends Model {
static table = "reviews";

static associations = {
movie: { type: "belongs_to", key: "movie_id" }
};

@field("body") body;

@relation("movies", "movie_id") movie;
}

We have created all of our required models. We can directly use them to initialize our database, but if we want to add a new model, we again have to make a change where we initialize the database. So to overcome this, create a new file models/index.js and add the following code:

// models/index.js
import Movie from "./Movie";
import Review from "./Review";

export const dbModels = [Movie, Review];

Thus we only have to make changes in our models folder. This makes our DAO folder more organized.

Initialize the Database

Now to use our schema and models to initialize our database, open index.js, which should be in the root of our application. Add the code below:

// index.js
import { AppRegistry } from "react-native";
import App from "./App";
import { name as appName } from "./app.json";

import { Database } from "@nozbe/watermelondb";
import SQLiteAdapter from "@nozbe/watermelondb/adapters/sqlite";
import { mySchema } from "./src/models/schema";
import { dbModels } from "./src/models/index.js";

// First, create the adapter to the underlying database:
const adapter = new SQLiteAdapter({
dbName: "WatermelonDemo",
schema: mySchema
});

// Then, make a Watermelon database from it!
const database = new Database({
adapter,
modelClasses: dbModels
});

AppRegistry.registerComponent(appName, () => App);

We create an adapter using our schema for the underlying database. Then we pass this adapter and our dbModels to create a new database instance.

It’s better at this point in time to check whether our application is working fine or not. So run your application and check:

npm run start:android
# or
npm run start:ios

We haven’t made any changes in the UI, so the screen will look similar to before if everything worked out.

All the code up to this part is under the v0.1 branch.

The post Create an Offline-first React Native App Using WatermelonDB appeared first on SitePoint.

The Best Multipurpose WordPress Themes for Designers

Original Source: http://feedproxy.google.com/~r/1stwebdesigner/~3/gKlAQ3mwJHI/

Unless there’s a special need for a specialty theme, a multipurpose theme is usually a safe bet and a good choice. Multipurpose themes typically excel in the number of design aids. They feature the flexibility needed to take full advantage of them. The best multipurpose themes, like the WordPress themes described below, are known for clean code, speed, 100% responsiveness, and are SEO friendly.

Normally, it takes some searching to find a theme that can do the job without having to put up with troublesome constraints or limitations. Sometimes problems are encountered when using certain popular plugins as an example. Searching, testing, and trial and error activities take up time you can spend on more productive activities. Not to mention the stress and frustration encountered along the way.

A better approach is to take a few minutes to browse through the themes described below. You can do some further research to test one or two that especially appeal to you, and that should do it!

Happy shopping!

Hello Theme

Hello Theme WordPress Theme

Any WordPress theme can be used with the Elementor open-source popular website building tool. Open source tools are noted for their potential, limitless extendibility and flexibility. Pair a high-quality multipurpose theme with Elementor and you have a website design capability worth bragging about.

The best match of all happens to be the Hello multipurpose WordPress theme. Hello is a theme without boundaries, and the fastest and lightest theme ever created.

An excellent reason to pair Hello with Elementor is that every time a new version of Elementor is released, the bulk of the testing conducted on the new version is done using Hello. A by-product of the testing is your assurance that the Hello theme will always be up to date and fully compatible with its host.

It’s also worth noting that Hello fully supports every one of the popular WordPress plugins, there’s no non-essential code in Hello to slow things down, and Hello is SEO friendly as well. It’s an ideal choice for both designers and developers.

Be Theme

Be Theme WordPress Theme

One way to ensure a multipurpose theme will provide all the tools and flexibility you’re ever likely to need, in addition to providing excellent performance and user support, is to look for the biggest of them all.

You don’t have to look far. Be Theme, with its more than 40 core website building features and tools and its library of more than 450 customizable pre-built websites places everything you’ll ever likely need at your fingertips.

The pre-built websites are professionally crafted, they cover every major website type as well as 30 industry sectors. Better yet, each has UI and UX features you’ll want in your site built right in. Use one as a starting point for your project and you’ll be amazed at how quickly you can have a quality, client-pleasing website up and running. Website building does not need to be difficult!

TheGem – Creative Multi-Purpose High-Performance WordPress Theme

TheGem WordPress Theme

While TheGem is ideal for building portfolio websites, its massive toolbox of features, options, and design elements makes it a truly multipurpose theme. TheGem was created with bloggers, agencies, online businesses, and creative entrepreneurs in mind. It would be an excellent choice for you if you seek maximum creative freedom in your website building without having to delve into the intricacies of the latest design trends and you would prefer to avoid coding.

Thanks in part to this multipurpose theme’s collection of 200+ website styles and 50 content elements, you should have no problem at all creating a unique, attractive, and search engine friendly website in a matter of minutes.

It’s really that easy, and your site will be fast, user friendly, and fully optimized for displaying your content on screen sizes ranging from desktops to hand-held devices.

Uncode – Creative Multiuse WordPress Theme

Uncode WordPress Theme

With sales to date in excess of 55,000, Uncode has become one of ThemeForest’s all-time top-selling themes. This creative, multipurpose WordPress theme has every design aid you’re ever likely to need, plus it’s designed to give you extraordinary control over your design layouts and your site content.

You’ll want to visit the website and browse Uncode’s user-creative website library to get the best possible picture of what you can accomplish with this theme. Be prepared to be impressed!

Bridge

Bridge WordPress Theme

Its 110,000-strong user base has made Bridge the best-selling creative theme on ThemeForest. Created by Qode Interactive’s development team, this multipurpose WordPress theme gives you a whole host of design options to work with.

The package includes 376+ prebuilt websites and a huge collection of modules, plugins, and design elements plus you get open-ended customizability that enables you to create designs exactly as you visualize them. You can also expect to receive 5-star support.

Movedo WP Theme – We DO MOVE Your World

Movedo WordPress Theme

MOVEDO is different. Try it out and you’ll understand what its authors claim: It was created with awesomeness in mind. MOVEDO is clean, modern, and super flexible with thoroughly enchanting special effects like moldable typography and images that appear to be moving when they actually aren’t.

This multipurpose theme lets you break away from sameness of design; and have fun while doing so.

Pofo – A Multipurpose Portfolio, Blog and eCommerce WordPress Theme

POFO WordPress Theme

While Pofo places a significant emphasis on portfolio, blogging, and eCommerce website building, it’s more than suitable for users ranging from creative design teams and agencies to corporations.

This multipurpose theme’s features include an outstanding selection of home pages and demos, custom shortcodes, 150+ prebuilt design elements, and the popular WPBakery page builder.

Pofo is fully responsive, flexible and highly customizable using WordPress customizer, optimized for SEO and page loading speed.

Why Multipurpose Is the Way to Go

Multipurpose themes are always among the best-selling WordPress themes for a reason. They give their users plenty of the flexibility they need to build virtually any type of website with relative ease.

Most multipurpose themes feature a generous selection of ready-made, ready-to-go templates you can choose from. They also include the ability to customize any of them with the help of a drag and drop website builder. The result; you get precisely the design you had in mind.


EVERYDAYS – Cinema 4D Free Project Files

Original Source: http://feedproxy.google.com/~r/abduzeedo/~3/RyOmE8FLF4Y/everydays-cinema-4d-free-project-files

EVERYDAYS – Cinema 4D Free Project Files
EVERYDAYS - Cinema 4D Free Project Files

abduzeedoSep 06, 2019

Constantin Paschou aka The french monkey shared an incredible 3D project titled ”EVERYDAYS”. It is an open source project, dedicated to Cinema4D users. Counting more than 800+ Free Project Files. The Everydays Open Source Project, is dedicated to all Cinema4D users wanting to learn from the artist. TFMSTYLE is providing all of the projects you’ll find below, for you to look at, learn, and help you out in your journey learning Cinema4D! All the assets you will find can be used as wanted, even commercially. 

All the project files are available on https://www.tfmstyle.com/cinema-4d

3D Scenes