<div dir="ltr">mochiweb ships with a rebar template as well, that's how the "make app" target works.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 20, 2014 at 1:05 PM, Mark Allen <span dir="ltr"><<a href="mailto:mallen@alertlogic.com" target="_blank">mallen@alertlogic.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I know you probably hate top posting. Sorry. (Not sorry.)<br>
<br>
It's a little known feature but rebar does support templates for<br>
generating new OTP applications.<br>
<br>
For example:<br>
<br>
$ mkdir tmp; cd tmp<br>
$ rebar create-app appid=hello<br>
$ rebar create template=simplesrv srvid=hello_srv<br>
<br>
You can make your own rebar templates too, although the docs for doing so<br>
are not very obvious. This was the best I found on github (so far)<br>
<br>
<a href="https://github.com/mbbx6spp/rebar-templates" target="_blank">https://github.com/mbbx6spp/rebar-templates</a><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Mark<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 6/19/14 11:52 AM, "Leonard Boyce" <<a href="mailto:leonard.boyce@lucidlayer.com">leonard.boyce@lucidlayer.com</a>> wrote:<br>
<br>
>So with all the complexity issues being talked about would a basic<br>
>'app generator' along the lines of yeoman<br>
><a href="http://yeoman.io/learning/index.html" target="_blank">http://yeoman.io/learning/index.html</a> not be a better fit?<br>
><br>
>Maybe a binary which can set up the framework for an example<br>
>application with the user having to answer a few questions.<br>
><br>
>Trivial example (assumes name of simperl as binary);<br>
><br>
>noobie@localhost$ ./simperl<br>
><br>
>- Choose the application example type:<br>
>1) Web Server<br>
>2) Multi-server Ping-Pong Example<br>
>> 1<br>
><br>
>- Choose the type of Web Server example<br>
>1) Simple "Hello World" web server<br>
>2) REST "Hello World" web server<br>
>3) ....<br>
><br>
>> 1<br>
>Web Server installed and running. Go to <a href="http://localhost:12345/" target="_blank">http://localhost:12345/</a><br>
><br>
>To modify this server to print "Goodbye World" instead, edit file<br>
>"simple_hello_world/src/simple_hello_world.erl"<br>
>and use the command "./simperl recomplile simple_hello_world"<br>
><br>
>For more information on how things actually work see:<br>
>simple_hello_world/doc/README.md<br>
><br>
>noobie@localhost$<br>
><br>
>By approaching it in this way you may achieve rapid 'satisfaction' and<br>
>the ability to expose the user to anything you want with examples of<br>
>differing complexity.<br>
><br>
>Leonard<br>
><br>
>On Thu, Jun 19, 2014 at 10:12 AM, Miles Fidelman<br>
><<a href="mailto:mfidelman@meetinghouse.net">mfidelman@meetinghouse.net</a>> wrote:<br>
>> Mahesh Paolini-Subramanya wrote:<br>
>>><br>
>>> "Complexity" is a remarkably loaded term - I'm fairly certain that<br>
>>>things<br>
>>> that are complex for me (Getting anywhere via mass-transit in Tokyo)<br>
>>>are<br>
>>> pretty trivial for others (e.g., Loic).<br>
>><br>
>><br>
>> Well, let's say "complex" in an engineering context, for starters.<br>
>><br>
>>> Whats more, complexity of systems has nothing to do with the<br>
>>>complexity of<br>
>>> the individual components involved (DNA is a bit of a prime example<br>
>>>here).<br>
>><br>
>><br>
>> Precisely. I'd venture that one gravitates toward Erlang when one is<br>
>> building systems and systems-of-systems with lots of distributed, moving<br>
>> parts (e.g., a telephone switching fabric). If one is building a<br>
>>single,<br>
>> stand-alone application, I expect Erlang might not be the "best" choice.<br>
>><br>
>>><br>
>>> That said, I would claim that erlang systems are more _comprehensible_<br>
>>> than others.<br>
>>> Mind you, this does require some mastery of erlang, which is not as<br>
>>>much<br>
>>> of a chicken-and-egg scenario as you might imagine.<br>
>>><br>
>>><br>
>><br>
>> You know, that's a really good point, that highlights two broader<br>
>>issues:<br>
>> conceptual models, and tooling that maps onto conceptual models:<br>
>><br>
>> - Sequential code is relatively easy to conceptualize and represent -<br>
>>well<br>
>> commented code can suffice as a representation, there are plenty of<br>
>> debugging and tracing tools for examining run-time behavior<br>
>><br>
>> - Object oriented code lends itself to browsers and inspector - though<br>
>> execution flow can get pretty arcane (at one point, I worked on military<br>
>> simulators - think game engine - each vehicle was an object, but the<br>
>>actual<br>
>> work was done by 4 spaghetti coded threads that each ran 20 time a<br>
>>second -<br>
>> very ugly, and what led me to discover Erlang)<br>
>><br>
>> - Actor formalism (i.e., Erlang) - very easy to conceptualize for<br>
>> applications where things naturally map onto independent processes<br>
>>(e.g.,<br>
>> the above-mentioned simulator -- tanks and airplanes are a lot easier to<br>
>> model as processes than as objects) - but tools for visualizing,<br>
>>designing,<br>
>> debugging systems with lots of processes, and the interactions among<br>
>>them,<br>
>> are close to non-existent (a problem for Erlang, but also for anyone<br>
>> building highly concurrent, highly distributed systems)<br>
>><br>
>><br>
>> --<br>
>> In theory, there is no difference between theory and practice.<br>
>> In practice, there is. .... Yogi Berra<br>
>><br>
>> _______________________________________________<br>
>> erlang-questions mailing list<br>
>> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
>> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
>_______________________________________________<br>
>erlang-questions mailing list<br>
><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>