DEV Community

Cover image for Our Project Got 100 Second Stars on Github🔥
Anthony Max Subscriber for HMPL.js

Posted on

23 19 19 19 20

Our Project Got 100 Second Stars on Github🔥

Hello everyone! Today, I would like to share a small achievement that our project has received after 10 months of work on it! Check it out (and support us with the star if you like it - thank you! ❤️). We'll talk about what this project is and how it can help you.

star history

🐜 What is this project?

This project is a template language that will help you create modern web applications without using frameworks, just with an API and a language compiler included.

repository

Let's take as an example a small registration form with fields such as login and password. Similar ones are simply used in millions of sites around the world.

import { compile } from "hmpl-js";

const templateFn = compile(
  `<div>
  <form onsubmit="function prevent(e){e.preventDefault();};return prevent(event);" id="form">
    <div class="form-example">
      <label for="login">Login: </label>
      <input type="text" name="login" id="login" required /><br/>
      <label for="password">Password: </label>
      <input type="password" name="password" id="password" required />
    </div>
    <div class="form-example">
      <input type="submit" value="Register!" />
    </div>
  </form>
  <p>
    {
      {
        "src":"/api/register",
        "after":"submit:#form",
        "repeat":false,
        "indicators": [
          {
            "trigger": "pending",
            "content": "<p>Loading...</p>"
          }
        ]
      }
    }
  </p>
</div>`
);
const initFn = (ctx) => {
  const event = ctx.request.event;

  return {
    body: new FormData(event.target, event.submitter),
    credentials: "same-origin",
  };
};
const obj = templateFn(initFn);
const wrapper = document.getElementById("wrapper");
wrapper.appendChild(obj.response);
Enter fullscreen mode Exit fullscreen mode

Here, from the server, if everything is ok, we will receive a response in the form of a simple HTML code with a p tag and Text inside it such as Hello, ${login}!

It is also worth noting that we received text with dynamic processing, that is, we received our login from the backend.

👀 How can the project help you?

First of all, this project will help developers make their web applications much smaller than if they were written on modern frameworks.

comparison

The diagram is based on this repository. This result is achieved thanks to a server-oriented approach, when we move entire pages, components, etc. to the server, and leave an empty framework on the client.

Unlike Alpine.js and similar libraries, HMPL has a fairly convenient syntax based on objects with customized requests via fetch.

🌱 Contributors

I want to give a huge thank you to the contributors who helped and help make the project better. Without their help, it would be difficult, since it is simply impossible to implement something that should work as it should.

contributors

All contributors from the old repository and the new one, many thanks to them all again ❤️!

📢 Project promotion

With this, things are always bad for me (ᵕ—ᴗ—). I focused only on development and did not think at all about the need to somehow promote it or something like that. For me, the main goal was different - to close those necessary issues every day, without which it would be simply impossible to use it today.

But at least I created a blog on dev.to, and I also tweet about it sometimes, and I created a blog where we also share our thoughts. I also write about it sometimes and other things, so you can check out all the resources.

Also, you can support us by giving a star to our project on GitHub! Thank you 🌊!

💎 Star HMPL ★

👽 What's next?

Make a cool template language, how else?) In fact, a Roadmap was recently made that describes what needs to be done by 2025.

There are not so many tasks, but as development will be added. After all, "competitors" HTMX and Apine.js, so the template language must have more functionality to be the best tool of all, but, for this also work!

✅ This project is Open Source

So you can take part in it too! This also means you can use it for commercial purposes:

Repo: https://github.com/hmpl-language/hmpl
Website: https://hmpl-lang.dev

🖋️ Conclusion

I would like to express my enormous gratitude to everyone who supported and supports the project with their likes, comments, contributions, and just activity. This is very important to us and I hope that we can continue to do something cool and interesting for the template language! Thank you, once again, everyone ❤️!

thanks

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (17)

Collapse
 
idevgames profile image
iDev-Games

Are you saying you did nothing in terms of promotion to gain your second 100 stars? My repo has 100 stars, all about ease of use and is at a pretty polished state after 30 versions released. Looking to get a real push now. Was hoping you had some insight in this post. Just building hasn't cut it for me, I need to find some way to branch out.

Collapse
 
anthonymax profile image
Anthony Max

I don't know, I write articles mostly. I'm clearly not the one who will reveal some secret of promotion. People with 20 thousand stars, probably better to ask them.

Collapse
 
idevgames profile image
iDev-Games

Appreciate it none the less, what you seem to be doing is working great. I too will write articles and see how I get on. Congrats and best of luck. Thanks

Thread Thread
 
anthonymax profile image
Anthony Max

Thanks!

Collapse
 
key_master1 profile image
Key Master1

Grats!

Collapse
 
anthonymax profile image
Anthony Max

Thanks!

Collapse
 
andrewbaisden profile image
Andrew Baisden

Congrats, thats some nice work!

Collapse
 
anthonymax profile image
Anthony Max

Like

Collapse
 
chattermate profile image
Runix

@anthonymax Impressive project, I am also in the same boat, any tips for promoting opensource project github.com/chattermate/chattermate... and how did you reach 200 stars?

Collapse
 
anthonymax profile image
Anthony Max

Thank you very much! I'm definitely not the one to give advice. I just write articles, I don't know how to do it any other way). Try hackernews, they say it's a good site

Collapse
 
nikitech0103 profile image
Nikita Dhandha

Nice Project.

Collapse
 
anthonymax profile image
Anthony Max

Thanks!

Collapse
 
lazy_code profile image
Nirob Ahmed

Great work!

Collapse
 
anthonymax profile image
Anthony Max

Thanks!

Collapse
 
nikhil_sachapara profile image
nikhil sachapara

its Great buddy!

Collapse
 
anthonymax profile image
Anthony Max

Thanks!

Collapse
 
anthonymax profile image
Anthony Max

Finally, interval requests to the server are being prepared. This functionality, it seems to me, is very necessary today, for example, to take the exchange rate from the server every second.

roadmap

Some comments may only be visible to logged-in visitors. Sign in to view all comments.