Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

General guidelines for developing a web application

As a programmer used to developing native applications, I'm expanding my horizons and developing my first web app. I'm intermediate to expert with Linux and C, intermediate with Python and HTML and beginner to intermediate with MySQL and Java.

I'm developing a web app that is more or less a resource allocator for a friend of mine. To put it simply, I want this program to help him manage jobs, assigning technicians and equipment. The main screen will be an embedded Google Calendar frame that can be updated dynamically via. their API. Now, certain jobs require technicians to hold certain certificates, and equipment must be calibrated on a specific schedule. I would also like to track extra data, such as phone numbers, e-mail addresses, job information, etc. To top it all off, I want it to look nice!

I've spent quite some time familiarizing myself with PHP, JavaScript and the DOM and I've developed some functionality and a neat UI. So far I've been coding server-side w/ PHP to deliver dynamic HTML via. MySQL and then JavaScript to manipulate the DOM. I have tables for technicians, certificates, jobs, phone numbers, etc.

My questions are:

  1. Is there anything missing to my general approach for developing a web app? (Server-side scripting interacts with database to produce dynamic HTML which is then manipulated client-side via. the DOM/client-side scripting).

  2. I chose PHP because it is commonly associated with web development. What are the alternatives? As a beginner I would like to know the "best" server-side language to learn (and I am up for a challenge), or at least be aware of the alternatives.

  3. As far as client-side goes it seems that JavaScript is IT. Is it?

  4. I've heard alot about AJAX but know little to nothing at all about it. Is it an alternative to generating HTML server-side via. a database? What is it/advantages/disadvantages.

  5. I've read that frames are being deprecated. Should I move away from frames and more towards DOM manipulation?

  6. If this application is to be available over the internet I will need to setup a login system of some sort. What are common ways of setting up authentication using hosted or private services?
  7. (Getting a little off topic) Any free hosting suggestions? I'm a student, and hosting the server myself would be unreliable for my friend.
  8. I would really love to implement as much of this project via. Python as possible. What can Python do in terms of programming for the browser and what would it require?
like image 640
Emma Avatar asked Mar 12 '26 07:03

Emma


1 Answers

  1. Is there anything missing to my general approach for developing a web app? (Server-side scripting interacts with database to produce dynamic HTML which is then manipulated client-side via. the DOM/client-side scripting).

No - that's the usual setup. Actually, client-side scripting is quite often missing, and web-page is completely refreshed on any interaction. Your description is perfectly fine.

  1. I chose PHP because it is commonly associated with web development. What are the alternatives? As a beginner I would like to know the "best" server-side language to learn (and I am up for a challenge), or at least be aware of the alternatives.

This is a debatable topic, subject to different tastes, thus usually more suited to community wiki; besides, there's bunch of such questions already.

Very quickly, PHP is most common because it is the easiest to configure, but it has bunch of cruft. Perl is old-school, and rather unreadable. Python and Ruby are currently the hottest, owing to amazing dynamic frameworks (CherryPy and Django vs. Sinatra and Rails), but the rivalry is strong, and everyone has picked a side. I'll tell you Ruby is nicer to work with, but someone else will say the same for Python. However, configuring them is a bit more difficult (i.e. not usually standard option on majority of hosting providers).

  1. As far as client-side goes it seems that JavaScript is IT. Is it?

That's it, if you're talking about HTML. The alternatives died off.

  1. I've heard alot about AJAX but know little to nothing at all about it. Is it an alternative to generating HTML server-side via. a database? What is it/advantages/disadvantages.

AJAX is a fancy name for making a HTTP request from JavaScript without reloading the page. The requested content can be executable JS, or parsable XML, or ready-to-insert HTML... and it is the only method to get some data client-side without refreshing the whole page.

  1. I've read that frames are being deprecated. Should I move away from frames and more towards DOM manipulation?

An emphatic yes. However, iframes have their (limited) uses. You most likely do not need them.

  1. If this application is to be available over the internet I will need to setup a login system of some sort. What are common ways of setting up authentication using hosted or private services?

Username + encrypted password in database, when user enters username + password, encrypt password and check both against the database. If successful, record username in session.

Another way is OpenID, but it requires a third-party OpenID provider.

  1. (Getting a little off topic) Any free hosting suggestions? I'm a student, and hosting the server myself would be unreliable for my friend.

Not too knowledgeable. I know about comyr (general purpose) and heroku (Ruby), both free for non-commercial use, AFAICR, but a bit of research can get you more.

  1. I would really love to implement as much of this project via. Python as possible. What can Python do in terms of programming for the browser and what would it require?

It can do everything in terms of server-side programming, just like any other Turing-complete language. It can do it pretty easily, being a dynamic language with lots of nice libraries targeted for web development. It will not do anything at all for the browser, though. Check out CherryPy for lightweight, and Django for heavyweight web app framework.

But I thought you chose PHP?...

like image 77
Amadan Avatar answered Mar 13 '26 19:03

Amadan