Gotta go to sleep -- I'll answer tomorrow :) Yariv
On Dec 13, 2007 10:54 PM, maddiin <[EMAIL PROTECTED]> wrote: > > Hi, > > > A note on the blog: It probably makes more work right now to rewrite > > what I´ve put up than to start from scratch.^^ I will open a new topic > > asking some questions regarding problems I ran in soon. > > See the "blog": > http://code.google.com/p/erlyweblog/ > Please forgive us for the name, we know we are lame ducks, but this is > meant to be a temporary project, it will not resist as a standalone > project. > > > As noted in the disclaimer, we hope this becomes a blog made by the > > community and would be glad, if the advanced users step in and help > > create it. Beginners are welcome as well. :) > > > Maybe the documentation could be made around the blog, explaining > > things in general and then how this would work in the blog > > application. It would be awesome, if a new user would have a full > > working blog after finishing the documentation, ready to start off > > writing about how cool erlyweb is. Would be also great for comparison > > to other frameworks. > > It would be awesome if you folks like the idea and Yariv would take > over the ownership. > > Now my questions: > I´ll make a list of the problems i ran into as an Erlang/Erlyweb > beginner. > > 1. Website root: > I didn´t find out how to use a component as the frontpage (e.g. > localhost:8000/) rather than the index.html from app/www. > > 2. Structure of components: > Having all controllers/views/templates in one directory seemed odd to > me. The templates directory inside each component may be odd, too, but > having at least one directory per component "feels" better. So I want > to know what your usual way is. > > 3. Template inheritance: > Using the html_container_controller.erl/html_container_view.et as the > root-template, how do I reuse header, main-content, sidebar and footer > from other components? I only found out how to have a static sidebar > and I would like that to be dynamic, for example showing blogrolls > related to a category or leaving out latest_entries from an entry > detail page. > > I also have no idea how to set individual titles for each page...I > read the " <title>s and other non-component data" topic in this group > and the "erlyweb-tutorial-using-components-to-create-dynamic- > containers" post on yarivs blog, but that was more confusing than > helping, because the former is a discussion of advanced users and both > seemed to include future ideas and I am not sure what the status of > this is. > > 4. Using controllers and views correctly: > The only reference I found was this tutorial: > http://progexpr.blogspot.com/2006/12/erlyweb-blog-tutorial.html > Thats why I complained about the musician example earlier, it doesnt > explain much. > > If you have a look at my entry_details template > http://erlyweblog.googlecode.com/svn/trunk/src/components/entries/templates/entries_detail.et > you´ll see, that I do most of the logic in there rather than in the > controller. I guess if I wouldn´t be lacking of Erlang knowledge, this > may not be a problem, but I simply don´t know how to. > > 5. Naming Sql-tables: > I used plurals like categories, entries and so on for table names. > After setting up relations I had problems getting related entries for > a category doing this: > C1 = categories:find_id(1). > categories:entries(C1). > Instead I have to call categories:entrieses(C1). > If you have overlooked it, I mean putting "es" to the end of entries. > o_0 How do I get around this or should I just use singular for table > names? > > 6. Complex queries: > How would you retrieve a list of entries with their related category, > tags, user and comment count in one query? I mean the full datasets, > not only an id or a name. Do you fall back to raw-sql and if so, how > do you use that in template context? > > I guess I have way more questions I can´t remember right now, but I > will bother you again, don´t worry. :) > > If you had the same or similar problems, please drop a line, so that I > don´t feel alone with my ignorance. > > Thanks for taking your time reading this and maybe answering a > question. > > maddiin > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "erlyweb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en -~----------~----~----~----~------~----~------~--~---
