Re: Good code or good templates (Maypole)
by jhourcle (Prior) on Mar 25, 2005 at 13:26 UTC
|
You're assuming that programmers are one dimensional. There are quite a few of us who didn't come to programming directly, but through other directions. I personally got into Perl after the only programmer in our web development group (well, we named our group 'Custom Research And Programming', but management didn't like the acronym) left, and I had to maintain and develop his code.
I got into the group because I had graphics experience. I've been writing HTML for a decade now. I'm guessing that other programmers could write nice looking templates, as well.
I'd personally rather have something that's easy to develop to and maintain. I couldn't care less about the shiny packaging -- I'd rather have something simple and elegent, which I know I can easily write myself.
I will agree that there are those people that aren't so good at the design aspects, just as there are good designers that can't code. But there are folks who can do more than just one thing. I may not be the best programmer, or the best designer, but I can get by in both aspects.
I will agree that the reason to use templating systems is to save time -- and that some people will derive more savings than others in not having to develop their own look and feel. But likewise, there are those people who would gain more from having a well written template engine, especially if it's easy to learn the syntax so they can adapt their existing design.
Similar story : years ago, before MMORPGs, a group of my friends decided that there were two main types of people who write for MUDs -- the ones who like doing programming, and the ones who like being creative. We starting building templating systems and a library of reusable objects/monsters/etc, but well, we never got it finished the point to turn it over to the creative folks. (mostly my fault, for deciding to re-write the combat system). We went with a similar premise to yours, but we had two general categories of users, not just one. (and we accepted the possibility that people might fit into both, and would be able to add stuff outside of the virtualization engine.
| [reply] |
Re: Maypole: Good code or good templates (Maypole)
by samizdat (Vicar) on Mar 25, 2005 at 20:00 UTC
|
I think the distinction to split your decision upon is how much time it takes to learn vs. how much usage will it get. Maypole & Struts both have rapid database interface subsystems and they both have template extensibility.
In my case, I've split infinity on both sides. In my business incarnation, my programmers are rewriting our main cash cow in Struts, and I think that's a viable solution because we are going to be replicating it and licensing it. In my SNL incarnation, I'm satisfied with Embperl because it's flexible enough and builds on my experience in Perl+HTML+CSS+MySQL. Embperl is simple enough that I can see what it takes to do something new, such as frames, in minutes, as opposed to having to wade through half a dozen manuals covering varying 'little language' syntax. I'm very productive quickly, which is important given that I have varying project requirements, many of which don't include web at all.
To get to your thesis directly, zby, I find the combination of HTML and CSS to be simple enough that I can make things very workable with only my friend O'Reilly near by. Of course, I have done dozens of hand coded websites and my web designer is still worlds better than I am. He's another advantage I have that you probably don't. ;-D | [reply] |
Maypole vs. Catalyst?
by davebaker (Pilgrim) on Mar 25, 2005 at 16:22 UTC
|
In your opinion, how does Catalyst stack up against Maypole? | [reply] |
|
|
| [reply] |
Re: Good code or good templates (Maypole)
by cog (Parson) on Mar 25, 2005 at 17:46 UTC
|
and disadvantages (quite many disadvantages to be sincere)
Could you tell us more? This interests me the most, because I'm considering using Maypole for a couple of things. | [reply] |
|
|
| [reply] |
|
|
Maypole is designed to have some CRUD (CReate, Update, Delete) database web app very quick. And it is good at that. If your app fits that model well than you have saved lot's of time if not you will have to spend a lot of time to add the missing functionality. I thought that CRUD could quite flexible if you were allowed to use database views but first views were not supported by the Maypole libraries (I eventually got it working with some patches with Postgresql), second it still is not that flexible as I thought.
And the last point the paging is not done right - at last in search, I remember, all the data is fetched first from the database and only then the items for the current page are filtered. So if you have in your database hundreds of thousends of records you'll have all of them in the memory in one huge array only to filter then a few of them.
| [reply] |
|
|
I remember, all the data is fetched first from the database and only then the items for the current page are filtered. So if you have in your database hundreds of thousends of records you'll have all of them in the memory in one huge array only to filter then a few of them.
This is a problem with Class::DBI, not Maypole. Class::DBI::Iterator fetches all the data and stores it as an array, as opposed to wrapping the underlying DBI statement handle.
| [reply] |
Re: Maypole: Good code or good templates (Maypole)
by samtregar (Abbot) on Mar 25, 2005 at 18:12 UTC
|
Have you looked at any PHP frameworks? They usually look much better than anything written in Perl. Of course, the code will permanently scar your psyche, but I guess you don't care about that!
-sam
| [reply] |
Re: Maypole: Good code or good templates (Maypole)
by NateTut (Deacon) on Mar 25, 2005 at 21:10 UTC
|
Why not both good code and good templates? Is it like "Do you want better, faster or cheaper? Pick two."? | [reply] |
Re: Maypole: Good code or good templates (Maypole)
by Booger (Pilgrim) on Mar 30, 2005 at 21:40 UTC
|
As the author emeritus of Maypole (Simon Cozens) has said one more than one occasion the templates that are packaged with Maypole are meant for example purposes only and you're not actually supposed to use them (I didn't).
I've been using Maypole for some time now and settled on it after looking at several other web frameworks. Maypole won out for several reasons:
It doesn't try to be everything to everyone. I have built several web applications of varying complexity with different technologies (Siebel, LAM/Perl/PHP, etc.) and have discovered that framework-enabled functionality often gets in the way of properly solving the problems at hand. No number framework developers can forsee and appropriately address all of the problems you're likely to encounter when developing large scale web applications and thus their implementations are often likely to be inaccurate or misused at best. Small frameworks are often best for building small-to-medium sized applications and should seek to provide a basis for implementing a solution but not seek to be the solution.
Secondly, the usefulness of a framework is inversely proportional the level of abstraction. Abstraction is nice but the harder you try to be everything to everyone (see above) the quicker you'll discover that your framework accomplishes little particularly well, with the exception of providing more avenues for half-assed extensions. The phrase "Jack of all trades, master of none" applies particularly well here. Yes, there are several components of Maypole than can be replaced but it works best as it is (i.e. before Simon gave control of it to the hordes).
It is my view that although nicely formatted and well thought out templates are nice, they cannot replace poorly thought-out design. As the templates provided for Maypole are meant to be throw-away examples, I think your thesis as it applies to Maypole is moot and probably for other frameworks as well (although I'm willing to admit that I'm wrong about this assumption). After all, what good is your framework if you have to re-write half of it to suit your needs.
| [reply] |
|
|
The fact that Simon has to constantly remind people to not use the templates is only supporting my point that templates are important for programmers. And it is not the first time when the author did not envisage how people will use his own creation.
| [reply] |