0.79.0 • Published 2 days ago

hyperview v0.79.0

Weekly downloads
274
License
MIT
Repository
github
Last release
2 days ago

logo

Native mobile apps, as easy as creating a website.

Hyperview is a new hypermedia format and React Native client for developing server-driven mobile apps.

  • Serve your app as XML: On the web, pages are rendered in a browser by fetching HTML content from a server. With Hyperview, screens are rendered in your mobile app by fetching Hyperview XML (HXML) content from a server. HXML's design reflects the UI and interaction patterns of today's mobile interfaces.
  • Work with any backend web technology: Use battle-tested web technologies like Django, Rails, or Node. Any HTTP server can host a Hyperview app. You can even deploy your app as a collection of static XML files if you want!
  • Update your apps instantly by deploying your backend: Say goodbye to slow release cycles and long app store review times. With Hyperview, your backend controls your app's layout, content, and available actions. This means you can update any aspect of your app with a server-side change. True CI/CD is finally attainable for mobile development.
  • Forget about API versioning and backwards compatibility: Unlike traditional native apps, every user always runs the most recent version of your code. With no version fragmentation, you can be more productive by eliminating the need to support and maintain older app versions.

See the Hyperview website for more information about Hyperview and Hyperview XML.

Hyperview XML

  • See examples of how to create rich, interactive apps with Hyperview XML here
  • See the full references for Hyperview XML here

Hyperview React Native Client

CircleCI

This repo contains a React Native implementation of the Hyperview Client. It can either be integrated into an existing React Native app, or used to create a self-contained RN app.

Requirements

The Hyperview client only has two required dependencies:

  • url-parse 1.4.3
  • @instawork/xmldom 0.0.2

More importantly, the client is designed to be incorporated into an existing React Native project, and thus has the following peer dependencies:

  • react >= 16.2.0
  • react-native >= 0.52.2
  • react-native-keyboard-aware-scrollview 2.0.0
  • react-native-webview 5.12.0

Getting Started

This repo contains an example XML server that serves Hyperview XML to showcase the available features. It also contains a demo Expo project that can connect to the example XML server, or any other Hyperview endpoint.

1. Run the example server

From the repo root directory:

yarn
yarn test:xmlserver

This will start an HTTP server listening on port 8085.

2. Start the demo app

In a separate shell, install the demo dependencies and start the development server. From the repo root directory:

cd demo
yarn

The next step depends on whether you want to run the demo app in the iOS simulator, on an Android Virtual Device, or on a physical mobile device.

Running on the iOS simulator

From the demo/ directory:

yarn ios

This will open the iOS simulator and install the demo app in the simulator. It will then start the Expo development server to load the demo app.

Running on an Android Virtual Device

From the demo/ directory:

adb reverse tcp:8085 tcp:8085
yarn android

This will open an AVD and install the demo app in the emulator. It will then start the Expo development server to load the demo app.

Running on a physical device

On your physical mobile device, install the Expo client

Make sure your mobile device and development machine are connected to the same network.

Open /demo/src/constants.js in a text editor. In ENTRY_POINT_URL, replace the host in the url (http://0.0.0.0:8085/index.xml) with the IP of your machine. This is needed in order for your physical device to be able to request the example XML files from your development machine.

From the demo/ directory on your development machine:

cd demo
yarn start

This command will start an Expo development server and open a webpage (http://localhost:19002). This webpage will display a QR code.

  • On your iOS device, open the Camera app and point it at the QR code on your screen. The Camera app should show an "Open in Expo" notification. Tap this notification.
  • On your Android device, use the Expo app to scan the QR code on your screen.

Developing hyperview core features

As you're developing new features for hyperview core, you can use the demo app along with this special command to help you quickly test your changes:

yarn sync

This command will update the installed hyperview package to use the untransformed code (so that it can easily be debugged), watch any changes made to src/ and copy them into demo/node_modules/hyperview/src.

You can also pass as an additional argument the root path of your own react-native app where you've installed hyperview to perform the same sync/watch operation. e.g.

yarn sync ../projects/my-cool-app

Tip

You may stop this with Ctrl + C

3. You're all set!

Whether you're using a physical device or simulator, you should now see a Hyperview screen rendered from the example server:

example

The example server simply serves files from the ./examples directory. You can modify or add files in ./examples and the server will update without restarting.

Running storybook

  1. Run the following to generate storybook. You would need the application_key which is the string passed as a first argument to the method AppRegistry.registerComponent in your root react-native component:
yarn generate <application_key>
  1. Start the storybook by running following in repo root:
yarn storybook
  1. Now you may open http://localhost:7007 on your browser to view storybook controls.

  2. Start the app registered as application_key.

Note

If you're getting issues about duplicate modules try removing the node_modules from /demo and retry.

Troubleshooting

This version of the Expo app is out of date. Uninstall the app and run again to upgrade.

If you see this warning message on the Expo development server webpage, you need to uninstall the Expo app from the simulator or physical device and install the latest version. On a physical device, this means getting the latest version from an app store. In the simulator or AVD, this means uninstalling and re-running yarn ios or yarn android.

0.79.0

2 days ago

0.78.0

1 month ago

0.77.0

2 months ago

0.76.0

2 months ago

0.75.0

3 months ago

0.74.0

3 months ago

0.73.0

5 months ago

0.71.1

6 months ago

0.72.2

6 months ago

0.72.1

6 months ago

0.72.3

6 months ago

0.72.0

6 months ago

0.70.0

8 months ago

0.71.0

7 months ago

0.69.0

8 months ago

0.66.1-rc.0

10 months ago

0.67.0

9 months ago

0.68.1

9 months ago

0.68.0

9 months ago

0.64.0

11 months ago

0.65.0

11 months ago

0.66.0

11 months ago

0.62.0

12 months ago

0.63.0

12 months ago

0.61.2

1 year ago

0.61.1

1 year ago

0.61.3

1 year ago

0.61.0

1 year ago

0.60.0

1 year ago

0.59.0

2 years ago

0.58.1

2 years ago

0.58.0

2 years ago

0.57.0

2 years ago

0.55.0

2 years ago

0.53.0

2 years ago

0.56.0

2 years ago

0.54.0

2 years ago

0.52.0

2 years ago

0.51.1

2 years ago

0.51.0

2 years ago

0.50.0

2 years ago

0.48.0

2 years ago

0.46.1

2 years ago

0.49.0

2 years ago

0.47.0

2 years ago

0.46.0

2 years ago

0.45.0

2 years ago

0.41.0

3 years ago

0.40.2

3 years ago

0.40.0

3 years ago

0.39.2

3 years ago

0.38.6

3 years ago

0.38.5

3 years ago

0.39.1

3 years ago

0.39.0

3 years ago

0.38.2

3 years ago

0.38.1

3 years ago

0.38.4

3 years ago

0.38.3

3 years ago

0.38.0

3 years ago

0.37.1

3 years ago

0.37.0

3 years ago

0.36.0

3 years ago

0.35.1

3 years ago

0.35.0

3 years ago

0.34.2

3 years ago

0.34.1

3 years ago

0.34.0

3 years ago

0.33.0

4 years ago

0.32.0

4 years ago

0.31.1

4 years ago

0.31.0

4 years ago

0.30.3

4 years ago

0.30.2

4 years ago

0.30.1

4 years ago

0.30.0

4 years ago

0.29.2

4 years ago

0.29.0

4 years ago

0.29.1

4 years ago

0.28.0

4 years ago

0.27.0

4 years ago

0.26.1

4 years ago

0.24.3

4 years ago

0.26.0

4 years ago

0.25.0

4 years ago

0.24.2

4 years ago

0.24.1

4 years ago

0.24.0

4 years ago

0.23.0

4 years ago

0.22.0

4 years ago

0.21.0

4 years ago

0.20.1

4 years ago

0.20.0

4 years ago

0.17.4

4 years ago

0.17.3

4 years ago

0.17.2

5 years ago

0.17.1

5 years ago

0.17.0

5 years ago

0.16.3

5 years ago

0.16.2

5 years ago

0.16.0

5 years ago

0.15.1

5 years ago

0.15.0

5 years ago

0.14.0

5 years ago

0.13.0

5 years ago

0.12.3

5 years ago

0.12.2

5 years ago

0.12.1

5 years ago

0.12.0

5 years ago

0.11.0

5 years ago

0.10.1

5 years ago

0.10.0

5 years ago

0.9.0

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago