Hi all again.. I've gotten my feet wet a bit more with both SmallTalk and a bit more with Seaside and would like to get started on a project I've currently got written in PHP with MySQL (as some of you may recall). I've since installed PostgreSQL on my server so I'm set in that regard and have VisualWorks running with Glorp.. I've started modelling some of my tables but didn't want to get too far before I started getting something going more on the Seaside end of things. I'd ideally like to start with a basic login mechanism and after searching the archives (see lots of references to issues with the basic http auth stuff), I'll probably stick with what I know best -- a form based login scheme tied to a database table of active users where the users have a stored MD5 hash for a password. Now, I think the thing that has me stumped is just how to get started on this adventure. So far with my Glorp stuff, I've got my "Users" table defined and am good there, but am just not sure what sort of layout I need on the Seaside end of things. Today I was reading up on Mewa which sounds really good as it sounds like a nice extension to Seaside which would greatly reduce some of the initial crud to be done for a traditional data driven site. In my case, my site needs to login a user after which they have a menu of things to do such as update contact info, generate some html reports (from database data), perhaps do online ordering (saving that one for last), etc. The problem I'm mostly having is that with my old PHP code base, I had an MVC based system where all of the logic was separated out by functionality (for the most part) -- some areas dealt with logins, others reports, others contact updates, etc. With this new Seaside setup+Glorp+Mewa, I'm not sure exactly how to factor things out. Do I want a different class for each task to be done (update contact info, order, reports, etc) or something else. I'll have to admit that even with the MVC approach I was using with my existing PHP site, I wasn't really thinking in any OO sort of manner -- I still had a functional sort of hat on my head. This might be part of my problem. Anyway, I hope that some of this makes sense and someone can kind of steer me in the right direction here. I know that once I get going, I'll be fine, but that first step is the big one and is harder if you've got minimal Smalltalk experience under your (or my) belt. Many TIA! Also-- if you want to reply directly I'm fine with sparing the bandwidth of others if this isn't completely on-topic here. -- Rick (sorry for the long post) _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Rick Flower wrote:
Also-- if you want to reply directly I'm fine with sparing the bandwidth of others if this isn't completely on-topic here.I, for one, would like to see the replies. _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Me too!
Discussions like this are always welcome! Cheers, Pablo.- On 2/8/06, Brad Fuller <[hidden email]> wrote: > Rick Flower wrote: > Also-- if you want to reply directly I'm fine with sparing the bandwidth of > others if this isn't completely on-topic here. > I, for one, would like to see the replies. > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Rick Flower
Rick Flower wrote:
> > Hi all again.. I've gotten my feet wet a bit more with both SmallTalk > and a bit more with Seaside and would like to get started on a project > I've currently got written in PHP with MySQL (as some of you may > recall). I wish I could ship you my PetStore demo, but I've not yet disentangled it from my application. FWIW, here's a few suggestions, based on your newness to Smalltalk. - Don't start with user login. I've stabbed at it about three times and I'm still not satisfied with the result. Currently, I use the Postgres username/password, not a separate table. So just hard code a user for now. - Skip Glorp and Mewa for now. Just write SQL directly, and walk the result sets to either create object instances or pump out HTML. In the case of simple reports (i.e. no post-query processing needed), mapping the SQL result to HTML would be far easier to understand than mapping the SQL result to objects (via Glorp), then adding MEWA descriptors to use the MEWA table display. - When you get to online ordering, you might start thinking about Glorp and MEWA. But you might find that what you have works just fine. - To handle update of contact info, just create a contact object corresponding to the form you want to show. Generate an UPDATE SQL stmt from that contact object (the form processing should stuff the values for you). Again, you might consider adding MEWA (and maybe Glorp) at this point as well. You mentioned VW, are you using the NC (non-commercial) version? It sounds like your app. is commercial use. What is your timeline, do you have to have your app ported by a certain date? What is the range of functionality, is there more than what you've described? -- Yanni Chiu _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Yanni Chiu wrote:
> - Don't start with user login. I've stabbed at it about three times > and I'm still not satisfied with the result. Currently, I use the > Postgres username/password, not a separate table. So just hard code > a user for now. I think with what I've already got going with Glorp, I can do easy lookups for users in the database, so I guess I'm not convinced of the merits of backing out (or bypassing) that code yet, but I will keep that in mind if I find myself spinning in circles > - Skip Glorp and Mewa for now. Just write SQL directly, and walk > the result sets to either create object instances or pump out HTML. > In the case of simple reports (i.e. no post-query processing needed), > mapping the SQL result to HTML would be far easier to understand > than mapping the SQL result to objects (via Glorp), then adding > MEWA descriptors to use the MEWA table display. Ok.. Point taken -- I guess I can see where figuring out how to plug all of this stuff together might be a bit overwhelming for a Smalltalk newbie like myself. > - When you get to online ordering, you might start thinking about > Glorp and MEWA. But you might find that what you have works just fine. Yeah, this is one of the harder areas to deal with which requires a bit more careful thought than other areas of the application.. In my case, I think I can steer away from a shopping cart model that so many web-apps use.. I really only need a single page with a big table of items that people can update quantities for and hit a button at the bottom of the page.. However, handling Paypal transactions is another story and I'll likely need to write code from scratch for that (and is a bit OT for this discussion).. > - To handle update of contact info, just create a contact object > corresponding to the form you want to show. Generate an UPDATE SQL stmt > from that contact object (the form processing should stuff the values > for you). Again, you might consider adding MEWA (and maybe Glorp) > at this point as well. Could this not be a method of a "User" object -- perhaps one method to generate the update HTML and another one to update the database object? I guess you've somewhat got my OO brain in gear now.. Any other options/opinions? > You mentioned VW, are you using the NC (non-commercial) version? > It sounds like your app. is commercial use. What is your timeline, > do you have to have your app ported by a certain date? What is the > range of functionality, is there more than what you've described? Yes, I'm using the NC version for now which I gather is fine after I spoke with one of their license people -- it's really only as issue once my coding is done and ready to deploy which I'm no where near close to yet. As for my timeline, I'd love to move all of my existing functionality over to Seaside/Smalltalk soon which would mean that I don't have to support my two other PHP sites anymore (an old "v1" prototype site and a v2 "user" site). As for my range of functionality, there are admin features that the average user won't have access to (or see for that matter) such as adding users, locking out users, generating admin reports, entering manual paper orders, handling back-orders, etc. All of this should be able to pass a CSS validation and be XHTML 1.0 Transitional as a minimum.. I spent quite a bit of time generating valid code and from what I've seen, Seaside does a nice job in this area as well (some frameworks that generate HTML on the fly don't generate valid XHTML). Anyway, hopefully someone will chime in with some more comments on this thread.. :-) -- Rick _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Rick Flower
Hi
> > Hi all again.. I've gotten my feet wet a bit more with both SmallTalk > and a bit more with Seaside and would like to get started on a project > I've currently got written in PHP with MySQL (as some of you may > recall). I've since installed PostgreSQL...I've started modelling > some of my tables ... Are you obliged to use SQL Tables (existing tables ? )? because I find that to learn, it's better not to take care of the persistance... especially in relationnal database... 1 - easiest way: you directly store your objects in the smalltalk image 2 - natural way: you use an object database 3 - twisted way: you map your objects in a relational DB :) ... I'm not actually a specialist and I don't have a good understanding on all "notions" but I don't really see why everybody keep on using RDB (performance ?, well-known products ?, legacy system...). I've once read that performance were better in OODB but the transactional fonctionalities were limited (limited number of concurent access)... If someone can help me to understand that (this may deserve a post?)... > > Today I was reading up on Mewa which sounds really good as it sounds > like a nice extension to Seaside Magritte has the same intend and is probably more interesting in your case. To be quick, it consists in associating meta-descriptions to any objects (seaside component association to edit and view it, persistance mechanism and any other properties you want to associate...) Moreover someone (Damien) extended them to directly access a MySQL DB... The problem is that I think it's only developped for squeak for now (?)... > In my case, my site needs to login a user after which they have a menu > of things to do such as update contact info, generate some html > reports (from database data), perhaps do online ordering (saving that > one for last), etc. The problem I'm mostly having is that with my old > PHP code base, I had an MVC based system where all of the logic was > separated out by functionality (for the most part) -- some areas dealt > with logins, others reports, others contact updates, etc. With this > new Seaside setup+Glorp+Mewa, I'm not sure exactly how to factor > things out. Do I want a different class for each task to be done > (update contact info, order, reports, etc) or something else. > seaside and programming in smalltalk... http://www.lukas-renggli.ch/seaside/tutorial/ I found this one good because it helps thinking OO and, of course, using seaside (the last exercise is a small application to manage a theater)... Cédrick _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On 2/8/06, Cédrick Béler <[hidden email]> wrote:
> Hi > > > > > Hi all again.. I've gotten my feet wet a bit more with both SmallTalk > > and a bit more with Seaside and would like to get started on a project > > I've currently got written in PHP with MySQL (as some of you may > > recall). I've since installed PostgreSQL...I've started modelling > > some of my tables ... > > Are you obliged to use SQL Tables (existing tables ? )? > because I find that to learn, it's better not to take care of the > persistance... especially in relationnal database... > 1 - easiest way: you directly store your objects in the smalltalk image > 2 - natural way: you use an object database > 3 - twisted way: you map your objects in a relational DB :) ... > > I'm not actually a specialist and I don't have a good understanding on > all "notions" but I don't really see why everybody keep on using RDB > (performance ?, well-known products ?, legacy system...). I've once read > that performance were better in OODB but the transactional > fonctionalities were limited (limited number of concurent access)... If > someone can help me to understand that (this may deserve a post?)... > > > > > Today I was reading up on Mewa which sounds really good as it sounds > > like a nice extension to Seaside > > Magritte has the same intend and is probably more interesting in your > case. To be quick, it consists in associating meta-descriptions to any > objects (seaside component association to edit and view it, persistance > mechanism and any other properties you want to associate...) Moreover > someone (Damien) extended them to directly access a MySQL DB... > The problem is that I think it's only developped for squeak for now (?)... Not to mention that I send a question to the Magritte list last week and I haven't received any reply yet... seems to be frozen. Moreover, the lack of documentation in the source code doesn't help either. Any kind of support is very important when you want to start using some product... So I switched to Mewa wich I found easier to use (at least for my needs). Cheers, Pablo.- > > > In my case, my site needs to login a user after which they have a menu > > of things to do such as update contact info, generate some html > > reports (from database data), perhaps do online ordering (saving that > > one for last), etc. The problem I'm mostly having is that with my old > > PHP code base, I had an MVC based system where all of the logic was > > separated out by functionality (for the most part) -- some areas dealt > > with logins, others reports, others contact updates, etc. With this > > new Seaside setup+Glorp+Mewa, I'm not sure exactly how to factor > > things out. Do I want a different class for each task to be done > > (update contact info, order, reports, etc) or something else. > > > I think the better will be to do a seaside tutorial to get used to > seaside and programming in smalltalk... > http://www.lukas-renggli.ch/seaside/tutorial/ I found this one good > because it helps thinking OO and, of course, using seaside (the last > exercise is a small application to manage a theater)... > > > Cédrick > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Rick Flower
Rick Flower wrote:
>> - To handle update of contact info, just create a contact object >> corresponding to the form you want to show. Generate an UPDATE SQL stmt >> from that contact object (the form processing should stuff the values >> for you). Again, you might consider adding MEWA (and maybe Glorp) >> at this point as well. > > Could this not be a method of a "User" object -- perhaps one method to > generate > the update HTML and another one to update the database object? I guess > you've somewhat got my OO brain in gear now.. Any other options/opinions? Create "User" as a POSTO (Plain-old-Smalltalk-object - my head is still full of acronyms because I was at a Java/SpringFramework presentation last night; the presenter talked on and on until the security guard had the organizer usher us out). Add getters and setters to the User class. Then you can use #textInputOn:of: and similar methods to generate the HTML. That's part of what Seaside gets you. For the price of learning MEWA and writing its descriptors, you won't have to manually code all the #textInputOn:of: stuff - that's part of what MEWA would get you. Finally, for the price of learning GLORP and writing its descriptors, you won't have to manually code any CREATE/SELECT/UPDATE/DELETE sql - that's part of what GLORP would get you. If you want, you can use an abstract superclass for all your model objects such as User. Here you could do the meta operations such as generating the HTML and SQL. At a certain point, you might decide that this is unnecessary because it was much more straitforward to put specific code in each of the few domain classes. Or you might decide that its pointless to reinvent a MEWA and/or GLORP framework, and decide to invest energy into using one or both. Or you might decide to continue to invest in your own frameworks. -- Yanni Chiu _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Pablo Iaria
> Not to mention that I send a question to the Magritte list last week
> and I haven't received any reply yet... seems to be frozen. Moreover, > the lack of documentation in the source code doesn't help either. Sorry, but no mail from you arrived in the mailing-list. Unfortunately I cannot reply on mails I do not receive. I know that there is a lack of documentation, I am currently working on it (mostly at night). In the meantime I suggest the following: * The most important documentation is still the source-code itself, most important method and classes are well documented. * There is a yet unpublished paper on Pier that includes a section about the basics of Magritte, please drop me a mail if you would like to read it. * There are slides of a complete Magritte tutorial available at http://www.lukas-renggli.ch/seaside/annecy/Magritte.pdf (5.1 MB) including some exercises http://www.lukas-renggli.ch/seaside/annecy/exercises.pdf. Damien Cassou even provided the solutions to the exercises, just drop me a mail if you would like to receive them. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Lukas Renggli wrote:
> I know that there is a lack of documentation, I am currently working > on it (mostly at night). In the meantime I suggest the following: > > * The most important documentation is still the source-code itself, > most important method and classes are well documented. > > * There is a yet unpublished paper on Pier that includes a section > about the basics of Magritte, please drop me a mail if you would like > to read it. > > * There are slides of a complete Magritte tutorial available at > http://www.lukas-renggli.ch/seaside/annecy/Magritte.pdf (5.1 MB) > including some exercises > http://www.lukas-renggli.ch/seaside/annecy/exercises.pdf. Damien > Cassou even provided the solutions to the exercises, just drop me a > mail if you would like to receive them. > much other than some references to it from Avi on this list some time ago (circa ~2003?) and a single PDF that talked about it a little but didn't give me any warm fuzzies on what it was capable of doing, etc.. I'll put those links in my rapidly growing collection of Smalltalk weblinks I'm keeping at home on my personal wiki.. Thanks again all of you for your insight.. -- Rick _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Pablo Iaria
>Not to mention that I send a question to the Magritte list last week >and I haven't received any reply yet... seems to be frozen. Moreover, >the lack of documentation in the source code doesn't help either. > > I think the list is down too.. reported to Stephane two days ago.... I ve seen your post on the web site http://impara.de/pipermail/smallwiki/ but I dont recceive any message since the 13th of january... and I think it's the same for everybody hope it will be fixed soon ;) Magritte was in development for the last months but I think it's stabilized now... and so, ready to use :) and Lukas is doing a kind of documentation I think... /*Cédrick ps: a tutorial for Magritte, exellent I ll have a look ;) */ *//**//* _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Lukas Renggli
> >* There are slides of a complete Magritte tutorial available at >http://www.lukas-renggli.ch/seaside/annecy/Magritte.pdf (5.1 MB) >including some exercises > > just exellent now there is a doc for Magritte ;) Thanks Lukas Cédrick _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by cbeler
> I think the list is down too.. reported to Stephane two days ago....
> I ve seen your post on the web site http://impara.de/pipermail/smallwiki/ > but I dont recceive any message since the 13th of january... and I think > it's the same for everybody hope it will be fixed soon ;) This is strange. I am sorry, I cannot do much about it, since I am not the owner of the list. Stef is certainly busy, so I contacted the system-administrator of the university, maybe he can help. > Magritte was in development for the last months but I think it's > stabilized now... and so, ready to use :) and Lukas is doing a kind of > documentation I think... Yes, there are currently not many changes but bug-fixes to be expected. Later on this year I will go for a next version, Magritte 1.1, that takes advantage of the new Pragmas in Squeak (that are compatible with VisualWorks) and will allow to separate view and model even further. > just exellent > now there is a doc for Magritte ;) Thanks Lukas Thanks ;-) Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Lukas Renggli
Hi Lukas!
I'm sending the mail to the list again. Thanks for the docs you sent us. I'll check them as soon as I can. Cheers! Pablo.- On 2/8/06, Lukas Renggli <[hidden email]> wrote: > > Not to mention that I send a question to the Magritte list last week > > and I haven't received any reply yet... seems to be frozen. Moreover, > > the lack of documentation in the source code doesn't help either. > > Sorry, but no mail from you arrived in the mailing-list. Unfortunately > I cannot reply on mails I do not receive. > > I know that there is a lack of documentation, I am currently working > on it (mostly at night). In the meantime I suggest the following: > > * The most important documentation is still the source-code itself, > most important method and classes are well documented. > > * There is a yet unpublished paper on Pier that includes a section > about the basics of Magritte, please drop me a mail if you would like > to read it. > > * There are slides of a complete Magritte tutorial available at > http://www.lukas-renggli.ch/seaside/annecy/Magritte.pdf (5.1 MB) > including some exercises > http://www.lukas-renggli.ch/seaside/annecy/exercises.pdf. Damien > Cassou even provided the solutions to the exercises, just drop me a > mail if you would like to receive them. > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Lukas Renggli
> * The most important documentation is still the source-code itself,
> most important method and classes are well documented. > > * There is a yet unpublished paper on Pier that includes a section > about the basics of Magritte, please drop me a mail if you would like > to read it. > > * There are slides of a complete Magritte tutorial available at > http://www.lukas-renggli.ch/seaside/annecy/Magritte.pdf (5.1 MB) > including some exercises > http://www.lukas-renggli.ch/seaside/annecy/exercises.pdf. Damien > Cassou even provided the solutions to the exercises, just drop me a > mail if you would like to receive them. Should I remind you that there is still a website with tutorials and a Design Overview Documentation ? http://smallwiki.unibe.ch/smallwiki/pier All this documents are Pier oriented, but have lots of information to help you start with magritte too. -- Damien Cassou CSS3 : "On passe au HSL, plus intuitif et moins orienté CRT que le RGB. Il y a du HSLA". Et en plus, ça veut dire quelque chose (au moins pour l'auteur) ! _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by cbeler
> Magritte was in development for the last months but I think it's
> stabilized now... and so, ready to use :) and Lukas is doing a kind of > documentation I think... Yes, I am writing my master thesis ;-) Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |