Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Not Available

Guest
Original poster
Jun 30, 2009
318
0
Well... I'm learning PHP and MySQL, and, as I do, I'm rewriting an application for my parents.

The thing is, it is an advanced user management system, but the desktop version was writting by a company which... no longer exists, it is slow, and it does nothing as we expected.

So I decided to rewrite it as a web application, using everything I've learnt so far (HTML, CSS, XML, JavaScript) and what I want to learn from building it (PHP and SQL).

But there are many catches: It's 75% complete, and I went on and tested it. I've added 10 users, and did the basic tasks the application has to do. Compared to the desktop application, it has a blazing-fast speed. But here's the first catch: the desktop application has more than 4000 users and runs on a 4-year-old PC, with 1GB of DDR-400 RAM, a 2Ghz AMD Athlon, and so on. A kind of weak PC. But I've tested what I've created on my brand new MBP (the 2.26Ghz one, with 2GB of RAM), with 10 users :) My question would be, is the final application going to run this fast with 4000 users even on the PC, or is it going to be slow? That is, are web applications faster than desktop applications?

And the second thing is related to databases. The desktop has a MS Access-based database, with a slightly different structure than the one I'm building. My application runs on a MySQL database. So the question would be, is it possible to alter an Access database, merging and deleting columns, and then, porting it to MySQL?

Thanks in advance!
 

lucidmedia

macrumors 6502a
Oct 13, 2008
702
37
Wellington, New Zealand
are web applications faster than desktop applications?

the answer is... depends!

a desktop application that is pulling data from a remote database will still have the latency issues that a web app does...

it also depends on the language you write the app in, and how tightly coupled to hardware you write your software.

If you need a desktop version of your webapp, have you considered something like Adobe Air? It will allow you to wrap your webapp in a desktop application wrapper and enable it to work when there is no network access, etc... you could reuse a great deal of your code that way...

either way, i think it would be worth your while to upload a larger database to work with your webapp testing. In general, 4000 users does not seem that large of a database to me...
 

Not Available

Guest
Original poster
Jun 30, 2009
318
0
Well... the desktop application we currently have is very old. I don't know what language it is written in, but it is dependant of the .NET 1.1 framework.

I don't need a desktop version of my web application. I will install WAMP and have it run LOCALLY, even if I am not connected to the Internet.

I don't know how big it is, but it takes about 10 seconds for the desktop application to load the entire list, and this can be annoying, because there are lots of customers who kind of need the info instantly.
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
Going from 10 to 4000 will slow it, but not by much, at least in of itself. It really depends on the efficiency of your queries that will make a bigger difference. Not knowing all the specifics of what the app is trying to do it's hard to say hard to say if it'll have speed issues, but I don't believe it will.

A quick Google search turned up this tool for doing a Access to MySQL conversions (it runs on Windows).
 

Not Available

Guest
Original poster
Jun 30, 2009
318
0
It really depends on the efficiency of your queries that will make a bigger difference.
Well... I'm still at the beginning, but O'Reilly has many high-quality books on the topics of both SQL and PHP.
Not knowing all the specifics of what the app is trying to do it's hard to say hard to say if it'll have speed issues, but I don't believe it will.
Well... there will be a web form, in which you enter details like name, address, a unique ID, a membership, a registration date, and so on. Then, a confirmation page, which shows the details that were submitted to the database. Then, you can click a button which takes you to a page which lists all the users in the database. There will also be a user removal form.

And this is pretty much it.

I'll look later when I get home into database altering systems.
 

memco

macrumors 6502
May 1, 2008
259
2
SQL should handle large amounts of data better than Access. This may not actually affect you all that much because "large amounts of data" is hundreds of thousands+ rows. In any case, the app shouldn't be all that slow.

One thing you may want to do is stress test the system by adding many more users than you anticipate needing and see how that affects the system. Doing this may show you places where the system is bottlenecking, which should give you ideas on where you can optimize your code.
 

ChrisA

macrumors G5
Jan 5, 2006
12,572
1,682
Redondo Beach, California
Well... I'm learning PHP and MySQL, and, as I do, I'm rewriting an application for my parents. ....[/b]

And the second thing is related to databases. The desktop has a MS Access-based database, with a slightly different structure than the one I'm building. My application runs on a MySQL database. So the question would be, is it possible to alter an Access database, merging and deleting columns, and then, porting it to MySQL?

Thanks in advance![/QUOTE

Don't worry about speed. 4,000 records in a database is so small that it is even hard to justify using a database. With tables that small the entire table ends up getting cached in RAM.

Speed of desktop vs. web apps. You can alway make the desktop app faster. It does not have to intercat with a web server. But for many apps the bottle neck is going to be the user. Most apps spend most of their time waiting for input. If the PC app was slow the reason is that it was very poorly designed. With only 4,000 user it should have been very fast on that PC.

Yes you can dump the Acces data to a comma or tab delimited ascii file then inport that file to MySQL. You can change the columns around eithe in Access, by editing the ascii file or by using MySQL. I'd do it the third way. Define a MySQL table that is identical to the Assess table then from the command line querry that table into the final table with something like "insert ... a,b,c from select ... c,b,a ..."
 

Not Available

Guest
Original poster
Jun 30, 2009
318
0
Well... I do suspect that the desktop application I'm talking about is poorly written, but I don't know enough desktop programming in order to connect to a databse, so all I can do is write a web one which hopefully will be better.

I'm saying "large amounts of data" for an old desktop PC, not a server machine, dedicated to this :)

I think I will simulate with 10.000+ persons on my application, see how it handles it.

Thanks for all your responses, it's been very helpful!
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
are web applications faster than desktop applications?

Nope.*

*Questions like this are loaded. There are obviously a lot of factors involved, so it's impossible to deliver a straight answer. But comparing a decade-old PC to a brand-spanking-new Mac will obviously not be a fair performance test.
 

Not Available

Guest
Original poster
Jun 30, 2009
318
0
Well... on my Mac, everything runs lovely. The 10.000-user database loads instantaneously. A 500.000 does knee it, though (tested by a bug in the script, used WHILE without incrementing :) ).

I think I'm going to take a different approach, though. I won't load the database on the page, as no one ever looks at it. Instead, I will create a form, and only return a page with the information needed.

Anyway, this's got me intrigued, so I will look into database tuning and try make it load as fast as possible.

Tomorrow I will run the test on the end-machine as well :)

One decade later...
I've implemented the search feature, got rid of the old system. I think it is going to run instantaneously on the PC as well.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.