Web Architecture/Flow

Software project, creating website

Page 1 of 1

8 Replies - 2460 Views - Last Post: 16 November 2009 - 03:22 AM

#1 godmoktail  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 76
  • Joined: 10-May 08

Web Architecture/Flow

Post icon  Posted 12 November 2009 - 06:02 PM

Hi. I am a student working on a Software Engineering project. Me and my teammates decided to create a website, similar to what craigslist does, but for our school environment (buying, selling products, negotiations done outside of the website). I am trying to figure out what components would go into this project. I'm used to developing desktop applications (C++, C#, Java), but web development is new to me. Additionally, I have no experience with databases. I'm familiar with HTML, PHP, and Perl.

I figure that there would be two components to the system, a server, and a database.
A requirement is that the server be written in C++. I'm not sure exactly what that entails. I suppose it's writing server code to deal with listening to ports, sockets, or some form of communication through the website. Also, I'm guessing (from some googling) that the physical server (tower, hardware) will store the webpages.

Where I get lost is in figuring out what are the subsystems of this system. That is, what goes into making this website project's architecture. This is how I break it down. I'm not sure if it's correct or even in the right direction.

Database: Contains tables, for
--user data (username, pass, bio, transaction history)
--product data (user who posted, description, etc)
--transaction data (history, users involved, etc)

Server: Deals with everything else
--stores webpages
--stores server code (server.cpp, for example) to deal with communication requests (website stuff)
--stores code for an automated system (registration confirmation emails, emails to users, and the like)
--supports threading
--communicates with the database

I'm not sure if I have the components for each subsystem correct. How is an automated system involved? Is the flow as follows: Webpages are loaded from server, server sends data from database to website, user sees website and all the data?

Thanks in advance. All I need is a fundamental understanding of this web-development architecture. I will continue to search online for help. Again, thanks in advance.

Edit: Sorry, didn't notice there was a web-development board. Instead of reposting, I will assume a moderator will move this topic to the appropriate board. Again, sorry for my lack of scrolling.

This post has been edited by godmoktail: 12 November 2009 - 06:08 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Web Architecture/Flow

#2 Oler1s  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1395
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: Web Architecture/Flow

Posted 12 November 2009 - 11:36 PM

You...have to write an HTTP server in C++. While you're not entirely ignorant of the work involved, do you understand the magnitude of the task, in developing a web application directly from scratch in C++? Heck, creating a presentable base HTTP server is bad enough from scratch, you want to serve a web app over it too....

And how much time do you have for this project? How big is your team?
Was This Post Helpful? 0
  • +
  • -

#3 godmoktail  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 76
  • Joined: 10-May 08

Re: Web Architecture/Flow

Posted 13 November 2009 - 09:35 AM

A team of four, and the product should be deliverable by May 2010. A website is different from a web app, no? We want to create a website, which wouldn't be too huge (browsing, searching, posting products). Just the server portion should be written in C++. Also, I'm guessing that webpages written in PHP can access the database. Doesn't seem like a gigantic project. The website can be designed fairly quickly (within a month), the database doesn't seem complicated, while the server seems like the biggest problem due to our inexperience with this type of project.
Was This Post Helpful? 0
  • +
  • -

#4 Oler1s  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1395
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: Web Architecture/Flow

Posted 13 November 2009 - 10:09 AM

Quote

A team of four, and the product should be deliverable by May 2010.
Oh, well then, for a team of four competent developers this isn't a bad deadline then.

Quote

A website is different from a web app, no?
Sure, but you are building a web application. You aren't always spitting out static files, right? Everytime a client requests a page, you have a program (an application) handling that request and forming the correct response.

Quote

Also, I'm guessing that webpages written in PHP can access the database.
Well, as long as there's the appropriate extension (i.e. code) for PHP for handling that database, sure.

Quote

Doesn't seem like a gigantic project.
No, it's not gigantic, but I feel like you're a bit too dismissive or unaware of the amount of work involved.

Quote

while the server seems like the biggest problem due to our inexperience with this type of project.
It most certainly will be. If you intend to use PHP for the web application, your web server, in addition to handling HTTP requests, needs to follow the CGI specification and allow for use of CGIs. That's because PHP can be used in one of two forms. As an Apache module or as a CGI program. Since you are writing your own webserver, then the Apache module is not relevant, and you want to use PHP as a CGI program.

There's two relevant specifications or standards for your server. The HTTP standard and the CGI standard. The HTTP standard I hope you know about. The CGI standard is a contract. If webservers want to use programs on the computer for handling requests, there's obligations on both the behavior of the server and the behavior of the program.

Your project can be immediately broken down into two decoupled components. The work relating to creating this HTTP server. And the work related to the web application. You want to be clear on what work falls in to each category. You should be building your web application like it could run on any web server. For example, during testing, you'll probably use Apache to test the web application. Or lighttpd or whatever suits your fancy.

The HTTP server work is about replicating the functionality needed to handle requests and serve the web application. You don't need to build anything fancy, but your application architecture shouldn't be too narrowminded. That is, everytime an incoming HTTP request comes in, you need some way to flexibly handle this.
Was This Post Helpful? 0
  • +
  • -

#5 godmoktail  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 76
  • Joined: 10-May 08

Re: Web Architecture/Flow

Posted 13 November 2009 - 11:06 AM

I think that I have described the server portion wrong. I believe we will not be creating a web server, but code in C++ to interact with a http web-server (such as Apache). Nevertheless, I guess this server-communication code will still need modules for PHP, and Postgres databases. So far, things are clearing up, but still am not so sure if I got it right.
Was This Post Helpful? 0
  • +
  • -

#6 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Web Architecture/Flow

Posted 13 November 2009 - 11:14 AM

Moved to Web Development :)
Was This Post Helpful? 0
  • +
  • -

#7 Oler1s  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1395
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: Web Architecture/Flow

Posted 13 November 2009 - 12:42 PM

Quote

I believe we will not be creating a web server, but code in C++ to interact with a http web-server (such as Apache).
Great. So what kind of interaction is involved?

Quote

I guess this server-communication code will still need modules for PHP, and Postgres databases. So far, things are clearing up, but still am not so sure if I got it right.
Well, if you know what is going on, that's great. Because we don't. See, largely, all I see is a need for C++, and a need for a website. And it doesn't sound like you know more than that.

Look, you need to be able to drop the jargon and explain what your applications are doing on a very high level. It's clear that you have a PHP web application, like any normal web application. But what is the C++ application doing? You say interacting, but what does "interacting" mean?
Was This Post Helpful? 0
  • +
  • -

#8 godmoktail  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 76
  • Joined: 10-May 08

Re: Web Architecture/Flow

Posted 14 November 2009 - 12:06 PM

I was wrong before. Yes, we will have to create a HTTP server in C++.

Quote

Your project can be immediately broken down into two decoupled components. The work relating to creating this HTTP server. And the work related to the web application. You want to be clear on what work falls in to each category. You should be building your web application like it could run on any web server. For example, during testing, you'll probably use Apache to test the web application. Or lighttpd or whatever suits your fancy.

The HTTP server work is about replicating the functionality needed to handle requests and serve the web application. You don't need to build anything fancy, but your application architecture shouldn't be too narrowminded. That is, everytime an incoming HTTP request comes in, you need some way to flexibly handle this.


I think the above was the answer to my topic.
Was This Post Helpful? 0
  • +
  • -

#9 rhodry_korb  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 67
  • Joined: 14-November 09

Re: Web Architecture/Flow

Posted 16 November 2009 - 03:22 AM

PHP can communicate to a database, such as MySQL, this is how a Content Managment System Works (ie Joomla, or Moodle (LMS)). It is a matter of getting the right code to do it. It is not all that hard.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1