While browsing GitHub and looking for open-source projects to collaborate on, I found Neo.mjs. I became interested in this project and started researching more about this new framework. I want to share everything that I found out about it in this blog post.
Neo.mjs was designed for building high-performance, data-driven web applications, with a strong focus on leveraging web workers for improved UI responsiveness. Here's a detailed overview of what it can offer:
Setting up your first project is straightforward. Here’s how to get started:
Open your terminal and run the following command to generate a new Neo.mjs workspace and application:
npx neo-app@latest
After running the command, you’ll be guided through a series of prompts to customize your new Neo.mjs application. Here's how my setup went:
> npx neo-app@latest Need to install the following packages: [email protected] Ok to proceed? (y) y Welcome to the neo.mjs app generator! current version of neo-app: 7.10.0 ? Please choose a name for your neo workspace: neo-workspace ? Please choose a name for your neo app: MyApp ? Please choose a theme for your neo app: neo-theme-dark neo-theme-light neo-theme-neo-light all ❯ none ? Please choose your main thread addons: (Pressto select, to toggle all, to invert selection, and to proceed) ❯◯ AmCharts ◯ AnalyticsByGoogle ◉ DragDrop ◯ HighlightJS ◯ LocalStorage ◉ Navigator ◯ MapboxGL (Move up and down to reveal more choices) ? Do you want to use SharedWorkers? Pick yes for multiple main threads (Browser Windows): no ? Do you want to use a ServiceWorker for caching assets? no
In this link you will find a nice video explaining all the setup with more details.
After completing the setup, the necessary packages will be installed automatically. The application will then launch your default browser, opening localhost:8080. This is where you'll see your freshly created Neo.mjs application running:
You’ll notice that Neo.mjs automatically generates an apps folder in your workspace. Inside this folder, your application's main entry point can be found in the view/MainContainer.mjs file. This is where you’ll start building your UI components and application logic.
Your new Neo.mjs workspace comes preconfigured with folders for views, components, and other application files. Spend some time exploring the file structure to understand how different parts of the app are organized. This will make it easier when you start building custom components.
Neo.mjs has a unique syntax that may seem a bit different from traditional JavaScript frameworks. It uses object literals extensively to define UI components in a way that resembles JSON. This syntax is designed to maximize performance and provide flexibility for building complex, data-driven applications.
As a beginner, I found it challenging at first to grasp how the files interact and communicate with one another. That's something that I still learning.
I’m planning to dive deeper into Neo.mjs, experimenting with building simple UIs, and exploring how to take full advantage of its multithreaded performance capabilities. Stay tuned for a future blog post or even a video tutorial where I hope share more in-depth tips, tricks, and examples of using Neo.mjs to build high-performance web applications.
If you're interested in joining me on this learning journey, feel free to explore the Neo.mjs GitHub repository and try out some of the example applications in their website.
Leave a comment if you used the Neo.mjs before with some tips!
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3