TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Alpaca - Easy Forms for jQuery

49 点作者 bikeshack超过 11 年前

16 条评论

gberger超过 11 年前
Why does the form have to be generated dynamically by JS?<p>A much better solution would be to generate the markup on the server-side. It should be easy enough to port this to Node, and a bit more of work for other major backend languages like Ruby, Python and PHP.<p>It could even be implemented as a webapp that takes the input JSON on the left side, and spits out HTML on the right, which I could paste into my site markup directly.<p>Right now, the trade-off is too big for the developer-time convenience of generating forms dynamically.
评论 #6824747 未加载
评论 #6826596 未加载
jmduke超过 11 年前
At a first glance: very cool plugin, I think the core idea of representing forms as JSON is a good one. Two gentle criticisms:<p>1. From a &#x27;prospective developer&#x27; standpoint, I&#x27;m worried about the dependencies and general heft of the thing. Does it require jQuery UI? Is there a stripped-down version I can use? As far as I can tell, the landing page doesn&#x27;t answer these questions.<p>2. More broadly, I&#x27;d argue that there are two types of &lt;form&gt; implementations: barebones forms that use &#x27;value&#x27; and &#x27;type&#x27; and very little else, and hyper-customized ones that are generated bespoke. This plugin seems to address the middle of that spectrum: people who need a little -- but not too much -- customization. It&#x27;s hard to tell exactly what options I&#x27;m given just from poking through the first few pages.
ivanhoe超过 11 年前
Cool idea, but please fix the radio button labels. Having to click on a radio button directly makes for a really bad UX
janekk超过 11 年前
I&#x27;m worried this does not put usability first. In the example Edit form, I noticed two problems: 1) the radio button labels have not been linked using &#x27;for&#x27; to the buttons, so clicking on them does nothing. 2) Hovering my mouse over the first address line text box causes it to move down away from my mouse! Errors like these will cause a lot of entry mistakes.
franksmule超过 11 年前
The radio buttons label not being linked is a deal breaker for me
weego超过 11 年前
This is really just an awful idea. Every few weeks&#x2F;months I see some kind of &quot;wouldn&#x27;t it be great to have users write pseudo-html in json and we can then write loads of javascript to write the html for them!&quot; kind of library and the answer to that is always &quot;why would that have ever seemed like a good idea?&quot;.<p>Good libraries decorate html to provide functionality because, well html is pretty good at the html bit.
tmikaeld超过 11 年前
Two things:<p>1. Too heavy.<p>2. Doesn&#x27;t degrade nicely.
aplummer超过 11 年前
Before having a big complain about the radio buttons, why not see:<p><a href="https://github.com/1337/alpaca/commit/d15032dd14214786f695252dddf4ddee499faadf" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;1337&#x2F;alpaca&#x2F;commit&#x2F;d15032dd14214786f69525...</a><p>It literally would have taken a similar amount of time to fix vs complain :&#x2F;, and much less to just open the issues list.
nnq超过 11 年前
The first example renders a form with radio button labels not tied to the appropriate controls, so I can&#x27;t just click them to select the radio button. Same for the other labels. This is <i>totally unforgivable</i> and such a well known annoyance that I refuse to read anything else. RIP Alpaca.
zerorbit超过 11 年前
Love it! The complaints here are usually from people who assume this is good for all situations. If you have a fixed amount of static forms, this wouldn&#x27;t make sense. BUT, if you had to do dynamic forms that can change drastically with user input, this is wonderful.
Vbits超过 11 年前
During my University coursework this year I had the same idea during one of my assignments, I wrote something similar without using jQuery as a hack for a entry level web development paper.
yannis超过 11 年前
Why is the maximum age for a field set at 50?
hartator超过 11 年前
Why you can only click on the bullet to select something on the example form? They seem pretty bad... at forms.
评论 #6825123 未加载
pbreit超过 11 年前
The delay is a concern. There would need to be some significant benefit for me to enforce that on users.
tzaman超过 11 年前
After working with Angular, it pretty much became my only choice for javascript + form combination
icecreampain超过 11 年前
No labels at all just on the demo form. This isn&#x27;t 1996 where one can make shitty HTML forms for shits and giggles. People expect high quality forms with labels nowadays.<p>As others have said: dealbreaker. Not going to use it.