<p>In reference to <a href="https://www.reddit.com/r/golang/comments/7z5anr/writing_an_article_on_web_application_structure/">this post</a>, I've been trying to decide what the best example application to build would be.</p>
<p>Is there any specific application that you would really like to see built for this article?</p>
<p>Current ideas include:</p>
<ul>
<li>Todo list</li>
<li>Bookshelf/library</li>
<li>Simple blog</li>
<li>Store inventory management</li>
<li>URL shortener</li>
<li>Video game stats tracker</li>
</ul>
<p>The goal of the article will be to build an app that contains and shows how to implement the following, using (mostly) just the standard Go library:</p>
<ul>
<li>API</li>
<li>Member dashboard</li>
<li>Authentication</li>
<li>Database usage</li>
<li>Templates</li>
<li>TLS (SSL)</li>
<li>Security</li>
<li>Error handling</li>
<li>Logging</li>
<li>Deployment</li>
<li>A skeleton structure to build upon</li>
</ul>
<p>However, if anyone has an idea for a straight forward SaaS, could even include things such as using Stripe for subscriptions.</p>
<p>Thanks!</p>
<hr/>**评论:**<br/><br/>PacNinja: <pre><p>How about a twitter clone?</p></pre>beeker1121: <pre><p>Could definitely see that as an option.</p></pre>Ploobers: <pre><p>Whatever application you choose, I am most interested in how to deal with multiple api objects that reference each other. Historically I've done both small packages while artificially restricting imports to be one-directional. I've also done a mega package where all the crud objects can communicate effectively, but leaves an enormous api surface. Neither one feels great.</p></pre>beeker1121: <pre><p>That's probably what I've thought about the most.</p>
<p>Just before the article, it may help, what I'm considering at this point is keeping everything as separate as possible, but merging it together through a third package.</p>
<p>For instance, have a <code>database</code> folder which contains a <code>member</code> package, and that strictly focuses on creating/updating/deleting a member in the <code>members</code> table. Then, you may have a <code>member_stats</code> that should be interacted with upon new member creation within your platform. Instead of importing the <code>stats</code> package for members within the <code>members</code> package, you have a third party service for creating a <code>New</code> member, and that merges the two packages together.</p></pre>govision: <pre><p>Setting up user aunthentication with apis. Make sure to add in table relations. I am practicing with a URL/meta tag searching site but I need to add the great complicity of user tables. Simplifying that would be really appreciated. And please no frameworks.</p></pre>tmack8080: <pre><p>I work in DevOps and I am trying to learn Go web programming for one specific use case ... generating reports of my equipment. For example, I have 5 storage array vendors. Each vendor provides a REST api. I would love to be able to write a web app to extract historical data, disk capacity, etc,. capture it in a database and make the data available via an internal web site. FreeNAS is a perfect example.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传