npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

handleview

v0.0.3

Published

MS Access with a Modern UI

Downloads

4

Readme

HandleView

A VBA framework that lets you build your UI in HTML by using only one form. I like to call it a Single Form Application (SFA).
This framework was originally developed by Alain Guerard but has undergone some significant revamping here. Credit goes to him for putting all the peices together to get VBA talking to JS and vice versa!

What is HandleView?

Bringing Microsoft Access user interface development to the 21st century, HandleView is a library that leverages the Web Browser control to render Javascript, HTML, CSS (Bootstrap anyone?) along with JQuery and now, with Syncfusion's amazing e2j-javascript ui control library.

Use your standard web development skills to create beautiful, responsive user interfaces!

How does it work?

Upon startup, the only form in the Access Database launches fully maximized with only one control - a Web Browser control. Using the on_load event, the VBA controller renders the startup 'route' to load a view template file from disk, interpolates the tokens with relevant data and controls, and outputs a fully built page that is then loaded into the WB DOM. When the WB loads the DOM, it immediately executes any Javascript code at least once during the lifetime of the view and renders the page accordingly.

Using your favorite Javascript UI Library (JQuery UI, or the newly supoorted Syncfusion controls), you build your components into an in-memory DOM until you have finished building your view. Applying the in memory DOM to the WB causes it to render in the WB control.

Data can be passed from the VBA controller to the view during the interpolation process and by passing in values using a special 'props' attribute. Any data and control structures are fully assembled as HTML by the VBA controller. Once the controller is finished constructing the entire page, it renders it in the WB control on the form.

Rendering causes the WB to reload it's new DOM and executes any javascript at least once when the document is fully loaded. Any javascript that you want executed the next time the WB refreshes can be accomplished with special attributes on the custom script tag.

What about form submissions?

Through some javascript intervention, POSTS are intercepted, forms can be validated, and then a simple click event on a hidden button is fired instead of the POST. This click event (or any DOM event for that matter) can be assigned to a VBA controller method by assigning the method as the event handler. The WB passes data back to VBA by way of an event and form data. VBA dutifully grabs the form data and converts it to parameters that are required by the event handler.

What about navigation?

At the most fundamental level, navigation is nothing more than raised events with parameters. Those events could be caused by anyting as simple as a menu button on the Nav bar or as a result of a complex set of instructions called by javascript. Parameters are passed to the controller during nav in the form of JSON query strings appended to the end of the requested route.

When a controller's navigation method is called, the url is parsed for a requested route and for JSON data. The requested route is then looked up in the routes module to determine which controller to call and which view it should build. From there, the whole process described above starts again.

Does xHV use Dependency Injection?

YES! While reflection is not available in VBA, classes are regestered against interfaces and can be instantiated either as a Singleton or as Transient.

Please check out the Wiki for details.

NOTE: You can safely ignore warnings about missing references to RubberDuck as this is a development time only addin (although you won't be able to compile the demo without it). It's free and will improve your code!