Summary

In this chapter, we were introduced to cogs—reusable components that could be implemented either exclusively in Go (pure cogs) or with Go and JavaScript (hybrid cogs). Cogs come with many benefits. We can use them in a plug and play manner, create multiple instances of them, readily maintain them due to their self-contained nature, and easily reuse them since they can exist as their own Go package along with their required static assets (template files, CSS, and JavaScript source files).

We introduced you to the UX toolkit, which provides us with the technology to implement cogs. We studied the anatomy of a cog and explored what a cog's file structure may look like with regards to the placement of Go, CSS, JavaScript, and template files. We considered how cogs utilize a virtual DOM to render their contents instead of performing an expensive replace inner HTML operation. We presented the various stages of the cog's life cycle. We showed you how to implement various cogs that we sprinkled all across IGWEB, which included both pure cogs and hybrid cogs.

In Chapter 10, Testing an Isomorphic Go Web Application, we will learn how to perform automated, end-to-end testing of IGWEB. This will consist of implementing tests to exercise functionality on both the server-side and the client-side.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.178.181