> First of all, congratulations for weblocks. I've spent most of the > last 10 years building server-side applications in Java. Once in a > while, I read Paul Graham's essays and books, and got interested in > Lisp. I started with the most available environment to me: emacs lisp. > I like the ideas proposed by weblocks. For me, it's a major step > forward. Probably I'm pretty tired of MVC frameworks, because such > pattern is not understood as an aid to better structure your > application, but the goal itself. That's why I've seen people trying > to convince themselves afterwards what they built was MVC-like.
I come from a similar background, doing some ruby on rails and C# stuff, and using Lisp and weblocks is really so much more liberating. > I took a look at the tutorials and all online resources I've been able > to find. My first question is: Is there any kind of javadoc-like > approach for common-lisp? I'd like to know about what each of the pre- > existing widgets do and how to use them. I installed a tool called > 'atdoc' but I haven't invested time in it yet. I would heavily advise setting up Emacs with Slime (http://common- lisp.net/project/slime/). Bill Clementson has a few good posts about Slime and Emacs setups (http://www.google.com/search?q=slime+site %3Abc.tech.coop%2Fblog has most of them). Once you do that, you can easily pull up the documentation for any symbol in any currently loaded lisp package by just moving your cursor to the symbol name and typing C-c C-d C-d (control-c control-d control-d). You can do a lot of other things with Slime as well. In addition to this, there is documentation for Weblocks on the Weblocks TRAC page at http://common-lisp.net/project/cl-weblocks/docs/ (this is just generated from the documentation in the Weblocks code - I am not sure how up to date it is). You can also generate this documentation yourself from your copy of Weblocks, though I forget the command to do it and the Leslie's Weblocks website seems to be down. Also, for general Lisp refernce, in addition to the Lisp documentation that is just in the code, I often use the index for Common Lisp the Language, Second Edition by Guy Steele at http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/#O, which explains some things more than just the Lisp docs do. There is also of Peter Siebel's Practical Common Lisp at http://www.gigamonkeys.com/book/ (though this isn't really a javadoc-like referenc, of course). > Besides that, I started my application using simple-blog as template. > I'm a little embarrassed to ask this, but I don't know where the list > of users and posts are stored. I mean, the following code > > (defun make-users-gridedit () > (make-instance 'gridedit > :name 'users-grid > :data-class 'user > :view 'user-table-view > :widget-prefix-fn (lambda (&rest args) > (declare (ignore args)) > (with-html (:h1 "Users"))) > :item-data-view 'user-data-view > :item-form-view 'user-form-view)) > > prints the already existing users, but I don't know where such > information is stored. My best guess is that the :data-class 'user is > tied somehow to the persistence layer, and just reads the entries in > the associated table/store. Is it also stored in hunchentoot:*session* > somewhere? That's pretty much right - the :data-class passed into the gridedit refers to a model data class, which can be tied to a backend using CLSQL or any of a number of other interfaces. It just reads these entries from your table or flat file or other persistence mechanism and then a view (in this case 'user-table-view) does the mapping of fields from the model class to the widget, which displays them (this is a somewhat simplified explanation though). > Another important question to me: Are there any built-in log > mechanism? where and how do I write and read the logs? I started my > application with :debug t and still I see no difference. I will let someone else answer this - I haven't done anything with logging yet. > One more thing. I hope I'm not declaring myself so stupid you've just > stopped reading :). When I try to stop my application, or reset the > sessions, I get an error saying hunchentoot:*acceptor* is not bound. > I'm using the latest version of weblocks. I let it go on and seems to > work, though. This is a known bug currently in weblocks-dev that I think Leslie is working on. In the meantime, to just get a feel for weblocks, I would suggest using weblocks-stable. If you are using weblocks-stable and getting an error like this, you are probably using hunchentoot 1.0 when you should be using hunchentoot 0.15.7 Hope that helps! Saikat On Mar 11, 1:52 am, Jose San Leandro <[email protected]> wrote: > Hi all, > > First of all, congratulations for weblocks. I've spent most of the > last 10 years building server-side applications in Java. Once in a > while, I read Paul Graham's essays and books, and got interested in > Lisp. I started with the most available environment to me: emacs lisp. > I like the ideas proposed by weblocks. For me, it's a major step > forward. Probably I'm pretty tired of MVC frameworks, because such > pattern is not understood as an aid to better structure your > application, but the goal itself. That's why I've seen people trying > to convince themselves afterwards what they built was MVC-like. > > Sorry for the preamble. I've just started to work with weblocks. I had > some problems installing sbcl and such, but I'm confident that would > become clearer to me once I have more experience developing in Lisp in > general. > > I took a look at the tutorials and all online resources I've been able > to find. My first question is: Is there any kind of javadoc-like > approach for common-lisp? I'd like to know about what each of the pre- > existing widgets do and how to use them. I installed a tool called > 'atdoc' but I haven't invested time in it yet. > > Besides that, I started my application using simple-blog as template. > I'm a little embarrassed to ask this, but I don't know where the list > of users and posts are stored. I mean, the following code > > (defun make-users-gridedit () > (make-instance 'gridedit > :name 'users-grid > :data-class 'user > :view 'user-table-view > :widget-prefix-fn (lambda (&rest args) > (declare (ignore args)) > (with-html (:h1 "Users"))) > :item-data-view 'user-data-view > :item-form-view 'user-form-view)) > > prints the already existing users, but I don't know where such > information is stored. My best guess is that the :data-class 'user is > tied somehow to the persistence layer, and just reads the entries in > the associated table/store. Is it also stored in hunchentoot:*session* > somewhere? > > Another important question to me: Are there any built-in log > mechanism? where and how do I write and read the logs? I started my > application with :debug t and still I see no difference. > > One more thing. I hope I'm not declaring myself so stupid you've just > stopped reading :). When I try to stop my application, or reset the > sessions, I get an error saying hunchentoot:*acceptor* is not bound. > I'm using the latest version of weblocks. I let it go on and seems to > work, though. > > Thank you very much in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "weblocks" 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/weblocks?hl=en -~----------~----~----~----~------~----~------~--~---
