|
Hi,
Looking for some suggestions on how to get started with Web development in Erlang. My background is largely C/C++ systems development, and picked up some Erlang, i.e. I can understand most not-too-complex/large Erlang programs given a little time, unless very esoteric style is adopted, and still find it a bit hard to 'think in Erlang' (a decade of procedural and OO thinking often gets in the way). However, with a turn of events, now I need to do some web-development. Started looking at Nitrogen, but finding the syntax very hard. A steep learning curve. I've done some PHP programming a decade back, and found it to be very simple, and this seems almost like a herculean learning exercise. The tutorial, didn't seem to be structured in a beginner friendly way, and there is hardly any alternative tutorial available. So I wonder as to how many people are really using it. I've had a look at Zotonic as well, but not sure if that might be easier / simpler, and also if it'd be too-much work separating out the CMS from the framework, it might be bit too hard for a beginner to make reasonable progress. My preferred approach would be to keep the backend pretty much REST'ish and use heavier frontend (s.a. jQuery) to interact with it, although I've the need for delivering some streaming media, and strong authentication etc. Also, I shall the services to be available on mobile handsets. Would really appreciate if someone can share thoughts, advice, and pointer to good / comprehensive tutorials etc., to make this learning (& adoption) as simple and easy as possible. Alternatively if someone feels that sticking to PHP (which I am slightly more comfortable with) would be a good idea, shall be happy to have that vote of confidence. Icarus _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
Many people prefer using Erlang just for REST API and internal
distribution, and serve any user-visible content using Python/Ruby/PHP, often on top of some framework (Django, Pylons, Rails, etc). For instance, Heroku and Github use Erlang for internal stuff, and serve content using Ruby. At Mochi Media, we use Python for displaying the pages, and use Erlang only as REST applications. I don't claim this way to be more correct than using Nitrogen/Erlydtl/whatever, but the reason why people do that is because they don't like using Erlang for pages generation. So, you can keep searching, but keep in mind that using another language for serving pages isn't that bad. On Fri, Jul 29, 2011 at 3:18 PM, Icarus Alive <[hidden email]> wrote: > Hi, > > Looking for some suggestions on how to get started with Web > development in Erlang. > My background is largely C/C++ systems development, and picked up some Erlang, > i.e. I can understand most not-too-complex/large Erlang programs given > a little time, > unless very esoteric style is adopted, and still find it a bit hard to > 'think in Erlang' > (a decade of procedural and OO thinking often gets in the way). However, with a > turn of events, now I need to do some web-development. > > Started looking at Nitrogen, but finding the syntax very hard. A steep > learning curve. > I've done some PHP programming a decade back, and found it to be very simple, > and this seems almost like a herculean learning exercise. The > tutorial, didn't seem > to be structured in a beginner friendly way, and there is hardly any > alternative tutorial > available. So I wonder as to how many people are really using it. I've > had a look at > Zotonic as well, but not sure if that might be easier / simpler, and > also if it'd be > too-much work separating out the CMS from the framework, it might be > bit too hard > for a beginner to make reasonable progress. > > My preferred approach would be to keep the backend pretty much REST'ish and use > heavier frontend (s.a. jQuery) to interact with it, although I've the > need for delivering > some streaming media, and strong authentication etc. Also, I shall the > services to be > available on mobile handsets. > > Would really appreciate if someone can share thoughts, advice, and pointer to > good / comprehensive tutorials etc., to make this learning (& > adoption) as simple and > easy as possible. Alternatively if someone feels that sticking to PHP > (which I am slightly > more comfortable with) would be a good idea, shall be happy to have that vote > of confidence. > > Icarus > _______________________________________________ > erlang-questions mailing list > [hidden email] > http://erlang.org/mailman/listinfo/erlang-questions > -- Best regards, Dmitry Demeshchuk _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
It mostly depends on what kind of web development you want to do.
Is it more of a mobile application than a publishing web site? Does is have specific authentication schemes? Etc. Etc. When your project involves a "normal" dynamic website with publishing, users, some interaction etc. then Zotonic might be a good fit. At least it will prevent you re-inventing quite some wheels. It also uses webmachine, so adding your own specific REST interface should be easy. When your project is really more backend like and not using templates (think of the backend for a mobile app) then it is better to make a server with Webmachine (and whatnot) and use Javascript on the user agent (or a native implementation). - Marc (disclaimer: I am one of the Zotonic maintainers) On 29 jul 2011, at 13:52, Dmitry Demeshchuk wrote: > Many people prefer using Erlang just for REST API and internal > distribution, and serve any user-visible content using > Python/Ruby/PHP, often on top of some framework (Django, Pylons, > Rails, etc). For instance, Heroku and Github use Erlang for internal > stuff, and serve content using Ruby. At Mochi Media, we use Python for > displaying the pages, and use Erlang only as REST applications. > > I don't claim this way to be more correct than using > Nitrogen/Erlydtl/whatever, but the reason why people do that is > because they don't like using Erlang for pages generation. > So, you can keep searching, but keep in mind that using another > language for serving pages isn't that bad. > > On Fri, Jul 29, 2011 at 3:18 PM, Icarus Alive <[hidden email]> wrote: >> Hi, >> >> Looking for some suggestions on how to get started with Web >> development in Erlang. >> My background is largely C/C++ systems development, and picked up some Erlang, >> i.e. I can understand most not-too-complex/large Erlang programs given >> a little time, >> unless very esoteric style is adopted, and still find it a bit hard to >> 'think in Erlang' >> (a decade of procedural and OO thinking often gets in the way). However, with a >> turn of events, now I need to do some web-development. >> >> Started looking at Nitrogen, but finding the syntax very hard. A steep >> learning curve. >> I've done some PHP programming a decade back, and found it to be very simple, >> and this seems almost like a herculean learning exercise. The >> tutorial, didn't seem >> to be structured in a beginner friendly way, and there is hardly any >> alternative tutorial >> available. So I wonder as to how many people are really using it. I've >> had a look at >> Zotonic as well, but not sure if that might be easier / simpler, and >> also if it'd be >> too-much work separating out the CMS from the framework, it might be >> bit too hard >> for a beginner to make reasonable progress. >> >> My preferred approach would be to keep the backend pretty much REST'ish and use >> heavier frontend (s.a. jQuery) to interact with it, although I've the >> need for delivering >> some streaming media, and strong authentication etc. Also, I shall the >> services to be >> available on mobile handsets. >> >> Would really appreciate if someone can share thoughts, advice, and pointer to >> good / comprehensive tutorials etc., to make this learning (& >> adoption) as simple and >> easy as possible. Alternatively if someone feels that sticking to PHP >> (which I am slightly >> more comfortable with) would be a good idea, shall be happy to have that vote >> of confidence. >> >> Icarus >> _______________________________________________ >> erlang-questions mailing list >> [hidden email] >> http://erlang.org/mailman/listinfo/erlang-questions >> > > > > -- > Best regards, > Dmitry Demeshchuk > _______________________________________________ > erlang-questions mailing list > [hidden email] > http://erlang.org/mailman/listinfo/erlang-questions _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
Thanks @Marc, for taking time to reply this this mail. On Fri, Jul 29, 2011 at 5:38 PM, Marc Worrell <[hidden email]> wrote: It mostly depends on what kind of web development you want to do. One of the avatars in likely to be a mobile application, but it is neither the first one, nor the only one. However, I am not sure I can classify it as a general publishing site, i.e. same content isn't viewed by several people, rather content uploaded 'somehow' (many ways, many sources) is visible only to the user. What the user can view/has viewed, must be held in tight secrecy. Even admins shouldn't be able to view the content or what content users viewed. User can (in-frequently) share some of the content with others, but I'd say that less than 0.1% of the content (figuratively speaking).
Does is have specific authentication schemes? Honestly, haven't given this enough thought. One of the requirements is to ensure privacy of user data, and that of the interaction. I'm yet to figure out the "how" part.
Ā When your project involves a "normal" dynamic website with publishing, users, some interaction etc. then Zotonic might be a good fit. Zotonic seemed very interesting, based on a superficial read of the site (I admit, haven't downloaded or tried it), but what seemed a bit intimidating from a newbie standpoint was that I couldn't figure out anything in documentation (s.a. a tutorial) on how to not-use-Zotonic-as-a-CMS-but-as-a-framework. For instance how to write an app that leverage some framework-features of Zotonic, but is largely a REST application. I can understand that such usecase may not the priority for the Zotonic team at the moment.Ā
When your project is really more backend like and not using templates (think of the backend for a mobile app) then it is better to make a server with Webmachine (and whatnot) and use Javascript on the user agent (or a native implementation). If the initial access mechanism to the service/application is desktop browser based is there anything that makes the jQuery Ā + JSON + RESTful backend, harder, less suitable, higher complexity, lower performance, difficult to scale (or any other foreseeable challenges), compared to the template based approach ?
-- regards, Banibrata http://www.linkedin.com/in/bdutta http://twitter.com/edgeliving _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
In reply to this post by Icarus Alive
Amazingly, I am in an eerily similar situation, and I think we'd interacted in the past. I shall be watching this thread carefully.
On Fri, Jul 29, 2011 at 4:48 PM, Icarus Alive <[hidden email]> wrote: Hi, -- regards, Banibrata http://www.linkedin.com/in/bdutta http://twitter.com/edgeliving _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
There is a new (and hot!) web development paradigm brought by backbone.js:
* The server side only returns JSON data <--- this minimizes the weakness of Erlang * Use backbone.js for everything else (templates etc.) See tutorials and demos: https://github.com/documentcloud/backbone/wiki/Tutorials%2C-blog-posts-and-example-sites Ngoc On Fri, Jul 29, 2011 at 10:06 PM, Banibrata Dutta <[hidden email]> wrote: > Amazingly, I am in an eerily similar situation, and I think we'd interacted > in the past. I shall be watching this thread carefully. > On Fri, Jul 29, 2011 at 4:48 PM, Icarus Alive <[hidden email]> > wrote: >> >> Hi, >> >> Looking for some suggestions on how to get started with Web >> development in Erlang. >> My background is largely C/C++ systems development, and picked up some >> Erlang, >> i.e. I can understand most not-too-complex/large Erlang programs given >> a little time, >> unless very esoteric style is adopted, and still find it a bit hard to >> 'think in Erlang' >> (a decade of procedural and OO thinking often gets in the way). However, >> with a >> turn of events, now I need to do some web-development. >> >> Started looking at Nitrogen, but finding the syntax very hard. A steep >> learning curve. >> I've done some PHP programming a decade back, and found it to be very >> simple, >> and this seems almost like a herculean learning exercise. The >> tutorial, didn't seem >> to be structured in a beginner friendly way, and there is hardly any >> alternative tutorial >> available. So I wonder as to how many people are really using it. I've >> had a look at >> Zotonic as well, but not sure if that might be easier / simpler, and >> also if it'd be >> too-much work separating out the CMS from the framework, it might be >> bit too hard >> for a beginner to make reasonable progress. >> >> My preferred approach would be to keep the backend pretty much REST'ish >> and use >> heavier frontend (s.a. jQuery) to interact with it, although I've the >> need for delivering >> some streaming media, and strong authentication etc. Also, I shall the >> services to be >> available on mobile handsets. >> >> Would really appreciate if someone can share thoughts, advice, and pointer >> to >> good / comprehensive tutorials etc., to make this learning (& >> adoption) as simple and >> easy as possible. Alternatively if someone feels that sticking to PHP >> (which I am slightly >> more comfortable with) would be a good idea, shall be happy to have that >> vote >> of confidence. >> >> Icarus >> _______________________________________________ >> erlang-questions mailing list >> [hidden email] >> http://erlang.org/mailman/listinfo/erlang-questions > > > > -- > regards, > Banibrata > http://www.linkedin.com/in/bdutta > http://twitter.com/edgeliving > > _______________________________________________ > erlang-questions mailing list > [hidden email] > http://erlang.org/mailman/listinfo/erlang-questions > > erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
In reply to this post by Banibrata Dutta
On 29 jul 2011, at 15:01, Banibrata Dutta wrote: > User can (in-frequently) share some of the content with others, but I'd say that less than 0.1% of the content (figuratively speaking). > Zotonic seemed very interesting, based on a superficial read of the site (I admit, haven't downloaded or tried it), but what seemed a bit intimidating from a newbie standpoint was that I couldn't figure out anything in documentation (s.a. a tutorial) on how to not-use-Zotonic-as-a-CMS-but-as-a-framework. For instance how to write an app that leverage some framework-features of Zotonic, but is largely a REST application. I can understand that such usecase may not the priority for the Zotonic team at the moment. As your users mostly don't share information you could: - add specific data models for storing the user's information - use the zotonic cms for the publication of news etc on the public facing part of your system - access your specific models from the template using the Zotonic 'm' model interface in the templates For your users, I would: - store users in the normal zotonic tables, but hide them from each other using access control - use the authentication/facebook/openid/etc modules for authentication > If the initial access mechanism to the service/application is desktop browser based is there anything that makes the jQuery + JSON + RESTful backend, harder, less suitable, higher complexity, lower performance, difficult to scale (or any other foreseeable challenges), compared to the template based approach ? For an initial setup and speed of development it is useful to keep your templates server based. Later you can add a REST (JSON) interface and templating on the user agent, as this might use less bandwidth. You can also stick with the Zotonic (Nitrogen alike) event model with pushed javascript instead of parsing/interpreting JSON on the client side. For more detailed discussions about Zotonic I would recommend the Zotonic users mailinglist http://groups.google.com/group/zotonic-users - Marc _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
In reply to this post by Banibrata Dutta
Would appreciate if my thread wasn't hijacked :-)... although gotta
agree that our scenarios are quite similar. On Fri, Jul 29, 2011 at 6:31 PM, Banibrata Dutta <[hidden email]> wrote: > Thanks @Marc, for taking time to reply this this mail. > On Fri, Jul 29, 2011 at 5:38 PM, Marc Worrell <[hidden email]> wrote: >> >> It mostly depends on what kind of web development you want to do. >> >> Is it more of a mobile application than a publishing web site? In my case, content characteristics are: 1. Always originating from single source 2. Always consumed by single user 3. Content has short lifetime - once consumed, will be archived 4. Each user has several hundreds of content display to her in "newest first" fashion >> >> Does is have specific authentication schemes? >> Etc. Etc. > > Honestly, haven't given this enough thought. One of the requirements is to > ensure privacy of user data, and that of the interaction. I'm yet to figure > out the "how" part. Well in my case it has to be some strong authentication. Storage, archival and access has to conform to HIPAA compliance. So we know we are dealing with EMR type content. > >> >> When your project involves a "normal" dynamic website with publishing, >> users, some interaction etc. then Zotonic might be a good fit. >> At least it will prevent you re-inventing quite some wheels. Ā It also uses >> webmachine, so adding your own specific REST interface should be easy. >> >> >> When your project is really more backend like and not using templates >> (think of the backend for a mobile app) then it is better to make a server >> with Webmachine (and whatnot) and use Javascript on the user agent (or a >> native implementation). >> >> On 29 jul 2011, at 13:52, Dmitry Demeshchuk wrote: >> >> > Many people prefer using Erlang just for REST API and internal >> > distribution, and serve any user-visible content using >> > Python/Ruby/PHP, often on top of some framework (Django, Pylons, >> > Rails, etc). For instance, Heroku and Github use Erlang for internal >> > stuff, and serve content using Ruby. At Mochi Media, we use Python for >> > displaying the pages, and use Erlang only as REST applications. >> > >> > I don't claim this way to be more correct than using >> > Nitrogen/Erlydtl/whatever, but the reason why people do that is >> > because they don't like using Erlang for pages generation. >> > So, you can keep searching, but keep in mind that using another >> > language for serving pages isn't that bad. >> > >> > On Fri, Jul 29, 2011 at 3:18 PM, Icarus Alive <[hidden email]> >> > wrote: >> >> Hi, >> >> >> >> Looking for some suggestions on how to get started with Web >> >> development in Erlang. >> >> My background is largely C/C++ systems development, and picked up some >> >> Erlang, >> >> i.e. I can understand most not-too-complex/large Erlang programs given >> >> a little time, >> >> unless very esoteric style is adopted, and still find it a bit hard to >> >> 'think in Erlang' >> >> (a decade of procedural and OO thinking often gets in the way). >> >> However, with a >> >> turn of events, now I need to do some web-development. >> >> >> >> Started looking at Nitrogen, but finding the syntax very hard. A steep >> >> learning curve. >> >> I've done some PHP programming a decade back, and found it to be very >> >> simple, >> >> and this seems almost like a herculean learning exercise. The >> >> tutorial, didn't seem >> >> to be structured in a beginner friendly way, and there is hardly any >> >> alternative tutorial >> >> available. So I wonder as to how many people are really using it. I've >> >> had a look at >> >> Zotonic as well, but not sure if that might be easier / simpler, and >> >> also if it'd be >> >> too-much work separating out the CMS from the framework, it might be >> >> bit too hard >> >> for a beginner to make reasonable progress. >> >> >> >> My preferred approach would be to keep the backend pretty much REST'ish >> >> and use >> >> heavier frontend (s.a. jQuery) to interact with it, although I've the >> >> need for delivering >> >> some streaming media, and strong authentication etc. Also, I shall the >> >> services to be >> >> available on mobile handsets. >> >> >> >> Would really appreciate if someone can share thoughts, advice, and >> >> pointer to >> >> good / comprehensive tutorials etc., to make this learning (& >> >> adoption) as simple and >> >> easy as possible. Alternatively if someone feels that sticking to PHP >> >> (which I am slightly >> >> more comfortable with) would be a good idea, shall be happy to have >> >> that vote >> >> of confidence. >> >> >> >> Icarus >> >> _______________________________________________ >> >> erlang-questions mailing list >> >> [hidden email] >> >> http://erlang.org/mailman/listinfo/erlang-questions >> >> >> > >> > >> > >> > -- >> > Best regards, >> > Dmitry Demeshchuk >> > _______________________________________________ >> > erlang-questions mailing list >> > [hidden email] >> > http://erlang.org/mailman/listinfo/erlang-questions >> >> _______________________________________________ >> erlang-questions mailing list >> [hidden email] >> http://erlang.org/mailman/listinfo/erlang-questions > > > > -- > regards, > Banibrata > http://www.linkedin.com/in/bdutta > http://twitter.com/edgeliving > > _______________________________________________ > erlang-questions mailing list > [hidden email] > http://erlang.org/mailman/listinfo/erlang-questions > > erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
In reply to this post by Ngoc Dao
The problem with javascript-for-everything-on-the-user-agent is that your site is not a web site anymore but an application.
This makes your site very hard to access for crawlers, screen readers etc. etc. - Marc On 29 jul 2011, at 15:14, Ngoc Dao wrote: > There is a new (and hot!) web development paradigm brought by backbone.js: > * The server side only returns JSON data <--- this minimizes the > weakness of Erlang > * Use backbone.js for everything else (templates etc.) > > See tutorials and demos: > https://github.com/documentcloud/backbone/wiki/Tutorials%2C-blog-posts-and-example-sites > > Ngoc _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
Yes. That's a different paradigm.
But if your site is behind a login page (like Facebook, Gmail) then that's OK. Anyway, that's not your problem, that's the problem of crawlers, screen readers etc. etc. Ngoc On Fri, Jul 29, 2011 at 10:19 PM, Marc Worrell <[hidden email]> wrote: > The problem with javascript-for-everything-on-the-user-agent is that your site is not a web site anymore but an application. > This makes your site very hard to access for crawlers, screen readers etc. etc. > > - Marc > > > On 29 jul 2011, at 15:14, Ngoc Dao wrote: > >> There is a new (and hot!) web development paradigm brought by backbone.js: >> * The server side only returns JSON data <--- this minimizes the >> weakness of Erlang >> * Use backbone.js for everything else (templates etc.) >> >> See tutorials and demos: >> https://github.com/documentcloud/backbone/wiki/Tutorials%2C-blog-posts-and-example-sites >> >> Ngoc > > erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
In reply to this post by Icarus Alive
For note, my background is also 15+ years of C++, and although it and Erlang are different, C++ templates are very much similar to Erlangs syntax (and dang near identical to Haskell), so if you were a heavy template writer like I am then think of it that way.Ā I jumped into Erlang and picked it up very quickly. Oh, and I use Nitrogen, mostly as I like to generate pages in code and theme and layout using css; I try to use as little straight html as possible, but using html directly is something Zotonic if good at if you prefer that. I can help with your C++ to Erlang mental conversions if you want. On Jul 29, 2011 5:18 AM, "Icarus Alive" <[hidden email]> wrote:
_______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
On Fri, Jul 29, 2011 at 7:43 PM, OvermindDL1 <[hidden email]> wrote:
> For note, my background is also 15+ years of C++, and although it and Erlang > are different, C++ templates are very much similar to Erlangs syntax (and > dang near identical to Haskell), so if you were a heavy template writer like > I am then think of it that way.Ā I jumped into Erlang and picked it up very > quickly. @OvermindDL1, very glad to hear that. Not familiar with Haskell, but C++ templates are a familiar territory. > Oh, and I use Nitrogen, mostly as I like to generate pages in code and theme > and layout using css; I try to use as little straight html as possible, but > using html directly is something Zotonic if good at if you prefer that. > > I can help with your C++ to Erlang mental conversions if you want. That would be really a great help. However, if you (or anyone else here) had a chance to compare Nitrogen & Zotonic on the developer efficiency and learning-curve aspects, would be good to hear. Also, how does it compare in performance terms, i.e. programmatic HTML generation in Erlang code, versus template driven HTML generation using a dedicated templating engine (if I understood it correctly). > > On Jul 29, 2011 5:18 AM, "Icarus Alive" <[hidden email]> wrote: > _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
In reply to this post by Icarus Alive
The "web" pages I've written in Erlang are mostly just status and management REST interfaces for a system whose main goal is something else, but what I've found so far: Ā If you want a web interface where you take the request once headers are parsed and the request decoded, use mochiweb.
Ā If you want an industrial-strength HTTP protocol server stack (things like content type negotiation, etc) for a REST-only implementation, use webmachine. Ā Sincerely, Ā
jw -- Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. On Fri, Jul 29, 2011 at 4:18 AM, Icarus Alive <[hidden email]> wrote: Hi, _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
On Fri, Jul 29, 2011 at 12:17 PM, Icarus Alive <[hidden email]> wrote:
> On Fri, Jul 29, 2011 at 7:43 PM, OvermindDL1 <[hidden email]> wrote: >> For note, my background is also 15+ years of C++, and although it and Erlang >> are different, C++ templates are very much similar to Erlangs syntax (and >> dang near identical to Haskell), so if you were a heavy template writer like >> I am then think of it that way. I jumped into Erlang and picked it up very >> quickly. > > @OvermindDL1, very glad to hear that. Not familiar with Haskell, but > C++ templates are a familiar territory. > >> Oh, and I use Nitrogen, mostly as I like to generate pages in code and theme >> and layout using css; I try to use as little straight html as possible, but >> using html directly is something Zotonic if good at if you prefer that. >> >> I can help with your C++ to Erlang mental conversions if you want. > > That would be really a great help. However, if you (or anyone else > here) had a chance to compare Nitrogen & Zotonic on the developer > efficiency and learning-curve aspects, would be good to hear. Also, > how does it compare in performance terms, i.e. programmatic HTML > generation in Erlang code, versus template driven HTML generation > using a dedicated templating engine (if I understood it correctly). I have not yet used Zotonic myself, but from what I gather they do about the same things but in different ways. It seems Nitrogen likes to generate web pages in code, although it can use templates. It seems Zotonic likes to generate web pages in templates, although it can use code. Zotonic seems to have a few more features then Nitrogen, but are easily made in Nitrogen thanks to its pure-code extension system. I chose Nitrogen because I prefer code to generate pages, my pages are mostly informational server stuff, so I do not need an html kid to do those things for me, but if you had one, maybe Zotonic? Both are quite fast, even the templates (from my understanding) are compiled to Erlang compiled beam files so there should not be any real difference. On Sat, Jul 30, 2011 at 10:51 AM, Jon Watte <[hidden email]> wrote: > The "web" pages I've written in Erlang are mostly just status and management > REST interfaces for a system whose main goal is something else, but what > I've found so far: > > If you want a web interface where you take the request once headers are > parsed and the request decoded, use mochiweb. > > If you want an industrial-strength HTTP protocol server stack (things like > content type negotiation, etc) for a REST-only implementation, use > webmachine. Exactly. Nitrogen/Zotonic are good for making the more direct 'website' kind of interface, but for making web services, something raw like mochiweb/cowboy or webmachine (webmachine excels at REST more then anything else) are better. _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
Nitrogen has a very cool new(ish) feature where you can use both nitrogen and webmachine in the same project pretty easily. Ā
Kenny
On Mon, Aug 1, 2011 at 9:55 PM, OvermindDL1 <[hidden email]> wrote:
_______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
In reply to this post by Icarus Alive
On Wed, Aug 3, 2011 at 3:54 AM, Benson Wong <[hidden email]> wrote:
> Hi, > My background is a web developer (~15 years), done PHP for about 11 years. > So I know it pretty well. > Just starting to learn Erlang. Done lots of javascript (jQuery, node.js, > etc). So a PHP developer, in the Erlang pool here :) > I think an imperative language like PHP would be a lot easier (and more > agile) to build the web app in than Erlang. I would choose erlang if I need > long lived connections (web sockets, long-poll, etc). Frameworks like Django > (Python)/Rails (ruby) would also make life easier. > If you want scalability/reliability/performance, add more PHP processes / > servers. > PHP is shared nothing, so it is easy to scale. Just add more. Using Nginx + > PHP-FPM. Solves a lot of slow request issues. > Put them behind an HTTP load balancer, HAProxy is a very popular choice. > Performance is usually database bound than it is app server bound. > On Fri, Jul 29, 2011 at 6:16 AM, Icarus Alive <[hidden email]> > wrote: >> >> Would appreciate if my thread wasn't hijacked :-)... although gotta >> agree that our scenarios are quite similar. >> >> On Fri, Jul 29, 2011 at 6:31 PM, Banibrata Dutta >> <[hidden email]> wrote: >> > Thanks @Marc, for taking time to reply this this mail. >> > On Fri, Jul 29, 2011 at 5:38 PM, Marc Worrell <[hidden email]> wrote: >> >> >> >> It mostly depends on what kind of web development you want to do. >> >> >> >> Is it more of a mobile application than a publishing web site? >> >> In my case, content characteristics are: >> 1. Always originating from single source >> 2. Always consumed by single user >> 3. Content has short lifetime - once consumed, will be archived >> 4. Each user has several hundreds of content display to her in "newest >> first" fashion >> >> >> >> >> Does is have specific authentication schemes? >> >> Etc. Etc. >> > >> > Honestly, haven't given this enough thought. One of the requirements is >> > to >> > ensure privacy of user data, and that of the interaction. I'm yet to >> > figure >> > out the "how" part. > > Security/Privacy, this is more of an operation and application design than > it is a Erlang/OTP vs PHP/Ruby/Python+framework. > Generally you'd want to: > * firewalls, no SSH access, web servers are only web servers, ie: only port > 443 open. > * use cookie based sessions. Don't use HTTP basic authentication. > * Server has controls all access based on the cookie. > * Use HTTPS. Always. > * There are lots of other techniques: > -- use bcrypt for passwords > -- sessions can be limited to one IP address at a time > -- sessions have short expire times (controlled on the server) > -- etc. > >> >> Well in my case it has to be some strong authentication. Storage, >> archival and access has to conform to HIPAA compliance. So we know we >> are dealing with EMR type content. Hi Benson, Really appreciate your descriptive & informative response, especially so for the part on security. My inclination towards Erlang stems from the fact that I was intending to do much of the backend in Erlang as well. The backend does lot of other things than just bridging between FE client request/responses and a DB, s.a. converting content format, managing archival policies, do some data analysis for reporting etc. Maybe some of that via ports. I wish I'd seen your mail few days back, because having tried both Nitrogen and Zotonic, which are I am sure excellent products, I think I've found peace in settling for ChicagoBoss. I found it lot easier to work with, as a beginner, maybe because the FP guts are almost hidden away from sight, and much of the developer/user coding is done in an imperative fashion. Also, I found it's documentation (although quite light) to be simple & just-enough to get me started and get me going. However, I might have to come back to PHP unless I am able to train my team on Erlang. Being a beginner, I find it hard to imagine being a good teacher / coach for rest of the team. Thanks again, everyone, for responding on this thread. Icarus. _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
I am curious, how is ChicagoBoss compared to Nitrogen? On Aug 2, 2011 11:31 PM, "Icarus Alive" <[hidden email]> wrote:
> On Wed, Aug 3, 2011 at 3:54 AM, Benson Wong <[hidden email]> wrote: >> Hi, >> My background is a web developer (~15 years), done PHP for about 11 years. >> So I know it pretty well. >> Just starting to learn Erlang. Done lots of javascript (jQuery, node.js, >> etc). So a PHP developer, in the Erlang pool here :) >> I think an imperative language like PHP would be a lot easier (and more >> agile) to build the web app in than Erlang. I would choose erlang if I need >> long lived connections (web sockets, long-poll, etc). Frameworks like Django >> (Python)/Rails (ruby) would also make life easier. >> If you want scalability/reliability/performance, add more PHP processes / >> servers. >> PHP is shared nothing, so it is easy to scale. Just add more. Using Nginx + >> PHP-FPM. Solves a lot of slow request issues. >> Put them behind an HTTP load balancer, HAProxy is a very popular choice. >> Performance is usually database bound than it is app server bound. >> On Fri, Jul 29, 2011 at 6:16 AM, Icarus Alive <[hidden email]> >> wrote: >>> >>> Would appreciate if my thread wasn't hijacked :-)... although gotta >>> agree that our scenarios are quite similar. >>> >>> On Fri, Jul 29, 2011 at 6:31 PM, Banibrata Dutta >>> <[hidden email]> wrote: >>> > Thanks @Marc, for taking time to reply this this mail. >>> > On Fri, Jul 29, 2011 at 5:38 PM, Marc Worrell <[hidden email]> wrote: >>> >> >>> >> It mostly depends on what kind of web development you want to do. >>> >> >>> >> Is it more of a mobile application than a publishing web site? >>> >>> In my case, content characteristics are: >>> 1. Always originating from single source >>> 2. Always consumed by single user >>> 3. Content has short lifetime - once consumed, will be archived >>> 4. Each user has several hundreds of content display to her in "newest >>> first" fashion >>> >>> >> >>> >> Does is have specific authentication schemes? >>> >> Etc. Etc. >>> > >>> > Honestly, haven't given this enough thought. One of the requirements is >>> > to >>> > ensure privacy of user data, and that of the interaction. I'm yet to >>> > figure >>> > out the "how" part. >> >> Security/Privacy, this is more of an operation and application design than >> it is a Erlang/OTP vs PHP/Ruby/Python+framework. >> Generally you'd want to: >> * firewalls, no SSH access, web servers are only web servers, ie: only port >> 443 open. >> * use cookie based sessions. Don't use HTTP basic authentication. >> * Server has controls all access based on the cookie. >> * Use HTTPS. Always. >> * There are lots of other techniques: >> -- use bcrypt for passwords >> -- sessions can be limited to one IP address at a time >> -- sessions have short expire times (controlled on the server) >> -- etc. >> >>> >>> Well in my case it has to be some strong authentication. Storage, >>> archival and access has to conform to HIPAA compliance. So we know we >>> are dealing with EMR type content. > > Hi Benson, > > Really appreciate your descriptive & informative response, especially > so for the part on security. > > My inclination towards Erlang stems from the fact that I was intending > to do much of the backend in Erlang as well. The backend does lot of > other things than just bridging between FE client request/responses > and a DB, s.a. converting content format, managing archival policies, > do some data analysis for reporting etc. Maybe some of that via ports. > > I wish I'd seen your mail few days back, because having tried both > Nitrogen and Zotonic, which are I am sure excellent products, I think > I've found peace in settling for ChicagoBoss. I found it lot easier to > work with, as a beginner, maybe because the FP guts are almost hidden > away from sight, and much of the developer/user coding is done in an > imperative fashion. Also, I found it's documentation (although quite > light) to be simple & just-enough to get me started and get me going. > > However, I might have to come back to PHP unless I am able to train my > team on Erlang. Being a beginner, I find it hard to imagine being a > good teacher / coach for rest of the team. > > Thanks again, everyone, for responding on this thread. > > Icarus. > _______________________________________________ > erlang-questions mailing list > [hidden email] > http://erlang.org/mailman/listinfo/erlang-questions _______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
In reply to this post by Icarus Alive
Sure Benson, will do so, although I've got a really long way to go.
On Wed, Aug 3, 2011 at 9:17 PM, Benson Wong <[hidden email]> wrote: > Hi Icarus, > I would appreciate it if you would share your experience with this when you > get deeper into Erlang, Chicago Boss web development. I'm just learning the > other side of the coin so highly interested in how it is. In particular, how > to structure a larger erlang system that coordinates front end / backend > jobs as you've mentioned. > Just for you benefit, with the traditional approach (PHP, Ruby, etc), > background jobs are usually done with tools like: > - Gearman > - beanstalkd (my preference) > - cron (archiving / periodic) > Sometimes I like to hack together my own simple event loop daemon using: > - PHP > - daemontools > - beanstalkd > The web server PHP jams a job into beanstalkd, the daemonized PHP pops the > job off the stack, does it, asks for another one. You can scale this out > over several machines quite easily. > Ben. > > On Tue, Aug 2, 2011 at 10:31 PM, Icarus Alive <[hidden email]> > wrote: >> >> Hi Benson, >> >> Really appreciate your descriptive & informative response, especially >> so for the part on security. >> >> My inclination towards Erlang stems from the fact that I was intending >> to do much of the backend in Erlang as well. The backend does lot of >> other things than just bridging between FE client request/responses >> and a DB, s.a. converting content format, managing archival policies, >> do some data analysis for reporting etc. Maybe some of that via ports. >> >> I wish I'd seen your mail few days back, because having tried both >> Nitrogen and Zotonic, which are I am sure excellent products, I think >> I've found peace in settling for ChicagoBoss. I found it lot easier to >> work with, as a beginner, maybe because the FP guts are almost hidden >> away from sight, and much of the developer/user coding is done in an >> imperative fashion. Also, I found it's documentation (although quite >> light) to be simple & just-enough to get me started and get me going. >> >> However, I might have to come back to PHP unless I am able to train my >> team on Erlang. Being a beginner, I find it hard to imagine being a >> good teacher / coach for rest of the team. >> >> Thanks again, everyone, for responding on this thread. >> >> Icarus. > > erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
In reply to this post by OvermindDL1
On Wed, Aug 3, 2011 at 9:50 PM, OvermindDL1 <[hidden email]> wrote:
> > I am curious, how is ChicagoBoss compared to Nitrogen? Haven't experienced Nitrogen long enough to make a good objective comparison. Just that there was something about Nitrogen Records, that seemed -- verbose and intimidating. Also, found it somewhat difficult to imagine how that syntax maps to the generated HTML. On the contrary, I found ErlyDTL very simple, once I saw the CB video-tutorials on youtube. Also the MVC constructs were a bit easier for me to follow in case of ChicagoBoss. The admin-interface was dead-simple. Finally, I found the tutorial for ChicagoBoss to be short, to-the-point, very simple/lucid and achieved something concrete I understood. The documentation get me functional quite quickly, and in fact, there wasn't very much to read. While it might take a lot more to become an expert, I felt that I could get up-n-running (from zero) with CB much sooner. > On Aug 2, 2011 11:31 PM, "Icarus Alive" <[hidden email]> wrote: >> On Wed, Aug 3, 2011 at 3:54 AM, Benson Wong <[hidden email]> wrote: >>> Hi, >>> My background is a web developer (~15 years), done PHP for about 11 >>> years. >>> So I know it pretty well. >>> Just starting to learn Erlang. Done lots of javascript (jQuery, node.js, >>> etc). So a PHP developer, in the Erlang pool here :) >>> I think an imperative language like PHP would be a lot easier (and more >>> agile) to build the web app in than Erlang. I would choose erlang if I >>> need >>> long lived connections (web sockets, long-poll, etc). Frameworks like >>> Django >>> (Python)/Rails (ruby) would also make life easier. >>> If you want scalability/reliability/performance, add more PHP processes / >>> servers. >>> PHP is shared nothing, so it is easy to scale. Just add more. Using Nginx >>> + >>> PHP-FPM. Solves a lot of slow request issues. >>> Put them behind an HTTP load balancer, HAProxy is a very popular choice. >>> Performance is usually database bound than it is app server bound. >>> On Fri, Jul 29, 2011 at 6:16 AM, Icarus Alive <[hidden email]> >>> wrote: >>>> >>>> Would appreciate if my thread wasn't hijacked :-)... although gotta >>>> agree that our scenarios are quite similar. >>>> >>>> On Fri, Jul 29, 2011 at 6:31 PM, Banibrata Dutta >>>> <[hidden email]> wrote: >>>> > Thanks @Marc, for taking time to reply this this mail. >>>> > On Fri, Jul 29, 2011 at 5:38 PM, Marc Worrell <[hidden email]> wrote: >>>> >> >>>> >> It mostly depends on what kind of web development you want to do. >>>> >> >>>> >> Is it more of a mobile application than a publishing web site? >>>> >>>> In my case, content characteristics are: >>>> 1. Always originating from single source >>>> 2. Always consumed by single user >>>> 3. Content has short lifetime - once consumed, will be archived >>>> 4. Each user has several hundreds of content display to her in "newest >>>> first" fashion >>>> >>>> >> >>>> >> Does is have specific authentication schemes? >>>> >> Etc. Etc. >>>> > >>>> > Honestly, haven't given this enough thought. One of the requirements >>>> > is >>>> > to >>>> > ensure privacy of user data, and that of the interaction. I'm yet to >>>> > figure >>>> > out the "how" part. >>> >>> Security/Privacy, this is more of an operation and application design >>> than >>> it is a Erlang/OTP vs PHP/Ruby/Python+framework. >>> Generally you'd want to: >>> * firewalls, no SSH access, web servers are only web servers, ie: only >>> port >>> 443 open. >>> * use cookie based sessions. Don't use HTTP basic authentication. >>> * Server has controls all access based on the cookie. >>> * Use HTTPS. Always. >>> * There are lots of other techniques: >>> -- use bcrypt for passwords >>> -- sessions can be limited to one IP address at a time >>> -- sessions have short expire times (controlled on the server) >>> -- etc. >>> >>>> >>>> Well in my case it has to be some strong authentication. Storage, >>>> archival and access has to conform to HIPAA compliance. So we know we >>>> are dealing with EMR type content. >> >> Hi Benson, >> >> Really appreciate your descriptive & informative response, especially >> so for the part on security. >> >> My inclination towards Erlang stems from the fact that I was intending >> to do much of the backend in Erlang as well. The backend does lot of >> other things than just bridging between FE client request/responses >> and a DB, s.a. converting content format, managing archival policies, >> do some data analysis for reporting etc. Maybe some of that via ports. >> >> I wish I'd seen your mail few days back, because having tried both >> Nitrogen and Zotonic, which are I am sure excellent products, I think >> I've found peace in settling for ChicagoBoss. I found it lot easier to >> work with, as a beginner, maybe because the FP guts are almost hidden >> away from sight, and much of the developer/user coding is done in an >> imperative fashion. Also, I found it's documentation (although quite >> light) to be simple & just-enough to get me started and get me going. >> >> However, I might have to come back to PHP unless I am able to train my >> team on Erlang. Being a beginner, I find it hard to imagine being a >> good teacher / coach for rest of the team. >> >> Thanks again, everyone, for responding on this thread. >> erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
|
Yeah I never liked nitrogen records either. I don't know how others build sites, but at my company the client side steps are always:
photoshop fileĀ -> create html/css -> convert to templates and write javascript Using django templates makes complete sense when you're starting from an html file. It does not take that much work at all and requires very little programming knowledge. If you change anything, it's not difficult to put the changes in the template, because they are so similar. If we used nitrogen, it would take significantly more work and the person doing it, would need to learn something completely unnatural if he did not know erlang already. Sergej On Wed, Aug 3, 2011 at 8:40 PM, Icarus Alive <[hidden email]> wrote:
_______________________________________________ erlang-questions mailing list [hidden email] http://erlang.org/mailman/listinfo/erlang-questions |
| Powered by Nabble | Edit this page |
