Simpler

check out new sample

Wil Maier
iTwin.js
3 min readSep 18, 2019

--

As Roop mentioned in the intro, I work with him as a developer outreach specialist. When I joined this team a few months ago, I faced a daunting challenge. Not only did I need to learn all I could about the iModel.js ecosystem, but I was also expected to help create sample apps for other newbies.

After I finished off a checklist of recommended learning materials, I dove into building and studying the Simple Viewer App.

I guess simple is a relative term!

What I quickly discovered is that it wasn’t simple enough for me. I made the mistake of mentioning this to my team and before I knew it, my job was to make it simpler.

I decided to strip out everything that wasn’t absolutely necessary to view an iModel. I am calling this new version the Basic Viewport App (although I did consider Simpler Viewer App).

I don’t know about you, but I find it deeply satisfying to eliminate all the clutter that accumulates in my garage — something about clean surfaces. Similarly, I really enjoyed deleting all the source files and functions that were not needed. I also reworked some of the code to make it easier to understand.

Actually not my garage — but maybe someday!

Instead of showcasing support for electron, web and mobile, it focuses just on web support. And instead of featuring a viewport, tree, table, property pane, unified selection and logging, it is limited to just the viewport and a few navigation tools.

And there you have it!

While it’s still not ‘simple’, it is a whole lot less confusing so I hope it will be easier for other newbies to start with. Are you ready to take a look?

Let’s do it!

Since we have recently consolidated all of our sample apps into a single GitHub repo, you will be pulling the Basic Viewport App along with the other samples. Just navigate to the imodeljs-samples page, click on the green button, and choose Download ZIP. After you extract the files, open a console window and set your current directory to the new folder. Then follow the directions in Development Setup.

If there is any way I can make it even simpler for you, please leave a comment below!

Looking forward, we plan to use this app as the basis for other focused samples. The ultimate goal is to populate an open-source library of useful sample apps so that any developer will be able to submit, study and/or use them in their projects. More details to follow soon.

Happy coding!

<- previous post | home | next post ->

--

--