Troy 35 Posting Whiz

Building a stateful web application is possible, but not feasible for most application scenarios. As for why a person may want such a thing? LOTS of reasons. An obvious example is a browser-based chat application. You want all members of the chat to see all messages entered as close to real-time as possible.

The most common and easy to implement solution is to build an "AJAX" solution. If you don't know what AJAX is, search here in the forums or just Google it. In short, it is a way for javascript running in the browser to make separate HTTP/HTTPS requests to your web server. It can do this "in the background" (asynchronously) while the user continues to use the browser application.

So while not truly stateful, you can build a web app that appears to be stateful by having an AJAX request check frequently for server-side changes and then update the client browser accordingly. This could mean that the AJAX request actually retrieves the new information and dynamically changes the page contents or it could mean you fire a page refresh.

Depending on the number of simultaneous users you need to support and the power of your server hardware and bandwith, you can set your AJAX request to fire every 5 seconds or whatever makes sense for your app. You may be able to get away with 3 seconds, but 1 or 2 is simply asking a lot of a browser/webserver relationship. If you code it correctly, …

nav33n commented: nice explanation.. Cheers ! +1
Troy 35 Posting Whiz

Here is some information about this: http://dev.mysql.com/doc/refman/5.0/en/table-locking.html

Thanks for the info and the link. The page at that link sells me on sticking with MyISAM I think.

Troy 35 Posting Whiz

And if what you describe is true, depending on the write frequency of a table, the row-level locking may be faster because additional updates are not waiting for the entire table to unlock. Sounds like reads would always be a tad slower? I don't know of course.

You should probably weigh in the database backup/copy advantages of InnoDB we talked about previously. Those could mean a lot to you.

Isn't the table type something you set per table as you create them? Does the installation process for vBulletin allow you to select your table type? I know apps such as phpBB and Wordpress do not allow you to choose that--so you are going to get MyISAM tables. I suppose their is a process to convert a table's type? I wonder what other gotchas there may be.

Troy 35 Posting Whiz

I'm very interested in this answer, too. Hopefully some light will be shed on this thread.

Troy 35 Posting Whiz

Comatose is correct. Here is more detail.

<script type="text/javascript">
function ElementContent(id,content)
{
    document.getElementById(id).value = content;
}
</script>

<textarea id="ta1">&nbsp;</textarea>
<button value="Click Me!" onclick="ElementContent('ta1','Hey, it works.')" />
Troy 35 Posting Whiz

For simply comparing 2 lists of words for matches, I'd leave the database out of it. You can store your results or the keywords in the database if you want, but for the actual comparison, check out PHP's array_diff() function.
http://www.php.net/manual/en/function.array-diff.php

PS: For the part where you retrieve the headers and meta tags of the pages server-side, I know you said you had this working, but my class_http would make that job quite easy. It's a robust screen-scraping class and even supports making WebDAV requests. It is very easy to use.
http://www.troywolf.com/articles/php/class_http/

Troy 35 Posting Whiz

Debugging tip: You mention that you run the statement in MySql window, and it works, but did you actually copy & paste the statement as generated by your code? Right after you build the $sql variable, output it like so:

echo $sql;
exit();

Then copy & paste that output in your MySql query windows and see if it works. You may find your problem.

Troy 35 Posting Whiz

You can mix and match some tech that is usually Windows with some tech that is normally linux. For example, PHP is usually used on the Linux OS with the Apache web service. But you can use PHP on Windows with IIS. (IIS stands for Internet Information Service and is the free Microsoft web server software. Apache is the standard web service for Linux and Unix.) There are usually some small drawbacks to using any tech on any OS other than what it was originally developed for, so I don't recommend it.

You are correct--once you've decided on an architecture, and start down a path, changing direction probably means a lot of rework. So you want to pick an architecture. I have my preferences, of course, but many times the architecture decision is based on existing hardware, software, and skill sets. For example, I prefer the "LAMP" solution over the Microsoft or Java architectures. LAMP is an acronym for Linux, Apache, MySql, and PHP. But if you told me that you work for a company that already has Windows servers, a Windows network admin, and a programmer who is skilled with C#, VB.NET, or VBScript, I'd say you should probably go more the Microsoft route with ASP or ASP.net web development. If you said you had a team of java programmers and existing UNIX servers and an Oracle database licensed for the web, I'd have to suggest you look into a UNIX/JSP/Oracle architecture.

Do NOT use …

Troy 35 Posting Whiz

Thanks, ae1. As for your "simple website with a few links" need, you probably already have enough experience from working with the MoveableType blog system to create a basic HTML page and include some links on it. If your need is truly for a "basic" website, you could always use a product like FrontPage that come with templates to get you started. (Don't tell anyway I suggested FrontPage. I'll fiercely deny it! :))

Then you mention a database, so I assume what you really want is a browser-based application to help you manage the law-office data needs. When it comes to specialized, data-driven software needs, you have 2 choices. Find something off the shelf that can be made to your needs, or roll your own solution. In 5 minutes on Google, I did not find any existing software packages, but there have to be some out there.

The jump from web page design (working with HTML, CSS, and graphics) to developing a data-driven Internet application is a big one. At your current experience level, if you want this app in the next 6 months, you need to find one or contract to have one built. I wish I had an easier answer for you.

Troy 35 Posting Whiz

You've discovered the truth. This stuff is not easy. It is not user-friendly. When Microsoft asks "Where do you want to go today?", they already know the answer: HELL.

Seriously, though, this stuff is not easy. You'll hear people talking about how great and simple MySql and/or PHP is, but truth is, you still need to be a real programmer to do any real work with this technology. It's not something a person casually plays with in their spare time. It is a skill, that to become good at, will probably need to be your profession or serious hobby. Like most technically difficult things, once you are familiar with the technology, and have some successful experience under your belt, it is "easy", but we can't forget the amount of effort it took to get from point A to point B.

You said "I do not want to be a developer". You can't build the Internet application you describe and not become a "developer". You need to contract this work to someone who can and wants to do it.