I hope that as Dream and Bonsai grow and stabilize, we’ll see new libraries, community examples, and guides that will propel the OCaml web ecosystem forward. I think that Bonsai is also very significant: its current API is very new and it’s a bit challenging to learn, but the central idea is extremely flexible and powerful. Even though it’s fairly new, still in alpha, and has many features under active development, it’s already had an impact. I agree that Dream is a game-changer here. Although we can write frontend and backend in the same language,.Bonsai’s modern API is very new, somewhat challenging to learn, and also lacks an ecosystem of packages/tutorials.There also isn’t an active ecosystem of packages, utils, tools, and tutorials for it yet. So that’s probably why ocaml does not yet have a good reputation for web dev : people are not aware of dream. Would be happy to answer any questions or comments. I had a lot of fun writing these, and I hope they’re useful to anyone considering OCaml for web development. It also includes some reflections on design decisions and my experience working with these libraries. Routing in Bonsai and Project Conclusion.Īdditionally, the project’s README has a comprehensive overview of the tech stack, folder structure, and usage instructions.It goes over some underlying concepts (SPAs, Frontend State Management, Algebraic Effects, Monads), as well as Bonsai’s core design. I actually wrote the first draft of this before I decided to do a blog, while trying to, well, understand Bonsai. This includes some background on the project, and instructions for accessing the live demo (Chrome only for now). In total, I wrote 7 articles that walk through my project’s: I really enjoyed writing an article series on hardware design with OCaml, so I decided to do so for web development as well. I found tutorials for bits and pieces, but nothing that connected all the dots. I couldn’t find realistic but accessible full-stack web projects in OCaml available for reference.In addition to all the language’s great features and safety guarantees, the ecosystem is pretty good! Dream near-perfectly coincides with my vision of backend webdev, and Bonsai has a great balance of flexibility/elegance and safety. OCaml is very underrated for web development.While working on this project, I realized two things: I used Dream for the backend, and Bonsai for the frontend. Since I’m fairly familiar with web programming through my work on Flarum and past internships/side projects, I decided to use this opportunity to explore the OCaml web development ecosystem. Last semester, I took Penn State’s CMPSC 431W, where our final project was to build a database-driven web application. Hi everyone! I’ve written a tutorial blog series about full-stack web development in OCaml, and wanted to share it here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |