vtpl
phpStageManager
vtpl | phpStageManager | |
---|---|---|
2 | 1 | |
16 | 2 | |
- | - | |
3.3 | 10.0 | |
2 months ago | over 8 years ago | |
PHP | PHP | |
Apache License 2.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
vtpl
-
Ask HN: Who wants to be hired? (May 2024)
Location: Romania
Remote: Yes (worldwide)
Willing to relocate: No
Technologies: PHP, JavaScript, MySQL, PostgreSQL, SQLite, Docker, HTML, SCSS, Bootstrap, Linux
Linkedin: https://www.linkedin.com/in/givanz/
Email: [email protected]
Github: https://github.com/givanz
Experienced Full Stack Developer, developing Open Source Vvveb CMS https://www.vvveb.com and VvvebJS page builder.
- That people produce HTML with string templates is telling us something
phpStageManager
-
That people produce HTML with string templates is telling us something
"Nobody ever generates JSON using string interpolation." Oh boy, you just took me back to my first ever PHP project. Feast your eyes: https://github.com/oxguy3/phpStageManager/blob/master/events...
This file generates a feed of events (rehearsals for my high school play) to be rendered by the FullCalendar JS plugin. FullCalendar required a particular data schema that didn't match the format of my MySQL table, which meant I couldn't just json_encode() the MySQL results. I guess I just didn't conceptualize that I could create a new object that matched the FullCalendar format, and then call json_encode(). So, I generated JSON with strings.
Honestly it's a toss-up whether the JSON generation is the worst thing about this file. It looks like I also made a separate database query for every single row to get the username, because I apparently didn't know how to do joins. Could probably spend an hour listing some of the other little nuggets of awful in there. But hey, it got the job done! :)
What are some alternatives?
literal-html - Simple and unsafe HTML/XML templates for TypeScript, using tagged template literals
nano - 🎯 SSR first, lightweight 1kB JSX library.
htmlgo - A library for writing type-safe HTML in Golang
html5-dom-document-php - A better HTML5 parser for PHP.
jsonnet - Jsonnet - The data templating language
flog - Pre-Markdown static site generator based on UNIX tools and XSL
rum - Simple, decomplected, isomorphic HTML UI library for Clojure and ClojureScript
gron - Make JSON greppable!
dominate - Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API. It allows you to write HTML pages in pure Python very concisely, which eliminate the need to learn another template language, and to take advantage of the more powerful features of Python.
hn-search - Hacker News Search