Inc. Development of the Product Data Management Platform - My team is multi-national and has adopted English as the official language. Keyword: Event driven, Data Management Platform, Workflow, Go, Retail, Maker Introduction
prototype their ideas - Anyone who wants to focus on backend logic - Anyone who struggles with frontend development - and wants genAI to write frontend code like me …
I asked Chat-GPT to show sample code using raw html, javascript and css… ``` 次のアプリケーションを作りたいです。 - ユーザが4つの英単語を入力します。(名詞、動詞、目的語、場所) - 完成した文に適した絵を画面に表示します - 画面には、入力部分、画像表示部分、作成ボタンがあります - 画像は最初は表示されません。文を入力後に作成ボタンを押すと、バックエンドで生成した画像をダウンロードするためのリンクが作 成されるので、作成されたリンクから画像をダウンロードして表示します 生のHTMLとJavascript,CSSにより、フロントエンドアプリケーションのコードを書いてください。 ``` Notes: a prompt which i posted to ChatGPT
Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext htmx is small (~14k min.gz’d), dependency-free, extendable, IE11 compatible & has reduced code base sizes by 67% when compared with react What is htmx ? https://htmx.org/
any element, not just anchors and forms, can issue an HTTP request Now any event, not just clicks or form submissions, can trigger requests Now any HTTP verb, not just GET and POST, can be used Now any element, not just the entire window, can be the target for update by the request Note that when you are using htmx, on the server side you typically respond with HTML, not JSON.
<div id=”response-encode”> </div> Overview Backend Server WebAP Server htmx Browser send a HTTP POST (specified method) request http handler <div> <p>eyJ0ZXN….</p> </div> If you want to know more details about this, go ahead the body of htmx. https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js
<div id=”response-encode”> </div> Overview Backend Server WebAP Server htmx Browser send a HTTP POST (specified method) request http handler <div> <p>eyJ0ZXN….</p> </div> If you want to know more details about this, go ahead the body of htmx. https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js When a user clicks on this button, issue an HTTP POST request to “/encode-strings” and use the content from the response to replace the element with the id response-encoded in the DOM
<div id=”response-encode”> </div> Overview Backend Server WebAP Server index.html <form hx-encoding="multipart/form-data" hx-post="/encode-strings" hx-target="#response-encoded" > < button>convert</button> </form> <div id=”response-encode”> <div> <p>eyJ0ZXN….</p> </div> </div> htmx Browser send a HTTP POST (specified method) request http handler <div> <p>eyJ0ZXN….</p> </div> return HTML as a HTTP Response body When a user clicks on this button, issue an HTTP POST request to “/encode-strings” and use the content from the response to replace the element with the id response-encoded in the DOM If you want to know more details about this, go ahead the body of htmx. https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js
CSS at the same time. And also htmx has many other great features such as CSS Transitions, WebSockets, Server Sent Events and so on. Notes: We can make the app more rich
browser features. - AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML - Benefits for Backend Engineers: - Enable to focus on backend development - Simplifies frontend development. - htmx is simple and HTML-based. I believe that it would make it easy to have genAI write the frontend code! Summary