[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] Is Quanta the right tool for me?
From:       Thibaut Cousin <cousin () kde ! org>
Date:       2006-07-20 0:06:47
Message-ID: 200607200206.51559.cousin () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Le jeudi 20 juillet 2006 01:22, Eric Laffoon a écrit :
> All I use it for (for years now) is for dynamic PHP and database use. ;-) I
> would say for PHP that Quanta is a contestant for the top tool anywhere at
> any price.

  Thanks for also taking time to answer.
  To make a long story short (because other members of the list heard the 
story once or twice already), my goal is mostly to learn the infernal duo, 
PHP/MySQL. My site is a personal site, so nobody is going to come to me 
crying if it's not ready on time, or temporarily broken.
  So I have no "external" constraint. And I always have the old version of the 
site, in plain CSS/XHTML, to fall back to.

> First of all content to a database is one thing, but it's hardly the entire
> site. If you're doing a data driven site as much as 80% will never be seen
> by the user. There is no problem storing content in the database, but there
> are a lot of ways to go about it and a lot of questions to ask. For
> instance... if all the PHP is going in the database how easy is it to debug
> it, update it or adjust features? In fact it's a nightmare precisely
> because content should only be HTML and storing PHP in a database is, if
> you'll pardon my saying, asking for loads of troubles.

  I don't intend to throw all my PHP functions in the database. The test site 
I'm playing with at the moment, and which should represent the real site 
later, has the following:

- A functions.php file, containing my home-made PHP functions.
- A main file index.php, acting like a template containing PHP calls to the 
database. Those calls query the database for contents, in order to build the 
final HTML page. All pages have URL like "index.php?id_page=8".
- A MySQL database, containing only some HTML code (the "content").

  Unless I missed something again, I don't think I made the mistake you and 
some others pointed out: putting some PHP in the database. I can understand 
why it would be a nightmare to debug...
  Even if I did *not* make the mistake, I admit that I had never thought of 
that. I'll be extra-careful about where I store my PHP code in the future. At 
the moment everything is new and shiny, I may be carried away and go too far. 
So thanks. :-)

> Have a look at http://kittyhooch.com. I have data in the database that I
> access only actually during the order process, because frankly I didn't
> have that much diverse data. However the product section manages lots of
> little PHP tricks where it can display all products, groups of products or
> a popup window with single product information. Of course this may be a
> different application and I'm actually moving what was in PHP classes into
> a database because my data source is becoming more fluid. That said, I have
> structures I in files I load data into like headings, prices, main content.

  Your site is very nice to browse and use. But its design is probably quite 
over my head at the moment. I'll stick to something simpler for now.
  Oh, and say hello to the cats for me. ;-) I'm moving to a house next week 
(my first), so I'm thinking seriously about having cats again...

> Now a general news site would be different in application. Regardless you
> have two tasks for this design. One is to determine your data structure,
> and of course databases are more rigid, where as XML allows relaxed
> structures, the other is to abstract your content and layout. In theory you
> need the following in content...
> * links
> * bold and italic
> * paragraphs or line breaks
> * images
> So the reality is that the requirements for your content are light, where
> as you may be using PHP classes for data management and more for your
> actual site.

  Honestly, I prefer MySQL over XML, but the only reason is that I want to 
learn MySQL. Obviously I need to think hard about the database structure, 
that's why I'm playing with a test site at the moment.

> Now as to managing the content... Another option is to save files to a
> content directory with indexed file names and story your file name in the
> database. This also makes it easier to do things like including elements in
> PHP strings to render to named places in your page template.

  I hadn't thought of this possibility... I think that, at first, I'll go for 
content stored in the database, as an exercise. But I'll remember this other 
possibility if, later, I find my choice to be awkward.

> As I mentioned recently on
> this list Michal Rudolf is working on a database plugin for Kommander and I
> have created an editing dialog. We hope to release in in the coming weeks
> after tweaking and testing. This will make it possible to have your file
> content be inserted into your database directly. Please keep in mind this
> leaves testing issues! You will want to develop a local/remote test and
> then be able to load from a file locally... which is why saving content in
> indexed files is attractive.

  That's good news! Earlier this afternoon, on the list, we had the beginning 
of a talk about developing a tool like that. So I'll be eagerly waiting for 
your plugin and I'll be happy to test it. :-)

> In any event the bottom line is that Quanta and Kommander remain the best
> tools for the job with PHP/Mysql and also if you choose for instance to use
> PHP5/XML. However if you are jumping into something new I'd run some tests
> on a small scale first. ;-) Live and learn. Also remember the help you get
> here and that changing to a less capable tool while changing everything
> else is not going to help the stress of dealing with change. ;-)

  You're very right about that. Tonight I'm working on my test site, without 
MySQL calls for the moment, so everything is in files. I have 13 files, 
scripts and stylesheets simultaneously opened, not to mention a shell for 
mysql commands and a Konqueror window for preview... It'd be rather 
unpleasant without Quanta at this point and I'd like to keep using it when I 
have to use the database.
  So you and others today answered my first question: I don't have to consider 
looking for another development tool. I can survive until you release your 
plugin. I have enough work with my CSS, and the theoretical design of the 
database, to keep busy.

  Again, I'd like to say how nice all those answers were today. I came with 
some unclear questions, was a bit overwhelmed by the precise questions I got 
in return, and then pleased with the constructive discussion that ensued.
  Regards,

-- 
Thibaut Cousin

[Attachment #5 (application/pgp-signature)]

_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic