<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/structure-javascript-code-iklaffys" -->

---
title: Structure JavaScript Code | daily.dev
description: The Revealing Module pattern is a way to structure JavaScript code. It is used by some of the most popular front-end JavaScript frameworks. It helps us...
canonical: https://daily.dev/posts/structure-javascript-code-iklaffys
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Structure JavaScript Code | daily.dev
og:description: The Revealing Module pattern is a way to structure JavaScript code. It is used by some of the most popular front-end JavaScript frameworks. It helps us...
og:url: https://daily.dev/posts/structure-javascript-code-iklaffys
og:image: https://api.daily.dev/og/posts/iKlAFfYS_.png
og:image:alt: Structure JavaScript Code
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Structure JavaScript Code

**[DZone](https://daily.dev/sources/dz)** · 4 min read · 24 upvotes · 1 comments

## Summary

The Revealing Module pattern is a way to structure JavaScript code. It is used by some of the most popular front-end JavaScript frameworks. It helps us organize our JavaScript code while not polluting the global namespace. In order to eliminate scattered Ajax calls throughout the code, we can use this pattern to consolidate Ajax calls.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://dzone.com/articles/structure-javascript-code>

## Community discussion

Top comments from developers on daily.dev.

**@vir4x** · 1 upvotes

> Good stuff... Check my micro-MVC web platform/framework which utilizes only my code and innovates in JS in ways you suggest too.
> https://github.com/g0d/micro-MVC.
>
>
> For instance check my biggest JS framework, Aether, and see how it implements stuff.
> https://github.com/g0d/micro-MVC/blob/master/framework/extensions/js/user/aether/aether.js
>
>
> It's nice to see that fellow engineers around the globe understand the true power of JS and write awesome code!
>
>
> Cheers!

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/structure-javascript-code-iklaffys)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Structure JavaScript Code","url":"https://daily.dev/posts/structure-javascript-code-iklaffys","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/structure-javascript-code-iklaffys"},"datePublished":"2021-04-28T22:43:16.392Z","dateModified":"2021-10-07T14:17:10.317Z","description":"The Revealing Module pattern is a way to structure JavaScript code. It is used by some of the most popular front-end JavaScript frameworks. It helps us...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a8613407b5d1efd177659649de0b085c","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a8613407b5d1efd177659649de0b085c","isAccessibleForFree":true,"articleSection":"DZone","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"DZone","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/dz","url":"https://daily.dev/sources/dz"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/structure-javascript-code-iklaffys","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":24},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"general-programming,javascript","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"DZone","item":"https://daily.dev/sources/dz"},{"@type":"ListItem","position":3,"name":"Structure JavaScript Code"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/structure-javascript-code-iklaffys","comment":[{"@type":"Comment","text":"Good stuff… Check my micro-MVC web platform/framework which utilizes only my code and innovates in JS in ways you suggest too.\nhttps://github.com/g0d/micro-MVC.\nFor instance check my biggest JS framework, Aether, and see how it implements stuff.\nhttps://github.com/g0d/micro-MVC/blob/master/framework/extensions/js/user/aether/aether.js\nIt’s nice to see that fellow engineers around the globe understand the true power of JS and write awesome code!\nCheers!","datePublished":"2021-04-29T07:54:44.521Z","url":"https://daily.dev/posts/iKlAFfYS_#c-OAZR1Z7UM","author":{"@type":"Person","name":"George Delaportas","url":"https://daily.dev/vir4x","image":"https://lh3.googleusercontent.com/a-/AOh14Ggi7nKvkr7n3Gu4OIcvEaIAv8Ml7H3M8-imoHS5C0s=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

